url
stringlengths
58
61
repository_url
stringclasses
1 value
labels_url
stringlengths
72
75
comments_url
stringlengths
67
70
events_url
stringlengths
65
68
html_url
stringlengths
46
51
id
int64
599M
1.83B
node_id
stringlengths
18
32
number
int64
1
6.09k
title
stringlengths
1
290
labels
list
state
stringclasses
2 values
locked
bool
1 class
milestone
dict
comments
int64
0
54
created_at
stringlengths
20
20
updated_at
stringlengths
20
20
closed_at
stringlengths
20
20
βŒ€
active_lock_reason
null
body
stringlengths
0
228k
βŒ€
reactions
dict
timeline_url
stringlengths
67
70
performed_via_github_app
null
state_reason
stringclasses
3 values
draft
bool
2 classes
pull_request
dict
is_pull_request
bool
2 classes
comments_text
sequence
https://api.github.com/repos/huggingface/datasets/issues/2045
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/2045/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/2045/comments
https://api.github.com/repos/huggingface/datasets/issues/2045/events
https://github.com/huggingface/datasets/pull/2045
830,351,527
MDExOlB1bGxSZXF1ZXN0NTkxODc2Mjcz
2,045
Preserve column ordering in Dataset.rename_column
[]
closed
false
null
2
2021-03-12T18:26:47Z
2021-03-16T14:48:05Z
2021-03-16T14:35:05Z
null
Currently `Dataset.rename_column` doesn't necessarily preserve the order of the columns: ```python >>> from datasets import Dataset >>> d = Dataset.from_dict({'sentences': ["s1", "s2"], 'label': [0, 1]}) >>> d Dataset({ features: ['sentences', 'label'], num_rows: 2 }) >>> d.rename_column('sentences', 'text') Dataset({ features: ['label', 'text'], num_rows: 2 }) ``` This PR fixes 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/2045/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/2045/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/2045.diff", "html_url": "https://github.com/huggingface/datasets/pull/2045", "merged_at": "2021-03-16T14:35:05Z", "patch_url": "https://github.com/huggingface/datasets/pull/2045.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/2045" }
true
[ "Not sure why CI isn't triggered.\r\n\r\n@lhoestq Can you please help me with this? ", "I don't know how to trigger it manually, but an empty commit should do the job" ]
https://api.github.com/repos/huggingface/datasets/issues/552
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/552/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/552/comments
https://api.github.com/repos/huggingface/datasets/issues/552/events
https://github.com/huggingface/datasets/pull/552
690,079,429
MDExOlB1bGxSZXF1ZXN0NDc3MDI4MzMx
552
Add multiprocessing
[]
closed
false
null
10
2020-09-01T11:56:17Z
2020-09-22T15:11:56Z
2020-09-02T10:01:25Z
null
Adding multiprocessing to `.map` It works in 3 steps: - shard the dataset in `num_proc` shards - spawn one process per shard and call `map` on them - concatenate the resulting datasets Example of usage: ```python from nlp import load_dataset dataset = load_dataset("squad", split="train") def function(x): return {"lowered": x.lower()} processed = d.map( function, input_columns=["context"], num_proc=4, cache_file_name="playground/tmp.arrow", load_from_cache_file=False ) ``` Here it writes 4 files depending on the process rank: - `playground/tmp_00000_of_00004.arrow` - `playground/tmp_00001_of_00004.arrow` - `playground/tmp_00002_of_00004.arrow` - `playground/tmp_00003_of_00004.arrow` The suffix format can be specified by the user. If the `cache_file_name` is not specified, it writes into separated files depending on the fingerprint, as usual. I still need to: - write tests for this - try to improve the logging (currently it shows 4 progress bars, but if one finishes before the others, then the following messages are written over the progress bars)
{ "+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/552/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/552/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/552.diff", "html_url": "https://github.com/huggingface/datasets/pull/552", "merged_at": "2020-09-02T10:01:25Z", "patch_url": "https://github.com/huggingface/datasets/pull/552.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/552" }
true
[ "Logging looks like\r\n\r\n```\r\nDone writing 21900 indices in 3854400 bytes .\r\nProcess #0 will write at playground/tmp_00000_of_00004.arrow\r\nDone writing 21900 indices in 3854400 bytes .\r\nProcess #1 will write at playground/tmp_00001_of_00004.arrow\r\nDone writing 21900 indices in 3854400 bytes .\r\nProcess #2 will write at playground/tmp_00002_of_00004.arrow\r\nDone writing 21899 indices in 3854224 bytes .\r\nProcess #3 will write at playground/tmp_00003_of_00004.arrow\r\nSpawning 4 processes\r\n#3: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 21899/21899 [00:02<00:00, 8027.41ex/s]\r\n#0: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 21900/21900 [00:02<00:00, 7982.87ex/s]\r\n#1: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 21900/21900 [00:02<00:00, 7923.89ex/s]\r\n#2: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 21900/21900 [00:02<00:00, 7920.04ex/s]\r\nConcatenating 4 shards from multiprocessing\r\n```", "I added tests and improved logging.\r\nBoth `map` and `filter` support multiprocessing", "A bit strange that the benchmarks on map/filter are worth than `master`.\r\n(maybe because they are not done on the same machine)", "The benchmark also got worse in other PRs (see [here](https://github.com/huggingface/nlp/pull/550#commitcomment-41931609) for example, where we have 16sec for `map fast-tokenizer batched` and 18 sec for `map identity`)", "Hi,\r\n\r\nwhen I use the multiprocessing in ```.map```:\r\n```\r\ndataset = load_dataset(\"text\", data_files=file_path, split=\"train\")\r\ndataset = dataset.map(lambda ex: tokenizer(ex[\"text\"], add_special_tokens=True,\r\n truncation=True, max_length=args.block_size), batched=True, num_proc=16)\r\ndataset.set_format(type='torch', columns=['input_ids'])\r\n```\r\nI get the following error:\r\n```\r\nTraceback (most recent call last):\r\n File \"src/run.py\", line 373, in <module>\r\n main()\r\n File \"src/run.py\", line 295, in main\r\n get_dataset(data_args, tokenizer=tokenizer, cache_dir=model_args.cache_dir) if training_args.do_train else None\r\n File \"src/run.py\", line 153, in get_dataset\r\n dataset = dataset.map(lambda ex: tokenizer(ex[\"text\"], add_special_tokens=True,\r\n File \"/root/miniconda3/envs/py3.8/lib/python3.8/site-packages/datasets/arrow_dataset.py\", line 1287, in map\r\n transformed_shards = [r.get() for r in results]\r\n File \"/root/miniconda3/envs/py3.8/lib/python3.8/site-packages/datasets/arrow_dataset.py\", line 1287, in <listcomp>\r\n transformed_shards = [r.get() for r in results]\r\n File \"/root/miniconda3/envs/py3.8/lib/python3.8/multiprocessing/pool.py\", line 771, in get\r\n raise self._value\r\n put(task)\r\n File \"/root/miniconda3/envs/py3.8/lib/python3.8/multiprocessing/connection.py\", line 206, in send\r\n self._send_bytes(_ForkingPickler.dumps(obj))\r\n File \"/root/miniconda3/envs/py3.8/lib/python3.8/multiprocessing/reduction.py\", line 51, in dumps\r\n cls(buf, protocol).dump(obj)\r\nAttributeError: Can't pickle local object 'get_dataset.<locals>.<lambda>'\r\n```\r\nI think you should use [pathos](https://github.com/uqfoundation/pathos) to pickle the lambda function and some others!\r\nI change the 30 line of src/datasets/arrow_dataset.py as following:\r\n```\r\n# 30 line: from multiprocessing import Pool, RLock\r\nimport pathos\r\nfrom pathos.multiprocessing import Pool\r\nfrom multiprocessing import RLock\r\n```\r\nand it works!", "That's very cool indeed !\r\nShall we condiser adding this dependency @thomwolf ?", "We already use `dill` so that's definitely a very interesting option indeed!", "it gets stuck on debian 9 when num_proc > 1\r\n", "Are you using a tokenizer ?\r\nDid you try to set `TOKENIZERS_PARALLELISM=false` ?\r\n\r\nFeel free to discuss it in #620 , we're discussing this issue", "I set `TOKENIZERS_PARALLELISM=false`. Just the warning went away. The program was still stuck\r\n" ]
https://api.github.com/repos/huggingface/datasets/issues/1527
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1527/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1527/comments
https://api.github.com/repos/huggingface/datasets/issues/1527/events
https://github.com/huggingface/datasets/pull/1527
764,638,504
MDExOlB1bGxSZXF1ZXN0NTM4NjA3MjQw
1,527
Add : Conv AI 2 (Messed up original PR)
[]
closed
false
null
0
2020-12-13T00:21:14Z
2020-12-13T19:14:24Z
2020-12-13T19:14:24Z
null
@lhoestq Sorry I messed up the previous 2 PR's -> https://github.com/huggingface/datasets/pull/1462 -> https://github.com/huggingface/datasets/pull/1383. So created a new one. Also, everything is fixed in this PR. Can you please review it ? Thanks in advance.
{ "+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/1527/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1527/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/1527.diff", "html_url": "https://github.com/huggingface/datasets/pull/1527", "merged_at": "2020-12-13T19:14:24Z", "patch_url": "https://github.com/huggingface/datasets/pull/1527.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/1527" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/830
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/830/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/830/comments
https://api.github.com/repos/huggingface/datasets/issues/830/events
https://github.com/huggingface/datasets/issues/830
740,065,376
MDU6SXNzdWU3NDAwNjUzNzY=
830
[GEM] add ToTTo Table-to-text dataset
[ { "color": "e99695", "default": false, "description": "Requesting to add a new dataset", "id": 2067376369, "name": "dataset request", "node_id": "MDU6TGFiZWwyMDY3Mzc2MzY5", "url": "https://api.github.com/repos/huggingface/datasets/labels/dataset%20request" } ]
closed
false
null
1
2020-11-10T16:38:34Z
2020-12-10T13:06:02Z
2020-12-10T13:06:01Z
null
## Adding a Dataset - **Name:** ToTTo - **Description:** ToTTo is an open-domain English table-to-text dataset with over 120,000 training examples that proposes a controlled generation task: given a Wikipedia table and a set of highlighted table cells, produce a one-sentence description. - **Paper:** https://arxiv.org/abs/2004.14373 - **Data:** https://github.com/google-research-datasets/totto - **Motivation:** Included in the GEM shared task Instructions to add a new dataset can be found [here](https://huggingface.co/docs/datasets/share_dataset.html).
{ "+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/830/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/830/timeline
null
completed
null
null
false
[ "closed via #1098 " ]
https://api.github.com/repos/huggingface/datasets/issues/2093
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/2093/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/2093/comments
https://api.github.com/repos/huggingface/datasets/issues/2093/events
https://github.com/huggingface/datasets/pull/2093
837,209,211
MDExOlB1bGxSZXF1ZXN0NTk3NTgyNjUx
2,093
Fix: Allows a feature to be named "_type"
[]
closed
false
null
4
2021-03-21T23:21:57Z
2021-03-25T14:35:54Z
2021-03-25T14:35:54Z
null
This PR tries to fix issue #1110. Sorry for taking so long to come back to this. It's a simple fix, but i am not sure if it works for all possible types of `obj`. Let me know what you think @lhoestq
{ "+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/2093/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/2093/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/2093.diff", "html_url": "https://github.com/huggingface/datasets/pull/2093", "merged_at": "2021-03-25T14:35:54Z", "patch_url": "https://github.com/huggingface/datasets/pull/2093.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/2093" }
true
[ "Nice thank you !\r\nThis looks like a pretty simple yet effective fix ;)\r\nCould you just add a test in `test_features.py` to make sure that you can create `features` with a `_type` field and that it is possible to convert it as a dict and reload it ?\r\n```python\r\nfrom datasets import Features, Value\r\n\r\n# We usually use `asdict` on a `DatasetInfo` object which is a dataclass instance that contains the features.\r\n# So we need the conversion of features to dict to work.\r\n# You can test that using `dataclasses._asdict_inner`.\r\n# This is the function used by `dataclasses.asdict` to convert a dataclass instance attribute to a dict\r\nfrom dataclasses import _asdict_inner \r\n\r\nf = Features({\"_type\": Value(\"string\")})\r\nreloaded_f = Features.from_dict(_asdict_inner(f, dict))\r\nassert reloaded_f == f\r\n```", "Sure, i will add a test. \r\nOne question: are the posted benchmarks reliable? The extra type check seems to add quite some overhead judging by the relative differences. Do you think this is an issue?", "The benchmark has a bit of noise, the values are fine ;)\r\nespecially in the change you did since the overhead added is negligible.", "Ok, i added the test you described above. \r\n\r\nI avoided importing the private `_asdict_inner` method and directly used the `DatasetInfo` class, if this is ok with you. Thanks a lot for your support during this PR!" ]
https://api.github.com/repos/huggingface/datasets/issues/565
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/565/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/565/comments
https://api.github.com/repos/huggingface/datasets/issues/565/events
https://github.com/huggingface/datasets/issues/565
691,039,121
MDU6SXNzdWU2OTEwMzkxMjE=
565
No module named 'nlp.logging'
[]
closed
false
null
2
2020-09-02T13:49:50Z
2020-09-03T07:29:50Z
2020-09-03T07:29:50Z
null
Hi, I am using nlp version 0.4.0. Trying to use bleurt as an eval metric, however, the bleurt script imports nlp.logging which creates the following error. What am I missing? ``` >>> import nlp 2020-09-02 13:47:09.210310: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1 >>> bleurt = nlp.load_metric("bleurt") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/melody/anaconda3/envs/transformers/lib/python3.6/site-packages/nlp/load.py", line 443, in load_metric metric_cls = import_main_class(module_path, dataset=False) File "/home/melody/anaconda3/envs/transformers/lib/python3.6/site-packages/nlp/load.py", line 61, in import_main_class module = importlib.import_module(module_path) File "/home/melody/anaconda3/envs/transformers/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/melody/anaconda3/envs/transformers/lib/python3.6/site-packages/nlp/metrics/bleurt/43448cf2959ea81d3ae0e71c5c8ee31dc15eed9932f197f5f50673cbcecff2b5/bleurt.py", line 20, in <module> from nlp.logging import get_logger ModuleNotFoundError: No module named 'nlp.logging' ``` Just to show once again that I can't import the logging module: ``` >>> import nlp 2020-09-02 13:48:38.190621: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1 >>> nlp.__version__ '0.4.0' >>> from nlp.logging import get_logger Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'nlp.logging' ```
{ "+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/565/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/565/timeline
null
completed
null
null
false
[ "Thanks for reporting.\r\n\r\nApparently this is a versioning issue: the lib downloaded the `bleurt` script from the master branch where we did this change recently. We'll fix that in a new release this week or early next week. Cc @thomwolf \r\n\r\nUntil that, I'd suggest you to download the right bleurt folder from github ([this one](https://github.com/huggingface/nlp/tree/0.4.0/metrics/bleurt)) and do\r\n\r\n```python\r\nfrom nlp import load_metric\r\n\r\nbleurt = load_metric(\"path/to/bleurt/folder\")\r\n```\r\n\r\nTo download it you can either clone the repo or download the `bleurt.py` file and place it in a folder named `bleurt` ", "Actually we can fix this on our side, this script didn't had to be updated. I'll do it in a few minutes" ]
https://api.github.com/repos/huggingface/datasets/issues/4844
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/4844/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/4844/comments
https://api.github.com/repos/huggingface/datasets/issues/4844/events
https://github.com/huggingface/datasets/pull/4844
1,337,878,249
PR_kwDODunzps49IFLa
4,844
Add 'val' to VALIDATION_KEYWORDS.
[]
closed
false
null
5
2022-08-13T06:49:41Z
2022-08-30T10:17:35Z
2022-08-30T10:14:54Z
null
This PR fixes #4839 by adding the word `"val"` to the `VALIDATION_KEYWORDS` so that the `load_dataset()` method with `imagefolder` (and probably, some other directives as well) reads folders named `"val"` as well. I think the supported keywords have to be mentioned in the documentation as well, but I couldn't think of a proper place to add that.
{ "+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/4844/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/4844/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/4844.diff", "html_url": "https://github.com/huggingface/datasets/pull/4844", "merged_at": "2022-08-30T10:14:54Z", "patch_url": "https://github.com/huggingface/datasets/pull/4844.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/4844" }
true
[ "@mariosasko not sure about how the reviewing process works. Maybe you can have a look because we discussed this elsewhere?", "Hi, thanks! \r\n\r\nLet's add one pattern with `val` to this test before merging: \r\nhttps://github.com/huggingface/datasets/blob/b88a656cf94c4ad972154371c83c1af759fde522/tests/test_data_files.py#L598", "_The documentation is not available anymore as the PR was closed or merged._", "@akt42 note that there is some info about splits keywords in the docs: https://huggingface.co/docs/datasets/main/en/repository_structure#split-names-keywords. I agree it's not clear that it applies not only to filenames, but to directories as well.\r\n\r\nI think \"val\" should be now added to the documentation source file here: https://github.com/huggingface/datasets/blob/main/docs/source/repository_structure.mdx?plain=1#L98", "@polinaeterna Thanks for notifying us that there is a list of supported keywords\r\n\r\nI've added \"val\" to that list and a test." ]
https://api.github.com/repos/huggingface/datasets/issues/643
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/643/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/643/comments
https://api.github.com/repos/huggingface/datasets/issues/643/events
https://github.com/huggingface/datasets/issues/643
704,477,164
MDU6SXNzdWU3MDQ0NzcxNjQ=
643
Caching processed dataset at wrong folder
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
closed
false
null
13
2020-09-18T15:41:26Z
2022-02-16T14:53:29Z
2022-02-16T14:53:29Z
null
Hi guys, I run this on my Colab (PRO): ```python from datasets import load_dataset dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train') def encode(examples): return tokenizer(examples['text'], truncation=True, padding='max_length') dataset = dataset.map(encode, batched=True) ``` The file is about 4 GB, so I cannot process it on the Colab HD because there is no enough space. So I decided to mount my Google Drive fs and do it on it. The dataset is cached in the right place but by processing it (applying `encode` function) seems to use a different folder because Colab HD starts to grow and it crashes when it should be done in the Drive fs. What gets me crazy, it prints it is processing/encoding the dataset in the right folder: ``` Testing the mapped function outputs Testing finished, running the mapping function on the dataset Caching processed dataset at /content/drive/My Drive/text/default-ad3e69d6242ee916/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/cache-b16341780a59747d.arrow ```
{ "+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/643/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/643/timeline
null
completed
null
null
false
[ "Thanks for reporting !\r\nIt uses a temporary file to write the data.\r\nHowever it looks like the temporary file is not placed in the right directory during the processing", "Well actually I just tested and the temporary file is placed in the same directory, so it should work as expected.\r\nWhich version of `datasets` are you using ?", "`datasets-1.0.1`\r\nHere you can reproduce it here:\r\nhttps://colab.research.google.com/drive/1O0KcepTFsmpkBbrbLLMq42iwTKmQh8d5?usp=sharing\r\n", "It looks like a pyarrow issue with google colab.\r\nFor some reason this code increases the disk usage of google colab while it actually writes into google drive:\r\n\r\n```python\r\nimport pyarrow as pa\r\n\r\nstream = pa.OSFile(\"/content/drive/My Drive/path/to/file.arrow\", \"wb\")\r\nwriter = pa.RecordBatchStreamWriter(stream, schema=pa.schema({\"text\": pa.string()}))\r\nwriter.write_table(pa.Table.from_pydict({\"text\": [\"a\"*511 + \"\\n\"] * ((1 << 30) // 512)})) # 1GiB\r\nwriter.close()\r\nstream.close()\r\n```\r\n\r\nMoreover if I `rm` the file on google drive, it frees disk space on google colab.", "It looks like replacing `pa.OSFile` by `open` fixes it, I'm going to open a PR", "Ok. Thank you so much!", "Actually I did more tests it doesn't >.<\r\nI'll let you know if I find a way to fix that", "Actually I also have the issue when writing a regular text file\r\n\r\n```python\r\nf = open(\"/content/drive/My Drive/path/to/file\", \"w\")\r\nf.write((\"a\"*511 + \"\\n\") * ((1 << 30) // 512)) # 1GiB\r\nf.close()\r\n```\r\n\r\nIs that supposed to happen ?", "The code you wrote should write a 1GB file in the Google Drive folder. Doesn't it? ", "Yes it does, but the disk usage of google colab also increases by 1GB", "I could check it and as you say as I write to te Drive disk the colab disk also increases...", "To reproduce it: \r\n```bash\r\n!df -h | grep sda1\r\n```\r\n```python\r\nf = open(\"/content/drive/My Drive/test_to_remove.txt\", \"w\")\r\nf.write((\"a\"*511 + \"\\n\") * ((1 << 30) // 512)) # 1GiB\r\nf.write((\"a\"*511 + \"\\n\") * ((1 << 30) // 512)) # 1GiB\r\nf.close()\r\n```\r\n```bash\r\n!ls -lh /content/drive/My\\ Drive/test_to_remove.txt\r\n\r\n!df -h | grep sda1\r\n\r\n!rm -rf /content/drive/My\\ Drive/test_to_remove.txt\r\n\r\n```\r\n[Colab](https://colab.research.google.com/drive/1D0UiweCYQwwWZ65EEhuqqbaDDbhJYXfm?usp=sharing)\r\n\r\n\r\n", "Apparently, Colab uses a local cache of the data files read/written from Google Drive. See:\r\n- https://github.com/googlecolab/colabtools/issues/2087#issuecomment-860818457\r\n- https://github.com/googlecolab/colabtools/issues/1915#issuecomment-804234540\r\n- https://github.com/googlecolab/colabtools/issues/2147#issuecomment-885052636" ]
https://api.github.com/repos/huggingface/datasets/issues/1373
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1373/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1373/comments
https://api.github.com/repos/huggingface/datasets/issues/1373/events
https://github.com/huggingface/datasets/pull/1373
760,280,869
MDExOlB1bGxSZXF1ZXN0NTM1MTM5MTY0
1,373
Add OPUS ECB Dataset
[]
closed
false
null
0
2020-12-09T12:18:22Z
2020-12-10T15:25:55Z
2020-12-10T15:25:54Z
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/1373/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1373/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/1373.diff", "html_url": "https://github.com/huggingface/datasets/pull/1373", "merged_at": "2020-12-10T15:25:54Z", "patch_url": "https://github.com/huggingface/datasets/pull/1373.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/1373" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/2519
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/2519/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/2519/comments
https://api.github.com/repos/huggingface/datasets/issues/2519/events
https://github.com/huggingface/datasets/pull/2519
924,903,240
MDExOlB1bGxSZXF1ZXN0NjczNDcyMzYy
2,519
Improve performance of pandas arrow extractor
[]
closed
false
null
4
2021-06-18T13:24:41Z
2021-06-21T09:06:06Z
2021-06-21T09:06:06Z
null
While reviewing PR #2505, I noticed that pandas arrow extractor could be refactored to be faster.
{ "+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/2519/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/2519/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/2519.diff", "html_url": "https://github.com/huggingface/datasets/pull/2519", "merged_at": "2021-06-21T09:06:06Z", "patch_url": "https://github.com/huggingface/datasets/pull/2519.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/2519" }
true
[ "Looks like this change\r\n```\r\npa_table[pa_table.column_names[0]].to_pandas(types_mapper=pandas_types_mapper)\r\n```\r\ndoesn't return a Series with the correct type.\r\nThis is related to https://issues.apache.org/jira/browse/ARROW-9664\r\n\r\nSince the types_mapper isn't taken into account, the ArrayXD types are not converted to the correct pandas extension dtype", "@lhoestq I think I found a workaround... πŸ˜‰ ", "For some reason the benchmarks are not run Oo", "Anyway, merging.\r\nWe'll see on master how much speed ups we got" ]
https://api.github.com/repos/huggingface/datasets/issues/4818
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/4818/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/4818/comments
https://api.github.com/repos/huggingface/datasets/issues/4818/events
https://github.com/huggingface/datasets/pull/4818
1,334,941,810
PR_kwDODunzps48-W7a
4,818
Add add cc-by-sa-2.5 license tag
[]
closed
false
null
2
2022-08-10T17:18:39Z
2022-10-04T13:47:24Z
2022-10-04T13:47:24Z
null
- [ ] add it to moon-landing - [ ] add it to hub-docs
{ "+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/4818/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/4818/timeline
null
null
true
{ "diff_url": "https://github.com/huggingface/datasets/pull/4818.diff", "html_url": "https://github.com/huggingface/datasets/pull/4818", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/4818.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/4818" }
true
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_4818). All of your documentation changes will be reflected on that endpoint.", "I think we can close this PR because the `standard_licenses.tsv` file was removed from this repo and we no longer perform any dataset card validation." ]
https://api.github.com/repos/huggingface/datasets/issues/4274
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/4274/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/4274/comments
https://api.github.com/repos/huggingface/datasets/issues/4274/events
https://github.com/huggingface/datasets/pull/4274
1,224,740,303
PR_kwDODunzps43Qm2w
4,274
Add API code examples for IterableDataset
[ { "color": "0075ca", "default": true, "description": "Improvements or additions to documentation", "id": 1935892861, "name": "documentation", "node_id": "MDU6TGFiZWwxOTM1ODkyODYx", "url": "https://api.github.com/repos/huggingface/datasets/labels/documentation" } ]
closed
false
null
1
2022-05-03T22:44:17Z
2022-05-04T16:29:32Z
2022-05-04T16:22:04Z
null
This PR adds API code examples for `IterableDataset` and `IterableDatasetDicts`.
{ "+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/4274/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/4274/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/4274.diff", "html_url": "https://github.com/huggingface/datasets/pull/4274", "merged_at": "2022-05-04T16:22:04Z", "patch_url": "https://github.com/huggingface/datasets/pull/4274.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/4274" }
true
[ "_The documentation is not available anymore as the PR was closed or merged._" ]
https://api.github.com/repos/huggingface/datasets/issues/731
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/731/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/731/comments
https://api.github.com/repos/huggingface/datasets/issues/731/events
https://github.com/huggingface/datasets/pull/731
721,142,985
MDExOlB1bGxSZXF1ZXN0NTAzMTExNzc4
731
dataset(aslg_pc12): initial loading script
[]
closed
false
null
3
2020-10-14T05:14:37Z
2020-10-28T15:27:06Z
2020-10-28T15:27:06Z
null
This contains the only current public part of this corpus. The rest of the corpus is not yet been made public, but this sample is still being used by researchers.
{ "+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/731/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/731/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/731.diff", "html_url": "https://github.com/huggingface/datasets/pull/731", "merged_at": "2020-10-28T15:27:06Z", "patch_url": "https://github.com/huggingface/datasets/pull/731.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/731" }
true
[ "Thanks @lhoestq \r\nAre there any guidelines for the dummy data?\r\nIn this particular case for example, the dataset fetches from two hardcoded URLs. \r\nDo I just `head -n 10` both files and zip them?\r\n\r\n", "> Thanks @lhoestq\r\n> Are there any guidelines for the dummy data?\r\n> In this particular case for example, the dataset fetches from two hardcoded URLs.\r\n> Do I just `head -n 10` both files and zip them?\r\n\r\nYes the idea is just to have a few examples to properly test the script and make sure it keeps working in the long run.\r\n\r\nAnd FYI there's a command to help you name the dummy data files correctly. More info in the documentation [here](https://huggingface.co/docs/datasets/share_dataset.html#adding-dummy-data)", "@lhoestq passes all tests" ]
https://api.github.com/repos/huggingface/datasets/issues/3867
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3867/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3867/comments
https://api.github.com/repos/huggingface/datasets/issues/3867/events
https://github.com/huggingface/datasets/pull/3867
1,162,896,605
PR_kwDODunzps40Hjrk
3,867
Update for the rename doc-builder -> hf-doc-utils
[]
closed
false
null
4
2022-03-08T16:58:25Z
2022-03-08T17:30:45Z
2022-03-08T17:30:45Z
null
This PR adapts the job to the upcoming change of name of `doc-builder`.
{ "+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/3867/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3867/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/3867.diff", "html_url": "https://github.com/huggingface/datasets/pull/3867", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/3867.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/3867" }
true
[ "why utils? it's a builder no?", "~~@julien-c there was a vote πŸ™‚ https://huggingface.slack.com/archives/C021H1P1HKR/p1646405136644739~~\r\n\r\noh I see you already commeented in the thread as well", "Thanks ! It looks all good to me (provided `hf-doc-utils` is the name we keep in the end). I'm fine with this name, and `hf-doc-builder` is also fine IMHO", "ok, this is definitely not a hill I'll die on =) @mishig25 @sgugger " ]
https://api.github.com/repos/huggingface/datasets/issues/422
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/422/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/422/comments
https://api.github.com/repos/huggingface/datasets/issues/422/events
https://github.com/huggingface/datasets/pull/422
663,028,497
MDExOlB1bGxSZXF1ZXN0NDU0NTE3MDU2
422
- Corrected encoding for IMDB.
[]
closed
false
null
0
2020-07-21T13:46:59Z
2020-07-22T16:02:53Z
2020-07-22T16:02:53Z
null
The preparation phase (after the download phase) crashed on windows because of charmap encoding not being able to decode certain characters. This change suggested in Issue #347 fixes it for the IMDB dataset.
{ "+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/422/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/422/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/422.diff", "html_url": "https://github.com/huggingface/datasets/pull/422", "merged_at": "2020-07-22T16:02:53Z", "patch_url": "https://github.com/huggingface/datasets/pull/422.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/422" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/2388
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/2388/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/2388/comments
https://api.github.com/repos/huggingface/datasets/issues/2388/events
https://github.com/huggingface/datasets/issues/2388
897,767,470
MDU6SXNzdWU4OTc3Njc0NzA=
2,388
Incorrect URLs for some datasets
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
closed
false
null
0
2021-05-21T07:22:35Z
2021-06-04T17:39:45Z
2021-06-04T17:39:45Z
null
## Describe the bug It seems that the URLs for the following datasets are invalid: - [ ] `bn_hate_speech` has been renamed: https://github.com/rezacsedu/Bengali-Hate-Speech-Dataset/commit/c67ecfc4184911e12814f6b36901f9828df8a63a - [ ] `covid_tweets_japanese` has been renamed: http://www.db.info.gifu-u.ac.jp/covid-19-twitter-dataset/ As a result we can no longer load these datasets using `load_dataset`. The simple fix is to rename the URL in the dataset script - will do this asap. ## Steps to reproduce the bug ```python from datasets import load_dataset # pick one of the datasets from the list above ds = load_dataset("bn_hate_speech") ``` ## Expected results Dataset loads without error. ## Actual results ``` Downloading: 3.36kB [00:00, 1.07MB/s] Downloading: 2.03kB [00:00, 678kB/s] Using custom data configuration default Downloading and preparing dataset bn_hate_speech/default (download: 951.48 KiB, generated: 949.84 KiB, post-processed: Unknown size, total: 1.86 MiB) to /Users/lewtun/.cache/huggingface/datasets/bn_hate_speech/default/0.0.0/a2dc726e511a2177523301bcad196af05d4d8a2cff30d2769ba8aacc1f5fdb5c... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/lewtun/miniconda3/envs/hf-hub_eval/lib/python3.8/site-packages/datasets/load.py", line 744, in load_dataset builder_instance.download_and_prepare( File "/Users/lewtun/miniconda3/envs/hf-hub_eval/lib/python3.8/site-packages/datasets/builder.py", line 574, in download_and_prepare self._download_and_prepare( File "/Users/lewtun/miniconda3/envs/hf-hub_eval/lib/python3.8/site-packages/datasets/builder.py", line 630, in _download_and_prepare split_generators = self._split_generators(dl_manager, **split_generators_kwargs) File "/Users/lewtun/.cache/huggingface/modules/datasets_modules/datasets/bn_hate_speech/a2dc726e511a2177523301bcad196af05d4d8a2cff30d2769ba8aacc1f5fdb5c/bn_hate_speech.py", line 76, in _split_generators train_path = dl_manager.download_and_extract(_URL) File "/Users/lewtun/miniconda3/envs/hf-hub_eval/lib/python3.8/site-packages/datasets/utils/download_manager.py", line 287, in download_and_extract return self.extract(self.download(url_or_urls)) File "/Users/lewtun/miniconda3/envs/hf-hub_eval/lib/python3.8/site-packages/datasets/utils/download_manager.py", line 195, in download downloaded_path_or_paths = map_nested( File "/Users/lewtun/miniconda3/envs/hf-hub_eval/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 195, in map_nested return function(data_struct) File "/Users/lewtun/miniconda3/envs/hf-hub_eval/lib/python3.8/site-packages/datasets/utils/download_manager.py", line 218, in _download return cached_path(url_or_filename, download_config=download_config) File "/Users/lewtun/miniconda3/envs/hf-hub_eval/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 281, in cached_path output_path = get_from_cache( File "/Users/lewtun/miniconda3/envs/hf-hub_eval/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 621, in get_from_cache raise FileNotFoundError("Couldn't find file at {}".format(url)) FileNotFoundError: Couldn't find file at https://raw.githubusercontent.com/rezacsedu/Bengali-Hate-Speech-Dataset/main/Bengali_%20Hate_Speech_Dataset_Subset.csv ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2.dev0 - Platform: macOS-10.16-x86_64-i386-64bit - Python version: 3.8.8 - PyArrow version: 3.0.0
{ "+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/2388/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/2388/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/5042
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5042/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5042/comments
https://api.github.com/repos/huggingface/datasets/issues/5042/events
https://github.com/huggingface/datasets/pull/5042
1,390,762,877
PR_kwDODunzps4_2eqa
5,042
Update swiss judgment prediction
[ { "color": "0e8a16", "default": false, "description": "Contribution to a dataset script", "id": 4564477500, "name": "dataset contribution", "node_id": "LA_kwDODunzps8AAAABEBBmPA", "url": "https://api.github.com/repos/huggingface/datasets/labels/dataset%20contribution" } ]
closed
false
null
1
2022-09-29T12:10:02Z
2022-09-30T07:14:00Z
2022-09-29T14:32:02Z
null
I forgot to add the new citation.
{ "+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/5042/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5042/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/5042.diff", "html_url": "https://github.com/huggingface/datasets/pull/5042", "merged_at": "2022-09-29T14:32:02Z", "patch_url": "https://github.com/huggingface/datasets/pull/5042.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5042" }
true
[ "_The documentation is not available anymore as the PR was closed or merged._" ]
https://api.github.com/repos/huggingface/datasets/issues/5927
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5927/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5927/comments
https://api.github.com/repos/huggingface/datasets/issues/5927/events
https://github.com/huggingface/datasets/issues/5927
1,744,009,032
I_kwDODunzps5n83dI
5,927
`IndexError` when indexing `Sequence` of `Array2D` with `None` values
[]
closed
false
null
2
2023-06-06T14:36:22Z
2023-06-13T12:39:39Z
2023-06-09T13:23:50Z
null
### Describe the bug Having `None` values in a `Sequence` of `ArrayND` fails. ### Steps to reproduce the bug ```python from datasets import Array2D, Dataset, Features, Sequence data = [ [ [[0]], None, None, ] ] feature = Sequence(Array2D((1, 1), dtype="int64")) dataset = Dataset.from_dict({"a": data}, features=Features({"a": feature})) dataset[0] # error raised only when indexing ``` ``` Traceback (most recent call last): File "/Users/quentingallouedec/gia/c.py", line 13, in <module> dataset[0] # error raised only when indexing File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2658, in __getitem__ return self._getitem(key) File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2643, in _getitem formatted_output = format_table( File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 634, in format_table return formatter(pa_table, query_type=query_type) File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 406, in __call__ return self.format_row(pa_table) File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 441, in format_row row = self.python_arrow_extractor().extract_row(pa_table) File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 144, in extract_row return _unnest(pa_table.to_pydict()) File "pyarrow/table.pxi", line 4146, in pyarrow.lib.Table.to_pydict File "pyarrow/table.pxi", line 1312, in pyarrow.lib.ChunkedArray.to_pylist File "pyarrow/array.pxi", line 1521, in pyarrow.lib.Array.to_pylist File "pyarrow/scalar.pxi", line 675, in pyarrow.lib.ListScalar.as_py File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/features/features.py", line 760, in to_pylist return self.to_numpy(zero_copy_only=zero_copy_only).tolist() File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/features/features.py", line 725, in to_numpy numpy_arr = np.insert(numpy_arr.astype(np.float64), null_indices, np.nan, axis=0) File "<__array_function__ internals>", line 200, in insert File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/numpy/lib/function_base.py", line 5426, in insert old_mask[indices] = False IndexError: index 3 is out of bounds for axis 0 with size 3 ``` AFAIK, the problem only occurs when you use a `Sequence` of `ArrayND`. I strongly suspect that the problem comes from this line, or `np.insert` is misused: https://github.com/huggingface/datasets/blob/02ee418831aba68d0be93227bce8b3f42ef8980f/src/datasets/features/features.py#L729 To put t simply, you want something that do that: ```python import numpy as np numpy_arr = np.zeros((1, 1, 1)) null_indices = np.array([1, 2]) np.insert(numpy_arr, null_indices, np.nan, axis=0) # raise an error, instead of outputting # array([[[ 0.]], # [[nan]], # [[nan]]]) ``` ### Expected behavior The previous code should not raise an error. ### Environment info - Python 3.10.11 - datasets 2.10.0 - pyarrow 12.0.0
{ "+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/5927/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5927/timeline
null
completed
null
null
false
[ "Easy fix would be to add:\r\n\r\n```python\r\nnull_indices -= np.arange(len(null_indices))\r\n```\r\n\r\nbefore L279, but I'm not sure it's the most intuitive way to fix it.", "Same issue here:\r\n\r\nhttps://github.com/huggingface/datasets/blob/7fcbe5b1575c8d162b65b9397b3dfda995a4e048/src/datasets/features/features.py#L1398\r\n\r\nFixed in #5948 " ]
https://api.github.com/repos/huggingface/datasets/issues/1283
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1283/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1283/comments
https://api.github.com/repos/huggingface/datasets/issues/1283/events
https://github.com/huggingface/datasets/pull/1283
759,251,457
MDExOlB1bGxSZXF1ZXN0NTM0Mjg4MDg2
1,283
Add dutch book review dataset
[]
closed
false
null
1
2020-12-08T08:50:48Z
2020-12-09T20:21:58Z
2020-12-09T17:25:25Z
null
- Name: Dutch Book Review Dataset (DBRD) - Description: The DBRD (pronounced dee-bird) dataset contains over 110k book reviews along with associated binary sentiment polarity labels and is intended as a benchmark for sentiment classification in Dutch. - Paper: https://arxiv.org/abs/1910.00896 - Data: https://github.com/benjaminvdb/DBRD - Motivation: A large (real-life) dataset of Dutch book reviews and sentiment polarity (positive/negative), based on the associated rating. Checks - [x] Create the dataset script /datasets/dbrd/dbrd.py using the template - [x] Fill the _DESCRIPTION and _CITATION variables - [x] Implement _info(), _split_generators() and _generate_examples() - [x] Make sure that the BUILDER_CONFIGS class attribute is filled with the different configurations of the dataset and that the BUILDER_CONFIG_CLASS is specified if there is a custom config class. - [x] Generate the metadata file dataset_infos.json for all configurations - [x] Generate the dummy data dummy_data.zip files to have the dataset script tested and that they don't weigh too much (<50KB) - [x] Add the dataset card README.md using the template : fill the tags and the various paragraphs - [x] Both tests for the real data and the dummy data pass.
{ "+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/1283/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1283/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/1283.diff", "html_url": "https://github.com/huggingface/datasets/pull/1283", "merged_at": "2020-12-09T17:25:25Z", "patch_url": "https://github.com/huggingface/datasets/pull/1283.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/1283" }
true
[ "> Really cool thanks !\r\n> \r\n> I left some (minor) comments\r\n\r\nThank you for your comments! πŸ‘ I went ahead and improved the dataset card using your suggestions and some tweaks of my own. I hope you like it! πŸ˜„" ]
https://api.github.com/repos/huggingface/datasets/issues/5556
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5556/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5556/comments
https://api.github.com/repos/huggingface/datasets/issues/5556/events
https://github.com/huggingface/datasets/pull/5556
1,593,246,936
PR_kwDODunzps5KauVL
5,556
Use default audio resampling type
[]
closed
false
null
5
2023-02-21T10:45:50Z
2023-02-21T12:49:50Z
2023-02-21T12:42:52Z
null
...instead of relying on the optional librosa dependency `resampy`. It was only used for `_decode_non_mp3_file_like` anyway and not for the other ones - removing it fixes consistency between decoding methods (except torchaudio decoding) Therefore I think it is a better solution than adding `resampy` as a dependency in https://github.com/huggingface/datasets/pull/5554 cc @polinaeterna
{ "+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/5556/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5556/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/5556.diff", "html_url": "https://github.com/huggingface/datasets/pull/5556", "merged_at": "2023-02-21T12:42:52Z", "patch_url": "https://github.com/huggingface/datasets/pull/5556.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5556" }
true
[ "_The documentation is not available anymore as the PR was closed or merged._", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==6.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.008730 / 0.011353 (-0.002623) | 0.004551 / 0.011008 (-0.006457) | 0.100206 / 0.038508 (0.061698) | 0.030264 / 0.023109 (0.007154) | 0.303310 / 0.275898 (0.027412) | 0.339040 / 0.323480 (0.015560) | 0.006923 / 0.007986 (-0.001063) | 0.004707 / 0.004328 (0.000379) | 0.077822 / 0.004250 (0.073571) | 0.034368 / 0.037052 (-0.002684) | 0.303125 / 0.258489 (0.044636) | 0.348322 / 0.293841 (0.054481) | 0.033831 / 0.128546 (-0.094715) | 0.011459 / 0.075646 (-0.064187) | 0.322092 / 0.419271 (-0.097180) | 0.047720 / 0.043533 (0.004187) | 0.304849 / 0.255139 (0.049710) | 0.330767 / 0.283200 (0.047567) | 0.087362 / 0.141683 (-0.054321) | 1.536095 / 1.452155 (0.083941) | 1.599979 / 1.492716 (0.107263) |\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.188985 / 0.018006 (0.170979) | 0.410775 / 0.000490 (0.410286) | 0.004215 / 0.000200 (0.004015) | 0.000086 / 0.000054 (0.000032) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.023124 / 0.037411 (-0.014287) | 0.096962 / 0.014526 (0.082436) | 0.104070 / 0.176557 (-0.072486) | 0.141248 / 0.737135 (-0.595887) | 0.108534 / 0.296338 (-0.187804) |\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.417118 / 0.215209 (0.201909) | 4.167808 / 2.077655 (2.090154) | 2.016540 / 1.504120 (0.512420) | 1.847812 / 1.541195 (0.306617) | 1.967023 / 1.468490 (0.498532) | 0.689262 / 4.584777 (-3.895515) | 3.378747 / 3.745712 (-0.366965) | 1.854126 / 5.269862 (-3.415735) | 1.152102 / 4.565676 (-3.413575) | 0.081839 / 0.424275 (-0.342437) | 0.012426 / 0.007607 (0.004819) | 0.521334 / 0.226044 (0.295289) | 5.230593 / 2.268929 (2.961664) | 2.269386 / 55.444624 (-53.175238) | 1.965631 / 6.876477 (-4.910846) | 2.028994 / 2.142072 (-0.113079) | 0.802142 / 4.805227 (-4.003085) | 0.147954 / 6.500664 (-6.352710) | 0.065031 / 0.075469 (-0.010438) |\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.235289 / 1.841788 (-0.606499) | 13.723507 / 8.074308 (5.649199) | 14.197923 / 10.191392 (4.006531) | 0.147950 / 0.680424 (-0.532473) | 0.028332 / 0.534201 (-0.505869) | 0.400180 / 0.579283 (-0.179103) | 0.418970 / 0.434364 (-0.015393) | 0.478381 / 0.540337 (-0.061957) | 0.576138 / 1.386936 (-0.810798) |\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.006548 / 0.011353 (-0.004805) | 0.004567 / 0.011008 (-0.006441) | 0.075658 / 0.038508 (0.037150) | 0.027190 / 0.023109 (0.004080) | 0.363417 / 0.275898 (0.087518) | 0.399575 / 0.323480 (0.076095) | 0.004982 / 0.007986 (-0.003004) | 0.003364 / 0.004328 (-0.000964) | 0.074392 / 0.004250 (0.070142) | 0.038839 / 0.037052 (0.001787) | 0.361133 / 0.258489 (0.102644) | 0.408557 / 0.293841 (0.114717) | 0.031468 / 0.128546 (-0.097078) | 0.011645 / 0.075646 (-0.064001) | 0.085145 / 0.419271 (-0.334126) | 0.041775 / 0.043533 (-0.001758) | 0.348624 / 0.255139 (0.093485) | 0.389610 / 0.283200 (0.106410) | 0.088576 / 0.141683 (-0.053107) | 1.511208 / 1.452155 (0.059054) | 1.560568 / 1.492716 (0.067852) |\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.185017 / 0.018006 (0.167011) | 0.407543 / 0.000490 (0.407053) | 0.002486 / 0.000200 (0.002286) | 0.000076 / 0.000054 (0.000021) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.025181 / 0.037411 (-0.012231) | 0.099056 / 0.014526 (0.084530) | 0.108597 / 0.176557 (-0.067959) | 0.144664 / 0.737135 (-0.592471) | 0.110417 / 0.296338 (-0.185922) |\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.434302 / 0.215209 (0.219093) | 4.327840 / 2.077655 (2.250185) | 2.059939 / 1.504120 (0.555819) | 1.853267 / 1.541195 (0.312072) | 1.906616 / 1.468490 (0.438126) | 0.700165 / 4.584777 (-3.884611) | 3.439216 / 3.745712 (-0.306496) | 2.792034 / 5.269862 (-2.477827) | 1.424852 / 4.565676 (-3.140824) | 0.083926 / 0.424275 (-0.340349) | 0.013943 / 0.007607 (0.006336) | 0.535964 / 0.226044 (0.309920) | 5.368671 / 2.268929 (3.099743) | 2.497027 / 55.444624 (-52.947597) | 2.166222 / 6.876477 (-4.710254) | 2.183766 / 2.142072 (0.041693) | 0.805886 / 4.805227 (-3.999341) | 0.152474 / 6.500664 (-6.348190) | 0.067354 / 0.075469 (-0.008115) |\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.284052 / 1.841788 (-0.557736) | 13.714066 / 8.074308 (5.639758) | 14.195212 / 10.191392 (4.003820) | 0.151815 / 0.680424 (-0.528609) | 0.016847 / 0.534201 (-0.517354) | 0.391174 / 0.579283 (-0.188109) | 0.409784 / 0.434364 (-0.024580) | 0.473880 / 0.540337 (-0.066458) | 0.561016 / 1.386936 (-0.825920) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#47ab08d9f06abd5bc23bddaa4875b93e926dd3b1 \"CML watermark\")\n", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==6.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.010284 / 0.011353 (-0.001068) | 0.005654 / 0.011008 (-0.005355) | 0.100522 / 0.038508 (0.062014) | 0.039201 / 0.023109 (0.016092) | 0.320831 / 0.275898 (0.044933) | 0.365351 / 0.323480 (0.041871) | 0.009066 / 0.007986 (0.001080) | 0.005805 / 0.004328 (0.001476) | 0.076969 / 0.004250 (0.072719) | 0.045813 / 0.037052 (0.008760) | 0.327115 / 0.258489 (0.068626) | 0.362823 / 0.293841 (0.068982) | 0.040521 / 0.128546 (-0.088025) | 0.013166 / 0.075646 (-0.062481) | 0.358579 / 0.419271 (-0.060692) | 0.051753 / 0.043533 (0.008220) | 0.323741 / 0.255139 (0.068602) | 0.360211 / 0.283200 (0.077011) | 0.111534 / 0.141683 (-0.030149) | 1.594887 / 1.452155 (0.142732) | 1.651516 / 1.492716 (0.158799) |\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.012051 / 0.018006 (-0.005956) | 0.475316 / 0.000490 (0.474826) | 0.004804 / 0.000200 (0.004604) | 0.000100 / 0.000054 (0.000046) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.027480 / 0.037411 (-0.009931) | 0.112022 / 0.014526 (0.097496) | 0.121539 / 0.176557 (-0.055017) | 0.166327 / 0.737135 (-0.570809) | 0.132575 / 0.296338 (-0.163763) |\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.418322 / 0.215209 (0.203113) | 4.149463 / 2.077655 (2.071808) | 1.890901 / 1.504120 (0.386781) | 1.682521 / 1.541195 (0.141327) | 1.716331 / 1.468490 (0.247841) | 0.729176 / 4.584777 (-3.855601) | 4.173303 / 3.745712 (0.427591) | 2.166249 / 5.269862 (-3.103612) | 1.384623 / 4.565676 (-3.181053) | 0.095486 / 0.424275 (-0.328789) | 0.013800 / 0.007607 (0.006193) | 0.573917 / 0.226044 (0.347872) | 5.348843 / 2.268929 (3.079914) | 2.421716 / 55.444624 (-53.022909) | 2.002048 / 6.876477 (-4.874428) | 2.079493 / 2.142072 (-0.062579) | 0.882818 / 4.805227 (-3.922409) | 0.172936 / 6.500664 (-6.327728) | 0.068384 / 0.075469 (-0.007085) |\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.285704 / 1.841788 (-0.556084) | 16.036346 / 8.074308 (7.962038) | 15.181557 / 10.191392 (4.990165) | 0.194044 / 0.680424 (-0.486380) | 0.033128 / 0.534201 (-0.501073) | 0.480290 / 0.579283 (-0.098993) | 0.497525 / 0.434364 (0.063161) | 0.602304 / 0.540337 (0.061966) | 0.754273 / 1.386936 (-0.632663) |\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.007263 / 0.011353 (-0.004090) | 0.005164 / 0.011008 (-0.005845) | 0.079833 / 0.038508 (0.041325) | 0.033974 / 0.023109 (0.010865) | 0.382057 / 0.275898 (0.106159) | 0.402924 / 0.323480 (0.079444) | 0.007273 / 0.007986 (-0.000712) | 0.004378 / 0.004328 (0.000049) | 0.080556 / 0.004250 (0.076305) | 0.047376 / 0.037052 (0.010324) | 0.379044 / 0.258489 (0.120555) | 0.422135 / 0.293841 (0.128294) | 0.038294 / 0.128546 (-0.090252) | 0.013974 / 0.075646 (-0.061672) | 0.094936 / 0.419271 (-0.324335) | 0.051033 / 0.043533 (0.007501) | 0.368197 / 0.255139 (0.113058) | 0.409627 / 0.283200 (0.126427) | 0.107365 / 0.141683 (-0.034318) | 1.537501 / 1.452155 (0.085346) | 1.618021 / 1.492716 (0.125305) |\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.227187 / 0.018006 (0.209181) | 0.473226 / 0.000490 (0.472736) | 0.006532 / 0.000200 (0.006332) | 0.000121 / 0.000054 (0.000066) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.029814 / 0.037411 (-0.007597) | 0.121113 / 0.014526 (0.106587) | 0.125107 / 0.176557 (-0.051450) | 0.167008 / 0.737135 (-0.570127) | 0.128720 / 0.296338 (-0.167619) |\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.452158 / 0.215209 (0.236949) | 4.507087 / 2.077655 (2.429433) | 2.193910 / 1.504120 (0.689790) | 1.991234 / 1.541195 (0.450039) | 2.120256 / 1.468490 (0.651766) | 0.726664 / 4.584777 (-3.858113) | 4.213148 / 3.745712 (0.467436) | 4.082857 / 5.269862 (-1.187005) | 1.741018 / 4.565676 (-2.824658) | 0.090176 / 0.424275 (-0.334099) | 0.013221 / 0.007607 (0.005614) | 0.558868 / 0.226044 (0.332824) | 5.617242 / 2.268929 (3.348313) | 2.985430 / 55.444624 (-52.459194) | 2.623136 / 6.876477 (-4.253341) | 2.383177 / 2.142072 (0.241105) | 0.917237 / 4.805227 (-3.887990) | 0.178774 / 6.500664 (-6.321890) | 0.064707 / 0.075469 (-0.010762) |\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.365402 / 1.841788 (-0.476385) | 16.035773 / 8.074308 (7.961465) | 13.917612 / 10.191392 (3.726220) | 0.152191 / 0.680424 (-0.528233) | 0.020734 / 0.534201 (-0.513467) | 0.442055 / 0.579283 (-0.137228) | 0.470588 / 0.434364 (0.036224) | 0.563433 / 0.540337 (0.023096) | 0.651161 / 1.386936 (-0.735775) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#6ab909a44b723fe0a8a586beafc8c5cbf9c91c21 \"CML watermark\")\n", "If it's good for you @polinaeterna I'd like to merge it and then run the `transformers` CI to see if it changes anything", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==6.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.008829 / 0.011353 (-0.002524) | 0.004652 / 0.011008 (-0.006356) | 0.102505 / 0.038508 (0.063997) | 0.030164 / 0.023109 (0.007054) | 0.306551 / 0.275898 (0.030653) | 0.368920 / 0.323480 (0.045440) | 0.007084 / 0.007986 (-0.000902) | 0.003545 / 0.004328 (-0.000783) | 0.079402 / 0.004250 (0.075152) | 0.035296 / 0.037052 (-0.001756) | 0.312010 / 0.258489 (0.053520) | 0.348773 / 0.293841 (0.054932) | 0.034622 / 0.128546 (-0.093924) | 0.011727 / 0.075646 (-0.063920) | 0.326911 / 0.419271 (-0.092361) | 0.043832 / 0.043533 (0.000300) | 0.306357 / 0.255139 (0.051218) | 0.328744 / 0.283200 (0.045544) | 0.091954 / 0.141683 (-0.049729) | 1.563989 / 1.452155 (0.111834) | 1.591901 / 1.492716 (0.099185) |\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.194955 / 0.018006 (0.176948) | 0.412864 / 0.000490 (0.412374) | 0.003710 / 0.000200 (0.003510) | 0.000081 / 0.000054 (0.000026) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.023132 / 0.037411 (-0.014279) | 0.099586 / 0.014526 (0.085060) | 0.105031 / 0.176557 (-0.071525) | 0.141206 / 0.737135 (-0.595929) | 0.111978 / 0.296338 (-0.184360) |\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.413729 / 0.215209 (0.198520) | 4.161713 / 2.077655 (2.084058) | 1.887442 / 1.504120 (0.383322) | 1.711847 / 1.541195 (0.170653) | 1.756833 / 1.468490 (0.288343) | 0.699239 / 4.584777 (-3.885538) | 3.346213 / 3.745712 (-0.399499) | 2.822289 / 5.269862 (-2.447573) | 1.475650 / 4.565676 (-3.090027) | 0.082800 / 0.424275 (-0.341475) | 0.012302 / 0.007607 (0.004695) | 0.523068 / 0.226044 (0.297024) | 5.242833 / 2.268929 (2.973904) | 2.310768 / 55.444624 (-53.133856) | 1.954629 / 6.876477 (-4.921847) | 2.015563 / 2.142072 (-0.126510) | 0.812613 / 4.805227 (-3.992614) | 0.149512 / 6.500664 (-6.351152) | 0.065162 / 0.075469 (-0.010307) |\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.270177 / 1.841788 (-0.571610) | 13.664765 / 8.074308 (5.590457) | 14.317968 / 10.191392 (4.126576) | 0.138135 / 0.680424 (-0.542289) | 0.028503 / 0.534201 (-0.505698) | 0.402921 / 0.579283 (-0.176362) | 0.400999 / 0.434364 (-0.033365) | 0.470983 / 0.540337 (-0.069355) | 0.544319 / 1.386936 (-0.842617) |\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.006841 / 0.011353 (-0.004512) | 0.004570 / 0.011008 (-0.006439) | 0.076398 / 0.038508 (0.037890) | 0.028136 / 0.023109 (0.005027) | 0.339864 / 0.275898 (0.063966) | 0.375496 / 0.323480 (0.052016) | 0.004967 / 0.007986 (-0.003019) | 0.003411 / 0.004328 (-0.000917) | 0.075727 / 0.004250 (0.071476) | 0.040025 / 0.037052 (0.002973) | 0.340473 / 0.258489 (0.081984) | 0.384396 / 0.293841 (0.090555) | 0.031683 / 0.128546 (-0.096863) | 0.011752 / 0.075646 (-0.063894) | 0.085635 / 0.419271 (-0.333636) | 0.042764 / 0.043533 (-0.000769) | 0.339417 / 0.255139 (0.084278) | 0.364190 / 0.283200 (0.080991) | 0.093842 / 0.141683 (-0.047841) | 1.480999 / 1.452155 (0.028844) | 1.549752 / 1.492716 (0.057036) |\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.174146 / 0.018006 (0.156140) | 0.415459 / 0.000490 (0.414970) | 0.002854 / 0.000200 (0.002654) | 0.000077 / 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.024671 / 0.037411 (-0.012740) | 0.101229 / 0.014526 (0.086703) | 0.108841 / 0.176557 (-0.067716) | 0.144530 / 0.737135 (-0.592606) | 0.112509 / 0.296338 (-0.183829) |\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.460561 / 0.215209 (0.245352) | 4.591139 / 2.077655 (2.513484) | 2.275535 / 1.504120 (0.771415) | 2.070976 / 1.541195 (0.529781) | 2.028766 / 1.468490 (0.560276) | 0.706166 / 4.584777 (-3.878611) | 3.408498 / 3.745712 (-0.337215) | 3.034665 / 5.269862 (-2.235197) | 1.586805 / 4.565676 (-2.978872) | 0.083355 / 0.424275 (-0.340920) | 0.012460 / 0.007607 (0.004853) | 0.565256 / 0.226044 (0.339212) | 5.662643 / 2.268929 (3.393715) | 2.697019 / 55.444624 (-52.747605) | 2.302044 / 6.876477 (-4.574433) | 2.373081 / 2.142072 (0.231009) | 0.809804 / 4.805227 (-3.995423) | 0.151481 / 6.500664 (-6.349183) | 0.066870 / 0.075469 (-0.008599) |\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.257293 / 1.841788 (-0.584495) | 14.059454 / 8.074308 (5.985146) | 13.783251 / 10.191392 (3.591859) | 0.140007 / 0.680424 (-0.540417) | 0.016624 / 0.534201 (-0.517577) | 0.381703 / 0.579283 (-0.197580) | 0.389032 / 0.434364 (-0.045332) | 0.466127 / 0.540337 (-0.074211) | 0.551052 / 1.386936 (-0.835884) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#4a767f7a3dffdf45886690b81c6e624146ae14da \"CML watermark\")\n" ]
https://api.github.com/repos/huggingface/datasets/issues/5768
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5768/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5768/comments
https://api.github.com/repos/huggingface/datasets/issues/5768/events
https://github.com/huggingface/datasets/issues/5768
1,672,494,561
I_kwDODunzps5jsD3h
5,768
load_dataset("squad") doesn't work in 2.7.1 and 2.10.1
[]
closed
false
null
8
2023-04-18T07:10:56Z
2023-04-20T10:27:23Z
2023-04-20T10:27:22Z
null
### Describe the bug There is an issue that seems to be unique to the "squad" dataset, in which it cannot be loaded using standard methods. This issue is most quickly reproduced from the command line, using the HF examples to verify a dataset is loaded properly. This is not a problem with "squad_v2" dataset for example. ### Steps to reproduce the bug cmd line > $ python -c "from datasets import load_dataset; print(load_dataset('squad', split='train')[0])" OR Python IDE > from datasets import load_dataset > load_dataset("squad") ### Expected behavior I expected to either see the output described here from running the very same command in command line ([https://huggingface.co/docs/datasets/installation]), or any output that does not raise Python's TypeError. There is some funky behaviour in the dataset builder portion of the codebase that means it is trying to import the squad dataset with an incorrect path, or the squad dataset couldn't be downloaded. I'm not really sure what the problem is beyond that. Messing around with caching I did manage to get it to load the dataset once, and then couldn't repeat this. ### Environment info datasets=2.7.1 **or** 2.10.1, python=3.10.8, Linux 3.10.0-1160.36.2.el7.x86_64 **or** Windows 10-64
{ "+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/5768/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5768/timeline
null
completed
null
null
false
[ "Thanks for reporting, @yaseen157.\r\n\r\nCould you please give the complete error stack trace?", "I am not able to reproduce your issue: the dataset loads perfectly on my local machine and on a Colab notebook: https://colab.research.google.com/drive/1Fbdoa1JdNz8DOdX6gmIsOK1nCT8Abj4O?usp=sharing\r\n```python\r\nIn [1]: from datasets import load_dataset\r\n\r\nIn [2]: ds = load_dataset(\"squad\")\r\nDownloading builder script: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 5.27k/5.27k [00:00<00:00, 3.22MB/s]\r\nDownloading metadata: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2.36k/2.36k [00:00<00:00, 1.60MB/s]\r\nDownloading readme: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 7.67k/7.67k [00:00<00:00, 4.58MB/s]\r\nDownloading and preparing dataset squad/plain_text to ...t/.cache/huggingface/datasets/squad/plain_text/1.0.0/d6ec3ceb99ca480ce37cdd35555d6cb2511d223b9150cce08a837ef62ffea453...\r\nDownloading data: 30.3MB [00:00, 91.8MB/s] | 0/2 [00:00<?, ?it/s]\r\nDownloading data: 4.85MB [00:00, 75.3MB/s] \r\nDownloading data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<00:00, 2.31it/s]\r\nExtracting data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<00:00, 2157.01it/s]\r\nDataset squad downloaded and prepared to .../.cache/huggingface/datasets/squad/plain_text/1.0.0/d6ec3ceb99ca480ce37cdd35555d6cb2511d223b9150cce08a837ef62ffea453. Subsequent calls will reuse this data.\r\n100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<00:00, 463.95it/s]\r\n\r\nIn [3]: ds\r\nOut[3]: \r\nDatasetDict({\r\n train: Dataset({\r\n features: ['id', 'title', 'context', 'question', 'answers'],\r\n num_rows: 87599\r\n })\r\n validation: Dataset({\r\n features: ['id', 'title', 'context', 'question', 'answers'],\r\n num_rows: 10570\r\n })\r\n})\r\n```", "I am at a complete loss for what's happening here. A quick summary, I have 3 machines to try this with:\r\n1) My windows 10 laptop\r\n2) Linux machine1, super computer login node\r\n3) Linux machine2, super computer compute node\r\n\r\nLet's define the following as a test script for the machines:\r\n\r\n```\r\nimport traceback\r\nimport datasets\r\nprint(f\"{datasets.__version__=}\")\r\ntry:\r\n ds = datasets.load_dataset(\"squad\")\r\nexcept:\r\n traceback.print_exc()\r\nelse:\r\n print(\"Success!\")\r\n```\r\n\r\nThe Windows laptop enters some sort of traceback recursion loop:\r\n\r\n> datasets.__version__='2.7.1'\r\n> Downloading and preparing dataset squad/plain_text to C:/Users/yr3g17/.cache/huggingface/datasets/squad/plain_text/1.0.0/d6ec3ceb99ca480ce37cdd35555d6cb2511d223b9150cce08a837ef62ffea453...\r\n> Downloading data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<?, ?it/s]\r\n> Traceback (most recent call last):\r\n> File \"<string>\", line 1, in <module>\r\n> File \"C:\\Users\\yr3g17\\AppData\\Local\\Programs\\Python\\Python39\\lib\\multiprocessing\\spawn.py\", line 116, in spawn_main\r\n> exitcode = _main(fd, parent_sentinel)\r\n> File \"C:\\Users\\yr3g17\\AppData\\Local\\Programs\\Python\\Python39\\lib\\multiprocessing\\spawn.py\", line 125, in _main\r\n> prepare(preparation_data)\r\n> File \"C:\\Users\\yr3g17\\AppData\\Local\\Programs\\Python\\Python39\\lib\\multiprocessing\\spawn.py\", line 236, in prepare\r\n> _fixup_main_from_path(data['init_main_from_path'])\r\n> File \"C:\\Users\\yr3g17\\AppData\\Local\\Programs\\Python\\Python39\\lib\\multiprocessing\\spawn.py\", line 287, in _fixup_main_from_path\r\n> main_content = runpy.run_path(main_path,\r\n> File \"C:\\Users\\yr3g17\\AppData\\Local\\Programs\\Python\\Python39\\lib\\runpy.py\", line 267, in run_path\r\n> code, fname = _get_code_from_file(run_name, path_name)\r\n> File \"C:\\Users\\yr3g17\\AppData\\Local\\Programs\\Python\\Python39\\lib\\runpy.py\", line 237, in _get_code_from_file\r\n> with io.open_code(decoded_path) as f:\r\n> OSError: [Errno 22] Invalid argument: 'C:\\\\Users\\\\yr3g17\\\\OneDrive - University of Southampton\\\\Documents\\\\PhD-repository\\\\<input>'\r\n> Traceback (most recent call last):\r\n> File \"<string>\", line 1, in <module>\r\n> File \"C:\\Users\\yr3g17\\AppData\\Local\\Programs\\Python\\Python39\\lib\\multiprocessing\\spawn.py\", line 116, in spawn_main\r\n> exitcode = _main(fd, parent_sentinel)\r\n> File \"C:\\Users\\yr3g17\\AppData\\Local\\Programs\\Python\\Python39\\lib\\multiprocessing\\spawn.py\", line 125, in _main\r\n> prepare(preparation_data)\r\n**this error traceback is endlessly recursive**\r\n\r\nThis is a brand new issue that started today and I didn't even realise was a thing, as I had been using my windows machine to follow tracebacks for the other machines...\r\n\r\nI suspect this issue had something to do with my filepath naming, but I couldn't confirm this when I spent time trying to debug this myself weeks ago, something to do with files being locked and never released. I'm not too concerned about my laptop not working here because I've had so many issues with Microsoft OneDrive and my filesystem.\r\n\r\nLinux machines 1 and 2 were working fine for months, but have all of a sudden stopped working. Trying to run linux machine 1 (login node), I get:\r\n\r\n> datasets.__version__='2.10.1'\r\n> Downloading and preparing dataset json/squad to /home/yr3g17/.cache/hugg\r\ningface/datasets/json/squad-d733af945be1d2c2/0.0.0/0f7e3662623656454fcd2\r\nb650f34e886a7db4b9104504885bd462096cc7a9f51...\r\n> Downloading data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ\r\nβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<00:00, 4042.70\r\nit/s]\r\n>Extracting data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ\r\nβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<00:00, 1\r\n11.15it/s]\r\n> Generating train split: 0 examples [00:00, ? examples/s]\r\n\r\n and hangs here. This has not happened to me before on the Linux machine. If I forcefully keyboard interrupt, I get:\r\n \r\n> Traceback (most recent call last):\r\n> File \"<stdin>\", line 2, in <module>\r\n> File \"/home/yr3g17/.conda/envs/arkroyal/lib/python3.10/site-packages/d\r\n> atasets/load.py\", line 1782, in load_dataset\r\n> builder_instance.download_and_prepare(\r\n> File \"/home/yr3g17/.conda/envs/arkroyal/lib/python3.10/site-packages/d\r\n> atasets/builder.py\", line 793, in download_and_prepare\r\n> with FileLock(lock_path) if is_local else contextlib.nullcontext():\r\n> File \"/home/yr3g17/.conda/envs/arkroyal/lib/python3.10/site-packages/d\r\n> atasets/utils/filelock.py\", line 320, in __enter__\r\n> self.acquire()\r\n> File \"/home/yr3g17/.conda/envs/arkroyal/lib/python3.10/site-packages/d\r\n> atasets/utils/filelock.py\", line 282, in acquire\r\n> time.sleep(poll_intervall)\r\n\r\nWhich also appears to be file lock related! I resolved this by navigating to my ~/.cache/huggingface/datasets directory and wiping out anything to do with the squad dataset in *.lock files. Now I get:\r\n\r\n```\r\nfrom datasets import load_dataset\r\ndataset_load(\"squad\")\r\n\r\n```\r\n> Downloading and preparing dataset squad/plain_text to /home/yr3g17/.cache/huggingface/datasets/squad/plain_text/1.0.0/d6ec3ceb99ca480ce37cdd35555d6cb\r\n> 2511d223b9150cce08a837ef62ffea453...\r\n> Downloading data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<00:00, 44.75it/s]\r\n> Extracting data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<00:00, 8.54it/s]\r\n> Dataset squad downloaded and prepared to /home/yr3g17/.cache/huggingface/datasets/squad/plain_text/1.0.0/d6ec3ceb99ca480ce37cdd35555d6cb2511d223b9150\r\n> cce08a837ef62ffea453. Subsequent calls will reuse this data.\r\n> 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<00:00, 19.77it/s]\r\n> DatasetDict({\r\n> train: Dataset({\r\n> features: ['id', 'title', 'context', 'question', 'answers'],\r\n> num_rows: 87599\r\n> })\r\n> validation: Dataset({\r\n> features: ['id', 'title', 'context', 'question', 'answers'],\r\n> num_rows: 10570\r\n> })\r\n> })\r\n> \r\n\r\nWhich all seems fine right, it's doing what it should be. But now, without ever leaving the IDE, I \"make a subsequent call\" to reuse the data by repeating the command. I encounter the following traceback\r\n\r\n`load_dataset(\"squad\")`\r\n\r\n> Traceback (most recent call last):\r\n> File \"<stdin>\", line 1, in <module>\r\n> File \"/home/yr3g17/.conda/envs/arkroyal/lib/python3.10/site-packages/datasets/load.py\", line 1759, in load_dataset\r\n> builder_instance = load_dataset_builder(\r\n> File \"/home/yr3g17/.conda/envs/arkroyal/lib/python3.10/site-packages/datasets/load.py\", line 1496, in load_dataset_builder\r\n> dataset_module = dataset_module_factory(\r\n> File \"/home/yr3g17/.conda/envs/arkroyal/lib/python3.10/site-packages/datasets/load.py\", line 1151, in dataset_module_factory\r\n> ).get_module()\r\n> File \"/home/yr3g17/.conda/envs/arkroyal/lib/python3.10/site-packages/datasets/load.py\", line 631, in get_module\r\n> data_files = DataFilesDict.from_local_or_remote(\r\n> File \"/home/yr3g17/.conda/envs/arkroyal/lib/python3.10/site-packages/datasets/data_files.py\", line 796, in from_local_or_remote\r\n> DataFilesList.from_local_or_remote(\r\n> File \"/home/yr3g17/.conda/envs/arkroyal/lib/python3.10/site-packages/datasets/data_files.py\", line 764, in from_local_or_remote\r\n> data_files = resolve_patterns_locally_or_by_urls(base_path, patterns, allowed_extensions)\r\n> File \"/home/yr3g17/.conda/envs/arkroyal/lib/python3.10/site-packages/datasets/data_files.py\", line 369, in resolve_patterns_locally_or_by_urls\r\n> raise FileNotFoundError(error_msg)\r\n> FileNotFoundError: Unable to resolve any data file that matches '['train[-._ 0-9/]**', '**[-._ 0-9/]train[-._ 0-9/]**', 'training[-._ 0-9/]**', '**[-\r\n> ._ 0-9/]training[-._ 0-9/]**']' at /mainfs/home/yr3g17/.cache/huggingface/datasets/squad with any supported extension ['csv', 'tsv', 'json', 'jsonl',\r\n> 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'gr\r\n> ib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', '\r\n> mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', '\r\n> emf', 'xbm', 'xpm', 'BLP', 'BMP', 'DIB', 'BUFR', 'CUR', 'PCX', 'DCX', 'DDS', 'PS', 'EPS', 'FIT', 'FITS', 'FLI', 'FLC', 'FTC', 'FTU', 'GBR', 'GIF', 'G\r\n> RIB', 'H5', 'HDF', 'PNG', 'APNG', 'JP2', 'J2K', 'JPC', 'JPF', 'JPX', 'J2C', 'ICNS', 'ICO', 'IM', 'IIM', 'TIF', 'TIFF', 'JFIF', 'JPE', 'JPG', 'JPEG',\r\n> 'MPG', 'MPEG', 'MSP', 'PCD', 'PXR', 'PBM', 'PGM', 'PPM', 'PNM', 'PSD', 'BW', 'RGB', 'RGBA', 'SGI', 'RAS', 'TGA', 'ICB', 'VDA', 'VST', 'WEBP', 'WMF',\r\n> 'EMF', 'XBM', 'XPM', 'aiff', 'au', 'avr', 'caf', 'flac', 'htk', 'svx', 'mat4', 'mat5', 'mpc2k', 'ogg', 'paf', 'pvf', 'raw', 'rf64', 'sd2', 'sds', 'ir\r\n> cam', 'voc', 'w64', 'wav', 'nist', 'wavex', 'wve', 'xi', 'mp3', 'opus', 'AIFF', 'AU', 'AVR', 'CAF', 'FLAC', 'HTK', 'SVX', 'MAT4', 'MAT5', 'MPC2K', 'O\r\n> GG', 'PAF', 'PVF', 'RAW', 'RF64', 'SD2', 'SDS', 'IRCAM', 'VOC', 'W64', 'WAV', 'NIST', 'WAVEX', 'WVE', 'XI', 'MP3', 'OPUS', 'zip']\r\n\r\nIt doesn't even appear like I can reliably repeat this process. I'll nuke squad files in my dataset cache and run the Python code again (which downloads a new copy of the dataset to cache). It will either fail (as it just did in the quote above), or it will successfully recall the dataset.\r\n\r\nI repeated this nuking process a few times until calling load_dataset was reliably giving me the correct result (no filelocking issues or tracebacks). I then sent the test script as a job to the supercomputer compute nodes (which do not have internet access and therefore depend on cached data from Linux machine 1 login nodes)\r\n\r\n> Using the latest cached version of the module from /home/yr3g17/.cache/huggingface/modules/datasets_modules/datasets/squad/8730650fed465361f38ac4d810\r\n> ccdd16e8fc87b56498e52fb7e2cadaefc1f177 (last modified on Tue Feb 14 10:12:56 2023) since it couldn't be found locally at squad., or remotely on the Hugging Face Hub.\r\n> Traceback (most recent call last):\r\n> File \"/mainfs/scratch/yr3g17/squad_qanswering/3054408/0/../../main.py\", line 5, in <module>\r\n> dataset = load_dataset(\"squad\")\r\n> File \"/home/yr3g17/.conda/envs/arkroyal/lib/python3.10/site-packages/datasets/load.py\", line 1759, in load_dataset\r\n> builder_instance = load_dataset_builder(\r\n> File \"/home/yr3g17/.conda/envs/arkroyal/lib/python3.10/site-packages/datasets/load.py\", line 1522, in load_dataset_builder\r\n> builder_instance: DatasetBuilder = builder_cls(\r\n> TypeError: 'NoneType' object is not callable\r\n\r\nand I have absolutely no idea why the second and third machines are producing different tracebacks. I have previously run these exact scripts successfully on the login and compute nodes of the supercomputer, this issue I'm raising has appeared fairly recently for me. This, is where I encounter the TypeError that I opened this issue with, which I was able to traceback (using my laptop before it too started not working) to whatever was dynamically importing \"builder_cls\". That bit of code wasn't doing importing builder_cls correctly and would effectively make the assignment \"builder_cls=None\" resulting in the TypeError. Does any of this help?", "I'm back on linux machine 1 (login node) now. After submitting that as a job to machine 2 and it failing with TypeError, linux machine 1 now produces identical traceback to machine 2:\r\n\r\n> (arkroyal) [yr3g17@cyan52 squad_qanswering]$ python\r\n> Python 3.10.8 (main, Nov 24 2022, 14:13:03) [GCC 11.2.0] on linux\r\n> Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>\r\n> from datasets import load_dataset\r\n> load_dataset(\"squad\")\r\n>\r\n> Traceback (most recent call last):\r\n> File \"<stdin>\", line 1, in <module>\r\n> File \"/home/yr3g17/.conda/envs/arkroyal/lib/python3.10/site-packages/datasets/load.py\", line 1759, in load_dataset\r\n> builder_instance = load_dataset_builder(\r\n> File \"/home/yr3g17/.conda/envs/arkroyal/lib/python3.10/site-packages/datasets/load.py\", line 1522, in load_dataset_builder\r\n> builder_instance: DatasetBuilder = builder_cls(\r\n> TypeError: 'NoneType' object is not callable\r\n\r\nI thought it might be useful to provide you with my cache file structure:\r\n\r\n>_home_yr3g17_.cache_huggingface_datasets_casino_default_1.1.0_302c3b1ac78c48091deabe83a11f4003c7b472a4e11a8eb92799653785bd5da1.lock\r\n>_home_yr3g17_.cache_huggingface_datasets_imdb_plain_text_1.0.0_2fdd8b9bcadd6e7055e742a706876ba43f19faee861df134affd7a3f60fc38a1.lock\r\n>_home_yr3g17_.cache_huggingface_datasets_squad_plain_text_1.0.0_d6ec3ceb99ca480ce37cdd35555d6cb2511d223b9150cce08a837ef62ffea453.lock\r\n>_home_yr3g17_.cache_huggingface_datasets_yelp_review_full_yelp_review_full_1.0.0_e8e18e19d7be9e75642fc66b198abadb116f73599ec89a69ba5dd8d1e57ba0bf.lock\r\n> casino\r\n> downloads\r\n> imdb\r\n> json\r\n> squad\r\n> squad_v2\r\n> yelp_review_full\r\n\r\nThe inside of squad/plain_text/1.0.0/ looks like\r\n\r\n> d6ec3ceb99ca480ce37cdd35555d6cb2511d223b9150cce08a837ef62ffea453\r\n> d6ec3ceb99ca480ce37cdd35555d6cb2511d223b9150cce08a837ef62ffea453.incomplete_info.lock\r\n> d6ec3ceb99ca480ce37cdd35555d6cb2511d223b9150cce08a837ef62ffea453_builder.lock\r\n", "I see this is quite a complex use case...\r\n\r\nLet's try multiple things:\r\n- First, update `datasets` and make sure you use the same version in all machines, so that we can easily compare different behaviors.\r\n ```\r\n pip install -U datasets\r\n ```\r\n- Second, wherever you run the `load_dataset(\"squad\")` command, make sure there is not a local directory named \"squad\". The datasets library gives priority to any local file/directory over the datasets on the Hugging Face Hub\r\n - I tell you this, because in one of your trace backs, it seems it refers to a local directory:\r\n ```\r\n Downloading and preparing dataset json/squad to /home/yr3g17/.cache/huggingface/datasets/json/squad-d733af945be1d2c2/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...\r\n ```\r\n- Third, to use the \"squad\" dataset from the Hub, you need to have internet connection, so that you can download the \"squad\" Python loading script from the Hub. Do all your machines have internet connection?\r\n - I ask this because of this error message:\r\n ```\r\n Using the latest cached version of the module from /home/yr3g17/.cache/huggingface/modules/datasets_modules/datasets/squad/8730650fed465361f38ac4d810ccdd16e8fc87b56498e52fb7e2cadaefc1f177 (last modified on Tue Feb 14 10:12:56 2023) since it couldn't be found locally at squad., or remotely on the Hugging Face Hub.\r\n ```\r\n- Fourth, to be sure that we avoid any issues with the cache, it is a good idea to remove it and regenerate it. Remove `.cache/huggingface/datasets` and also `.cache/huggingface/modules`\r\n- Fifth, as an additional debugging tool, let's be sure we use the latest \"squad\" Python loading script by passing the revision parameter:\r\n ```\r\n ds = load_dataset(\"squad\", revision=\"5fe18c4c680f9922d794e3f4dd673a751c74ee37\")\r\n ```", "Additionally, we just had an infrastructure issue on the Hugging Face Hub at around 11:30 today. That might have contributed to the connectivity issue... It is fixed now.\r\n\r\nhttps://status.huggingface.co/", "Hi again, thanks for your help and insight Albert Villanova.\r\n\r\nIt's all working now, so thank you for that. For the benefit of anyone else who ends up in this thread, I solved the problem by addressing Albert's advice:\r\n\r\n(1) Both Windows and Linux machine 1 (have internet access) and can now access the SQuAD dataset. The supercomputer login node can only access version 2.7.1, but my Windows laptop is running on datasets 2.11.0 just fine. I suspect it was just a perfect storm alongside the aforementioned \"infrastructure issue\".\r\n\r\n(2) I did have a local directory called squad, because I was using a local copy of evaluate's \"SQuAD\" metric. The supercomputer compute nodes do not have internet access and treat `metric = evaluate.load('<x>')` as a way of loading a metric at the local path `./<x>/<x>.py`, which could've been a related issue as I was storing the metric under `squad/squad.py`. Don't be lazy like me and store the evaluation code under a path with a name that can be misinterpreted.\r\n\r\n(3) I can't give internet access to the supercomputer compute nodes, so local files do just fine here.\r\n\r\n(4) The windows and Linux machine 1 can both access the internet and were getting fresh copies of the dataset from the huggingface hub. Linux machine 2 was working after I cleared the contents of ~/.cache/huggingface/....\r\n\r\nI feel silly now, knowing it was all so simple! Sorry about that Albert, and thanks again for the help. I've not raised a Github issue like this before, so I'm not sure if I should be close my own issues or if this is something you guys do?", "Thanks for your detailed feedback which for sure will be useful to other community members." ]
https://api.github.com/repos/huggingface/datasets/issues/528
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/528/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/528/comments
https://api.github.com/repos/huggingface/datasets/issues/528/events
https://github.com/huggingface/datasets/pull/528
684,673,673
MDExOlB1bGxSZXF1ZXN0NDcyNTIzNDI1
528
fix missing variable names in docs
[]
closed
false
null
1
2020-08-24T13:31:48Z
2020-08-25T09:04:04Z
2020-08-25T09:04:03Z
null
fix #524
{ "+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/528/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/528/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/528.diff", "html_url": "https://github.com/huggingface/datasets/pull/528", "merged_at": "2020-08-25T09:04:03Z", "patch_url": "https://github.com/huggingface/datasets/pull/528.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/528" }
true
[ "The problem came from `default: ` that is rendered differently and hides the parameter names. I changed `default: ...` to `defaults to ...`" ]
https://api.github.com/repos/huggingface/datasets/issues/4204
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/4204/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/4204/comments
https://api.github.com/repos/huggingface/datasets/issues/4204/events
https://github.com/huggingface/datasets/pull/4204
1,212,431,764
PR_kwDODunzps42oN0j
4,204
Add Recall Metric Card
[]
closed
false
null
2
2022-04-22T14:24:26Z
2022-05-03T13:23:23Z
2022-05-03T13:16:24Z
null
What this PR mainly does: - add metric card for recall metric - update docs in recall python file Note: I've also included a .json file with all of the metric card information. I've started compiling the relevant information in this type of .json files, and then using a script I wrote to generate the formatted metric card, as well as the docs to go in the .py file. I figured I'd upload the .json because it could be useful, especially if I also make a PR with the script I'm using (let me know if that's something you think would be beneficial!)
{ "+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/4204/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/4204/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/4204.diff", "html_url": "https://github.com/huggingface/datasets/pull/4204", "merged_at": "2022-05-03T13:16:24Z", "patch_url": "https://github.com/huggingface/datasets/pull/4204.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/4204" }
true
[ "_The documentation is not available anymore as the PR was closed or merged._", "This looks good to me! " ]
https://api.github.com/repos/huggingface/datasets/issues/494
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/494/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/494/comments
https://api.github.com/repos/huggingface/datasets/issues/494/events
https://github.com/huggingface/datasets/pull/494
676,886,955
MDExOlB1bGxSZXF1ZXN0NDY2MTExOTQz
494
Fix numpy stacking
[]
closed
false
null
1
2020-08-11T13:40:30Z
2020-08-11T14:56:50Z
2020-08-11T13:49:52Z
null
When getting items using a column name as a key, numpy arrays were not stacked. I fixed that and added some tests. There is another issue that still needs to be fixed though: when getting items using a column name as a key, pytorch tensors are not stacked (it outputs a list of tensors). This PR should help with the to fix this issue.
{ "+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/494/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/494/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/494.diff", "html_url": "https://github.com/huggingface/datasets/pull/494", "merged_at": "2020-08-11T13:49:52Z", "patch_url": "https://github.com/huggingface/datasets/pull/494.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/494" }
true
[ "This PR also fixed a bug where numpy arrays were returned instead of pytorch tensors when getting with a clumn as a key." ]
https://api.github.com/repos/huggingface/datasets/issues/5029
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5029/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5029/comments
https://api.github.com/repos/huggingface/datasets/issues/5029/events
https://github.com/huggingface/datasets/pull/5029
1,387,600,960
PR_kwDODunzps4_r8-j
5,029
Fix import in `ClassLabel` docstring example
[]
closed
false
null
1
2022-09-27T11:35:29Z
2022-09-27T14:03:24Z
2022-09-27T12:27:50Z
null
This PR addresses a super-simple fix: adding a missing `import` to the `ClassLabel` docstring example, as it was formatted as `from datasets Features`, so it's been fixed to `from datasets import Features`.
{ "+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/5029/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5029/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/5029.diff", "html_url": "https://github.com/huggingface/datasets/pull/5029", "merged_at": "2022-09-27T12:27:50Z", "patch_url": "https://github.com/huggingface/datasets/pull/5029.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5029" }
true
[ "_The documentation is not available anymore as the PR was closed or merged._" ]
https://api.github.com/repos/huggingface/datasets/issues/1536
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1536/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1536/comments
https://api.github.com/repos/huggingface/datasets/issues/1536/events
https://github.com/huggingface/datasets/pull/1536
765,043,121
MDExOlB1bGxSZXF1ZXN0NTM4ODM2MDM3
1,536
Add Hippocorpus Dataset
[]
closed
false
null
2
2020-12-13T06:13:02Z
2020-12-15T13:41:17Z
2020-12-15T13:40:11Z
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/1536/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1536/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/1536.diff", "html_url": "https://github.com/huggingface/datasets/pull/1536", "merged_at": "2020-12-15T13:40:11Z", "patch_url": "https://github.com/huggingface/datasets/pull/1536.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/1536" }
true
[ "> Before we merge can you try to reduce the size of the dummy_data.zip file ?\r\n> \r\n> To do so feel free to only keep a few lines of the csv files ans also remove unnecessary chunks of texts (for example keep only the first sentences of a story).\r\n\r\nHi @lhoestq, I have reduced the size of the dummy_data.zip file by making the necessary changes you had suggested. ", "merging since the CI is fixed on master" ]
https://api.github.com/repos/huggingface/datasets/issues/3075
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3075/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3075/comments
https://api.github.com/repos/huggingface/datasets/issues/3075/events
https://github.com/huggingface/datasets/pull/3075
1,026,103,388
PR_kwDODunzps4tL75E
3,075
Updates LexGLUE and MultiEURLEX README.md files
[]
closed
false
null
0
2021-10-14T08:19:16Z
2021-10-18T10:13:40Z
2021-10-18T10:13:40Z
null
Updates LexGLUE and MultiEURLEX README.md files - Fix leaderboard in LexGLUE. - Fix an error in the CaseHOLD data example. - Turn MultiEURLEX dataset statistics table into HTML to nicely render in HF website.
{ "+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/3075/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3075/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/3075.diff", "html_url": "https://github.com/huggingface/datasets/pull/3075", "merged_at": "2021-10-18T10:13:40Z", "patch_url": "https://github.com/huggingface/datasets/pull/3075.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/3075" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/3804
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3804/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3804/comments
https://api.github.com/repos/huggingface/datasets/issues/3804/events
https://github.com/huggingface/datasets/issues/3804
1,157,297,278
I_kwDODunzps5E-vR-
3,804
Text builder with custom separator line boundaries
[ { "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
6
2022-03-02T14:50:16Z
2022-03-16T15:53:59Z
null
null
**Is your feature request related to a problem? Please describe.** The current [Text](https://github.com/huggingface/datasets/blob/207be676bffe9d164740a41a883af6125edef135/src/datasets/packaged_modules/text/text.py#L23) builder implementation splits texts with `splitlines()` which splits the text on several line boundaries. Not all of them are always wanted. **Describe the solution you'd like** ```python if self.config.sample_by == "line": batch_idx = 0 while True: batch = f.read(self.config.chunksize) if not batch: break batch += f.readline() # finish current line if self.config.custom_newline is None: batch = batch.splitlines(keepends=self.config.keep_linebreaks) else: batch = batch.split(self.config.custom_newline)[:-1] pa_table = pa.Table.from_arrays([pa.array(batch)], schema=schema) # Uncomment for debugging (will print the Arrow table size and elements) # logger.warning(f"pa_table: {pa_table} num rows: {pa_table.num_rows}") # logger.warning('\n'.join(str(pa_table.slice(i, 1).to_pydict()) for i in range(pa_table.num_rows))) yield (file_idx, batch_idx), pa_table batch_idx += 1 ``` **A clear and concise description of what you want to happen.** Creating the dataset rows with a subset of the `splitlines()` line boundaries.
{ "+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/3804/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3804/timeline
null
null
null
null
false
[ "Gently pinging @lhoestq", "Hi ! Interresting :)\r\n\r\nCould you give more details on what kind of separators you would like to use instead ?", "In my case, I just want to use `\\n` but not `U+2028`.", "Ok I see, maybe there can be a `sep` parameter to allow users to specify what line/paragraph separator they'd like to use", "Related to:\r\n- #3729 \r\n- #3910", "Thanks for requesting this enhancement. We have recently found a somehow related issue with another dataset:\r\n- #3704\r\n\r\nLet me make a PR proposal." ]
https://api.github.com/repos/huggingface/datasets/issues/4951
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/4951/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/4951/comments
https://api.github.com/repos/huggingface/datasets/issues/4951/events
https://github.com/huggingface/datasets/pull/4951
1,365,954,814
PR_kwDODunzps4-lDqd
4,951
Fix license information in qasc dataset card
[]
closed
false
null
1
2022-09-08T10:04:39Z
2022-09-08T14:54:47Z
2022-09-08T14:52:05Z
null
This PR adds the license information to `qasc` dataset, once reported via GitHub by Tushar Khot, the dataset is licensed under CC BY 4.0: - https://github.com/allenai/qasc/issues/5
{ "+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/4951/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/4951/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/4951.diff", "html_url": "https://github.com/huggingface/datasets/pull/4951", "merged_at": "2022-09-08T14:52:05Z", "patch_url": "https://github.com/huggingface/datasets/pull/4951.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/4951" }
true
[ "_The documentation is not available anymore as the PR was closed or merged._" ]
https://api.github.com/repos/huggingface/datasets/issues/5394
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5394/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5394/comments
https://api.github.com/repos/huggingface/datasets/issues/5394/events
https://github.com/huggingface/datasets/issues/5394
1,513,976,229
I_kwDODunzps5aPXGl
5,394
CI error: TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers'
[]
closed
false
null
2
2022-12-29T18:58:44Z
2022-12-30T10:40:51Z
2022-12-29T21:00:27Z
null
### Describe the bug While installing the dependencies, the CI raises a TypeError: ``` Traceback (most recent call last): File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 183, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 142, in _get_module_details return _get_module_details(pkg_main_name, error) File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 109, in _get_module_details __import__(pkg_name) File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/__init__.py", line 6, in <module> from .errors import setup_default_warnings File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/errors.py", line 2, in <module> from .compat import Literal File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/compat.py", line 3, in <module> from thinc.util import copy_array File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/thinc/__init__.py", line 5, in <module> from .config import registry File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/thinc/config.py", line 2, in <module> import confection File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/confection/__init__.py", line 10, in <module> from pydantic import BaseModel, create_model, ValidationError, Extra File "pydantic/__init__.py", line 2, in init pydantic.__init__ File "pydantic/dataclasses.py", line 46, in init pydantic.dataclasses # | None | Attribute is set to None. | File "pydantic/main.py", line 121, in init pydantic.main TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers' ``` See: https://github.com/huggingface/datasets/actions/runs/3793736481/jobs/6466356565 ### Steps to reproduce the bug ```shell pip install .[tests,metrics-tests] python -m spacy download en_core_web_sm ``` ### Expected behavior No error. ### Environment info See: https://github.com/huggingface/datasets/actions/runs/3793736481/jobs/6466356565
{ "+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/5394/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5394/timeline
null
completed
null
null
false
[ "I still getting the same error :\r\n\r\n`python -m spacy download fr_core_news_lg\r\n`.\r\n`import spacy`", "@MFatnassi, this issue and the corresponding fix only affect our Continuous Integration testing environment.\r\n\r\nNote that `datasets` does not depend on `spacy`." ]
https://api.github.com/repos/huggingface/datasets/issues/440
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/440/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/440/comments
https://api.github.com/repos/huggingface/datasets/issues/440/events
https://github.com/huggingface/datasets/pull/440
666,116,823
MDExOlB1bGxSZXF1ZXN0NDU3MDE2MjQy
440
Fix user specified features in map
[]
closed
false
null
0
2020-07-27T09:04:26Z
2020-07-28T09:25:23Z
2020-07-28T09:25:22Z
null
`.map` didn't keep the user specified features because of an issue in the writer. The writer used to overwrite the user specified features with inferred features. I also added tests to make sure it doesn't happen again.
{ "+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/440/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/440/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/440.diff", "html_url": "https://github.com/huggingface/datasets/pull/440", "merged_at": "2020-07-28T09:25:22Z", "patch_url": "https://github.com/huggingface/datasets/pull/440.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/440" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/4724
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/4724/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/4724/comments
https://api.github.com/repos/huggingface/datasets/issues/4724/events
https://github.com/huggingface/datasets/pull/4724
1,311,127,404
PR_kwDODunzps47vLrP
4,724
Download and prepare as Parquet for cloud storage
[]
closed
false
null
8
2022-07-20T13:39:02Z
2022-09-05T17:27:25Z
2022-09-05T17:25:27Z
null
Download a dataset as Parquet in a cloud storage can be useful for streaming mode and to use with spark/dask/ray. This PR adds support for `fsspec` URIs like `s3://...`, `gcs://...` etc. and ads the `file_format` to save as parquet instead of arrow: ```python from datasets import * cache_dir = "s3://..." builder = load_dataset_builder("crime_and_punish", cache_dir=cache_dir) builder.download_and_prepare(file_format="parquet") ``` EDIT: actually changed the API to ```python from datasets import * builder = load_dataset_builder("crime_and_punish") builder.download_and_prepare("s3://...", file_format="parquet") ``` credentials to cloud storage can be passed using the `storage_options` argument in For consistency with the BeamBasedBuilder, I name the parquet files `{builder.name}-{split}-xxxxx-of-xxxxx.parquet`. I think this is fine since we'll need to implement parquet sharding after this PR, so that a dataset can be used efficiently with dask for example. Note that images/audio files are not embedded yet in the parquet files, this will added in a subsequent PR TODO: - [x] docs - [x] tests
{ "+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/4724/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/4724/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/4724.diff", "html_url": "https://github.com/huggingface/datasets/pull/4724", "merged_at": "2022-09-05T17:25:27Z", "patch_url": "https://github.com/huggingface/datasets/pull/4724.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/4724" }
true
[ "_The documentation is not available anymore as the PR was closed or merged._", "Added some docs for dask and took your comments into account\r\n\r\ncc @philschmid if you also want to take a look :)", "Just noticed that it would be more convenient to pass the output dir to download_and_prepare directly, to bypass the caching logic which prepares the dataset at `<cache_dir>/<name>/<version>/<hash>/`. And this way the cache is only used for the downloaded files. What do you think ?\r\n\r\n```python \r\n\r\nbuilder = load_datadet_builder(\"squad\")\r\n# or with a custom cache\r\nbuilder = load_datadet_builder(\"squad\", cache_dir=\"path/to/local/cache/for/downloaded/files\")\r\n\r\n# download and prepare to s3\r\nbuilder.download_and_prepare(\"s3://my_bucket/squad\")\r\n```", "Might be of interest: \r\nPyTorch and AWS introduced better support for S3 streaming in `torchtext`. \r\n![image](https://user-images.githubusercontent.com/32632186/183354186-a7f005e3-4167-4d80-ad1a-c62dd51ad7b6.png)\r\n", "Having thought about it a bit more, I also agree with @philschmid in that it's important to follow the existing APIs (pandas/dask), which means we should support the following at some point:\r\n\r\n* remote data files resolution for the packaged modules to support `load_dataset(\"<format>\", data_files=\"<fs_url>\")`\r\n* `to_<format>(\"<fs_url>\")`\r\n* `load_from_disk` and `save_to_disk` already expose the `fs` param, but it would be cool to support specifying `fsspec` URLs directly as the source/destination path (perhaps we can then deprecate `fs` to be fully aligned with pandas/dask)\r\n\r\nIMO these are the two main issues with the current approach:\r\n* relying on the builder API to generate the formatted files results in a non-friendly format due to how our caching works (a lot of nested subdirectories)\r\n* this approach still downloads the files needed to generate a dataset locally. Considering one of our goals is to align the streaming API with the non-streaming one, this could be avoided by running `to_<format>` on streamed/iterable datasets", "Alright I did the last change I wanted to do, here is the final API:\r\n\r\n```python\r\nbuilder = load_dataset_builder(...)\r\nbuilder.download_and_prepare(\"s3://...\", storage_options={\"token\": ...})\r\n```\r\n\r\nand it creates the arrow files directly in the specified directory, not in a nested subdirectory structure as we do in the cache !\r\n\r\n> this approach still downloads the files needed to generate a dataset locally. Considering one of our goals is to align the streaming API with the non-streaming one, this could be avoided by running to_<format> on streamed/iterable datasets\r\n\r\nYup this can be explored in some future work I think. Though to keep things simple and clear I would keep the streaming behaviors only when you load a dataset in streaming mode, and not include it in `download_and_prepare` (because it wouldn't be aligned with the name of the function, which imply to 1. download and 2. prepare ^^). Maybe an API like that can make sense for those who need full streaming\r\n\r\n```python\r\nds = load_dataset(..., streaming=True)\r\nds.to_parquet(\"s3://...\")\r\n```", "totally agree with your comment on the meaning of \"loading\", I'll update the docs", "I took your comments into account and reverted all the changes related to `cache_dir` to keep the support for remote `cache_dir` for beam datasets. I also updated the wording in the docs to not use \"load\" when it's not appropriate :)" ]
https://api.github.com/repos/huggingface/datasets/issues/1508
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1508/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1508/comments
https://api.github.com/repos/huggingface/datasets/issues/1508/events
https://github.com/huggingface/datasets/pull/1508
763,908,724
MDExOlB1bGxSZXF1ZXN0NTM4MjEyODUy
1,508
Fix namedsplit docs
[]
closed
false
null
2
2020-12-12T14:43:38Z
2021-03-11T02:18:39Z
2020-12-15T12:57:48Z
null
Fixes a broken link and `DatasetInfoMixin.split`'s docstring.
{ "+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/1508/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1508/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/1508.diff", "html_url": "https://github.com/huggingface/datasets/pull/1508", "merged_at": "2020-12-15T12:57:48Z", "patch_url": "https://github.com/huggingface/datasets/pull/1508.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/1508" }
true
[ "Hii please follow me", "Thanks @mariosasko!" ]
https://api.github.com/repos/huggingface/datasets/issues/1215
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1215/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1215/comments
https://api.github.com/repos/huggingface/datasets/issues/1215/events
https://github.com/huggingface/datasets/pull/1215
758,002,885
MDExOlB1bGxSZXF1ZXN0NTMzMjUyNjUx
1,215
Add irc disentanglement
[]
closed
false
null
2
2020-12-06T19:30:46Z
2020-12-16T16:18:25Z
2020-12-16T16:18:25Z
null
added files for irc disentanglement dataset was unable to test dummy data as a result of vpn/proxy issues
{ "+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/1215/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1215/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/1215.diff", "html_url": "https://github.com/huggingface/datasets/pull/1215", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/1215.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/1215" }
true
[ "looks like this PR includes changes about many files other than the ones for irc_disentanglement\r\n\r\nCould you please create a new branch and create another PR please ?", "closing in favor of #1586 " ]
https://api.github.com/repos/huggingface/datasets/issues/3069
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3069/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3069/comments
https://api.github.com/repos/huggingface/datasets/issues/3069/events
https://github.com/huggingface/datasets/issues/3069
1,024,818,680
I_kwDODunzps49FX34
3,069
CI fails on Windows with FileNotFoundError when stting up s3_base fixture
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
closed
false
null
0
2021-10-13T05:52:26Z
2021-10-13T08:05:49Z
2021-10-13T06:49:48Z
null
## Describe the bug After commit 9353fc863d0c99ab0427f83cc5a4f04fcf52f1df, the CI fails on Windows with FileNotFoundError when stting up s3_base fixture. See: https://app.circleci.com/pipelines/github/huggingface/datasets/8151/workflows/5db8d154-badd-4d3d-b202-ca7a318997a2/jobs/50321 Error summary: ``` ERROR tests/test_arrow_dataset.py::test_dummy_dataset_serialize_s3 - FileNotF... ERROR tests/test_dataset_dict.py::test_dummy_dataset_serialize_s3 - FileNotFo... ``` Stack trace: ``` ______________ ERROR at setup of test_dummy_dataset_serialize_s3 ______________ [gw0] win32 -- Python 3.6.8 C:\tools\miniconda3\python.exe @pytest.fixture() def s3_base(): # writable local S3 system import shlex import subprocess # Mocked AWS Credentials for moto. old_environ = os.environ.copy() os.environ.update(S3_FAKE_ENV_VARS) > proc = subprocess.Popen(shlex.split("moto_server s3 -p %s" % s3_port)) tests\s3_fixtures.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\tools\miniconda3\lib\subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <subprocess.Popen object at 0x0000012BB8A4B908> args = 'moto_server s3 -p 5555', executable = None, preexec_fn = None close_fds = True, pass_fds = (), cwd = None, env = None startupinfo = <subprocess.STARTUPINFO object at 0x0000012BB8177630> creationflags = 0, shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1 c2pwrite = -1, errread = -1, errwrite = -1, unused_restore_signals = True unused_start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session): """Execute program (MS Windows version)""" assert not pass_fds, "pass_fds not supported on Windows." if not isinstance(args, str): args = list2cmdline(args) # Process startup details if startupinfo is None: startupinfo = STARTUPINFO() if -1 not in (p2cread, c2pwrite, errwrite): startupinfo.dwFlags |= _winapi.STARTF_USESTDHANDLES startupinfo.hStdInput = p2cread startupinfo.hStdOutput = c2pwrite startupinfo.hStdError = errwrite if shell: startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW startupinfo.wShowWindow = _winapi.SW_HIDE comspec = os.environ.get("COMSPEC", "cmd.exe") args = '{} /c "{}"'.format (comspec, args) # Start the process try: hp, ht, pid, tid = _winapi.CreateProcess(executable, args, # no special security None, None, int(not close_fds), creationflags, env, os.fspath(cwd) if cwd is not None else None, > startupinfo) E FileNotFoundError: [WinError 2] The system cannot find the file specified C:\tools\miniconda3\lib\subprocess.py:1017: FileNotFoundError ```
{ "+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/3069/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3069/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/2430
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/2430/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/2430/comments
https://api.github.com/repos/huggingface/datasets/issues/2430/events
https://github.com/huggingface/datasets/pull/2430
907,322,595
MDExOlB1bGxSZXF1ZXN0NjU4MTg3Njkw
2,430
Add version-specific BibTeX
[]
closed
false
null
4
2021-05-31T10:05:42Z
2021-06-08T07:53:22Z
2021-06-08T07:53:22Z
null
As pointed out by @lhoestq in #2411, after the creation of the Zenodo DOI for Datasets, a new BibTeX entry is created with each release. This PR adds a version-specific BibTeX entry, besides the existing one which is generic for the project. See version-specific BibTeX entry here: https://zenodo.org/record/4817769/export/hx#.YLSyd6j7RPY
{ "+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/2430/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/2430/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/2430.diff", "html_url": "https://github.com/huggingface/datasets/pull/2430", "merged_at": "2021-06-08T07:53:22Z", "patch_url": "https://github.com/huggingface/datasets/pull/2430.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/2430" }
true
[ "Maybe we should only keep one citation ?\r\ncc @thomwolf @yjernite ", "For info:\r\n- The one automatically generated by Zenodo is version-specific, and a new one will be generated after each release.\r\n- Zenodo has also generated a project-specific DOI (they call it *Concept DOI* as opposed to *Version DOI*), but currently this only redirects to the DOI page of the latest version.\r\n- All the information automatically generated by Zenodo can be corrected/customized if necessary.\r\n - If we decide to correct/update metadata, take into account that there are the following fields (among others): Authors, Contributors, Title, Description, Keywords, Additional Notes, License,...\r\n\r\nAccording to Zenodo: https://help.zenodo.org/#versioning\r\n> **Which DOI should I use in citations?**\r\n> \r\n> You should normally always use the DOI for the specific version of your record in citations. This is to ensure that other researchers can access the exact research artefact you used for reproducibility. By default, Zenodo uses the specific version to generate citations.\r\n> \r\n> You can use the Concept DOI representing all versions in citations when it is desirable to cite an evolving research artifact, without being specific about the version.", "Thanks for the details ! As zenodo says we should probably just show the versioned DOI. And we can remove the old citation.", "I have removed the old citation.\r\n\r\nWhat about the new one? Should we customize it? I have fixed some author names (replaced nickname with first and family names). Note that the list of authors is created automatically by Zenodo from this list: https://github.com/huggingface/datasets/graphs/contributors\r\nI do not know if this default automatic list of authors is what we want to show in the citation..." ]
https://api.github.com/repos/huggingface/datasets/issues/4944
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/4944/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/4944/comments
https://api.github.com/repos/huggingface/datasets/issues/4944/events
https://github.com/huggingface/datasets/issues/4944
1,364,313,569
I_kwDODunzps5RUcXh
4,944
larger dataset, larger GPU memory in the training phase? Is that correct?
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
closed
false
null
2
2022-09-07T08:46:30Z
2022-09-07T12:34:58Z
2022-09-07T12:34:58Z
null
from datasets import set_caching_enabled set_caching_enabled(False) for ds_name in ["squad","newsqa","nqopen","narrativeqa"]: train_ds = load_from_disk("../../../dall/downstream/processedproqa/{}-train.hf".format(ds_name)) break train_ds = concatenate_datasets([train_ds,train_ds,train_ds,train_ds]) #operation 1 trainer = QuestionAnsweringTrainer( #huggingface trainer model=model, args=training_args, train_dataset=train_ds, eval_dataset= None, eval_examples=None, answer_column_name=answer_column, dataset_name="squad", tokenizer=tokenizer, data_collator=data_collator, compute_metrics=compute_metrics if training_args.predict_with_generate else None, ) with operation 1, the GPU memory increases from 16G to 23G
{ "+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/4944/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/4944/timeline
null
completed
null
null
false
[ "does the trainer save it in GPU? sooo curious... how to fix it", "It's my bad. didn't limit the input length" ]
https://api.github.com/repos/huggingface/datasets/issues/3904
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3904/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3904/comments
https://api.github.com/repos/huggingface/datasets/issues/3904/events
https://github.com/huggingface/datasets/issues/3904
1,167,730,095
I_kwDODunzps5FmiWv
3,904
CONLL2003 Dataset not available
[ { "color": "2edb81", "default": false, "description": "A bug in a dataset script provided in the library", "id": 2067388877, "name": "dataset bug", "node_id": "MDU6TGFiZWwyMDY3Mzg4ODc3", "url": "https://api.github.com/repos/huggingface/datasets/labels/dataset%20bug" } ]
closed
false
null
4
2022-03-13T23:46:15Z
2023-06-28T18:08:16Z
2022-03-17T08:21:32Z
null
## Describe the bug [CONLL2003](https://huggingface.co/datasets/conll2003) Dataset can no longer reach 'https://data.deepai.org/conll2003.zip' ![image](https://user-images.githubusercontent.com/4755430/158084483-ff83631c-5154-4823-892d-577bf1166db0.png) ## Steps to reproduce the bug ```python from datasets import load_dataset datasets = load_dataset("conll2003") ``` ## Expected results Download the conll2003 dataset. ## Actual results Error: `ConnectionError: Couldn't reach https://data.deepai.org/conll2003.zip (error 502)`
{ "+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/3904/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3904/timeline
null
completed
null
null
false
[ "Thanks for reporting, @omarespejel.\r\n\r\nI'm sorry but I can't reproduce the issue: the loading of the dataset works perfecto for me and I can reach the data URL: https://data.deepai.org/conll2003.zip\r\n\r\nMight it be due to a temporary problem in the data owner site (https://data.deepai.org/) that is fixed now?\r\nCould you please try loading the dataset again and tell if the problem persists?", "@omarespejel I'm closing this issue. Feel free to reopen it if the problem persists.", "getting same issue. Can't find any solution.", "I am getting the same issue. I use google colab with CPU.\r\nThe code I used is exactly the same as described above.\r\n```\r\nfrom datasets import load_dataset\r\ndataset = load_dataset(\"conll2003\")\r\n```\r\n\r\nThe produced error:\r\n![image](https://github.com/huggingface/datasets/assets/9371628/d87f7fb0-ef58-4755-abb5-f8f92c51fe02)\r\n\r\nNote: This error is different from what was initially described in this thread. This is because I use CPU. When I use GPU I reproduce the same initial error of the thread.\r\n\r\nMoreover, I receive the following warning:\r\n```\r\nWARNING:urllib3.connection:Certificate did not match expected hostname: data.deepai.org. Certificate: {'subject': ((('commonName', '*.b-cdn.net'),),), 'issuer': ((('countryName', 'GB'),), (('stateOrProvinceName', 'Greater Manchester'),), (('localityName', 'Salford'),), (('organizationName', 'Sectigo Limited'),), (('commonName', 'Sectigo RSA Domain Validation Secure Server CA'),)), 'version': 3, 'serialNumber': 'DDED48B13E1EA03983E833AB2C35EF07', 'notBefore': 'Nov 7 00:00:00 2022 GMT', 'notAfter': 'Nov 11 23:59:59 2023 GMT', 'subjectAltName': (('DNS', '*.b-cdn.net'), ('DNS', 'b-cdn.net')), 'OCSP': ('http://ocsp.sectigo.com/',), 'caIssuers': ('http://crt.sectigo.com/SectigoRSADomainValidationSecureServerCA.crt',)}\r\nDownloading and preparing dataset conll2003/conll2003 to /root/.cache/huggingface/datasets/conll2003/conll2003/1.0.0/9a4d16a94f8674ba3466315300359b0acd891b68b6c8743ddf60b9c702adce98...\r\nWARNING:urllib3.connection:Certificate did not match expected hostname: data.deepai.org. Certificate: {'subject': ((('commonName', '*.b-cdn.net'),),), 'issuer': ((('countryName', 'GB'),), (('stateOrProvinceName', 'Greater Manchester'),), (('localityName', 'Salford'),), (('organizationName', 'Sectigo Limited'),), (('commonName', 'Sectigo RSA Domain Validation Secure Server CA'),)), 'version': 3, 'serialNumber': 'DDED48B13E1EA03983E833AB2C35EF07', 'notBefore': 'Nov 7 00:00:00 2022 GMT', 'notAfter': 'Nov 11 23:59:59 2023 GMT', 'subjectAltName': (('DNS', '*.b-cdn.net'), ('DNS', 'b-cdn.net')), 'OCSP': ('http://ocsp.sectigo.com/',), 'caIssuers': ('http://crt.sectigo.com/SectigoRSADomainValidationSecureServerCA.crt',)}\r\n```\r\n" ]
https://api.github.com/repos/huggingface/datasets/issues/5401
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5401/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5401/comments
https://api.github.com/repos/huggingface/datasets/issues/5401/events
https://github.com/huggingface/datasets/pull/5401
1,517,160,935
PR_kwDODunzps5Gh1XQ
5,401
Support Dataset conversion from/to Spark
[]
open
false
null
4
2023-01-03T09:57:40Z
2023-01-05T14:21:33Z
null
null
This PR implements Spark integration by supporting `Dataset` conversion from/to Spark `DataFrame`.
{ "+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/5401/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5401/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/5401.diff", "html_url": "https://github.com/huggingface/datasets/pull/5401", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5401.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5401" }
true
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_5401). All of your documentation changes will be reflected on that endpoint.", "Cool thanks !\r\n\r\nSpark DataFrame are usually quite big, and I believe here `from_spark` would load everything in the driver node's RAM, which is quite limiting. Same for `to_spark` which would load everything in the driver node's RAM before sending the data to the executor. Maybe we can mention this in the docstring ?\r\n\r\nTo transfer big datasets from/into the HF ecosystem using Spark maybe we can just make sure that `pyspark` can read/write to the HF Hub, and that `datasets` can read from HDFS/S3/etc.", "Yes @lhoestq , consider this as a first integration of the Datasets library with Spark.\r\n- This PR implements the basic conversion between both.\r\n - And yes, we are using the Spark's `pandas` API (that uses `pyarrow` under the hood): everything is transferred to the driver.\r\n - Note that we are converting from/to a Datasets dataset: this is not distributed\r\n\r\nThe next step is to support the integration of the HF Hub with Spark, that I think should be done using `hffs`.", "Thinking more about it I don't really see how those two methods help in practice, since one can already do `datasets` <-> pandas <-> spark and those two methods don't add value over this.\r\n\r\nHowever I think it can be good documentation to explain that it's possible to do it and it's super simple" ]
https://api.github.com/repos/huggingface/datasets/issues/5906
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5906/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5906/comments
https://api.github.com/repos/huggingface/datasets/issues/5906/events
https://github.com/huggingface/datasets/issues/5906
1,728,171,113
I_kwDODunzps5nAcxp
5,906
Could you unpin responses version?
[]
closed
false
null
0
2023-05-26T20:02:14Z
2023-05-30T17:53:31Z
2023-05-30T17:53:31Z
null
### Describe the bug Could you unpin [this](https://github.com/huggingface/datasets/blob/main/setup.py#L139) or move it to test requirements? This is a testing library and we also use it for our tests as well. We do not want to use a very outdated version. ### Steps to reproduce the bug could not install this library due to dependency conflict. ### Expected behavior can install datasets ### Environment info linux 64
{ "+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/5906/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5906/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/2825
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/2825/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/2825/comments
https://api.github.com/repos/huggingface/datasets/issues/2825/events
https://github.com/huggingface/datasets/issues/2825
976,584,926
MDU6SXNzdWU5NzY1ODQ5MjY=
2,825
The datasets.map function does not load cached dataset after moving python script
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
closed
false
null
3
2021-08-23T03:23:37Z
2021-08-31T13:14:41Z
2021-08-31T13:13:36Z
null
## Describe the bug The datasets.map function caches the processed data to a certain directory. When the map function is called another time with totally the same parameters, the cached data are supposed to be reloaded instead of re-processing. However, it doesn't reuse cached data sometimes. I use the common data processing in different tasks, the datasets are processed again, the only difference is that I run them in different files. ## Steps to reproduce the bug Just run the following codes in different .py files. ```python if __name__ == '__main__': from datasets import load_dataset from transformers import AutoTokenizer raw_datasets = load_dataset("wikitext", "wikitext-2-raw-v1") tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased") def tokenize_function(examples): return tokenizer(examples["text"], padding="max_length", truncation=True) tokenized_datasets = raw_datasets.map(tokenize_function, batched=True) ``` ## Expected results The map function should reload data in the second or any later runs. ## Actual results The processing happens in each run. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.8.0 - Platform: linux - Python version: 3.7.6 - PyArrow version: 3.0.0 This is the first time I report a bug. If there is any problem or confusing description, please let me know πŸ˜„.
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/2825/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/2825/timeline
null
completed
null
null
false
[ "This also happened to me on COLAB.\r\nDetails:\r\nI ran the `run_mlm.py` in two different notebooks. \r\nIn the first notebook, I do tokenization since I can get 4 CPU cores without any GPUs, and save the cache into a folder which I copy to drive.\r\nIn the second notebook, I copy the cache folder from drive and re-run the run_mlm.py script (this time I uncomment the trainer code which happens after the tokenization)\r\n\r\nNote: I didn't change anything in the arguments, not even the preprocessing_num_workers\r\n ", "Thanks for reporting ! This is indeed a bug, I'm looking into it", "#2854 fixed the issue :)\r\n\r\nWe'll do a new release of `datasets` soon to make the fix available.\r\nIn the meantime, feel free to try it out by installing `datasets` from source\r\n\r\nIf you have other issues or any question, feel free to re-open the issue :)" ]
https://api.github.com/repos/huggingface/datasets/issues/3449
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3449/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3449/comments
https://api.github.com/repos/huggingface/datasets/issues/3449/events
https://github.com/huggingface/datasets/issues/3449
1,083,373,018
I_kwDODunzps5AkvXa
3,449
Add `__add__()`, `__iadd__()` and similar to `Dataset` class
[ { "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" }, { "color": "c5def5", "default": false, "description": "Generic discussion on the library", "id": 2067400324, "name": "generic discussion", "node_id": "MDU6TGFiZWwyMDY3NDAwMzI0", "url": "https://api.github.com/repos/huggingface/datasets/labels/generic%20discussion" } ]
closed
false
null
2
2021-12-17T15:29:11Z
2023-07-25T15:33:57Z
2023-07-25T15:33:56Z
null
**Is your feature request related to a problem? Please describe.** No. **Describe the solution you'd like** I would like to be able to concatenate datasets as follows: ```python >>> dataset["train"] += dataset["validation"] ``` ... instead of using `concatenate_datasets()`: ```python >>> raw_datasets["train"] = concatenate_datasets([raw_datasets["train"], raw_datasets["validation"]]) >>> del raw_datasets["validation"] ``` **Describe alternatives you've considered** Well, I have considered `concatenate_datasets()` πŸ˜€ **Additional context** N.a.
{ "+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/3449/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3449/timeline
null
not_planned
null
null
false
[ "I was going through the codebase, and I believe the implementation of __add__() and __iadd__() will be similar to concatenate_datasets() after the elimination of code for arguments other than the list of datasets (info, split, axis). \r\n(Assuming elimination of axis means concatenating over axis 1.)", "Most data frame libraries (Polars, Pandas, ...) override `__add__` to perform (mathematical) summation, so having different behavior here is a bad idea." ]
https://api.github.com/repos/huggingface/datasets/issues/3279
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3279/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3279/comments
https://api.github.com/repos/huggingface/datasets/issues/3279/events
https://github.com/huggingface/datasets/pull/3279
1,054,711,852
PR_kwDODunzps4ulVHe
3,279
Minor Typo Fix - Precision to Recall
[]
closed
false
null
0
2021-11-16T10:32:22Z
2021-11-16T11:18:03Z
2021-11-16T11:18:02Z
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/3279/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3279/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/3279.diff", "html_url": "https://github.com/huggingface/datasets/pull/3279", "merged_at": "2021-11-16T11:18:02Z", "patch_url": "https://github.com/huggingface/datasets/pull/3279.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/3279" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/3293
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3293/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3293/comments
https://api.github.com/repos/huggingface/datasets/issues/3293/events
https://github.com/huggingface/datasets/pull/3293
1,057,004,431
PR_kwDODunzps4uslLN
3,293
Pin version exclusion for Markdown
[]
closed
false
null
0
2021-11-18T06:56:01Z
2021-11-18T10:28:05Z
2021-11-18T10:28:04Z
null
As Markdown version 3.3.5 has a bug, it is better to exclude it in case the users have it previously installed in their environment. Related to #3289, #3286.
{ "+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/3293/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3293/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/3293.diff", "html_url": "https://github.com/huggingface/datasets/pull/3293", "merged_at": "2021-11-18T10:28:04Z", "patch_url": "https://github.com/huggingface/datasets/pull/3293.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/3293" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/5993
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5993/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5993/comments
https://api.github.com/repos/huggingface/datasets/issues/5993/events
https://github.com/huggingface/datasets/issues/5993
1,776,643,555
I_kwDODunzps5p5W3j
5,993
ValueError: Table schema does not match schema used to create file
[]
closed
false
null
2
2023-06-27T10:54:07Z
2023-06-27T15:36:42Z
2023-06-27T15:32:44Z
null
### Describe the bug Saving a dataset as parquet fails with a `ValueError: Table schema does not match schema used to create file` if the dataset was obtained out of a `.select_columns()` call with columns selected out of order. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict( { "x1": [1, 2, 3], "x2": [10, 11, 12], } ) ds = dataset.select_columns(["x2", "x1"]) ds.to_parquet("demo.parquet") ``` ```shell >>> ValueError: Table schema does not match schema used to create file: table: x2: int64 x1: int64 -- schema metadata -- huggingface: '{"info": {"features": {"x2": {"dtype": "int64", "_type": "V' + 53 vs. file: x1: int64 x2: int64 -- schema metadata -- huggingface: '{"info": {"features": {"x1": {"dtype": "int64", "_type": "V' + 53 ``` --- I think this is because after the `.select_columns()` call with out of order columns, the output dataset features' schema ends up being out of sync with the schema of the arrow table backing it. ```python ds.features.arrow_schema >>> x1: int64 x2: int64 -- schema metadata -- huggingface: '{"info": {"features": {"x1": {"dtype": "int64", "_type": "V' + 53 ds.data.schema >>> x2: int64 x1: int64 -- schema metadata -- huggingface: '{"info": {"features": {"x2": {"dtype": "int64", "_type": "V' + 53 ``` So when we call `.to_parquet()`, the call behind the scenes to `datasets.io.parquet.ParquetDatasetWriter(...).write()` which initialises the backend `pyarrow.parquet.ParquetWriter` with `schema = self.dataset.features.arrow_schema` triggers `pyarrow` on write when [it checks](https://github.com/apache/arrow/blob/11b140a734a516e436adaddaeb35d23f30dcce44/python/pyarrow/parquet/core.py#L1086-L1090) that the `ParquetWriter` schema matches the schema of the table being written πŸ™Œ https://github.com/huggingface/datasets/blob/6ed837325cb539a5deb99129e5ad181d0269e050/src/datasets/io/parquet.py#L139-L141 ### Expected behavior The dataset gets successfully saved as parquet. *In the same way as it does if saving it as csv: ```python import datasets dataset = datasets.Dataset.from_dict( { "x1": [1, 2, 3], "x2": [10, 11, 12], } ) ds = dataset.select_columns(["x2", "x1"]) ds.to_csv("demo.csv") ``` ### Environment info `python==3.11` `datasets==2.13.1`
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/5993/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5993/timeline
null
completed
null
null
false
[ "We'll do a new release of `datasets` soon to make the fix available :)\r\n\r\nIn the meantime you can use `datasets` from source (main)", "Thank you very much @lhoestq ! πŸš€ " ]
https://api.github.com/repos/huggingface/datasets/issues/1063
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1063/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1063/comments
https://api.github.com/repos/huggingface/datasets/issues/1063/events
https://github.com/huggingface/datasets/pull/1063
756,376,374
MDExOlB1bGxSZXF1ZXN0NTMxOTMxMTMz
1,063
Add the Ud treebank
[]
closed
false
null
1
2020-12-03T16:56:41Z
2020-12-04T16:11:54Z
2020-12-04T15:51:46Z
null
This PR adds the 183 datasets in 104 languages of the UD Treebank.
{ "+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/1063/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1063/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/1063.diff", "html_url": "https://github.com/huggingface/datasets/pull/1063", "merged_at": "2020-12-04T15:51:45Z", "patch_url": "https://github.com/huggingface/datasets/pull/1063.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/1063" }
true
[ "merging since the CI is fixed on master" ]
https://api.github.com/repos/huggingface/datasets/issues/6005
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6005/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6005/comments
https://api.github.com/repos/huggingface/datasets/issues/6005/events
https://github.com/huggingface/datasets/pull/6005
1,788,103,576
PR_kwDODunzps5UoJ91
6,005
Drop Python 3.7 support
[]
closed
false
null
7
2023-07-04T15:02:37Z
2023-07-06T15:32:41Z
2023-07-06T15:22:43Z
null
`hfh` and `transformers` have dropped Python 3.7 support, so we should do the same :). (Based on the stats, it seems less than 10% of the users use `datasets` with Python 3.7)
{ "+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/6005/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6005/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/6005.diff", "html_url": "https://github.com/huggingface/datasets/pull/6005", "merged_at": "2023-07-06T15:22:43Z", "patch_url": "https://github.com/huggingface/datasets/pull/6005.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6005" }
true
[ "<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.006152 / 0.011353 (-0.005200) | 0.003916 / 0.011008 (-0.007092) | 0.097355 / 0.038508 (0.058847) | 0.037228 / 0.023109 (0.014119) | 0.315753 / 0.275898 (0.039855) | 0.387949 / 0.323480 (0.064470) | 0.004804 / 0.007986 (-0.003181) | 0.002975 / 0.004328 (-0.001353) | 0.076932 / 0.004250 (0.072682) | 0.053497 / 0.037052 (0.016445) | 0.331143 / 0.258489 (0.072654) | 0.388347 / 0.293841 (0.094506) | 0.027535 / 0.128546 (-0.101011) | 0.008509 / 0.075646 (-0.067137) | 0.312639 / 0.419271 (-0.106632) | 0.047212 / 0.043533 (0.003679) | 0.316875 / 0.255139 (0.061736) | 0.352191 / 0.283200 (0.068992) | 0.021380 / 0.141683 (-0.120303) | 1.541401 / 1.452155 (0.089247) | 1.519420 / 1.492716 (0.026704) |\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.206332 / 0.018006 (0.188326) | 0.412252 / 0.000490 (0.411762) | 0.005119 / 0.000200 (0.004919) | 0.000077 / 0.000054 (0.000022) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.023856 / 0.037411 (-0.013556) | 0.098216 / 0.014526 (0.083691) | 0.106553 / 0.176557 (-0.070003) | 0.168767 / 0.737135 (-0.568369) | 0.109244 / 0.296338 (-0.187094) |\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.457580 / 0.215209 (0.242371) | 4.583246 / 2.077655 (2.505591) | 2.296356 / 1.504120 (0.792236) | 2.096216 / 1.541195 (0.555021) | 2.159086 / 1.468490 (0.690596) | 0.557905 / 4.584777 (-4.026872) | 3.345910 / 3.745712 (-0.399802) | 1.767436 / 5.269862 (-3.502426) | 1.021583 / 4.565676 (-3.544094) | 0.067265 / 0.424275 (-0.357011) | 0.011411 / 0.007607 (0.003804) | 0.559841 / 0.226044 (0.333797) | 5.586892 / 2.268929 (3.317963) | 2.735520 / 55.444624 (-52.709104) | 2.429393 / 6.876477 (-4.447084) | 2.544901 / 2.142072 (0.402829) | 0.667603 / 4.805227 (-4.137625) | 0.136244 / 6.500664 (-6.364421) | 0.066961 / 0.075469 (-0.008508) |\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.206529 / 1.841788 (-0.635259) | 13.988306 / 8.074308 (5.913998) | 13.481813 / 10.191392 (3.290421) | 0.161901 / 0.680424 (-0.518523) | 0.016850 / 0.534201 (-0.517351) | 0.367657 / 0.579283 (-0.211626) | 0.393343 / 0.434364 (-0.041021) | 0.465288 / 0.540337 (-0.075050) | 0.559888 / 1.386936 (-0.827048) |\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.005956 / 0.011353 (-0.005397) | 0.003734 / 0.011008 (-0.007274) | 0.077841 / 0.038508 (0.039333) | 0.036532 / 0.023109 (0.013422) | 0.438923 / 0.275898 (0.163025) | 0.490133 / 0.323480 (0.166653) | 0.004651 / 0.007986 (-0.003335) | 0.002881 / 0.004328 (-0.001448) | 0.077868 / 0.004250 (0.073618) | 0.051700 / 0.037052 (0.014647) | 0.448018 / 0.258489 (0.189529) | 0.500304 / 0.293841 (0.206464) | 0.029051 / 0.128546 (-0.099496) | 0.008498 / 0.075646 (-0.067148) | 0.082932 / 0.419271 (-0.336339) | 0.043665 / 0.043533 (0.000132) | 0.431613 / 0.255139 (0.176474) | 0.458749 / 0.283200 (0.175549) | 0.021951 / 0.141683 (-0.119731) | 1.556043 / 1.452155 (0.103888) | 1.588391 / 1.492716 (0.095675) |\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.220674 / 0.018006 (0.202667) | 0.415408 / 0.000490 (0.414918) | 0.002613 / 0.000200 (0.002413) | 0.000075 / 0.000054 (0.000020) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.025548 / 0.037411 (-0.011863) | 0.103633 / 0.014526 (0.089107) | 0.115193 / 0.176557 (-0.061364) | 0.163971 / 0.737135 (-0.573164) | 0.114754 / 0.296338 (-0.181585) |\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.456823 / 0.215209 (0.241614) | 4.569950 / 2.077655 (2.492296) | 2.196339 / 1.504120 (0.692219) | 1.985822 / 1.541195 (0.444628) | 2.044083 / 1.468490 (0.575593) | 0.567919 / 4.584777 (-4.016858) | 3.397515 / 3.745712 (-0.348197) | 1.741087 / 5.269862 (-3.528775) | 1.041237 / 4.565676 (-3.524440) | 0.068963 / 0.424275 (-0.355313) | 0.011677 / 0.007607 (0.004070) | 0.565010 / 0.226044 (0.338966) | 5.625886 / 2.268929 (3.356957) | 2.670658 / 55.444624 (-52.773967) | 2.300279 / 6.876477 (-4.576198) | 2.392178 / 2.142072 (0.250106) | 0.680226 / 4.805227 (-4.125001) | 0.139119 / 6.500664 (-6.361545) | 0.067953 / 0.075469 (-0.007516) |\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.303280 / 1.841788 (-0.538507) | 14.458686 / 8.074308 (6.384378) | 14.409369 / 10.191392 (4.217977) | 0.144581 / 0.680424 (-0.535843) | 0.016634 / 0.534201 (-0.517567) | 0.364607 / 0.579283 (-0.214676) | 0.394521 / 0.434364 (-0.039843) | 0.433417 / 0.540337 (-0.106921) | 0.527127 / 1.386936 (-0.859809) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#04a36f9546484dceadb84a133c1a460281d018f8 \"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.006245 / 0.011353 (-0.005108) | 0.003871 / 0.011008 (-0.007138) | 0.098823 / 0.038508 (0.060315) | 0.039853 / 0.023109 (0.016744) | 0.314989 / 0.275898 (0.039091) | 0.376733 / 0.323480 (0.053254) | 0.004754 / 0.007986 (-0.003232) | 0.002971 / 0.004328 (-0.001357) | 0.078451 / 0.004250 (0.074201) | 0.053160 / 0.037052 (0.016107) | 0.324443 / 0.258489 (0.065954) | 0.361488 / 0.293841 (0.067647) | 0.027942 / 0.128546 (-0.100604) | 0.008535 / 0.075646 (-0.067111) | 0.315526 / 0.419271 (-0.103745) | 0.045706 / 0.043533 (0.002174) | 0.329614 / 0.255139 (0.074475) | 0.336339 / 0.283200 (0.053139) | 0.021278 / 0.141683 (-0.120405) | 1.529710 / 1.452155 (0.077555) | 1.566833 / 1.492716 (0.074116) |\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.215263 / 0.018006 (0.197257) | 0.440320 / 0.000490 (0.439830) | 0.002627 / 0.000200 (0.002427) | 0.000075 / 0.000054 (0.000021) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.023971 / 0.037411 (-0.013441) | 0.100549 / 0.014526 (0.086023) | 0.106995 / 0.176557 (-0.069561) | 0.169630 / 0.737135 (-0.567505) | 0.111614 / 0.296338 (-0.184724) |\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.424911 / 0.215209 (0.209702) | 4.246920 / 2.077655 (2.169266) | 1.923321 / 1.504120 (0.419202) | 1.714795 / 1.541195 (0.173600) | 1.772906 / 1.468490 (0.304416) | 0.554676 / 4.584777 (-4.030101) | 3.478896 / 3.745712 (-0.266816) | 2.800494 / 5.269862 (-2.469368) | 1.382630 / 4.565676 (-3.183047) | 0.067271 / 0.424275 (-0.357004) | 0.010967 / 0.007607 (0.003360) | 0.526769 / 0.226044 (0.300725) | 5.288564 / 2.268929 (3.019636) | 2.337459 / 55.444624 (-53.107165) | 1.999975 / 6.876477 (-4.876502) | 2.102680 / 2.142072 (-0.039392) | 0.672181 / 4.805227 (-4.133046) | 0.135097 / 6.500664 (-6.365567) | 0.066950 / 0.075469 (-0.008519) |\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.264365 / 1.841788 (-0.577423) | 14.282440 / 8.074308 (6.208132) | 14.220200 / 10.191392 (4.028808) | 0.139055 / 0.680424 (-0.541369) | 0.016681 / 0.534201 (-0.517520) | 0.367936 / 0.579283 (-0.211348) | 0.393959 / 0.434364 (-0.040404) | 0.424438 / 0.540337 (-0.115900) | 0.508065 / 1.386936 (-0.878872) |\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.006514 / 0.011353 (-0.004839) | 0.003890 / 0.011008 (-0.007118) | 0.078871 / 0.038508 (0.040363) | 0.038080 / 0.023109 (0.014971) | 0.358282 / 0.275898 (0.082384) | 0.430654 / 0.323480 (0.107174) | 0.005712 / 0.007986 (-0.002273) | 0.003030 / 0.004328 (-0.001299) | 0.078636 / 0.004250 (0.074386) | 0.057771 / 0.037052 (0.020719) | 0.368814 / 0.258489 (0.110325) | 0.437047 / 0.293841 (0.143206) | 0.029470 / 0.128546 (-0.099076) | 0.008523 / 0.075646 (-0.067124) | 0.083334 / 0.419271 (-0.335938) | 0.044505 / 0.043533 (0.000972) | 0.357484 / 0.255139 (0.102345) | 0.393839 / 0.283200 (0.110639) | 0.023340 / 0.141683 (-0.118343) | 1.561033 / 1.452155 (0.108878) | 1.595560 / 1.492716 (0.102844) |\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.204149 / 0.018006 (0.186143) | 0.442747 / 0.000490 (0.442257) | 0.003105 / 0.000200 (0.002905) | 0.000085 / 0.000054 (0.000030) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.027002 / 0.037411 (-0.010409) | 0.105595 / 0.014526 (0.091070) | 0.108695 / 0.176557 (-0.067861) | 0.163182 / 0.737135 (-0.573953) | 0.114999 / 0.296338 (-0.181339) |\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.483713 / 0.215209 (0.268504) | 4.836063 / 2.077655 (2.758409) | 2.488072 / 1.504120 (0.983952) | 2.289556 / 1.541195 (0.748361) | 2.342912 / 1.468490 (0.874422) | 0.565937 / 4.584777 (-4.018840) | 3.479085 / 3.745712 (-0.266627) | 1.770922 / 5.269862 (-3.498940) | 1.046084 / 4.565676 (-3.519592) | 0.067857 / 0.424275 (-0.356418) | 0.011283 / 0.007607 (0.003676) | 0.592966 / 0.226044 (0.366921) | 5.932842 / 2.268929 (3.663914) | 2.956252 / 55.444624 (-52.488372) | 2.602704 / 6.876477 (-4.273772) | 2.715625 / 2.142072 (0.573552) | 0.674299 / 4.805227 (-4.130929) | 0.136039 / 6.500664 (-6.364625) | 0.067629 / 0.075469 (-0.007840) |\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.333734 / 1.841788 (-0.508054) | 14.561943 / 8.074308 (6.487634) | 14.455385 / 10.191392 (4.263993) | 0.132020 / 0.680424 (-0.548404) | 0.016893 / 0.534201 (-0.517308) | 0.367146 / 0.579283 (-0.212137) | 0.399623 / 0.434364 (-0.034741) | 0.432658 / 0.540337 (-0.107680) | 0.530475 / 1.386936 (-0.856461) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#18da5adb22b2b403b8d8ae673192746d2ed7e9f9 \"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.006045 / 0.011353 (-0.005308) | 0.003906 / 0.011008 (-0.007103) | 0.097558 / 0.038508 (0.059050) | 0.038827 / 0.023109 (0.015718) | 0.393564 / 0.275898 (0.117666) | 0.442459 / 0.323480 (0.118980) | 0.004792 / 0.007986 (-0.003194) | 0.002984 / 0.004328 (-0.001345) | 0.076419 / 0.004250 (0.072169) | 0.053606 / 0.037052 (0.016554) | 0.409743 / 0.258489 (0.151254) | 0.445753 / 0.293841 (0.151912) | 0.027753 / 0.128546 (-0.100793) | 0.008428 / 0.075646 (-0.067219) | 0.310267 / 0.419271 (-0.109004) | 0.057582 / 0.043533 (0.014049) | 0.396624 / 0.255139 (0.141485) | 0.416288 / 0.283200 (0.133089) | 0.029048 / 0.141683 (-0.112635) | 1.495362 / 1.452155 (0.043207) | 1.546331 / 1.492716 (0.053615) |\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.203832 / 0.018006 (0.185826) | 0.423649 / 0.000490 (0.423160) | 0.004533 / 0.000200 (0.004333) | 0.000076 / 0.000054 (0.000022) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.023084 / 0.037411 (-0.014328) | 0.100503 / 0.014526 (0.085977) | 0.105058 / 0.176557 (-0.071499) | 0.168506 / 0.737135 (-0.568629) | 0.112019 / 0.296338 (-0.184320) |\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.425877 / 0.215209 (0.210668) | 4.251278 / 2.077655 (2.173624) | 1.931339 / 1.504120 (0.427219) | 1.730578 / 1.541195 (0.189383) | 1.750637 / 1.468490 (0.282147) | 0.559307 / 4.584777 (-4.025470) | 3.461665 / 3.745712 (-0.284047) | 2.826959 / 5.269862 (-2.442903) | 1.418448 / 4.565676 (-3.147229) | 0.067881 / 0.424275 (-0.356394) | 0.011394 / 0.007607 (0.003787) | 0.533226 / 0.226044 (0.307181) | 5.341849 / 2.268929 (3.072921) | 2.367832 / 55.444624 (-53.076792) | 2.027240 / 6.876477 (-4.849236) | 2.095852 / 2.142072 (-0.046220) | 0.673790 / 4.805227 (-4.131437) | 0.136044 / 6.500664 (-6.364620) | 0.066350 / 0.075469 (-0.009119) |\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.203740 / 1.841788 (-0.638048) | 13.720879 / 8.074308 (5.646571) | 13.405939 / 10.191392 (3.214547) | 0.146792 / 0.680424 (-0.533632) | 0.016844 / 0.534201 (-0.517357) | 0.373455 / 0.579283 (-0.205828) | 0.394596 / 0.434364 (-0.039768) | 0.464715 / 0.540337 (-0.075623) | 0.558931 / 1.386936 (-0.828005) |\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.006118 / 0.011353 (-0.005235) | 0.003817 / 0.011008 (-0.007191) | 0.077494 / 0.038508 (0.038985) | 0.037507 / 0.023109 (0.014398) | 0.387030 / 0.275898 (0.111132) | 0.437352 / 0.323480 (0.113872) | 0.004810 / 0.007986 (-0.003176) | 0.002935 / 0.004328 (-0.001394) | 0.077143 / 0.004250 (0.072892) | 0.053986 / 0.037052 (0.016933) | 0.393164 / 0.258489 (0.134675) | 0.449603 / 0.293841 (0.155762) | 0.029303 / 0.128546 (-0.099244) | 0.008481 / 0.075646 (-0.067165) | 0.083363 / 0.419271 (-0.335908) | 0.043877 / 0.043533 (0.000344) | 0.378175 / 0.255139 (0.123036) | 0.403996 / 0.283200 (0.120797) | 0.021688 / 0.141683 (-0.119995) | 1.541606 / 1.452155 (0.089452) | 1.552996 / 1.492716 (0.060280) |\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.236759 / 0.018006 (0.218752) | 0.416221 / 0.000490 (0.415732) | 0.000862 / 0.000200 (0.000662) | 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.025543 / 0.037411 (-0.011868) | 0.101731 / 0.014526 (0.087206) | 0.108482 / 0.176557 (-0.068075) | 0.160290 / 0.737135 (-0.576845) | 0.111392 / 0.296338 (-0.184946) |\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.457767 / 0.215209 (0.242558) | 4.565976 / 2.077655 (2.488321) | 2.245413 / 1.504120 (0.741294) | 2.031458 / 1.541195 (0.490264) | 2.073193 / 1.468490 (0.604702) | 0.560461 / 4.584777 (-4.024316) | 3.422536 / 3.745712 (-0.323176) | 2.977017 / 5.269862 (-2.292845) | 1.377021 / 4.565676 (-3.188655) | 0.068444 / 0.424275 (-0.355831) | 0.011036 / 0.007607 (0.003429) | 0.571501 / 0.226044 (0.345456) | 5.702652 / 2.268929 (3.433723) | 2.727132 / 55.444624 (-52.717492) | 2.399269 / 6.876477 (-4.477208) | 2.574281 / 2.142072 (0.432208) | 0.682600 / 4.805227 (-4.122627) | 0.136943 / 6.500664 (-6.363722) | 0.067126 / 0.075469 (-0.008343) |\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.322196 / 1.841788 (-0.519592) | 14.239509 / 8.074308 (6.165201) | 14.235779 / 10.191392 (4.044387) | 0.148262 / 0.680424 (-0.532162) | 0.016566 / 0.534201 (-0.517635) | 0.364034 / 0.579283 (-0.215249) | 0.399157 / 0.434364 (-0.035207) | 0.426348 / 0.540337 (-0.113990) | 0.520804 / 1.386936 (-0.866132) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#8f57aae06bd325d76cb70cb774450f3a66f169cf \"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.007808 / 0.011353 (-0.003545) | 0.004706 / 0.011008 (-0.006303) | 0.100530 / 0.038508 (0.062022) | 0.052052 / 0.023109 (0.028943) | 0.419300 / 0.275898 (0.143402) | 0.488451 / 0.323480 (0.164971) | 0.006350 / 0.007986 (-0.001636) | 0.003875 / 0.004328 (-0.000453) | 0.076489 / 0.004250 (0.072238) | 0.077554 / 0.037052 (0.040502) | 0.435863 / 0.258489 (0.177373) | 0.483241 / 0.293841 (0.189400) | 0.037518 / 0.128546 (-0.091028) | 0.009857 / 0.075646 (-0.065789) | 0.340933 / 0.419271 (-0.078339) | 0.087046 / 0.043533 (0.043514) | 0.410721 / 0.255139 (0.155582) | 0.428995 / 0.283200 (0.145795) | 0.041701 / 0.141683 (-0.099982) | 1.821017 / 1.452155 (0.368862) | 1.837021 / 1.492716 (0.344305) |\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.228444 / 0.018006 (0.210438) | 0.480446 / 0.000490 (0.479956) | 0.004963 / 0.000200 (0.004763) | 0.000101 / 0.000054 (0.000046) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.032485 / 0.037411 (-0.004926) | 0.096500 / 0.014526 (0.081974) | 0.111547 / 0.176557 (-0.065010) | 0.178842 / 0.737135 (-0.558294) | 0.111099 / 0.296338 (-0.185240) |\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.467159 / 0.215209 (0.251950) | 4.701676 / 2.077655 (2.624021) | 2.390560 / 1.504120 (0.886440) | 2.197722 / 1.541195 (0.656528) | 2.264705 / 1.468490 (0.796215) | 0.568667 / 4.584777 (-4.016110) | 4.200724 / 3.745712 (0.455012) | 3.777625 / 5.269862 (-1.492236) | 2.372451 / 4.565676 (-2.193225) | 0.067562 / 0.424275 (-0.356714) | 0.008947 / 0.007607 (0.001340) | 0.556910 / 0.226044 (0.330865) | 5.528927 / 2.268929 (3.259998) | 2.902780 / 55.444624 (-52.541844) | 2.507933 / 6.876477 (-4.368544) | 2.734627 / 2.142072 (0.592554) | 0.683305 / 4.805227 (-4.121922) | 0.158288 / 6.500664 (-6.342376) | 0.071252 / 0.075469 (-0.004217) |\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.487502 / 1.841788 (-0.354286) | 22.193341 / 8.074308 (14.119033) | 15.922607 / 10.191392 (5.731215) | 0.172189 / 0.680424 (-0.508235) | 0.021502 / 0.534201 (-0.512699) | 0.471198 / 0.579283 (-0.108085) | 0.475979 / 0.434364 (0.041615) | 0.544675 / 0.540337 (0.004338) | 0.756102 / 1.386936 (-0.630834) |\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.007635 / 0.011353 (-0.003717) | 0.004614 / 0.011008 (-0.006394) | 0.075852 / 0.038508 (0.037344) | 0.049700 / 0.023109 (0.026591) | 0.425957 / 0.275898 (0.150059) | 0.512590 / 0.323480 (0.189110) | 0.006921 / 0.007986 (-0.001065) | 0.003714 / 0.004328 (-0.000615) | 0.075536 / 0.004250 (0.071286) | 0.070206 / 0.037052 (0.033153) | 0.455706 / 0.258489 (0.197217) | 0.512231 / 0.293841 (0.218390) | 0.036685 / 0.128546 (-0.091861) | 0.009793 / 0.075646 (-0.065853) | 0.084208 / 0.419271 (-0.335064) | 0.065262 / 0.043533 (0.021729) | 0.423761 / 0.255139 (0.168622) | 0.456791 / 0.283200 (0.173591) | 0.044539 / 0.141683 (-0.097144) | 1.797029 / 1.452155 (0.344874) | 1.864124 / 1.492716 (0.371408) |\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.366840 / 0.018006 (0.348834) | 0.479254 / 0.000490 (0.478765) | 0.070383 / 0.000200 (0.070183) | 0.000762 / 0.000054 (0.000707) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.034233 / 0.037411 (-0.003178) | 0.103140 / 0.014526 (0.088614) | 0.117099 / 0.176557 (-0.059457) | 0.178532 / 0.737135 (-0.558603) | 0.120092 / 0.296338 (-0.176247) |\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.492993 / 0.215209 (0.277784) | 4.878776 / 2.077655 (2.801121) | 2.566666 / 1.504120 (1.062547) | 2.356383 / 1.541195 (0.815188) | 2.454723 / 1.468490 (0.986233) | 0.571432 / 4.584777 (-4.013345) | 4.240554 / 3.745712 (0.494842) | 7.509259 / 5.269862 (2.239398) | 4.040294 / 4.565676 (-0.525382) | 0.067409 / 0.424275 (-0.356866) | 0.008657 / 0.007607 (0.001050) | 0.585751 / 0.226044 (0.359707) | 5.967668 / 2.268929 (3.698739) | 3.195573 / 55.444624 (-52.249052) | 2.839772 / 6.876477 (-4.036704) | 2.806319 / 2.142072 (0.664246) | 0.681502 / 4.805227 (-4.123725) | 0.158673 / 6.500664 (-6.341991) | 0.073224 / 0.075469 (-0.002245) |\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.623335 / 1.841788 (-0.218453) | 22.490806 / 8.074308 (14.416498) | 16.762435 / 10.191392 (6.571043) | 0.180961 / 0.680424 (-0.499463) | 0.022716 / 0.534201 (-0.511485) | 0.472910 / 0.579283 (-0.106373) | 0.471616 / 0.434364 (0.037252) | 0.548192 / 0.540337 (0.007854) | 0.734357 / 1.386936 (-0.652579) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#c0498b47a00153d4730352b6595fc51ab054fb95 \"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.005858 / 0.011353 (-0.005495) | 0.003512 / 0.011008 (-0.007497) | 0.079739 / 0.038508 (0.041231) | 0.057736 / 0.023109 (0.034627) | 0.317640 / 0.275898 (0.041742) | 0.354157 / 0.323480 (0.030677) | 0.004772 / 0.007986 (-0.003214) | 0.002824 / 0.004328 (-0.001504) | 0.063288 / 0.004250 (0.059037) | 0.049542 / 0.037052 (0.012489) | 0.323974 / 0.258489 (0.065485) | 0.372149 / 0.293841 (0.078308) | 0.026841 / 0.128546 (-0.101705) | 0.007846 / 0.075646 (-0.067800) | 0.262546 / 0.419271 (-0.156725) | 0.051952 / 0.043533 (0.008420) | 0.319439 / 0.255139 (0.064300) | 0.343862 / 0.283200 (0.060663) | 0.027021 / 0.141683 (-0.114662) | 1.445211 / 1.452155 (-0.006944) | 1.485006 / 1.492716 (-0.007711) |\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.183174 / 0.018006 (0.165167) | 0.422794 / 0.000490 (0.422304) | 0.004148 / 0.000200 (0.003948) | 0.000067 / 0.000054 (0.000012) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.023037 / 0.037411 (-0.014374) | 0.071300 / 0.014526 (0.056775) | 0.083022 / 0.176557 (-0.093535) | 0.146215 / 0.737135 (-0.590920) | 0.082549 / 0.296338 (-0.213789) |\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.422846 / 0.215209 (0.207637) | 4.215280 / 2.077655 (2.137626) | 2.256802 / 1.504120 (0.752682) | 2.056867 / 1.541195 (0.515673) | 2.102478 / 1.468490 (0.633988) | 0.497552 / 4.584777 (-4.087225) | 3.049716 / 3.745712 (-0.695996) | 4.209227 / 5.269862 (-1.060635) | 2.599947 / 4.565676 (-1.965730) | 0.059131 / 0.424275 (-0.365144) | 0.006459 / 0.007607 (-0.001148) | 0.495047 / 0.226044 (0.269003) | 4.952332 / 2.268929 (2.683404) | 2.675260 / 55.444624 (-52.769365) | 2.333223 / 6.876477 (-4.543254) | 2.449573 / 2.142072 (0.307500) | 0.583420 / 4.805227 (-4.221807) | 0.125140 / 6.500664 (-6.375524) | 0.060209 / 0.075469 (-0.015260) |\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.215033 / 1.841788 (-0.626755) | 18.101107 / 8.074308 (10.026799) | 13.489222 / 10.191392 (3.297830) | 0.147122 / 0.680424 (-0.533302) | 0.016567 / 0.534201 (-0.517634) | 0.329909 / 0.579283 (-0.249374) | 0.340952 / 0.434364 (-0.093412) | 0.379166 / 0.540337 (-0.161172) | 0.510767 / 1.386936 (-0.876169) |\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.005942 / 0.011353 (-0.005411) | 0.003628 / 0.011008 (-0.007380) | 0.061975 / 0.038508 (0.023467) | 0.058331 / 0.023109 (0.035221) | 0.393277 / 0.275898 (0.117379) | 0.410740 / 0.323480 (0.087261) | 0.004546 / 0.007986 (-0.003440) | 0.002826 / 0.004328 (-0.001503) | 0.062216 / 0.004250 (0.057966) | 0.049801 / 0.037052 (0.012748) | 0.394070 / 0.258489 (0.135581) | 0.414407 / 0.293841 (0.120566) | 0.027161 / 0.128546 (-0.101385) | 0.007901 / 0.075646 (-0.067746) | 0.066778 / 0.419271 (-0.352493) | 0.041354 / 0.043533 (-0.002179) | 0.379432 / 0.255139 (0.124293) | 0.402966 / 0.283200 (0.119766) | 0.020279 / 0.141683 (-0.121404) | 1.416986 / 1.452155 (-0.035169) | 1.474335 / 1.492716 (-0.018382) |\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.226147 / 0.018006 (0.208140) | 0.404361 / 0.000490 (0.403871) | 0.000358 / 0.000200 (0.000158) | 0.000054 / 0.000054 (-0.000000) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.025105 / 0.037411 (-0.012306) | 0.075849 / 0.014526 (0.061323) | 0.084781 / 0.176557 (-0.091775) | 0.137415 / 0.737135 (-0.599720) | 0.086288 / 0.296338 (-0.210051) |\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.445925 / 0.215209 (0.230716) | 4.453478 / 2.077655 (2.375823) | 2.419048 / 1.504120 (0.914928) | 2.246363 / 1.541195 (0.705168) | 2.304022 / 1.468490 (0.835532) | 0.499132 / 4.584777 (-4.085645) | 3.001336 / 3.745712 (-0.744376) | 2.902593 / 5.269862 (-2.367269) | 1.819843 / 4.565676 (-2.745834) | 0.057210 / 0.424275 (-0.367065) | 0.006338 / 0.007607 (-0.001269) | 0.523280 / 0.226044 (0.297236) | 5.235969 / 2.268929 (2.967040) | 2.897585 / 55.444624 (-52.547039) | 2.541586 / 6.876477 (-4.334891) | 2.564233 / 2.142072 (0.422160) | 0.584714 / 4.805227 (-4.220513) | 0.124611 / 6.500664 (-6.376053) | 0.061774 / 0.075469 (-0.013695) |\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.349799 / 1.841788 (-0.491988) | 18.225076 / 8.074308 (10.150768) | 13.781518 / 10.191392 (3.590126) | 0.130562 / 0.680424 (-0.549862) | 0.016434 / 0.534201 (-0.517767) | 0.331607 / 0.579283 (-0.247676) | 0.343456 / 0.434364 (-0.090908) | 0.380437 / 0.540337 (-0.159900) | 0.522793 / 1.386936 (-0.864143) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#f0a3dbbd2e7ace162346d95ec27db674e80c1e23 \"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.013721 / 0.011353 (0.002368) | 0.005715 / 0.011008 (-0.005293) | 0.090116 / 0.038508 (0.051608) | 0.087185 / 0.023109 (0.064075) | 0.427813 / 0.275898 (0.151915) | 0.390614 / 0.323480 (0.067135) | 0.006976 / 0.007986 (-0.001009) | 0.004231 / 0.004328 (-0.000098) | 0.078320 / 0.004250 (0.074070) | 0.066235 / 0.037052 (0.029183) | 0.439904 / 0.258489 (0.181415) | 0.424119 / 0.293841 (0.130278) | 0.050362 / 0.128546 (-0.078184) | 0.014992 / 0.075646 (-0.060654) | 0.293519 / 0.419271 (-0.125753) | 0.066906 / 0.043533 (0.023373) | 0.449657 / 0.255139 (0.194518) | 0.393800 / 0.283200 (0.110600) | 0.032258 / 0.141683 (-0.109425) | 1.539534 / 1.452155 (0.087379) | 1.675292 / 1.492716 (0.182576) |\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.210515 / 0.018006 (0.192508) | 0.506817 / 0.000490 (0.506327) | 0.001938 / 0.000200 (0.001738) | 0.000118 / 0.000054 (0.000064) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.026019 / 0.037411 (-0.011393) | 0.080635 / 0.014526 (0.066109) | 0.103050 / 0.176557 (-0.073507) | 0.160597 / 0.737135 (-0.576538) | 0.095844 / 0.296338 (-0.200495) |\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.506359 / 0.215209 (0.291150) | 5.041586 / 2.077655 (2.963931) | 2.198288 / 1.504120 (0.694168) | 1.987544 / 1.541195 (0.446349) | 1.866790 / 1.468490 (0.398300) | 0.681642 / 4.584777 (-3.903135) | 4.719306 / 3.745712 (0.973593) | 7.669869 / 5.269862 (2.400008) | 4.466082 / 4.565676 (-0.099595) | 0.092974 / 0.424275 (-0.331301) | 0.008196 / 0.007607 (0.000589) | 0.707656 / 0.226044 (0.481612) | 6.974507 / 2.268929 (4.705579) | 3.254206 / 55.444624 (-52.190418) | 2.499019 / 6.876477 (-4.377457) | 2.509089 / 2.142072 (0.367017) | 0.915952 / 4.805227 (-3.889276) | 0.192119 / 6.500664 (-6.308545) | 0.065473 / 0.075469 (-0.009996) |\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.309078 / 1.841788 (-0.532710) | 19.660348 / 8.074308 (11.586040) | 16.659582 / 10.191392 (6.468190) | 0.194315 / 0.680424 (-0.486109) | 0.027773 / 0.534201 (-0.506428) | 0.401241 / 0.579283 (-0.178042) | 0.515799 / 0.434364 (0.081435) | 0.488772 / 0.540337 (-0.051566) | 0.604790 / 1.386936 (-0.782146) |\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.006823 / 0.011353 (-0.004530) | 0.003940 / 0.011008 (-0.007068) | 0.061533 / 0.038508 (0.023025) | 0.065241 / 0.023109 (0.042132) | 0.411790 / 0.275898 (0.135892) | 0.475720 / 0.323480 (0.152241) | 0.005376 / 0.007986 (-0.002609) | 0.003433 / 0.004328 (-0.000895) | 0.065703 / 0.004250 (0.061452) | 0.050736 / 0.037052 (0.013683) | 0.435890 / 0.258489 (0.177401) | 0.436698 / 0.293841 (0.142857) | 0.040357 / 0.128546 (-0.088189) | 0.011578 / 0.075646 (-0.064069) | 0.072831 / 0.419271 (-0.346440) | 0.055698 / 0.043533 (0.012165) | 0.408225 / 0.255139 (0.153086) | 0.439551 / 0.283200 (0.156352) | 0.030469 / 0.141683 (-0.111214) | 1.443866 / 1.452155 (-0.008289) | 1.502022 / 1.492716 (0.009306) |\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.290338 / 0.018006 (0.272332) | 0.540726 / 0.000490 (0.540236) | 0.003244 / 0.000200 (0.003044) | 0.000170 / 0.000054 (0.000116) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.030865 / 0.037411 (-0.006547) | 0.090866 / 0.014526 (0.076340) | 0.106224 / 0.176557 (-0.070332) | 0.166583 / 0.737135 (-0.570553) | 0.104448 / 0.296338 (-0.191891) |\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.518025 / 0.215209 (0.302816) | 6.027065 / 2.077655 (3.949410) | 2.671840 / 1.504120 (1.167720) | 2.273949 / 1.541195 (0.732754) | 2.414892 / 1.468490 (0.946402) | 0.774318 / 4.584777 (-3.810459) | 5.020364 / 3.745712 (1.274652) | 4.146927 / 5.269862 (-1.122934) | 2.584598 / 4.565676 (-1.981078) | 0.089519 / 0.424275 (-0.334756) | 0.009181 / 0.007607 (0.001574) | 0.654467 / 0.226044 (0.428423) | 6.421595 / 2.268929 (4.152666) | 3.091589 / 55.444624 (-52.353036) | 2.554798 / 6.876477 (-4.321679) | 2.441354 / 2.142072 (0.299282) | 0.943386 / 4.805227 (-3.861841) | 0.173641 / 6.500664 (-6.327023) | 0.072209 / 0.075469 (-0.003260) |\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.557147 / 1.841788 (-0.284641) | 19.980747 / 8.074308 (11.906439) | 17.816813 / 10.191392 (7.625421) | 0.212078 / 0.680424 (-0.468346) | 0.025435 / 0.534201 (-0.508766) | 0.396200 / 0.579283 (-0.183084) | 0.546249 / 0.434364 (0.111885) | 0.459632 / 0.540337 (-0.080705) | 0.616548 / 1.386936 (-0.770388) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#535e972a70a3d4f8490a7e1a77ac43d5a4ab2655 \"CML watermark\")\n" ]
https://api.github.com/repos/huggingface/datasets/issues/4113
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/4113/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/4113/comments
https://api.github.com/repos/huggingface/datasets/issues/4113/events
https://github.com/huggingface/datasets/issues/4113
1,194,843,532
I_kwDODunzps5HN92M
4,113
Multiprocessing with FileLock fails in python 3.9
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
closed
false
null
1
2022-04-06T16:27:09Z
2022-11-28T11:49:14Z
2022-11-28T11:49:14Z
null
On python 3.9, this code hangs: ```python from multiprocessing import Pool from filelock import FileLock def run(i): print(f"got the lock in multi process [{i}]") with FileLock("tmp.lock"): with Pool(2) as pool: pool.map(run, range(2)) ``` This is because the subprocesses try to acquire the lock from the main process for some reason. This is not the case in older versions of python. This can cause many issues in python 3.9. In particular, we use multiprocessing to fetch data files when you load a dataset (as long as there are >16 data files). Therefore `imagefolder` hangs, and I expect any dataset that needs to download >16 files to hang as well. Let's see if we can fix this and have a CI that runs on 3.9. cc @mariosasko @julien-c
{ "+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/4113/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/4113/timeline
null
completed
null
null
false
[ "Closing this one because it must be used this way actually:\r\n```python\r\ndef main():\r\n with FileLock(\"tmp.lock\"):\r\n with Pool(2) as pool:\r\n pool.map(run, range(2))\r\n\r\nif __name__ == \"__main__\":\r\n main()\r\n```" ]
https://api.github.com/repos/huggingface/datasets/issues/3774
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3774/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3774/comments
https://api.github.com/repos/huggingface/datasets/issues/3774/events
https://github.com/huggingface/datasets/pull/3774
1,146,843,177
PR_kwDODunzps4zSDHC
3,774
Fix reddit_tifu data URL
[]
closed
false
null
0
2022-02-22T12:21:15Z
2022-02-22T12:38:45Z
2022-02-22T12:38:44Z
null
Fix #3773.
{ "+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/3774/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3774/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/3774.diff", "html_url": "https://github.com/huggingface/datasets/pull/3774", "merged_at": "2022-02-22T12:38:44Z", "patch_url": "https://github.com/huggingface/datasets/pull/3774.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/3774" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/5606
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5606/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5606/comments
https://api.github.com/repos/huggingface/datasets/issues/5606/events
https://github.com/huggingface/datasets/issues/5606
1,608,911,632
I_kwDODunzps5f5gsQ
5,606
Add `Dataset.to_list` to the API
[ { "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" }, { "color": "7057ff", "default": true, "description": "Good for newcomers", "id": 1935892877, "name": "good first issue", "node_id": "MDU6TGFiZWwxOTM1ODkyODc3", "url": "https://api.github.com/repos/huggingface/datasets/labels/good%20first%20issue" } ]
closed
false
null
3
2023-03-03T16:17:10Z
2023-03-27T13:26:40Z
2023-03-27T13:26:40Z
null
Since there is `Dataset.from_list` in the API, we should also add `Dataset.to_list` to be consistent. Regarding the implementation, we can re-use `Dataset.to_dict`'s code and replace the `to_pydict` calls with `to_pylist`.
{ "+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/5606/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5606/timeline
null
completed
null
null
false
[ "Hello, I have an interest in this issue.\r\nIs the `Dataset.to_dict` you are describing correct in the code here?\r\n\r\nhttps://github.com/huggingface/datasets/blob/35b789e8f6826b6b5a6b48fcc2416c890a1f326a/src/datasets/arrow_dataset.py#L4633-L4667", "Yes, this is where `Dataset.to_dict` is defined.", "#self-assign" ]
https://api.github.com/repos/huggingface/datasets/issues/3801
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3801/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3801/comments
https://api.github.com/repos/huggingface/datasets/issues/3801/events
https://github.com/huggingface/datasets/pull/3801
1,155,649,279
PR_kwDODunzps4zvqjN
3,801
[Breaking] Align `map` when streaming: update instead of overwrite + add missing parameters
[]
closed
false
null
1
2022-03-01T18:06:43Z
2022-03-07T16:30:30Z
2022-03-07T16:30:29Z
null
Currently the datasets in streaming mode and in non-streaming mode have two distinct API for `map` processing. In this PR I'm aligning the two by changing `map` in streamign mode. This includes a **major breaking change** and will require a major release of the library: **Datasets 2.0** In particular, `Dataset.map` adds new columns (with dict.update) BUT `IterableDataset.map` used to discard previous columns (it overwrites the dict). In this PR I'm chaning the `IterableDataset.map` to behave the same way as `Dataset.map`: it will update the examples instead of overwriting them. I'm also adding those missing parameters to streaming `map`: with_indices, input_columns, remove_columns ### TODO - [x] tests - [x] docs Related to https://github.com/huggingface/datasets/issues/3444
{ "+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/3801/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3801/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/3801.diff", "html_url": "https://github.com/huggingface/datasets/pull/3801", "merged_at": "2022-03-07T16:30:29Z", "patch_url": "https://github.com/huggingface/datasets/pull/3801.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/3801" }
true
[ "Right ! Will add it in another PR :)" ]
https://api.github.com/repos/huggingface/datasets/issues/1710
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1710/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1710/comments
https://api.github.com/repos/huggingface/datasets/issues/1710/events
https://github.com/huggingface/datasets/issues/1710
781,914,951
MDU6SXNzdWU3ODE5MTQ5NTE=
1,710
IsADirectoryError when trying to download C4
[]
closed
false
null
2
2021-01-08T07:31:30Z
2022-08-04T11:56:10Z
2022-08-04T11:55:04Z
null
**TLDR**: I fail to download C4 and see a stacktrace originating in `IsADirectoryError` as an explanation for failure. How can the problem be fixed? **VERBOSE**: I use Python version 3.7 and have the following dependencies listed in my project: ``` datasets==1.2.0 apache-beam==2.26.0 ``` When running the following code, where `/data/huggingface/unpacked/` contains a single unzipped `wet.paths` file manually downloaded as per the instructions for C4: ``` from datasets import load_dataset load_dataset("c4", "en", data_dir="/data/huggingface/unpacked", beam_runner='DirectRunner') ``` I get the following stacktrace: ``` /Users/fredriko/venv/misc/bin/python /Users/fredriko/source/misc/main.py Downloading and preparing dataset c4/en (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /Users/fredriko/.cache/huggingface/datasets/c4/en/2.3.0/8304cf264cc42bdebcb13fca4b9cb36368a96f557d36f9dc969bebbe2568b283... Traceback (most recent call last): File "/Users/fredriko/source/misc/main.py", line 3, in <module> load_dataset("c4", "en", data_dir="/data/huggingface/unpacked", beam_runner='DirectRunner') File "/Users/fredriko/venv/misc/lib/python3.7/site-packages/datasets/load.py", line 612, in load_dataset ignore_verifications=ignore_verifications, File "/Users/fredriko/venv/misc/lib/python3.7/site-packages/datasets/builder.py", line 527, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/Users/fredriko/venv/misc/lib/python3.7/site-packages/datasets/builder.py", line 1066, in _download_and_prepare pipeline=pipeline, File "/Users/fredriko/venv/misc/lib/python3.7/site-packages/datasets/builder.py", line 582, in _download_and_prepare split_generators = self._split_generators(dl_manager, **split_generators_kwargs) File "/Users/fredriko/.cache/huggingface/modules/datasets_modules/datasets/c4/8304cf264cc42bdebcb13fca4b9cb36368a96f557d36f9dc969bebbe2568b283/c4.py", line 190, in _split_generators file_paths = dl_manager.download_and_extract(files_to_download) File "/Users/fredriko/venv/misc/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 258, in download_and_extract return self.extract(self.download(url_or_urls)) File "/Users/fredriko/venv/misc/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 189, in download self._record_sizes_checksums(url_or_urls, downloaded_path_or_paths) File "/Users/fredriko/venv/misc/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 117, in _record_sizes_checksums self._recorded_sizes_checksums[str(url)] = get_size_checksum_dict(path) File "/Users/fredriko/venv/misc/lib/python3.7/site-packages/datasets/utils/info_utils.py", line 80, in get_size_checksum_dict with open(path, "rb") as f: IsADirectoryError: [Errno 21] Is a directory: '/' Process finished with exit code 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/1710/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1710/timeline
null
completed
null
null
false
[ "I haven't tested C4 on my side so there so there may be a few bugs in the code/adjustments to make.\r\nHere it looks like in c4.py, line 190 one of the `files_to_download` is `'/'` which is invalid.\r\nValid files are paths to local files or URLs to remote files.", "Fixed once processed data is used instead:\r\n- #2575" ]
https://api.github.com/repos/huggingface/datasets/issues/3968
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3968/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3968/comments
https://api.github.com/repos/huggingface/datasets/issues/3968/events
https://github.com/huggingface/datasets/issues/3968
1,174,193,962
I_kwDODunzps5F_Mcq
3,968
Cannot preview 'indonesian-nlp/eli5_id' dataset
[ { "color": "E5583E", "default": false, "description": "Related to the dataset viewer on huggingface.co", "id": 3470211881, "name": "dataset-viewer", "node_id": "LA_kwDODunzps7O1zsp", "url": "https://api.github.com/repos/huggingface/datasets/labels/dataset-viewer" } ]
closed
false
null
5
2022-03-19T06:54:09Z
2022-03-24T16:34:24Z
2022-03-24T16:34:24Z
null
## Dataset viewer issue for '*indonesian-nlp/eli5_id*' **Link:** https://huggingface.co/datasets/indonesian-nlp/eli5_id I can not see the dataset preview. ``` Server Error Status code: 400 Exception: Status400Error Message: Not found. Maybe the cache is missing, or maybe the dataset does not exist. ``` Am I the one who added this dataset ? Yes
{ "+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/3968/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3968/timeline
null
completed
null
null
false
[ "Hi @cahya-wirawan, thanks for reporting.\r\n\r\nYour dataset is working OK in streaming mode:\r\n```python\r\nIn [1]: from datasets import load_dataset\r\n ...: ds = load_dataset(\"indonesian-nlp/eli5_id\", split=\"train\", streaming=True)\r\n ...: item = next(iter(ds))\r\n ...: item\r\nUsing custom data configuration indonesian-nlp--eli5_id-9fe728a7e760fb7b\r\n\r\nOut[1]: \r\n{'q_id': '1oy5tc',\r\n 'title': 'dalam sepak bola apa gunanya menyia-nyiakan dua permainan pertama dengan terburu-buru - di tengah - bukan permainan terburu-buru biasa saya mendapatkannya',\r\n 'selftext': '',\r\n 'document': '',\r\n 'subreddit': 'explainlikeimfive',\r\n 'answers': {'a_id': ['ccwtgnz', 'ccwtmho', 'ccwt946', 'ccwvj0u'],\r\n 'text': ['Jaga pertahanan tetap jujur, rasakan operan terburu-buru, buka permainan yang lewat. Pelanggaran yang terlalu satu dimensi akan gagal. Dan mereka yang bergegas ke tengah kadang-kadang dapat dibuka lebar-lebar untuk ukuran yard yang besar.',\r\n 'Jika Anda melempar bola sepanjang waktu, maka pertahanan akan beradaptasi untuk selalu menutupi umpan. Dengan melakukan permainan lari sederhana sesekali, Anda memaksa pertahanan untuk tetap dekat dan menjaga dari lari. Terkadang, pelanggaran dapat membuat pertahanan lengah dengan berpura-pura berlari dan membebaskan penerima mereka. Selain itu, Anda tidak perlu mendapatkan yard besar di setiap permainan. Terkadang, paling baik mendapatkan beberapa yard sekaligus. Selama Anda mendapatkan yang pertama, Anda dalam kondisi yang baik.',\r\n 'Dalam kebanyakan kasus, O-Line seharusnya membuat lubang untuk dilalui kembali. Jika Anda menjalankan terlalu banyak permainan ke luar / melempar, pertahanan akan mengejar. Juga, 2 permainan 5 yard memberi Anda satu set down baru.',\r\n 'Saya Anda tidak suka jenis drama itu, tonton CFL. Kami hanya mendapatkan 3 down sehingga Anda tidak bisa menyia-nyiakannya. Lebih banyak lagi yang lewat.'],\r\n 'score': [3, 2, 2, 2]},\r\n 'title_urls': {'url': []},\r\n 'selftext_urls': {'url': []},\r\n 'answers_urls': {'url': []}}\r\n```\r\nTherefore, it should be properly rendered in the previewer. Let me ping @severo to have a look at it.", "Thanks @albertvillanova for checking it. Btw, I have another dataset indonesian-nlp/lfqa_id which has the same issue. However, this dataset is still private, is it the reason why the preview doesn't work?", "Yes, preview is not supported on private datasets yet. We are working on that though...", "Thanks for the confirmation ", "Fixed. Thanks for your feedback." ]
https://api.github.com/repos/huggingface/datasets/issues/275
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/275/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/275/comments
https://api.github.com/repos/huggingface/datasets/issues/275/events
https://github.com/huggingface/datasets/issues/275
639,439,052
MDU6SXNzdWU2Mzk0MzkwNTI=
275
NonMatchingChecksumError when loading pubmed dataset
[ { "color": "2edb81", "default": false, "description": "A bug in a dataset script provided in the library", "id": 2067388877, "name": "dataset bug", "node_id": "MDU6TGFiZWwyMDY3Mzg4ODc3", "url": "https://api.github.com/repos/huggingface/datasets/labels/dataset%20bug" } ]
closed
false
null
1
2020-06-16T07:31:51Z
2020-06-19T07:37:07Z
2020-06-19T07:37:07Z
null
I get this error when i run `nlp.load_dataset('scientific_papers', 'pubmed', split = 'train[:50%]')`. The error is: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-2-7742dea167d0> in <module>() ----> 1 df = nlp.load_dataset('scientific_papers', 'pubmed', split = 'train[:50%]') 2 df = pd.DataFrame(df) 3 gc.collect() 3 frames /usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 518 download_mode=download_mode, 519 ignore_verifications=ignore_verifications, --> 520 save_infos=save_infos, 521 ) 522 /usr/local/lib/python3.6/dist-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, save_infos, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 431 verify_infos = not save_infos and not ignore_verifications 432 self._download_and_prepare( --> 433 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 434 ) 435 # Sync info /usr/local/lib/python3.6/dist-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 468 # Checksums verification 469 if verify_infos: --> 470 verify_checksums(self.info.download_checksums, dl_manager.get_recorded_sizes_checksums()) 471 for split_generator in split_generators: 472 if str(split_generator.split_info.name).lower() == "all": /usr/local/lib/python3.6/dist-packages/nlp/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums) 34 bad_urls = [url for url in expected_checksums if expected_checksums[url] != recorded_checksums[url]] 35 if len(bad_urls) > 0: ---> 36 raise NonMatchingChecksumError(str(bad_urls)) 37 logger.info("All the checksums matched successfully.") 38 NonMatchingChecksumError: ['https://drive.google.com/uc?id=1b3rmCSIoh6VhD4HKWjI4HOW-cSwcwbeC&export=download', 'https://drive.google.com/uc?id=1lvsqvsFi3W-pE1SqNZI0s8NR9rC1tsja&export=download'] ``` I'm currently working on google colab. That is quite strange because yesterday it was fine.
{ "+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/275/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/275/timeline
null
completed
null
null
false
[ "For some reason the files are not available for unauthenticated users right now (like the download service of this package). Instead of downloading the right files, it downloads the html of the error.\r\nAccording to the error it should be back again in 24h.\r\n\r\n![image](https://user-images.githubusercontent.com/42851186/84751599-096c6580-afbd-11ea-97f3-ee4aef791711.png)\r\n" ]
https://api.github.com/repos/huggingface/datasets/issues/4317
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/4317/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/4317/comments
https://api.github.com/repos/huggingface/datasets/issues/4317/events
https://github.com/huggingface/datasets/pull/4317
1,232,737,401
PR_kwDODunzps43qBzh
4,317
Fix cnn_dailymail (dm stories were ignored)
[]
closed
false
null
1
2022-05-11T14:25:25Z
2022-05-11T16:00:09Z
2022-05-11T15:52:37Z
null
https://github.com/huggingface/datasets/pull/4188 introduced a bug in `datasets` 2.2.0: DailyMail stories are ignored when generating the dataset. I fixed that, and removed the google drive link (it has annoying quota limitations issues) We can do a patch release after this is merged
{ "+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/4317/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/4317/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/4317.diff", "html_url": "https://github.com/huggingface/datasets/pull/4317", "merged_at": "2022-05-11T15:52:37Z", "patch_url": "https://github.com/huggingface/datasets/pull/4317.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/4317" }
true
[ "_The documentation is not available anymore as the PR was closed or merged._" ]
https://api.github.com/repos/huggingface/datasets/issues/3113
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3113/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3113/comments
https://api.github.com/repos/huggingface/datasets/issues/3113/events
https://github.com/huggingface/datasets/issues/3113
1,030,667,547
I_kwDODunzps49br0b
3,113
Loading Data from HDF files
[ { "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" }, { "color": "BDE59C", "default": false, "description": "Issues a bit more difficult than \"Good First\" issues", "id": 3761482852, "name": "good second issue", "node_id": "LA_kwDODunzps7gM6xk", "url": "https://api.github.com/repos/huggingface/datasets/labels/good%20second%20issue" } ]
open
false
null
5
2021-10-19T19:26:46Z
2023-04-28T19:49:17Z
null
null
**Is your feature request related to a problem? Please describe.** More often than not I come along big HDF datasets, and currently there is no straight forward way to feed them to a dataset. **Describe the solution you'd like** I would love to see a `from_h5` method that gets an interface implemented by the user on how items are extracted from dataset (in case of multiple datasets containing elements like arrays and metadata and etc). **Describe alternatives you've considered** Currently I manually load hdf files using `h5py` and implement PyTorch dataset interface. For small h5 files I load them into a pandas dataframe and use `from_pandas` function in the `datasets` package to load them, but for big datasets this is not feasible. **Additional context** HDF files are widespread throughout different domains and are one of the go to's for many researchers/scientists/engineers who work with numerical data. Given `datasets`' usecases have outgrown NLP use cases, it will make a lot of sense focusing on things like supporting HDF files.
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/3113/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3113/timeline
null
null
null
null
false
[ "I'm currently working on bringing [Ecoset](https://www.pnas.org/doi/10.1073/pnas.2011417118) to huggingface datasets and I would second this request...", "I would also like this support or something similar. Geospatial datasets come in netcdf which is derived from hdf5, or zarr. I've gotten zarr stores to work with datasets and streaming, but it takes awhile to convert the data to zarr if it's not stored in that natively. ", "@mariosasko , I would like to contribute on this \"good second issue\" . Is there anything in the works for this Issue or can I go ahead ? \r\n", "Hi @VijayKalmath! As far as I know, nobody is working on it, so feel free to take over. Also, before you start, I suggest you comment `#self-assign` on this issue to assign it to yourself.", "#self-assign" ]
https://api.github.com/repos/huggingface/datasets/issues/966
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/966/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/966/comments
https://api.github.com/repos/huggingface/datasets/issues/966/events
https://github.com/huggingface/datasets/pull/966
754,558,686
MDExOlB1bGxSZXF1ZXN0NTMwNDM4NDE4
966
Add CLINC150 Dataset
[]
closed
false
null
2
2020-12-01T16:50:13Z
2020-12-02T18:45:43Z
2020-12-02T18:45:30Z
null
Added CLINC150 Dataset. The link to the dataset can be found [here](https://github.com/clinc/oos-eval) and the paper can be found [here](https://www.aclweb.org/anthology/D19-1131.pdf) - [x] Followed the instructions in CONTRIBUTING.md - [x] Ran the tests successfully - [x] Created the dummy data
{ "+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/966/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/966/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/966.diff", "html_url": "https://github.com/huggingface/datasets/pull/966", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/966.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/966" }
true
[ "Looks like your PR now shows changes in many other files than the ones for CLINC150.\r\nFeel free to create another branch and another PR", "created new [PR](https://github.com/huggingface/datasets/pull/1016)\r\n\r\nclosing this!" ]
https://api.github.com/repos/huggingface/datasets/issues/515
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/515/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/515/comments
https://api.github.com/repos/huggingface/datasets/issues/515/events
https://github.com/huggingface/datasets/pull/515
681,845,619
MDExOlB1bGxSZXF1ZXN0NDcwMTY5MTQ0
515
Fix batched map for formatted dataset
[]
closed
false
null
0
2020-08-19T13:34:50Z
2020-08-20T20:30:43Z
2020-08-20T20:30:42Z
null
If you had a dataset formatted as numpy for example, and tried to do a batched map, then it would crash because one of the elements from the inputs was missing for unchanged columns (ex: batch of length 999 instead of 1000). The happened during the creation of the `pa.Table`, since columns had different lengths.
{ "+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/515/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/515/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/515.diff", "html_url": "https://github.com/huggingface/datasets/pull/515", "merged_at": "2020-08-20T20:30:42Z", "patch_url": "https://github.com/huggingface/datasets/pull/515.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/515" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/3578
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3578/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3578/comments
https://api.github.com/repos/huggingface/datasets/issues/3578/events
https://github.com/huggingface/datasets/issues/3578
1,103,403,287
I_kwDODunzps5BxJkX
3,578
label information get lost after parquet serialization
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
closed
false
null
2
2022-01-14T10:10:38Z
2023-07-25T15:44:53Z
2023-07-25T15:44:53Z
null
## Describe the bug In *dataset_info.json* file, information about the label get lost after the dataset serialization. ## Steps to reproduce the bug ```python from datasets import load_dataset # normal save dataset = load_dataset('glue', 'sst2', split='train') dataset.save_to_disk("normal_save") # save after parquet serialization dataset.to_parquet("glue-sst2-train.parquet") dataset = load_dataset("parquet", data_files='glue-sst2-train.parquet') dataset.save_to_disk("save_after_parquet") ``` ## Expected results I expected to keep label information in *dataset_info.json* file even after parquet serialization ## Actual results In the normal serialization i got ```json "label": { "num_classes": 2, "names": [ "negative", "positive" ], "names_file": null, "id": null, "_type": "ClassLabel" }, ``` And after parquet serialization i got ```json "label": { "dtype": "int64", "id": null, "_type": "Value" }, ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.18.0 - Platform: ubuntu 20.04 - Python version: 3.8.10 - PyArrow version: 6.0.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/3578/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3578/timeline
null
completed
null
null
false
[ "Hi ! We did a release of `datasets` today that may fix this issue. Can you try updating `datasets` and trying again ?\r\n\r\nEDIT: the issue is still there actually\r\n\r\nI think we can fix that by storing the Features in the parquet schema metadata, and then reload them when loading the parquet file", "This info is stored in the Parquet schema metadata as of https://github.com/huggingface/datasets/pull/5516" ]
https://api.github.com/repos/huggingface/datasets/issues/961
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/961/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/961/comments
https://api.github.com/repos/huggingface/datasets/issues/961/events
https://github.com/huggingface/datasets/issues/961
754,434,398
MDU6SXNzdWU3NTQ0MzQzOTg=
961
sample multiple datasets
[]
closed
false
null
5
2020-12-01T14:20:02Z
2023-07-20T14:08:57Z
2023-07-20T14:08:57Z
null
Hi I am dealing with multiple datasets, I need to have a dataloader over them with a condition that in each batch data samples are coming from one of the datasets. My main question is: - I need to have a way to sample the datasets first with some weights, lets say 2x dataset1 1x dataset2, could you point me how I can do it sub-questions: - I want to concat sampled datasets and define one dataloader on it, then I need a way to make sure batches come from 1 dataset in each iteration, could you assist me how I can do? - I use iterative-type of datasets, but I need a method of shuffling still since it brings accuracy performance issues if not doing it, thanks for the help.
{ "+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/961/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/961/timeline
null
completed
null
null
false
[ "here I share my dataloader currently for multiple tasks: https://gist.github.com/rabeehkarimimahabadi/39f9444a4fb6f53dcc4fca5d73bf8195 \r\n\r\nI need to train my model distributedly with this dataloader, \"MultiTasksataloader\", currently this does not work in distributed fasion,\r\nto save on memory I tried to use iterative datasets, could you have a look in this dataloader and tell me if this is indeed the case? not sure how to make datasets being iterative to not load them in memory, then I remove the sampler for dataloader, and shard the data per core, could you tell me please how I should implement this case in datasets library? and how do you find my implementation in terms of correctness? thanks \r\n", "Hi @rabeehkarimimahabadi any luck with updating the multi-task data loader to work with distributed training?", "Hi @pushkalkatara yes I solved it back then, here please find my implementation https://github.com/rabeehk/hyperformer/blob/main/hyperformer/data/multitask_sampler.py ", "Thanks @rabeehk for sharing. \r\n\r\nThe sampler basically returns a list of integers to sample from each task's dataset. I was wondering how to use it with two `torch.Dataset` of different tasks. Also, do I need to shard across processes while creating an Iterable Dataset?\r\n", "We now have `interleave_datasets` in the API that allows you to cycle/sample with probabilities (with various stopping strategies) through a list of datasets. However, more specific behavior should be implemented manually." ]
https://api.github.com/repos/huggingface/datasets/issues/2596
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/2596/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/2596/comments
https://api.github.com/repos/huggingface/datasets/issues/2596/events
https://github.com/huggingface/datasets/issues/2596
937,598,914
MDU6SXNzdWU5Mzc1OTg5MTQ=
2,596
Transformer Class on dataset
[ { "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" } ]
closed
false
null
9
2021-07-06T07:27:15Z
2022-11-02T14:26:09Z
2022-11-02T14:26:09Z
null
Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit).
{ "+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/2596/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/2596/timeline
null
completed
null
null
false
[ "Hi ! Do you have an example in mind that shows how this could be useful ?", "Example:\n\nMerge 2 datasets into one datasets\n\nLabel extraction from dataset\n\ndataset(text, label)\n β€”> dataset(text, newlabel)\n\nTextCleaning.\n\n\nFor image dataset, \nTransformation are easier (ie linear algebra).\n\n\n\n\n\n\n> On Jul 6, 2021, at 17:39, Quentin Lhoest ***@***.***> wrote:\n> \n> ο»Ώ\n> Hi ! Do you have an example in mind that shows how this could be useful ?\n> \n> β€”\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub, or unsubscribe.\n", "There are already a few transformations that you can apply on a dataset using methods like `dataset.map()`.\r\nYou can find examples in the documentation here:\r\nhttps://huggingface.co/docs/datasets/processing.html\r\n\r\nYou can merge two datasets with `concatenate_datasets()` or do label extraction with `dataset.map()` for example", "Ok, sure.\n\nThanks for pointing on functional part.\nMy question is more\nβ€œPhilosophical”/Design perspective.\n\nThere are 2 perspetive:\n Add transformation methods to \n Dataset Class\n\n\n OR Create a Transformer Class\n which operates on Dataset Class.\n\nT(Dataset) β€”> Dataset\n\ndatasetnew = MyTransform.transform(dataset)\ndatasetNew.save(path)\n\n\nWhat would be the difficulty\nof implementing a Transformer Class\noperating at dataset level ?\n\n\nthanks\n\n\n\n\n\n\n\n\n\n> On Jul 6, 2021, at 22:00, Quentin Lhoest ***@***.***> wrote:\n> \n> ο»Ώ\n> There are already a few transformations that you can apply on a dataset using methods like dataset.map().\n> You can find examples in the documentation here:\n> https://huggingface.co/docs/datasets/processing.html\n> \n> You can merge two datasets with concatenate_datasets() or do label extraction with dataset.map() for example\n> \n> β€”\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub, or unsubscribe.\n", "I can imagine that this would be a useful API to implement processing pipelines as transforms. They could be used to perform higher level transforms compared to the atomic transforms allowed by methods like map, filter, etc.\r\n\r\nI guess if you find any transform that could be useful for text dataset processing, image dataset processing etc. we could definitely start having such transforms :)", "Thanks for reply.\n\nWhat would be the constraints\nto have\nDataset β€”> Dataset consistency ?\n\nMain issue would be\nlarger than memory dataset and\nserialization on disk.\n\nTechnically,\none still process at atomic level\nand try to wrap the full results\ninto Dataset…. (!)\n\nWhat would you think ?\n\n\n\n\n\n\n\n\n> On Jul 7, 2021, at 16:51, Quentin Lhoest ***@***.***> wrote:\n> \n> ο»Ώ\n> I can imagine that this would be a useful API to implement processing pipelines as transforms. They could be used to perform higher level transforms compared to the atomic transforms allowed by methods like map, filter, etc.\n> \n> I guess if you find any transform that could be useful for text dataset processing, image dataset processing etc. we could definitely start having such transforms :)\n> \n> β€”\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub, or unsubscribe.\n", "We can be pretty flexible and not impose any constraints for transforms.\r\n\r\nMoreover, this library is designed to support datasets bigger than memory. The datasets are loaded from the disk via memory mapping, without filling up RAM. Even processing functions like `map` work in a batched fashion to not fill up your RAM. So this shouldn't be an issue", "Ok thanks.\n\nBut, Dataset has various flavors.\nIn current design of Dataset,\n how the serialization on disk is done (?)\n\n\nThe main issue is serialization \nof newdataset= Transform(Dataset)\n (ie thats why am referring to Out Of memory dataset…):\n\n Should be part of Transform or part of dataset ?\n\n\n\n\nMaybe, not, since the output is aimed to feed model in memory (?)\n\n\n\n\n\n\n\n\n> On Jul 7, 2021, at 18:04, Quentin Lhoest ***@***.***> wrote:\n> \n> ο»Ώ\n> We can be pretty flexible and not impose any constraints for transforms.\n> \n> Moreover, this library is designed to support datasets bigger than memory. The datasets are loaded from the disk via memory mapping, without filling up RAM. Even processing functions like map work in a batched fashion to not fill up your RAM. So this shouldn't be an issue\n> \n> β€”\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub, or unsubscribe.\n", "I'm not sure I understand, could you elaborate a bit more please ?\r\n\r\nEach dataset is a wrapper of a PyArrow Table that contains all the data. The table is loaded from an arrow file on the disk.\r\nWe have an ArrowWriter and ArrowReader class to write/read arrow tables on disk or in in-memory buffers." ]
https://api.github.com/repos/huggingface/datasets/issues/3013
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3013/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3013/comments
https://api.github.com/repos/huggingface/datasets/issues/3013/events
https://github.com/huggingface/datasets/issues/3013
1,014,960,419
I_kwDODunzps48fxEj
3,013
Improve `get_dataset_infos`?
[ { "color": "d876e3", "default": true, "description": "Further information is requested", "id": 1935892912, "name": "question", "node_id": "MDU6TGFiZWwxOTM1ODkyOTEy", "url": "https://api.github.com/repos/huggingface/datasets/labels/question" }, { "color": "E5583E", "default": false, "description": "Related to the dataset viewer on huggingface.co", "id": 3470211881, "name": "dataset-viewer", "node_id": "LA_kwDODunzps7O1zsp", "url": "https://api.github.com/repos/huggingface/datasets/labels/dataset-viewer" } ]
closed
false
null
1
2021-10-04T09:47:04Z
2022-02-21T15:57:10Z
2022-02-21T15:57:10Z
null
Using the dedicated function `get_dataset_infos` on a dataset that has no dataset-info.json file returns an empty info: ``` >>> from datasets import get_dataset_infos >>> get_dataset_infos('wit') {} ``` While it's totally possible to get it (regenerate it) with: ``` >>> from datasets import load_dataset_builder >>> builder = load_dataset_builder('wit') >>> builder.info DatasetInfo(description='Wikipedia-based Image Text (WIT) Dataset is a large multimodal multilingual dataset. WIT is composed of a curated set\n of 37.6 million entity rich image-text examples with 11.5 million unique images across 108 Wikipedia languages. Its\n size enables WIT to be used as a pretraining dataset for multimodal machine learning models.\n', citation='@article{srinivasan2021wit,\n title={WIT: Wikipedia-based Image Text Dataset for Multimodal Multilingual Machine Learning},\n author={Srinivasan, Krishna and Raman, Karthik and Chen, Jiecao and Bendersky, Michael and Najork, Marc},\n journal={arXiv preprint arXiv:2103.01913},\n year={2021}\n}\n', homepage='https://github.com/google-research-datasets/wit', license='', features={'b64_bytes': Value(dtype='string', id=None), 'embedding': Sequence(feature=Value(dtype='float64', id=None), length=-1, id=None), 'image_url': Value(dtype='string', id=None), 'metadata_url': Value(dtype='string', id=None), 'original_height': Value(dtype='int32', id=None), 'original_width': Value(dtype='int32', id=None), 'mime_type': Value(dtype='string', id=None), 'caption_attribution_description': Value(dtype='string', id=None), 'wit_features': Sequence(feature={'language': Value(dtype='string', id=None), 'page_url': Value(dtype='string', id=None), 'attribution_passes_lang_id': Value(dtype='string', id=None), 'caption_alt_text_description': Value(dtype='string', id=None), 'caption_reference_description': Value(dtype='string', id=None), 'caption_title_and_reference_description': Value(dtype='string', id=None), 'context_page_description': Value(dtype='string', id=None), 'context_section_description': Value(dtype='string', id=None), 'hierarchical_section_title': Value(dtype='string', id=None), 'is_main_image': Value(dtype='string', id=None), 'page_changed_recently': Value(dtype='string', id=None), 'page_title': Value(dtype='string', id=None), 'section_title': Value(dtype='string', id=None)}, length=-1, id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name='wit', config_name='default', version=0.0.0, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None) ``` Should we test if info is empty, and in that case regenerate it? Or always generate 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/3013/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3013/timeline
null
completed
null
null
false
[ "To keeps things simple maybe we should use `load_dataset_builder` in `get_dataset_infos`.\r\n`load_dataset_builder` instantiates a builder and runs the _infos() method in order to give you the most up-to-date infos, even if the dataset_infos.json is outdated or missing." ]
https://api.github.com/repos/huggingface/datasets/issues/5901
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5901/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5901/comments
https://api.github.com/repos/huggingface/datasets/issues/5901/events
https://github.com/huggingface/datasets/pull/5901
1,727,179,016
PR_kwDODunzps5Rarux
5,901
Make prepare_split more robust if errors in metadata dataset_info splits
[]
closed
false
null
3
2023-05-26T08:48:22Z
2023-06-02T06:06:38Z
2023-06-01T13:39:40Z
null
This PR uses `split_generator.split_info` as default value for `split_info` if any exception is raised while trying to get `split_generator.name` from `self.info.splits` (this may happen if there is any error in the metadata dataset_info splits). Please note that `split_info` is only used by the logger. Fix #5895 if passed `verification_mode="no_checks"`: ```python ds = load_dataset( "ArmelR/stack-exchange-instruction", data_dir="data/finetune", split="train", verification_mode="no_checks", revision="c609f1caade5cfbf3b9fe9cfa17d7cb000b457bd", ) ```
{ "+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/5901/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5901/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/5901.diff", "html_url": "https://github.com/huggingface/datasets/pull/5901", "merged_at": "2023-06-01T13:39:39Z", "patch_url": "https://github.com/huggingface/datasets/pull/5901.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5901" }
true
[ "_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.008809 / 0.011353 (-0.002544) | 0.005641 / 0.011008 (-0.005367) | 0.124986 / 0.038508 (0.086477) | 0.037311 / 0.023109 (0.014202) | 0.388915 / 0.275898 (0.113017) | 0.430123 / 0.323480 (0.106643) | 0.007447 / 0.007986 (-0.000538) | 0.009593 / 0.004328 (0.005264) | 0.099148 / 0.004250 (0.094898) | 0.052393 / 0.037052 (0.015341) | 0.399779 / 0.258489 (0.141290) | 0.439109 / 0.293841 (0.145268) | 0.043409 / 0.128546 (-0.085137) | 0.016286 / 0.075646 (-0.059360) | 0.431198 / 0.419271 (0.011927) | 0.064932 / 0.043533 (0.021400) | 0.390650 / 0.255139 (0.135511) | 0.432883 / 0.283200 (0.149684) | 0.110978 / 0.141683 (-0.030705) | 1.796121 / 1.452155 (0.343967) | 1.960097 / 1.492716 (0.467381) |\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.286292 / 0.018006 (0.268286) | 0.659495 / 0.000490 (0.659005) | 0.008294 / 0.000200 (0.008094) | 0.000485 / 0.000054 (0.000431) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.029325 / 0.037411 (-0.008086) | 0.125454 / 0.014526 (0.110928) | 0.136459 / 0.176557 (-0.040097) | 0.221075 / 0.737135 (-0.516060) | 0.140281 / 0.296338 (-0.156058) |\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.602401 / 0.215209 (0.387192) | 6.124553 / 2.077655 (4.046898) | 2.453141 / 1.504120 (0.949021) | 2.038611 / 1.541195 (0.497416) | 2.073611 / 1.468490 (0.605121) | 0.938040 / 4.584777 (-3.646737) | 5.755972 / 3.745712 (2.010260) | 4.450935 / 5.269862 (-0.818926) | 2.337219 / 4.565676 (-2.228457) | 0.107118 / 0.424275 (-0.317157) | 0.015201 / 0.007607 (0.007594) | 0.785833 / 0.226044 (0.559788) | 7.732984 / 2.268929 (5.464055) | 3.236892 / 55.444624 (-52.207733) | 2.696402 / 6.876477 (-4.180074) | 2.805036 / 2.142072 (0.662964) | 1.108612 / 4.805227 (-3.696616) | 0.221067 / 6.500664 (-6.279597) | 0.085538 / 0.075469 (0.010068) |\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.600311 / 1.841788 (-0.241476) | 18.528118 / 8.074308 (10.453810) | 21.107199 / 10.191392 (10.915807) | 0.219489 / 0.680424 (-0.460934) | 0.028927 / 0.534201 (-0.505274) | 0.503446 / 0.579283 (-0.075837) | 0.619833 / 0.434364 (0.185469) | 0.582454 / 0.540337 (0.042117) | 0.709154 / 1.386936 (-0.677782) |\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.008516 / 0.011353 (-0.002837) | 0.006090 / 0.011008 (-0.004918) | 0.104574 / 0.038508 (0.066066) | 0.042676 / 0.023109 (0.019566) | 0.458623 / 0.275898 (0.182725) | 0.568479 / 0.323480 (0.244999) | 0.008374 / 0.007986 (0.000389) | 0.004677 / 0.004328 (0.000349) | 0.105946 / 0.004250 (0.101695) | 0.055256 / 0.037052 (0.018204) | 0.511036 / 0.258489 (0.252547) | 0.598383 / 0.293841 (0.304542) | 0.043612 / 0.128546 (-0.084934) | 0.014707 / 0.075646 (-0.060940) | 0.116350 / 0.419271 (-0.302921) | 0.061413 / 0.043533 (0.017880) | 0.477785 / 0.255139 (0.222646) | 0.542643 / 0.283200 (0.259443) | 0.120431 / 0.141683 (-0.021252) | 1.994083 / 1.452155 (0.541928) | 2.100600 / 1.492716 (0.607883) |\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.298480 / 0.018006 (0.280474) | 0.601921 / 0.000490 (0.601432) | 0.000445 / 0.000200 (0.000245) | 0.000086 / 0.000054 (0.000032) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.034784 / 0.037411 (-0.002627) | 0.133555 / 0.014526 (0.119029) | 0.138541 / 0.176557 (-0.038015) | 0.203114 / 0.737135 (-0.534021) | 0.153477 / 0.296338 (-0.142861) |\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.780484 / 0.215209 (0.565275) | 7.150876 / 2.077655 (5.073222) | 3.168590 / 1.504120 (1.664470) | 2.698746 / 1.541195 (1.157552) | 2.695678 / 1.468490 (1.227188) | 1.037706 / 4.584777 (-3.547071) | 5.672631 / 3.745712 (1.926918) | 2.798137 / 5.269862 (-2.471725) | 1.738588 / 4.565676 (-2.827088) | 0.111160 / 0.424275 (-0.313115) | 0.013878 / 0.007607 (0.006271) | 0.800191 / 0.226044 (0.574146) | 8.546676 / 2.268929 (6.277748) | 4.116852 / 55.444624 (-51.327773) | 3.331271 / 6.876477 (-3.545206) | 3.307410 / 2.142072 (1.165337) | 1.191019 / 4.805227 (-3.614208) | 0.248953 / 6.500664 (-6.251711) | 0.086632 / 0.075469 (0.011162) |\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.795057 / 1.841788 (-0.046730) | 18.038785 / 8.074308 (9.964476) | 21.865566 / 10.191392 (11.674174) | 0.211058 / 0.680424 (-0.469366) | 0.026956 / 0.534201 (-0.507245) | 0.518855 / 0.579283 (-0.060428) | 0.618105 / 0.434364 (0.183741) | 0.569227 / 0.540337 (0.028889) | 0.705431 / 1.386936 (-0.681505) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#074925b9b7c1dfd33b8675aa99c07cc26375665c \"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.008900 / 0.011353 (-0.002453) | 0.005726 / 0.011008 (-0.005283) | 0.131747 / 0.038508 (0.093239) | 0.040585 / 0.023109 (0.017476) | 0.420531 / 0.275898 (0.144633) | 0.459430 / 0.323480 (0.135950) | 0.007642 / 0.007986 (-0.000344) | 0.006750 / 0.004328 (0.002421) | 0.099147 / 0.004250 (0.094897) | 0.055852 / 0.037052 (0.018799) | 0.423653 / 0.258489 (0.165164) | 0.453304 / 0.293841 (0.159463) | 0.045247 / 0.128546 (-0.083300) | 0.016034 / 0.075646 (-0.059612) | 0.443115 / 0.419271 (0.023843) | 0.078853 / 0.043533 (0.035320) | 0.417508 / 0.255139 (0.162369) | 0.440936 / 0.283200 (0.157736) | 0.115603 / 0.141683 (-0.026080) | 1.844610 / 1.452155 (0.392456) | 1.998497 / 1.492716 (0.505781) |\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.272622 / 0.018006 (0.254616) | 0.598045 / 0.000490 (0.597556) | 0.007088 / 0.000200 (0.006888) | 0.000159 / 0.000054 (0.000105) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.032976 / 0.037411 (-0.004436) | 0.143970 / 0.014526 (0.129444) | 0.142172 / 0.176557 (-0.034384) | 0.216747 / 0.737135 (-0.520389) | 0.146004 / 0.296338 (-0.150334) |\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.687507 / 0.215209 (0.472298) | 6.549524 / 2.077655 (4.471870) | 2.924142 / 1.504120 (1.420022) | 2.504471 / 1.541195 (0.963277) | 2.496280 / 1.468490 (1.027790) | 0.959054 / 4.584777 (-3.625723) | 5.851742 / 3.745712 (2.106030) | 4.983357 / 5.269862 (-0.286504) | 2.627403 / 4.565676 (-1.938274) | 0.112955 / 0.424275 (-0.311320) | 0.016206 / 0.007607 (0.008599) | 0.819158 / 0.226044 (0.593114) | 8.416949 / 2.268929 (6.148020) | 3.776765 / 55.444624 (-51.667859) | 3.002397 / 6.876477 (-3.874080) | 3.158852 / 2.142072 (1.016779) | 1.197099 / 4.805227 (-3.608129) | 0.280654 / 6.500664 (-6.220010) | 0.099471 / 0.075469 (0.024002) |\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.687007 / 1.841788 (-0.154781) | 19.411976 / 8.074308 (11.337668) | 22.053482 / 10.191392 (11.862090) | 0.228038 / 0.680424 (-0.452386) | 0.028226 / 0.534201 (-0.505975) | 0.527695 / 0.579283 (-0.051588) | 0.635911 / 0.434364 (0.201547) | 0.618205 / 0.540337 (0.077868) | 0.735164 / 1.386936 (-0.651772) |\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.009450 / 0.011353 (-0.001903) | 0.006566 / 0.011008 (-0.004442) | 0.108919 / 0.038508 (0.070411) | 0.050010 / 0.023109 (0.026900) | 0.505168 / 0.275898 (0.229270) | 0.552190 / 0.323480 (0.228710) | 0.007569 / 0.007986 (-0.000417) | 0.006807 / 0.004328 (0.002478) | 0.116621 / 0.004250 (0.112371) | 0.060374 / 0.037052 (0.023321) | 0.515165 / 0.258489 (0.256676) | 0.572125 / 0.293841 (0.278284) | 0.046561 / 0.128546 (-0.081986) | 0.016159 / 0.075646 (-0.059487) | 0.114568 / 0.419271 (-0.304704) | 0.064689 / 0.043533 (0.021157) | 0.497870 / 0.255139 (0.242731) | 0.567332 / 0.283200 (0.284132) | 0.126254 / 0.141683 (-0.015429) | 1.954074 / 1.452155 (0.501919) | 2.057682 / 1.492716 (0.564966) |\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.013857 / 0.018006 (-0.004149) | 0.601561 / 0.000490 (0.601071) | 0.002897 / 0.000200 (0.002697) | 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.038480 / 0.037411 (0.001069) | 0.142480 / 0.014526 (0.127954) | 0.160479 / 0.176557 (-0.016077) | 0.217942 / 0.737135 (-0.519194) | 0.159908 / 0.296338 (-0.136431) |\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.697926 / 0.215209 (0.482717) | 6.869754 / 2.077655 (4.792100) | 3.125463 / 1.504120 (1.621343) | 2.729123 / 1.541195 (1.187928) | 2.855747 / 1.468490 (1.387257) | 1.015345 / 4.584777 (-3.569432) | 5.839176 / 3.745712 (2.093463) | 5.019678 / 5.269862 (-0.250184) | 2.080489 / 4.565676 (-2.485187) | 0.118884 / 0.424275 (-0.305391) | 0.021381 / 0.007607 (0.013774) | 0.877847 / 0.226044 (0.651803) | 8.714561 / 2.268929 (6.445633) | 3.933399 / 55.444624 (-51.511226) | 3.281809 / 6.876477 (-3.594668) | 3.330342 / 2.142072 (1.188269) | 1.235005 / 4.805227 (-3.570222) | 0.239686 / 6.500664 (-6.260978) | 0.093546 / 0.075469 (0.018077) |\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.787916 / 1.841788 (-0.053872) | 20.094828 / 8.074308 (12.020520) | 22.902101 / 10.191392 (12.710709) | 0.249315 / 0.680424 (-0.431109) | 0.028058 / 0.534201 (-0.506143) | 0.524960 / 0.579283 (-0.054323) | 0.643881 / 0.434364 (0.209517) | 0.621203 / 0.540337 (0.080866) | 0.723337 / 1.386936 (-0.663599) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#074925b9b7c1dfd33b8675aa99c07cc26375665c \"CML watermark\")\n" ]
https://api.github.com/repos/huggingface/datasets/issues/6032
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6032/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6032/comments
https://api.github.com/repos/huggingface/datasets/issues/6032/events
https://github.com/huggingface/datasets/issues/6032
1,804,358,679
I_kwDODunzps5rjFQX
6,032
DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info
[]
open
false
null
2
2023-07-14T07:22:55Z
2023-07-17T04:12:45Z
null
null
### Describe the bug ```python download_config = DownloadConfig(proxies={'https': '<my proxy>'}) builder = load_dataset_builder(..., download_config=download_config) ``` But, when getting the dataset_info from HfApi, the http requests not using the proxies. ### Steps to reproduce the bug 1. Setup proxies in DownloadConfig. 2. Call `load_dataset_build` with download_config. 3. Inspect the call stack in HfApi.dataset_info. ![image](https://github.com/huggingface/datasets/assets/138426806/33e538a8-2e22-4e63-b634-343febe5324b) ### Expected behavior DownloadConfig.proxies works for getting dataset_info. ### Environment info https://github.com/huggingface/datasets/commit/406b2212263c0d33f267e35b917f410ff6b3bc00 Python 3.11.4
{ "+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/6032/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6032/timeline
null
null
null
null
false
[ "`HfApi` comes from the `huggingface_hub` package. You can use [this](https://huggingface.co/docs/huggingface_hub/v0.16.3/en/package_reference/utilities#huggingface_hub.configure_http_backend) utility to change the `huggingface_hub`'s `Session` proxies (see the example).\r\n\r\nWe plan to implement https://github.com/huggingface/datasets/issues/5080 and make this behavior more consistent eventually.", "> this\r\n\r\nThanks. I will try `huggingface_hub.configure_http_backend` to change session's config." ]
https://api.github.com/repos/huggingface/datasets/issues/1672
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1672/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1672/comments
https://api.github.com/repos/huggingface/datasets/issues/1672/events
https://github.com/huggingface/datasets/issues/1672
777,258,941
MDU6SXNzdWU3NzcyNTg5NDE=
1,672
load_dataset hang on file_lock
[]
closed
false
null
3
2021-01-01T10:25:07Z
2021-03-31T16:24:13Z
2021-01-01T11:47:36Z
null
I am trying to load the squad dataset. Fails on Windows 10 but succeeds in Colab. Transformers: 3.3.1 Datasets: 1.0.2 Windows 10 (also tested in WSL) ``` datasets.logging.set_verbosity_debug() datasets. train_dataset = load_dataset('squad', split='train') valid_dataset = load_dataset('squad', split='validation') train_dataset.features ``` ``` https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/squad/squad.py not found in cache or force_download set to True, downloading to C:\Users\simpl\.cache\huggingface\datasets\tmpzj_o_6u7 Downloading: 5.24k/? [00:00<00:00, 134kB/s] storing https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/squad/squad.py in cache at C:\Users\simpl\.cache\huggingface\datasets\f6877c8d2e01e8fcb60dc101be28b54a7522feac756deb9ac5c39c6d8ebef1ce.85f43de978b9b25921cb78d7a2f2b350c04acdbaedb9ecb5f7101cd7c0950e68.py creating metadata file for C:\Users\simpl\.cache\huggingface\datasets\f6877c8d2e01e8fcb60dc101be28b54a7522feac756deb9ac5c39c6d8ebef1ce.85f43de978b9b25921cb78d7a2f2b350c04acdbaedb9ecb5f7101cd7c0950e68.py Checking C:\Users\simpl\.cache\huggingface\datasets\f6877c8d2e01e8fcb60dc101be28b54a7522feac756deb9ac5c39c6d8ebef1ce.85f43de978b9b25921cb78d7a2f2b350c04acdbaedb9ecb5f7101cd7c0950e68.py for additional imports. Found main folder for dataset https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/squad/squad.py at C:\Users\simpl\.cache\huggingface\modules\datasets_modules\datasets\squad Found specific version folder for dataset https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/squad/squad.py at C:\Users\simpl\.cache\huggingface\modules\datasets_modules\datasets\squad\1244d044b266a5e4dbd4174d23cb995eead372fbca31a03edc3f8a132787af41 Found script file from https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/squad/squad.py to C:\Users\simpl\.cache\huggingface\modules\datasets_modules\datasets\squad\1244d044b266a5e4dbd4174d23cb995eead372fbca31a03edc3f8a132787af41\squad.py Couldn't find dataset infos file at https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/squad\dataset_infos.json Found metadata file for dataset https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/squad/squad.py at C:\Users\simpl\.cache\huggingface\modules\datasets_modules\datasets\squad\1244d044b266a5e4dbd4174d23cb995eead372fbca31a03edc3f8a132787af41\squad.json No config specified, defaulting to first: squad/plain_text ``` Interrupting the jupyter kernel we are in a file lock. In Google Colab the download is ok. In contrast to a local run in colab dataset_infos.json is downloaded ``` https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/squad/dataset_infos.json not found in cache or force_download set to True, downloading to /root/.cache/huggingface/datasets/tmptl9ha_ad Downloading: 2.19k/? [00:00<00:00, 26.2kB/s] ```
{ "+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/1672/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1672/timeline
null
completed
null
null
false
[ "Can you try to upgrade to a more recent version of datasets?", "Thank, upgrading to 1.1.3 resolved the issue.", "Having the same issue with `datasets 1.1.3` of `1.5.0` (both tracebacks look the same) and `kilt_wikipedia`, Ubuntu 20.04\r\n\r\n```py\r\nIn [1]: from datasets import load_dataset \r\n\r\nIn [2]: wikipedia = load_dataset('kilt_wikipedia')['full'] \r\nDownloading: 7.37kB [00:00, 2.74MB/s] \r\nDownloading: 3.33kB [00:00, 1.44MB/s] \r\n^C---------------------------------------------------------------------------\r\nOSError Traceback (most recent call last)\r\n~/anaconda3/envs/transformers2/lib/python3.7/site-packages/datasets/utils/filelock.py in _acquire(self)\r\n 380 try:\r\n--> 381 fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)\r\n 382 except (IOError, OSError):\r\n\r\nOSError: [Errno 37] No locks available\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nKeyboardInterrupt Traceback (most recent call last)\r\n<ipython-input-2-f412d3d46ec9> in <module>\r\n----> 1 wikipedia = load_dataset('kilt_wikipedia')['full']\r\n\r\n~/anaconda3/envs/transformers2/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, sav\r\ne_infos, script_version, **config_kwargs)\r\n 601 hash=hash,\r\n 602 features=features,\r\n--> 603 **config_kwargs,\r\n 604 )\r\n 605 \r\n\r\n~/anaconda3/envs/transformers2/lib/python3.7/site-packages/datasets/builder.py in __init__(self, *args, **kwargs)\r\n 841 def __init__(self, *args, **kwargs):\r\n 842 self._writer_batch_size = kwargs.pop(\"writer_batch_size\", self._writer_batch_size)\r\n--> 843 super(GeneratorBasedBuilder, self).__init__(*args, **kwargs)\r\n 844 \r\n 845 @abc.abstractmethod\r\n\r\n~/anaconda3/envs/transformers2/lib/python3.7/site-packages/datasets/builder.py in __init__(self, cache_dir, name, hash, features, **config_kwargs)\r\n 174 os.makedirs(self._cache_dir_root, exist_ok=True)\r\n 175 lock_path = os.path.join(self._cache_dir_root, self._cache_dir.replace(os.sep, \"_\") + \".lock\")\r\n--> 176 with FileLock(lock_path):\r\n 177 if os.path.exists(self._cache_dir): # check if data exist\r\n 178 if len(os.listdir(self._cache_dir)) > 0:\r\n\r\n~/anaconda3/envs/transformers2/lib/python3.7/site-packages/datasets/utils/filelock.py in __enter__(self)\r\n 312 \r\n 313 def __enter__(self):\r\n--> 314 self.acquire()\r\n 315 return self\r\n 316 \r\n\r\n~/anaconda3/envs/transformers2/lib/python3.7/site-packages/datasets/utils/filelock.py in acquire(self, timeout, poll_intervall)\r\n 261 if not self.is_locked:\r\n 262 logger().debug(\"Attempting to acquire lock %s on %s\", lock_id, lock_filename)\r\n--> 263 self._acquire()\r\n 264 \r\n 265 if self.is_locked:\r\n\r\n~/anaconda3/envs/transformers2/lib/python3.7/site-packages/datasets/utils/filelock.py in _acquire(self)\r\n 379 \r\n 380 try:\r\n--> 381 fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)\r\n 382 except (IOError, OSError):\r\n 383 os.close(fd)\r\n\r\nKeyboardInterrupt: \r\n\r\n```" ]
https://api.github.com/repos/huggingface/datasets/issues/5591
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5591/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5591/comments
https://api.github.com/repos/huggingface/datasets/issues/5591/events
https://github.com/huggingface/datasets/pull/5591
1,603,571,407
PR_kwDODunzps5K9S79
5,591
set dev version
[]
closed
false
null
3
2023-02-28T18:09:05Z
2023-02-28T18:16:31Z
2023-02-28T18:09:15Z
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/5591/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5591/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/5591.diff", "html_url": "https://github.com/huggingface/datasets/pull/5591", "merged_at": "2023-02-28T18:09:15Z", "patch_url": "https://github.com/huggingface/datasets/pull/5591.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5591" }
true
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_5591). All of your documentation changes will be reflected on that endpoint.", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==6.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.008826 / 0.011353 (-0.002527) | 0.004595 / 0.011008 (-0.006413) | 0.103387 / 0.038508 (0.064879) | 0.030241 / 0.023109 (0.007132) | 0.351202 / 0.275898 (0.075303) | 0.417601 / 0.323480 (0.094121) | 0.007121 / 0.007986 (-0.000865) | 0.003497 / 0.004328 (-0.000831) | 0.079256 / 0.004250 (0.075006) | 0.037617 / 0.037052 (0.000564) | 0.380542 / 0.258489 (0.122053) | 0.397863 / 0.293841 (0.104022) | 0.034291 / 0.128546 (-0.094255) | 0.011767 / 0.075646 (-0.063879) | 0.323737 / 0.419271 (-0.095534) | 0.041502 / 0.043533 (-0.002031) | 0.352982 / 0.255139 (0.097843) | 0.378618 / 0.283200 (0.095418) | 0.091671 / 0.141683 (-0.050012) | 1.499278 / 1.452155 (0.047123) | 1.517489 / 1.492716 (0.024773) |\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.190108 / 0.018006 (0.172102) | 0.414404 / 0.000490 (0.413915) | 0.001064 / 0.000200 (0.000864) | 0.000066 / 0.000054 (0.000011) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.023214 / 0.037411 (-0.014198) | 0.099351 / 0.014526 (0.084825) | 0.105227 / 0.176557 (-0.071330) | 0.150620 / 0.737135 (-0.586516) | 0.109323 / 0.296338 (-0.187015) |\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.412463 / 0.215209 (0.197254) | 4.138123 / 2.077655 (2.060469) | 1.845163 / 1.504120 (0.341043) | 1.641108 / 1.541195 (0.099913) | 1.715471 / 1.468490 (0.246981) | 0.697397 / 4.584777 (-3.887380) | 3.449829 / 3.745712 (-0.295883) | 1.959309 / 5.269862 (-3.310553) | 1.285754 / 4.565676 (-3.279923) | 0.082746 / 0.424275 (-0.341529) | 0.012523 / 0.007607 (0.004916) | 0.524745 / 0.226044 (0.298700) | 5.257085 / 2.268929 (2.988156) | 2.293163 / 55.444624 (-53.151461) | 1.958309 / 6.876477 (-4.918168) | 2.016106 / 2.142072 (-0.125966) | 0.814359 / 4.805227 (-3.990869) | 0.149443 / 6.500664 (-6.351221) | 0.066013 / 0.075469 (-0.009456) |\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.248495 / 1.841788 (-0.593292) | 14.303301 / 8.074308 (6.228993) | 14.238533 / 10.191392 (4.047141) | 0.161421 / 0.680424 (-0.519003) | 0.028779 / 0.534201 (-0.505422) | 0.396511 / 0.579283 (-0.182772) | 0.412784 / 0.434364 (-0.021580) | 0.473984 / 0.540337 (-0.066353) | 0.569610 / 1.386936 (-0.817327) |\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.007003 / 0.011353 (-0.004350) | 0.004621 / 0.011008 (-0.006387) | 0.079418 / 0.038508 (0.040910) | 0.028659 / 0.023109 (0.005550) | 0.340594 / 0.275898 (0.064696) | 0.377972 / 0.323480 (0.054492) | 0.005421 / 0.007986 (-0.002565) | 0.004852 / 0.004328 (0.000523) | 0.077579 / 0.004250 (0.073329) | 0.042662 / 0.037052 (0.005610) | 0.342264 / 0.258489 (0.083775) | 0.387255 / 0.293841 (0.093414) | 0.032574 / 0.128546 (-0.095972) | 0.011820 / 0.075646 (-0.063826) | 0.087960 / 0.419271 (-0.331312) | 0.045199 / 0.043533 (0.001667) | 0.341785 / 0.255139 (0.086646) | 0.365014 / 0.283200 (0.081814) | 0.096129 / 0.141683 (-0.045554) | 1.498962 / 1.452155 (0.046807) | 1.557331 / 1.492716 (0.064615) |\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.236216 / 0.018006 (0.218210) | 0.440189 / 0.000490 (0.439699) | 0.000399 / 0.000200 (0.000199) | 0.000060 / 0.000054 (0.000005) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.026357 / 0.037411 (-0.011055) | 0.104485 / 0.014526 (0.089959) | 0.109616 / 0.176557 (-0.066941) | 0.163005 / 0.737135 (-0.574130) | 0.113859 / 0.296338 (-0.182479) |\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.437452 / 0.215209 (0.222243) | 4.371854 / 2.077655 (2.294199) | 2.056845 / 1.504120 (0.552725) | 1.856071 / 1.541195 (0.314876) | 1.957978 / 1.468490 (0.489488) | 0.703171 / 4.584777 (-3.881606) | 3.433889 / 3.745712 (-0.311823) | 1.968321 / 5.269862 (-3.301541) | 1.204947 / 4.565676 (-3.360729) | 0.084499 / 0.424275 (-0.339777) | 0.012729 / 0.007607 (0.005122) | 0.537534 / 0.226044 (0.311490) | 5.383346 / 2.268929 (3.114417) | 2.522136 / 55.444624 (-52.922488) | 2.192715 / 6.876477 (-4.683762) | 2.243579 / 2.142072 (0.101507) | 0.811136 / 4.805227 (-3.994091) | 0.154015 / 6.500664 (-6.346649) | 0.069324 / 0.075469 (-0.006145) |\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.294232 / 1.841788 (-0.547556) | 14.809448 / 8.074308 (6.735140) | 13.510074 / 10.191392 (3.318682) | 0.158033 / 0.680424 (-0.522391) | 0.016703 / 0.534201 (-0.517498) | 0.393976 / 0.579283 (-0.185307) | 0.385983 / 0.434364 (-0.048381) | 0.476691 / 0.540337 (-0.063646) | 0.565694 / 1.386936 (-0.821242) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#b0dd3126196e8fcd9ba81a6602b46623b4e77e6e \"CML watermark\")\n", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==6.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.009155 / 0.011353 (-0.002198) | 0.005227 / 0.011008 (-0.005781) | 0.099767 / 0.038508 (0.061259) | 0.035338 / 0.023109 (0.012229) | 0.293913 / 0.275898 (0.018015) | 0.366976 / 0.323480 (0.043496) | 0.007802 / 0.007986 (-0.000184) | 0.005286 / 0.004328 (0.000958) | 0.075117 / 0.004250 (0.070867) | 0.042336 / 0.037052 (0.005284) | 0.304690 / 0.258489 (0.046201) | 0.343496 / 0.293841 (0.049655) | 0.038745 / 0.128546 (-0.089802) | 0.012275 / 0.075646 (-0.063371) | 0.334455 / 0.419271 (-0.084817) | 0.052611 / 0.043533 (0.009078) | 0.293229 / 0.255139 (0.038090) | 0.314340 / 0.283200 (0.031140) | 0.108676 / 0.141683 (-0.033007) | 1.444495 / 1.452155 (-0.007659) | 1.492244 / 1.492716 (-0.000472) |\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.204852 / 0.018006 (0.186846) | 0.438202 / 0.000490 (0.437712) | 0.005043 / 0.000200 (0.004843) | 0.000282 / 0.000054 (0.000228) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.027268 / 0.037411 (-0.010143) | 0.109497 / 0.014526 (0.094972) | 0.117187 / 0.176557 (-0.059369) | 0.162551 / 0.737135 (-0.574584) | 0.124175 / 0.296338 (-0.172164) |\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.401667 / 0.215209 (0.186458) | 4.010274 / 2.077655 (1.932619) | 1.882617 / 1.504120 (0.378497) | 1.721960 / 1.541195 (0.180765) | 1.806874 / 1.468490 (0.338384) | 0.711253 / 4.584777 (-3.873524) | 3.806585 / 3.745712 (0.060873) | 3.713011 / 5.269862 (-1.556851) | 1.896558 / 4.565676 (-2.669119) | 0.086092 / 0.424275 (-0.338184) | 0.012129 / 0.007607 (0.004522) | 0.504905 / 0.226044 (0.278861) | 5.050794 / 2.268929 (2.781865) | 2.324331 / 55.444624 (-53.120293) | 2.020170 / 6.876477 (-4.856307) | 2.079685 / 2.142072 (-0.062388) | 0.854782 / 4.805227 (-3.950445) | 0.166754 / 6.500664 (-6.333910) | 0.062434 / 0.075469 (-0.013035) |\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.187897 / 1.841788 (-0.653891) | 14.618517 / 8.074308 (6.544209) | 13.205760 / 10.191392 (3.014368) | 0.154322 / 0.680424 (-0.526102) | 0.029243 / 0.534201 (-0.504958) | 0.442390 / 0.579283 (-0.136893) | 0.434651 / 0.434364 (0.000287) | 0.523082 / 0.540337 (-0.017256) | 0.602675 / 1.386936 (-0.784261) |\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.007214 / 0.011353 (-0.004139) | 0.005225 / 0.011008 (-0.005783) | 0.076497 / 0.038508 (0.037989) | 0.032761 / 0.023109 (0.009652) | 0.336005 / 0.275898 (0.060107) | 0.373547 / 0.323480 (0.050067) | 0.005460 / 0.007986 (-0.002526) | 0.003933 / 0.004328 (-0.000395) | 0.074540 / 0.004250 (0.070289) | 0.047785 / 0.037052 (0.010733) | 0.341917 / 0.258489 (0.083428) | 0.396978 / 0.293841 (0.103137) | 0.036763 / 0.128546 (-0.091783) | 0.012043 / 0.075646 (-0.063603) | 0.087632 / 0.419271 (-0.331640) | 0.049376 / 0.043533 (0.005843) | 0.335169 / 0.255139 (0.080030) | 0.354852 / 0.283200 (0.071652) | 0.100180 / 0.141683 (-0.041503) | 1.443422 / 1.452155 (-0.008733) | 1.518618 / 1.492716 (0.025901) |\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.209593 / 0.018006 (0.191587) | 0.444028 / 0.000490 (0.443538) | 0.004545 / 0.000200 (0.004345) | 0.000100 / 0.000054 (0.000046) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.029676 / 0.037411 (-0.007735) | 0.115444 / 0.014526 (0.100918) | 0.121765 / 0.176557 (-0.054791) | 0.171037 / 0.737135 (-0.566098) | 0.128592 / 0.296338 (-0.167746) |\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.428556 / 0.215209 (0.213347) | 4.228531 / 2.077655 (2.150877) | 2.039190 / 1.504120 (0.535070) | 1.836518 / 1.541195 (0.295324) | 1.897040 / 1.468490 (0.428550) | 0.698893 / 4.584777 (-3.885884) | 3.753998 / 3.745712 (0.008286) | 2.097731 / 5.269862 (-3.172131) | 1.338315 / 4.565676 (-3.227361) | 0.087119 / 0.424275 (-0.337156) | 0.012149 / 0.007607 (0.004542) | 0.520774 / 0.226044 (0.294730) | 5.227420 / 2.268929 (2.958492) | 2.522235 / 55.444624 (-52.922389) | 2.194213 / 6.876477 (-4.682264) | 2.241406 / 2.142072 (0.099333) | 0.843119 / 4.805227 (-3.962109) | 0.169128 / 6.500664 (-6.331536) | 0.065071 / 0.075469 (-0.010398) |\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.254490 / 1.841788 (-0.587298) | 15.037137 / 8.074308 (6.962829) | 13.115333 / 10.191392 (2.923941) | 0.181743 / 0.680424 (-0.498681) | 0.017748 / 0.534201 (-0.516453) | 0.425758 / 0.579283 (-0.153525) | 0.429926 / 0.434364 (-0.004438) | 0.524386 / 0.540337 (-0.015951) | 0.643044 / 1.386936 (-0.743892) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#09e820e79a3b879855b514e2a62d84b738013940 \"CML watermark\")\n" ]
https://api.github.com/repos/huggingface/datasets/issues/5179
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5179/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5179/comments
https://api.github.com/repos/huggingface/datasets/issues/5179/events
https://github.com/huggingface/datasets/issues/5179
1,430,826,100
I_kwDODunzps5VSKx0
5,179
`map()` fails midway due to format incompatibility
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
closed
false
null
9
2022-11-01T03:57:59Z
2022-11-08T11:35:26Z
2022-11-08T11:35:26Z
null
### Describe the bug I am using the `emotion` dataset from Hub for sequence classification. After training the model, I am using it to generate predictions for all the entries present in the `validation` split of the dataset. ```py def get_test_accuracy(model): def fn(batch): inputs = {k:v.to(device) for k,v in batch.items() if k in tokenizer.model_input_names} with torch.no_grad(): output = model(**inputs) pred_label = torch.argmax(output.logits, axis=-1) return {"predicted_label": pred_label.cpu().numpy()} return fn ``` This is how the `get_test_accuracy()` is being used: ```py emotions = load_dataset("emotion") def tokenize(batch): return tokenizer(batch["text"], padding=True, truncation=True) emotions_encoded = emotions.map(tokenize, batched=True) emotions_encoded.set_format("torch", columns=["input_ids", "attention_mask", "label"]) new_dataset = emotions_encoded["validation"].map( accuracy_fn, batched=True, batch_size=128 ) ``` Complete code is available in the Colab Notebook provided below. The `map()` process fails midway giving: ```shell AttributeError Traceback (most recent call last) <ipython-input-8-ad24ac288eb4> in <module> 2 3 new_dataset = emotions_encoded["validation"].map( ----> 4 accuracy_fn, batched=True, batch_size=128 5 ) 7 frames /usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in map(self, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 2588 new_fingerprint=new_fingerprint, 2589 disable_tqdm=disable_tqdm, -> 2590 desc=desc, 2591 ) 2592 else: /usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 582 self: "Dataset" = kwargs.pop("self") 583 # apply actual function --> 584 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 585 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 586 for dataset in datasets: /usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output /usr/local/lib/python3.7/dist-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 478 # Call actual function 479 --> 480 out = func(self, *args, **kwargs) 481 482 # Update fingerprint of in-place transforms + update in-place history of transforms /usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, disable_tqdm, desc, cache_only) 2970 indices, 2971 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 2972 offset=offset, 2973 ) 2974 except NumExamplesMismatchError: /usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 2850 if with_rank: 2851 additional_args += (rank,) -> 2852 processed_inputs = function(*fn_args, *additional_args, **fn_kwargs) 2853 if update_data is None: 2854 # Check if the function returns updated examples <ipython-input-6-4e0d280426f6> in fn(batch) 1 def get_test_accuracy(model): 2 def fn(batch): ----> 3 inputs = {k:v.to(device) for k,v in batch.items() 4 if k in tokenizer.model_input_names} 5 with torch.no_grad(): <ipython-input-6-4e0d280426f6> in <dictcomp>(.0) 2 def fn(batch): 3 inputs = {k:v.to(device) for k,v in batch.items() ----> 4 if k in tokenizer.model_input_names} 5 with torch.no_grad(): 6 output = model(**inputs) AttributeError: 'list' object has no attribute 'to' ``` As you'd notice in the notebook, the process fails _midway_ and not at the beginning. Is this expected? ### Steps to reproduce the bug Colab Notebook: https://colab.research.google.com/gist/sayakpaul/d1570d537faf39040d02d77b1ed7de07/scratchpad.ipynb ### Expected behavior The mapping process should complete as is. If you switch the `split` to `test` it works as expected. ### Environment info Colab
{ "+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/5179/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5179/timeline
null
completed
null
null
false
[ "Cc: @lhoestq ", "You can end up with a list instead of a tensor if all the tensors inside the list can't be stacked together - can you make sure all your inputs are tensors with the same shape ?", "Is there an easy way to ensure it?", "You can make sure your `tokenize` function always return tensors of the same shape", "I modified my `tokenize()` function to be like so:\r\n\r\n```py\r\ndef tokenize(batch):\r\n return tokenizer(batch[\"text\"], padding=\"longest\")\r\n```\r\n\r\nso that the padding always happens w.r.t to the length of the longest sequence in a batch. The issue still persists. Is there any other way? ", "tbh I though your first implementation was fine\r\n```python\r\ndef tokenize(batch):\r\n return tokenizer(batch[\"text\"], padding=True, truncation=True)\r\n```\r\n\r\nMaybe you can try to see what the erroring data looks like by adding a try/except in `get_test_accuracy` ?", "This is what I got. \r\n\r\nFor the non-erroring data, it looks like (without the labels):\r\n\r\n```\r\ntensor([[ 101, 10047, 3110, ..., 0, 0, 0],\r\n [ 101, 1045, 2514, ..., 0, 0, 0],\r\n [ 101, 1045, 2514, ..., 0, 0, 0],\r\n ...,\r\n [ 101, 1045, 2005, ..., 0, 0, 0],\r\n [ 101, 1045, 2572, ..., 0, 0, 0],\r\n [ 101, 10047, 7481, ..., 0, 0, 0]]) 128\r\ntensor([[1, 1, 1, ..., 0, 0, 0],\r\n [1, 1, 1, ..., 0, 0, 0],\r\n [1, 1, 1, ..., 0, 0, 0],\r\n ...,\r\n [1, 1, 1, ..., 0, 0, 0],\r\n [1, 1, 1, ..., 0, 0, 0],\r\n [1, 1, 1, ..., 0, 0, 0]]) 128\r\n```\r\n\r\nFor the erroring part:\r\n\r\n```\r\n[tensor([ 101, 1045, 2064, 2102, 2393, 3110, 2066, 2242, 6355, 3047, 2004, 2574,\r\n 2004, 1996, 8629, 2357, 2125, 4299, 1045, 2071, 2424, 2009, 2006, 7858,\r\n 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r\n 0, 0, 0, 0, 0, 0]), tensor([ 101, 10047, 5458, 1997, 3110, 11654, 1998, 11055, 102, 0,\r\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r\n 0, 0, 0, 0, 0, 0]), tensor([ 101, 1045, 2074, 2064, 2102, 6073, 1996, 3110, 2008, 2026,\r\n 14982, 2000, 5587, 2203, 16650, 29563, 2030, 2569, 4506, 2052,\r\n 2191, 1037, 2738, 11552, 2208, 17044, 14540, 2100, 3375, 102,\r\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r\n 0, 0, 0, 0, 0, 0]),\r\n...\r\n\r\n[tensor([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\r\n 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), tensor([1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),\r\n...\r\n```\r\n\r\nI also tried investigating the shapes of the individual entries within a `batch` without the labels:\r\n\r\n```py\r\ndef get_test_accuracy(model):\r\n def fn(batch): \r\n try:\r\n inputs = {k:v.to(device) for k,v in batch.items() \r\n if k in tokenizer.model_input_names}\r\n with torch.no_grad():\r\n output = model(**inputs)\r\n pred_label = torch.argmax(output.logits, axis=-1)\r\n return {\"predicted_label\": pred_label.cpu().numpy()}\r\n except:\r\n for k in batch:\r\n if k != \"label\":\r\n for i in range(len(batch[k])):\r\n print(batch[k][i].shape)\r\n return fn\r\n```\r\n\r\nThey are:\r\n\r\n```\r\n...\r\ntorch.Size([66])\r\ntorch.Size([66])\r\ntorch.Size([66])\r\ntorch.Size([66])\r\ntorch.Size([66])\r\ntorch.Size([66])\r\ntorch.Size([66])\r\ntorch.Size([66])\r\ntorch.Size([66])\r\ntorch.Size([66])\r\ntorch.Size([66])\r\ntorch.Size([66])\r\ntorch.Size([66])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\ntorch.Size([69])\r\n```\r\n\r\nThere are differing shapes. I understand if I set `batch_size=None` in `emotions_encoded = emotions.map(tokenize, batched=True)` the problem should be fixed as the whole dataset would be treated as a single batch. But is there a way to do that in batches? ", "If you use the same batch_size for your two maps, you should get the exact same batches - therefore all containing the same shapes", "Oh I see. Thanks. Closing this issue. " ]
https://api.github.com/repos/huggingface/datasets/issues/5464
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5464/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5464/comments
https://api.github.com/repos/huggingface/datasets/issues/5464/events
https://github.com/huggingface/datasets/issues/5464
1,557,462,104
I_kwDODunzps5c1PxY
5,464
NonMatchingChecksumError for hendrycks_test
[]
closed
false
null
2
2023-01-26T00:43:23Z
2023-01-27T05:44:31Z
2023-01-26T07:41:58Z
null
### Describe the bug The checksum of the file has likely changed on the remote host. ### Steps to reproduce the bug `dataset = nlp.load_dataset("hendrycks_test", "anatomy")` ### Expected behavior no error thrown ### Environment info - `datasets` version: 2.2.1 - Platform: macOS-13.1-arm64-arm-64bit - Python version: 3.9.13 - PyArrow version: 9.0.0 - 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/5464/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5464/timeline
null
completed
null
null
false
[ "Thanks for reporting, @sarahwie.\r\n\r\nPlease note this issue was already fixed in `datasets` 2.6.0 version:\r\n- #5040\r\n\r\nIf you update your `datasets` version, you will be able to load the dataset:\r\n```\r\npip install -U datasets\r\n```", "Oops, missed that I needed to upgrade. Thanks!" ]
https://api.github.com/repos/huggingface/datasets/issues/1088
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1088/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1088/comments
https://api.github.com/repos/huggingface/datasets/issues/1088/events
https://github.com/huggingface/datasets/pull/1088
756,822,017
MDExOlB1bGxSZXF1ZXN0NTMyMzAyNjIz
1,088
add xquad_r dataset
[]
closed
false
null
0
2020-12-04T05:45:55Z
2020-12-04T10:58:13Z
2020-12-04T10:47:01Z
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/1088/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1088/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/1088.diff", "html_url": "https://github.com/huggingface/datasets/pull/1088", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/1088.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/1088" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/3028
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3028/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3028/comments
https://api.github.com/repos/huggingface/datasets/issues/3028/events
https://github.com/huggingface/datasets/pull/3028
1,016,230,272
PR_kwDODunzps4ssO4s
3,028
Properly install ruamel-yaml for windows CI
[]
closed
false
null
3
2021-10-05T11:51:15Z
2021-10-05T14:02:12Z
2021-10-05T11:51:22Z
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/3028/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3028/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/3028.diff", "html_url": "https://github.com/huggingface/datasets/pull/3028", "merged_at": "2021-10-05T11:51:22Z", "patch_url": "https://github.com/huggingface/datasets/pull/3028.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/3028" }
true
[ "@lhoestq I would say this does not \"properly\" install `ruamel-yaml`, but the contrary, you overwrite the previous version without desinstalling it first.\r\n\r\nAccording to `pip` docs:\r\n> This can break your system if the existing package is of a different version or was installed with a different package manager!\r\n\r\nNote that our case fulfills both conditions:\r\n- the installing version (`0.17.16`) is different from the existing one (`0.15.87`)\r\n- you are installing using `pip` (`setuptools`), whereas the exisitng version was installed using `distutils`\r\n\r\nThat is why I did not fix the issue this way, made a hotfix pinning `huggingface_hub` (#3025), while looking for a permanent solution for the issue.", "Yea I did this because we need the latest version of `huggingface_hub` for #2986 and because I didn't want to ssh to the windows worker x)\r\nMaybe it can be fixed by installing it with conda - let me try", "Oh yea it may not work since it was first installed with distutils" ]
https://api.github.com/repos/huggingface/datasets/issues/1981
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1981/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1981/comments
https://api.github.com/repos/huggingface/datasets/issues/1981/events
https://github.com/huggingface/datasets/issues/1981
821,411,109
MDU6SXNzdWU4MjE0MTExMDk=
1,981
wmt datasets fail to load
[]
closed
false
null
6
2021-03-03T19:21:39Z
2021-03-04T14:16:47Z
2021-03-03T22:48:36Z
null
on master: ``` python -c 'from datasets import load_dataset; load_dataset("wmt14", "de-en")' Downloading and preparing dataset wmt14/de-en (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/stas/.cache/huggingface/datasets/wmt14/de-en/1.0.0/43e717d978d2261502b0194999583acb874ba73b0f4aed0ada2889d1bb00f36e... Traceback (most recent call last): File "<string>", line 1, in <module> File "/mnt/nvme1/code/huggingface/datasets-master/src/datasets/load.py", line 740, in load_dataset builder_instance.download_and_prepare( File "/mnt/nvme1/code/huggingface/datasets-master/src/datasets/builder.py", line 578, in download_and_prepare self._download_and_prepare( File "/mnt/nvme1/code/huggingface/datasets-master/src/datasets/builder.py", line 634, in _download_and_prepare split_generators = self._split_generators(dl_manager, **split_generators_kwargs) File "/home/stas/.cache/huggingface/modules/datasets_modules/datasets/wmt14/43e717d978d2261502b0194999583acb874ba73b0f4aed0ada2889d1bb00f36e/wmt_utils.py", line 760, in _split_generators extraction_map = dict(downloaded_files, **manual_files) ``` it worked fine recently. same problem if I try wmt16. git bisect points to this commit from Feb 25 as the culprit https://github.com/huggingface/datasets/commit/792f1d9bb1c5361908f73e2ef7f0181b2be409fa @albertvillanova
{ "+1": 0, "-1": 0, "confused": 1, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/1981/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1981/timeline
null
completed
null
null
false
[ "@stas00 Mea culpa... May I fix this tomorrow morning?", "yes, of course, I reverted to the version before that and it works ;)\r\n\r\nbut since a new release was just made you will probably need to make a hotfix.\r\n\r\nand add the wmt to the tests?", "Sure, I will implement a regression test!", "@stas00 it is fixed. @lhoestq are you releasing the hot fix or would you prefer me to do it?", "I'll do a patch release for this issue early tomorrow.\r\n\r\nAnd yes we absolutly need tests for the wmt datasets: The missing tests for wmt are an artifact from the early development of the lib but now we have tools to generate automatically the dummy data used for tests :)", "still facing the same issue or similar:\r\nfrom datasets import load_dataset\r\nwtm14_test = load_dataset('wmt14',\"de-en\",cache_dir='./datasets')\r\n\r\n~.cache\\huggingface\\modules\\datasets_modules\\datasets\\wmt14\\43e717d978d2261502b0194999583acb874ba73b0f4aed0ada2889d1bb00f36e\\wmt_utils.py in _split_generators(self, dl_manager)\r\n758 # Extract manually downloaded files.\r\n759 manual_files = dl_manager.extract(manual_paths_dict)\r\n--> 760 extraction_map = dict(downloaded_files, **manual_files)\r\n761\r\n762 for language in self.config.language_pair:\r\n\r\nTypeError: type object argument after ** must be a mapping, not list" ]
https://api.github.com/repos/huggingface/datasets/issues/4163
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/4163/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/4163/comments
https://api.github.com/repos/huggingface/datasets/issues/4163/events
https://github.com/huggingface/datasets/issues/4163
1,203,539,268
I_kwDODunzps5HvI1E
4,163
Optional Content Warning for Datasets
[ { "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
5
2022-04-13T16:38:01Z
2022-06-09T20:39:02Z
null
null
**Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. We now have hate speech datasets on the hub, like this one: https://huggingface.co/datasets/HannahRoseKirk/HatemojiBuild I'm wondering if there is an option to select a content warning message that appears before the dataset preview? Otherwise, people immediately see hate speech when clicking on this dataset. **Describe the solution you'd like** A clear and concise description of what you want to happen. Implementation of a content warning message that separates users from the dataset preview until they click out of the warning. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. Possibly just a way to remove the dataset preview completely? I think I like the content warning option better, though. **Additional context** Add any other context about the feature request here.
{ "+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/4163/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/4163/timeline
null
null
null
null
false
[ "Hi! You can use the `extra_gated_prompt` YAML field in a dataset card for displaying custom messages/warnings that the user must accept before gaining access to the actual dataset. This option also keeps the viewer hidden until the user agrees to terms. ", "Hi @mariosasko, thanks for explaining how to add this feature. \r\n\r\nIf the current dataset yaml is:\r\n```\r\n---\r\nannotations_creators:\r\n- expert\r\nlanguage_creators:\r\n- expert-generated\r\nlanguages:\r\n- en\r\nlicense:\r\n- cc-by-4.0\r\nmultilinguality:\r\n- monolingual\r\npretty_name: HatemojiBuild\r\nsize_categories:\r\n- 1K<n<10K\r\nsource_datasets:\r\n- original\r\ntask_categories:\r\n- text-classification\r\ntask_ids:\r\n- hate-speech-detection\r\n---\r\n```\r\n\r\nCan you provide a minimal working example of how to added the gated prompt?\r\n\r\nThanks!", "```\r\n---\r\nannotations_creators:\r\n- expert\r\nlanguage_creators:\r\n- expert-generated\r\nlanguages:\r\n- en\r\nlicense:\r\n- cc-by-4.0\r\nmultilinguality:\r\n- monolingual\r\npretty_name: HatemojiBuild\r\nsize_categories:\r\n- 1K<n<10K\r\nsource_datasets:\r\n- original\r\ntask_categories:\r\n- text-classification\r\ntask_ids:\r\n- hate-speech-detection\r\nextra_gated_prompt: \"This repository contains harmful content.\"\r\n---\r\n```\r\n\\+ enable `User Access requests` under the Settings pane.\r\n\r\nThere's a brief guide here https://discuss.huggingface.co/t/how-to-customize-the-user-access-requests-message/13953 , and you can see the field in action here, https://huggingface.co/datasets/mozilla-foundation/common_voice_7_0/blob/main/README.md (you need to agree the terms in the Dataset Card pane to be able to access the files pane, so this comes up 403 at first).\r\n\r\nAnd a working example here! https://huggingface.co/datasets/DDSC/dkhate :) Great to be able to mitigate harms in text.", "-- is there a way to gate content anonymously, i.e. without registering which users access it?", "+1 to @leondz's question. One scenario is if you don't want the dataset to be indexed by search engines or viewed in browser b/c of upstream conditions on data, but don't want to collect emails. Some ability to turn off the dataset viewer or add a gating mechanism without emails would be fantastic." ]
https://api.github.com/repos/huggingface/datasets/issues/5277
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5277/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5277/comments
https://api.github.com/repos/huggingface/datasets/issues/5277/events
https://github.com/huggingface/datasets/pull/5277
1,459,388,551
PR_kwDODunzps5Dbybu
5,277
Remove YAML integer keys from class_label metadata
[]
closed
false
null
3
2022-11-22T08:34:07Z
2022-11-22T13:58:26Z
2022-11-22T13:55:49Z
null
Fix partially #5275.
{ "+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/5277/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5277/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/5277.diff", "html_url": "https://github.com/huggingface/datasets/pull/5277", "merged_at": "2022-11-22T13:55:49Z", "patch_url": "https://github.com/huggingface/datasets/pull/5277.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5277" }
true
[ "_The documentation is not available anymore as the PR was closed or merged._", "Also note that this approach is valid when metadata keys are str, but also if they are int.\r\n- This will be helpful for any community dataset using old integer keys in their metadata", "perfect !" ]
https://api.github.com/repos/huggingface/datasets/issues/1571
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1571/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1571/comments
https://api.github.com/repos/huggingface/datasets/issues/1571/events
https://github.com/huggingface/datasets/pull/1571
766,981,721
MDExOlB1bGxSZXF1ZXN0NTM5ODM5OTEw
1,571
Fixing the KILT tasks to match our current standards
[]
closed
false
null
0
2020-12-14T22:26:12Z
2020-12-14T23:07:41Z
2020-12-14T23:07:41Z
null
This introduces a few changes to the Knowledge Intensive Learning task benchmark to bring it more in line with our current datasets, including adding the (minimal) dataset card and having one config per sub-task
{ "+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/1571/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1571/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/1571.diff", "html_url": "https://github.com/huggingface/datasets/pull/1571", "merged_at": "2020-12-14T23:07:41Z", "patch_url": "https://github.com/huggingface/datasets/pull/1571.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/1571" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/3635
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3635/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3635/comments
https://api.github.com/repos/huggingface/datasets/issues/3635/events
https://github.com/huggingface/datasets/pull/3635
1,115,333,219
PR_kwDODunzps4xobAe
3,635
Make `ted_talks_iwslt` dataset streamable
[ { "color": "0e8a16", "default": false, "description": "Contribution to a dataset script", "id": 4564477500, "name": "dataset contribution", "node_id": "LA_kwDODunzps8AAAABEBBmPA", "url": "https://api.github.com/repos/huggingface/datasets/labels/dataset%20contribution" } ]
closed
false
null
3
2022-01-26T18:07:56Z
2022-10-04T09:36:23Z
2022-10-03T09:44:47Z
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/3635/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3635/timeline
null
null
true
{ "diff_url": "https://github.com/huggingface/datasets/pull/3635.diff", "html_url": "https://github.com/huggingface/datasets/pull/3635", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/3635.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/3635" }
true
[ "Thanks for adding this @mariosasko! It worked for me when running it with a local data file, however, when using the file on Google Drive I get the following error:\r\n```Python\r\nds = load_dataset(\"./ted_talks_iwslt\",\"eu_ca_2014\", streaming=True, split=\"train\", use_auth_token=True)\r\nnext(iter(ds))\r\n```\r\n```\r\n---------------------------------------------------------------------------\r\nClientResponseError Traceback (most recent call last)\r\nFile ~/git/bigscience-datasets/env/lib/python3.9/site-packages/fsspec/implementations/http.py:383, in HTTPFileSystem._info(self, url, **kwargs)\r\n 381 try:\r\n 382 info.update(\r\n--> 383 await _file_info(\r\n 384 url,\r\n 385 size_policy=policy,\r\n 386 session=session,\r\n 387 **self.kwargs,\r\n 388 **kwargs,\r\n 389 )\r\n 390 )\r\n 391 if info.get(\"size\") is not None:\r\n\r\nFile ~/git/bigscience-datasets/env/lib/python3.9/site-packages/fsspec/implementations/http.py:734, in _file_info(url, session, size_policy, **kwargs)\r\n 733 async with r:\r\n--> 734 r.raise_for_status()\r\n 736 # TODO:\r\n 737 # recognise lack of 'Accept-Ranges',\r\n 738 # or 'Accept-Ranges': 'none' (not 'bytes')\r\n 739 # to mean streaming only, no random access => return None\r\n\r\nFile ~/git/bigscience-datasets/env/lib/python3.9/site-packages/aiohttp/client_reqrep.py:1004, in ClientResponse.raise_for_status(self)\r\n 1003 self.release()\r\n-> 1004 raise ClientResponseError(\r\n 1005 self.request_info,\r\n 1006 self.history,\r\n 1007 status=self.status,\r\n 1008 message=self.reason,\r\n 1009 headers=self.headers,\r\n 1010 )\r\n\r\nClientResponseError: 403, message='Forbidden', url=URL('https://drive.google.com/u/0/uc?id=1Cz1Un9p8Xn9IpEMMrg2kXSDt0dnjxc4z&export=download&confirm=1RJz')\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nFileNotFoundError Traceback (most recent call last)\r\nInput In [9], in <module>\r\n 1 iterable = iter(ds)\r\n 2 for i in range(10):\r\n----> 3 item = next(iterable)\r\n 4 print(item['text'][:10], item['meta'])\r\n\r\nFile ~/git/bigscience-datasets/env/lib/python3.9/site-packages/datasets/iterable_dataset.py:341, in IterableDataset.__iter__(self)\r\n 340 def __iter__(self):\r\n--> 341 for key, example in self._iter():\r\n 342 if self.features:\r\n 343 # we encode the example for ClassLabel feature types for example\r\n 344 encoded_example = self.features.encode_example(example)\r\n\r\nFile ~/git/bigscience-datasets/env/lib/python3.9/site-packages/datasets/iterable_dataset.py:338, in IterableDataset._iter(self)\r\n 336 else:\r\n 337 ex_iterable = self._ex_iterable\r\n--> 338 yield from ex_iterable\r\n\r\nFile ~/git/bigscience-datasets/env/lib/python3.9/site-packages/datasets/iterable_dataset.py:78, in ExamplesIterable.__iter__(self)\r\n 77 def __iter__(self):\r\n---> 78 for key, example in self.generate_examples_fn(**self.kwargs):\r\n 79 yield key, example\r\n\r\nFile ~/.cache/huggingface/modules/datasets_modules/datasets/lm_en_ted_talks_iwslt/756148758e86e64a350f9b320744a2bd5ed5cff74f7df620763a2b5e1a45e6c6/lm_en_ted_talks_iwslt.py:118, in TedTalksIWSLT._generate_examples(self, files)\r\n 116 for _LANG in _LANG_CODES:\r\n 117 source_file_path = _YEAR_FOLDER[year] + \"/ted_\" + _LANG + _YEAR[year] + \".zip\"\r\n--> 118 for path, file in files:\r\n 119 if path.endswith(source_file_path):\r\n 120 source_talks, _ = parse_zip_file(path, file.read())\r\n\r\nFile ~/git/bigscience-datasets/env/lib/python3.9/site-packages/datasets/utils/streaming_download_manager.py:596, in StreamingDownloadManager.iter_archive(self, urlpath_or_buf)\r\n 594 yield from _iter_archive(urlpath_or_buf)\r\n 595 else:\r\n--> 596 with xopen(urlpath_or_buf, \"rb\", use_auth_token=self.download_config.use_auth_token) as f:\r\n 597 yield from _iter_archive(f)\r\n\r\nFile ~/git/bigscience-datasets/env/lib/python3.9/site-packages/datasets/utils/streaming_download_manager.py:296, in xopen(file, mode, use_auth_token, *args, **kwargs)\r\n 294 new_kwargs = {}\r\n 295 kwargs = {**kwargs, **new_kwargs}\r\n--> 296 file_obj = fsspec.open(file, mode=mode, *args, **kwargs).open()\r\n 297 _add_retries_to_file_obj_read_method(file_obj)\r\n 298 return file_obj\r\n\r\nFile ~/git/bigscience-datasets/env/lib/python3.9/site-packages/fsspec/core.py:140, in OpenFile.open(self)\r\n 132 def open(self):\r\n 133 \"\"\"Materialise this as a real open file without context\r\n 134 \r\n 135 The file should be explicitly closed to avoid enclosed file\r\n (...)\r\n 138 been deleted; but a with-context is better style.\r\n 139 \"\"\"\r\n--> 140 out = self.__enter__()\r\n 141 closer = out.close\r\n 142 fobjects = self.fobjects.copy()[:-1]\r\n\r\nFile ~/git/bigscience-datasets/env/lib/python3.9/site-packages/fsspec/core.py:103, in OpenFile.__enter__(self)\r\n 100 def __enter__(self):\r\n 101 mode = self.mode.replace(\"t\", \"\").replace(\"b\", \"\") + \"b\"\r\n--> 103 f = self.fs.open(self.path, mode=mode)\r\n 105 self.fobjects = [f]\r\n 107 if self.compression is not None:\r\n\r\nFile ~/git/bigscience-datasets/env/lib/python3.9/site-packages/fsspec/spec.py:1009, in AbstractFileSystem.open(self, path, mode, block_size, cache_options, compression, **kwargs)\r\n 1007 else:\r\n 1008 ac = kwargs.pop(\"autocommit\", not self._intrans)\r\n-> 1009 f = self._open(\r\n 1010 path,\r\n 1011 mode=mode,\r\n 1012 block_size=block_size,\r\n 1013 autocommit=ac,\r\n 1014 cache_options=cache_options,\r\n 1015 **kwargs,\r\n 1016 )\r\n 1017 if compression is not None:\r\n 1018 from fsspec.compression import compr\r\n\r\nFile ~/git/bigscience-datasets/env/lib/python3.9/site-packages/fsspec/implementations/http.py:343, in HTTPFileSystem._open(self, path, mode, block_size, autocommit, cache_type, cache_options, size, **kwargs)\r\n 341 kw[\"asynchronous\"] = self.asynchronous\r\n 342 kw.update(kwargs)\r\n--> 343 size = size or self.info(path, **kwargs)[\"size\"]\r\n 344 session = sync(self.loop, self.set_session)\r\n 345 if block_size and size:\r\n\r\nFile ~/git/bigscience-datasets/env/lib/python3.9/site-packages/fsspec/asyn.py:91, in sync_wrapper.<locals>.wrapper(*args, **kwargs)\r\n 88 @functools.wraps(func)\r\n 89 def wrapper(*args, **kwargs):\r\n 90 self = obj or args[0]\r\n---> 91 return sync(self.loop, func, *args, **kwargs)\r\n\r\nFile ~/git/bigscience-datasets/env/lib/python3.9/site-packages/fsspec/asyn.py:71, in sync(loop, func, timeout, *args, **kwargs)\r\n 69 raise FSTimeoutError from return_result\r\n 70 elif isinstance(return_result, BaseException):\r\n---> 71 raise return_result\r\n 72 else:\r\n 73 return return_result\r\n\r\nFile ~/git/bigscience-datasets/env/lib/python3.9/site-packages/fsspec/asyn.py:25, in _runner(event, coro, result, timeout)\r\n 23 coro = asyncio.wait_for(coro, timeout=timeout)\r\n 24 try:\r\n---> 25 result[0] = await coro\r\n 26 except Exception as ex:\r\n 27 result[0] = ex\r\n\r\nFile ~/git/bigscience-datasets/env/lib/python3.9/site-packages/fsspec/implementations/http.py:396, in HTTPFileSystem._info(self, url, **kwargs)\r\n 393 except Exception as exc:\r\n 394 if policy == \"get\":\r\n 395 # If get failed, then raise a FileNotFoundError\r\n--> 396 raise FileNotFoundError(url) from exc\r\n 397 logger.debug(str(exc))\r\n 399 return {\"name\": url, \"size\": None, **info, \"type\": \"file\"}\r\n\r\nFileNotFoundError: https://drive.google.com/u/0/uc?id=1Cz1Un9p8Xn9IpEMMrg2kXSDt0dnjxc4z&export=download&confirm=1RJz\r\n```", "Thanks @mariosasko.\r\n\r\nTo make this dataset streamable, we should first host the data on the Hub instead of current Google Drive. Do you know if their license allows to do so? ", "This dataset is licensed under [cc-by-nc-4.0](https://creativecommons.org/licenses/by-nc/4.0/), so I think it should be" ]
https://api.github.com/repos/huggingface/datasets/issues/2893
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/2893/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/2893/comments
https://api.github.com/repos/huggingface/datasets/issues/2893/events
https://github.com/huggingface/datasets/pull/2893
993,342,781
MDExOlB1bGxSZXF1ZXN0NzMxNTQ0NDQz
2,893
add mbpp dataset
[]
closed
false
null
1
2021-09-10T15:27:30Z
2021-09-16T09:35:42Z
2021-09-16T09:35:42Z
null
This PR adds the mbpp dataset introduced by Google [here](https://github.com/google-research/google-research/tree/master/mbpp) as mentioned in #2816. The dataset contain two versions: a full and a sanitized one. They have a slightly different schema and it is current state the loading preserves the original schema. An open question is whether to harmonize the two schemas when loading the dataset or to preserve the original one. Since not all fields are overlapping the schema will not be exactly the same.
{ "+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/2893/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/2893/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/2893.diff", "html_url": "https://github.com/huggingface/datasets/pull/2893", "merged_at": "2021-09-16T09:35:42Z", "patch_url": "https://github.com/huggingface/datasets/pull/2893.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/2893" }
true
[ "I think it's fine to have the original schema" ]
https://api.github.com/repos/huggingface/datasets/issues/988
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/988/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/988/comments
https://api.github.com/repos/huggingface/datasets/issues/988/events
https://github.com/huggingface/datasets/issues/988
755,069,159
MDU6SXNzdWU3NTUwNjkxNTk=
988
making sure datasets are not loaded in memory and distributed training of them
[]
closed
false
null
2
2020-12-02T08:45:15Z
2022-10-05T13:00:42Z
2022-10-05T13:00:42Z
null
Hi I am dealing with large-scale datasets which I need to train distributedly, I used the shard function to divide the dataset across the cores, without any sampler, this does not work for distributed training and does not become any faster than 1 TPU core. 1) how I can make sure data is not loaded in memory 2) in case of distributed training with iterative datasets which measures needs to be taken? Is this all sharding the data only. I was wondering if there can be possibility for me to discuss this with someone with distributed training with iterative datasets using dataset library. thanks
{ "+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/988/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/988/timeline
null
completed
null
null
false
[ "my implementation of sharding per TPU core: https://github.com/google-research/ruse/blob/d4dd58a2d8efe0ffb1a9e9e77e3228d6824d3c3c/seq2seq/trainers/t5_trainer.py#L316 \r\nmy implementation of dataloader for this case https://github.com/google-research/ruse/blob/d4dd58a2d8efe0ffb1a9e9e77e3228d6824d3c3c/seq2seq/tasks/tasks.py#L496 ", "Hi! You can use the `assert not bool(dataset.cache_files)` assertion to ensure your data is in memory. And I suggest using `accelerate` for distributed training." ]
https://api.github.com/repos/huggingface/datasets/issues/1629
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1629/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1629/comments
https://api.github.com/repos/huggingface/datasets/issues/1629/events
https://github.com/huggingface/datasets/pull/1629
774,255,716
MDExOlB1bGxSZXF1ZXN0NTQ1MjAwNTQ3
1,629
add wongnai_reviews test set labels
[]
closed
false
null
0
2020-12-24T08:02:31Z
2020-12-28T17:23:39Z
2020-12-28T17:23:39Z
null
- add test set labels provided by @ekapolc - refactor `star_rating` to a `datasets.features.ClassLabel` field
{ "+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/1629/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1629/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/1629.diff", "html_url": "https://github.com/huggingface/datasets/pull/1629", "merged_at": "2020-12-28T17:23:39Z", "patch_url": "https://github.com/huggingface/datasets/pull/1629.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/1629" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/3833
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3833/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3833/comments
https://api.github.com/repos/huggingface/datasets/issues/3833/events
https://github.com/huggingface/datasets/pull/3833
1,160,543,713
PR_kwDODunzps4z_99t
3,833
Small typos in How-to-train tutorial.
[]
closed
false
null
0
2022-03-06T07:49:49Z
2022-03-07T12:35:33Z
2022-03-07T12:13:17Z
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/3833/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3833/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/3833.diff", "html_url": "https://github.com/huggingface/datasets/pull/3833", "merged_at": "2022-03-07T12:13:17Z", "patch_url": "https://github.com/huggingface/datasets/pull/3833.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/3833" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/219
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/219/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/219/comments
https://api.github.com/repos/huggingface/datasets/issues/219/events
https://github.com/huggingface/datasets/pull/219
627,235,893
MDExOlB1bGxSZXF1ZXN0NDI1MDc2NjQx
219
force mwparserfromhell as third party
[]
closed
false
null
0
2020-05-29T12:33:17Z
2020-05-29T13:30:13Z
2020-05-29T13:30:12Z
null
This should fix your env because you had `mwparserfromhell ` as a first party for `isort` @patrickvonplaten
{ "+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/219/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/219/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/219.diff", "html_url": "https://github.com/huggingface/datasets/pull/219", "merged_at": "2020-05-29T13:30:12Z", "patch_url": "https://github.com/huggingface/datasets/pull/219.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/219" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/2556
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/2556/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/2556/comments
https://api.github.com/repos/huggingface/datasets/issues/2556/events
https://github.com/huggingface/datasets/issues/2556
931,595,872
MDU6SXNzdWU5MzE1OTU4NzI=
2,556
Better DuplicateKeysError error to help the user debug the issue
[ { "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" }, { "color": "7057ff", "default": true, "description": "Good for newcomers", "id": 1935892877, "name": "good first issue", "node_id": "MDU6TGFiZWwxOTM1ODkyODc3", "url": "https://api.github.com/repos/huggingface/datasets/labels/good%20first%20issue" } ]
closed
false
null
7
2021-06-28T13:50:57Z
2022-06-28T09:26:04Z
2022-06-28T09:26:04Z
null
As mentioned in https://github.com/huggingface/datasets/issues/2552 it would be nice to improve the error message when a dataset fails to build because there are duplicate example keys. The current one is ```python datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` and we could have something that guides the user to debugging the issue: ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ```
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/2556/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/2556/timeline
null
completed
null
null
false
[ "excuse me, my `datasets` version is `2.2.2`, but I also just see the error info like \r\n```\r\nDuplicatedKeysError: FAILURE TO GENERATE DATASET !\r\nFound duplicate Key: 0\r\nKeys should be unique and deterministic in nature\r\n```", "Hi ! for which dataset do you have this error ?\r\n\r\nAlso note that this issue is just about improving the error message, which is not very friendly x)", "@lhoestq I would like to take a hit at improving the error message. Will open a draft PR and will reach out to you for review\r\n", "> DuplicateKeysError: both 42th and 1337th examples have the same keys `48`.\r\n\r\n@lhoestq when you mention 42th and 1337th in the above case , are these values the examples' \"id\" or are they the examples' index ? ", "Hi ! Thanks @VijayKalmath :)\r\n\r\nIn the general case, examples don't have an \"id\" field, so I think it should correspond to the index", "@lhoestq , I have opened a draft PR for this Issue. \r\n\r\nI wanted to check with you if there is a way to get `<path/to/the/dataset/script>` currently or do I need to add extra code to find that. \r\n\r\nIf I need to find the script , I can assume that the generator function will always be in `datasets/{dataset_name}/{dataset_name}.py`. ", "Thanks !\r\n\r\n> I wanted to check with you if there is a way to get <path/to/the/dataset/script> currently or do I need to add extra code to find that.\r\n\r\nYou don't have access to this info inside the ArrowWriter unfortunately. This info is available in builder.py in the DatasetBuilder code that uses the ArrowWriter though, maybe a try-catch there can do the job" ]
https://api.github.com/repos/huggingface/datasets/issues/3308
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3308/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3308/comments
https://api.github.com/repos/huggingface/datasets/issues/3308/events
https://github.com/huggingface/datasets/issues/3308
1,059,255,705
I_kwDODunzps4_IvWZ
3,308
"dataset_infos.json" missing for chr_en and mc4
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" }, { "color": "2edb81", "default": false, "description": "A bug in a dataset script provided in the library", "id": 2067388877, "name": "dataset bug", "node_id": "MDU6TGFiZWwyMDY3Mzg4ODc3", "url": "https://api.github.com/repos/huggingface/datasets/labels/dataset%20bug" } ]
open
false
null
3
2021-11-21T00:07:22Z
2022-01-19T13:55:32Z
null
null
## Describe the bug In the repository, every dataset has its metadata in a file called`dataset_infos.json`. But, this file is missing for two datasets: `chr_en` and `mc4`. ## Steps to reproduce the bug Check [chr_en](https://github.com/huggingface/datasets/tree/master/datasets/chr_en) and [mc4](https://github.com/huggingface/datasets/tree/master/datasets/mc4)
{ "+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/3308/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3308/timeline
null
null
null
null
false
[ "Hi ! Thanks for reporting :) \r\nWe can easily add the metadata for `chr_en` IMO, but for mC4 it will take more time, since it requires to count the number of examples in each language", "No problem. I am trying to do some analysis on the metadata of all available datasets. Is reading `metadata_infos.json` for each dataset the correct way to go? \r\n\r\nI noticed that the same information is also available as special variables inside .py file of each dataset. So, I was wondering if `metadata_infos.json` has been deprecated?\r\n\r\n![image](https://user-images.githubusercontent.com/8587189/142914413-a95a1abf-6f3e-4fbe-96e5-16d3ca39c831.png)\r\n", "The `dataset_infos.json` files have more information and are made to be used to analyze the datasets without having to run/parse the python scripts. Moreover some datasets on the Hugging face don't even have a python script, and for those ones we'll make tools to generate the JSON file automatically :)" ]
https://api.github.com/repos/huggingface/datasets/issues/2583
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/2583/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/2583/comments
https://api.github.com/repos/huggingface/datasets/issues/2583/events
https://github.com/huggingface/datasets/issues/2583
936,034,976
MDU6SXNzdWU5MzYwMzQ5NzY=
2,583
Error iteration over IterableDataset using Torch DataLoader
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
closed
false
null
2
2021-07-02T19:55:58Z
2021-07-20T09:04:45Z
2021-07-05T23:48:23Z
null
## Describe the bug I have an IterableDataset (created using streaming=True) and I am trying to create batches using Torch DataLoader class by passing this IterableDataset to it. This throws error which is pasted below. I can do the same by using Torch IterableDataset. One thing I noticed is that in the former case when I look at the dataloader.sampler class I get torch.utils.data.sampler.SequentialSampler while the latter one gives torch.utils.data.dataloader._InfiniteConstantSampler. I am not sure if this is how it is meant to be used, but that's what seemed reasonable to me. ## Steps to reproduce the bug 1. Does not work. ```python >>> from datasets import load_dataset >>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True) >>> dataloader = torch.utils.data.DataLoader(dataset, batch_size=4) >>> dataloader.sampler <torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208> >>> for batch in dataloader: ... print(batch) ``` 2. Works. ```python import torch from torch.utils.data import Dataset, IterableDataset, DataLoader class CustomIterableDataset(IterableDataset): 'Characterizes a dataset for PyTorch' def __init__(self, data): 'Initialization' self.data = data def __iter__(self): return iter(self.data) data = list(range(12)) dataset = CustomIterableDataset(data) dataloader = DataLoader(dataset, batch_size=4) print("dataloader: ", dataloader.sampler) for batch in dataloader: print(batch) ``` ## Expected results To get batches of data with the batch size as 4. Output from the latter one (2) though Datasource is different here so actual data is different. dataloader: <torch.utils.data.dataloader._InfiniteConstantSampler object at 0x7f1cc29e2c50> tensor([0, 1, 2, 3]) tensor([4, 5, 6, 7]) tensor([ 8, 9, 10, 11]) ## Actual results <torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208> ... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in __next__ data = self._next_data() File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 474, in _next_data index = self._next_index() # may raise StopIteration File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 427, in _next_index return next(self._sampler_iter) # may raise StopIteration File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 227, in __iter__ for idx in self.sampler: File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 67, in __iter__ return iter(range(len(self.data_source))) TypeError: object of type 'IterableDataset' has no len() ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: '1.8.1.dev0' - Platform: Linux - Python version: Python 3.6.8 - PyArrow version: '3.0.0'
{ "+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/2583/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/2583/timeline
null
completed
null
null
false
[ "Hi ! This is because you first need to format the dataset for pytorch:\r\n\r\n```python\r\n>>> import torch\r\n>>> from datasets import load_dataset\r\n>>> dataset = load_dataset('oscar', \"unshuffled_deduplicated_en\", split='train', streaming=True)\r\n>>> torch_iterable_dataset = dataset.with_format(\"torch\")\r\n>>> assert isinstance(torch_iterable_dataset, torch.utils.data.IterableDataset)\r\n>>> dataloader = torch.utils.data.DataLoader(torch_iterable_dataset, batch_size=4)\r\n>>> next(iter(dataloader))\r\n{'id': tensor([0, 1, 2, 3]), 'text': ['Mtendere Village was inspired...]}\r\n```\r\n\r\nThis is because the pytorch dataloader expects a subclass of `torch.utils.data.IterableDataset`. Since you can't pass an arbitrary iterable to a pytorch dataloader, you first need to build an object that inherits from `torch.utils.data.IterableDataset` using `with_format(\"torch\")` for example.\r\n", "Thank you for that and the example! \r\n\r\nWhat you said makes total sense; I just somehow missed that and assumed HF IterableDataset was a subclass of Torch IterableDataset. " ]
https://api.github.com/repos/huggingface/datasets/issues/1324
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1324/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1324/comments
https://api.github.com/repos/huggingface/datasets/issues/1324/events
https://github.com/huggingface/datasets/issues/1324
759,587,864
MDU6SXNzdWU3NTk1ODc4NjQ=
1,324
❓ Sharing ElasticSearch indexed dataset
[ { "color": "e99695", "default": false, "description": "Requesting to add a new dataset", "id": 2067376369, "name": "dataset request", "node_id": "MDU6TGFiZWwyMDY3Mzc2MzY5", "url": "https://api.github.com/repos/huggingface/datasets/labels/dataset%20request" } ]
open
false
null
3
2020-12-08T16:25:58Z
2020-12-22T07:50:56Z
null
null
Hi there, First of all, thank you very much for this amazing library. Datasets have become my preferred data structure for basically everything I am currently doing. **Question:** I'm working with a dataset and I have an elasticsearch container running at localhost:9200. I added an elasticsearch index and I was wondering - how can I know where it has been saved? - how can I share the indexed dataset with others? I tried to dig into the docs, but could not find anything about that. Thank you very much for your help. Best, Pietro Edit: apologies for the wrong label
{ "+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/1324/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1324/timeline
null
null
null
null
false
[ "Hello @pietrolesci , I am not sure to understand what you are trying to do here.\r\n\r\nIf you're looking for ways to save a dataset on disk, you can you the `save_to_disk` method:\r\n```python\r\n>>> import datasets\r\n>>> loaded_dataset = datasets.load(\"dataset_name\")\r\n>>> loaded_dataset.save_to_disk(\"/path/on/your/disk\")\r\n```\r\n\r\nThe saved dataset can later be retrieved using:\r\n```python\r\n>>> loaded_dataset = datasets.Dataset.load_from_disk(\"/path/on/your/disk\")\r\n```\r\n\r\nAlso, I'd recommend posting your question directly in the issue section of the [elasticsearch repo](https://github.com/elastic/elasticsearch)", "Hi @SBrandeis,\n\nThanks a lot for picking up my request. \n\nMaybe I can clarify my use-case with a bit of context. Say I have the IMDb dataset. I create an ES index on it. Now I can save and reload the dataset from disk normally. Once I reload the dataset, it is easy to retrieve the ES index on my machine. I was wondering: is there a way I can share the (now) indexed version of the IMDb dataset with my colleagues without requiring them to re-index it?\n\nThanks a lot in advance for your consideration.\n\nBest,\n\nPietro", "Thanks for the clarification.\r\n\r\nI am not familiar with ElasticSearch, but if I understand well you're trying to migrate your data along with the ES index.\r\nMy advice would be to check out ES documentation, for instance, this might help you: https://www.elastic.co/guide/en/cloud/current/ec-migrate-data.html\r\n\r\nLet me know if it helps" ]
https://api.github.com/repos/huggingface/datasets/issues/4435
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/4435/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/4435/comments
https://api.github.com/repos/huggingface/datasets/issues/4435/events
https://github.com/huggingface/datasets/issues/4435
1,257,496,552
I_kwDODunzps5K89_o
4,435
Load a local cached dataset that has been modified
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
closed
false
null
2
2022-06-02T01:51:49Z
2022-06-02T23:59:26Z
2022-06-02T23:59:18Z
null
## Describe the bug I have loaded a dataset as follows: ``` d = load_dataset("emotion", split="validation") ``` Afterwards I make some modifications to the dataset via a `map` call: ``` d.map(some_update_func, cache_file_name=modified_dataset) ``` This generates a cached version of the dataset on my local system in the same directory as the original download of the data (/path/to/cache). Running an `ls` returns: ``` modified_dataset dataset_info.json emotion-test.arrow emotion-train.arrow emotion-validation.arrow ``` as expected. However, when I try to load up the modified cached dataset via a call to ``` modified = load_dataset("emotion", split="validation", data_files="/path/to/cache/modified_dataset") ``` it simply redownloads a new version of the dataset and dumps to a new cache rather than loading up the original modified dataset: ``` Using custom data configuration validation-cdbf51685638421b Downloading and preparing dataset emotion/validation to ... ``` How am I supposed to load the original modified local cache copy of the dataset? ## Environment info - `datasets` version: 2.2.2 - Platform: Linux-5.4.0-113-generic-x86_64-with-glibc2.17 - Python version: 3.8.13 - PyArrow version: 8.0.0 - Pandas version: 1.4.2
{ "+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/4435/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/4435/timeline
null
completed
null
null
false
[ "Hi! `datasets` caches every modification/loading, so you can either rerun the pipeline up to the `map` call or use `Dataset.from_file(modified_dataset)` to load the dataset directly from the cache file.", "Awesome, hvala Mario! This works. " ]
https://api.github.com/repos/huggingface/datasets/issues/1956
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1956/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1956/comments
https://api.github.com/repos/huggingface/datasets/issues/1956/events
https://github.com/huggingface/datasets/issues/1956
818,013,741
MDU6SXNzdWU4MTgwMTM3NDE=
1,956
[distributed env] potentially unsafe parallel execution
[]
closed
false
null
2
2021-02-27T20:38:45Z
2021-03-01T17:24:42Z
2021-03-01T17:24:42Z
null
``` metric = load_metric('glue', 'mrpc', num_process=num_process, process_id=rank) ``` presumes that there is only one set of parallel processes running - and will intermittently fail if you have multiple sets running as they will surely overwrite each other. Similar to https://github.com/huggingface/datasets/issues/1942 (but for a different reason). That's why dist environments use some unique to a group identifier so that each group is dealt with separately. e.g. the env-way of pytorch dist syncing is done with a unique per set `MASTER_ADDRESS+MASTER_PORT` So ideally this interface should ask for a shared secret to do the right thing. I'm not reporting an immediate need, but am only flagging that this will hit someone down the road. This problem can be remedied by adding a new optional `shared_secret` option, which can then be used to differentiate different groups of processes. and this secret should be part of the file lock name and the experiment. Thank you
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/1956/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1956/timeline
null
completed
null
null
false
[ "You can pass the same `experiment_id` for all the metrics of the same group, and use another `experiment_id` for the other groups.\r\nMaybe we can add an environment variable that sets the default value for `experiment_id` ? What do you think ?", "Ah, you're absolutely correct, @lhoestq - it's exactly the equivalent of the shared secret. Thank you!" ]
https://api.github.com/repos/huggingface/datasets/issues/3300
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3300/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3300/comments
https://api.github.com/repos/huggingface/datasets/issues/3300/events
https://github.com/huggingface/datasets/issues/3300
1,058,644,459
I_kwDODunzps4_GaHr
3,300
❓ Dataset loading script from Hugging Face Hub
[ { "color": "e99695", "default": false, "description": "Requesting to add a new dataset", "id": 2067376369, "name": "dataset request", "node_id": "MDU6TGFiZWwyMDY3Mzc2MzY5", "url": "https://api.github.com/repos/huggingface/datasets/labels/dataset%20request" }, { "color": "E5583E", "default": false, "description": "Related to the dataset viewer on huggingface.co", "id": 3470211881, "name": "dataset-viewer", "node_id": "LA_kwDODunzps7O1zsp", "url": "https://api.github.com/repos/huggingface/datasets/labels/dataset-viewer" } ]
closed
false
null
8
2021-11-19T15:20:52Z
2021-12-22T10:57:56Z
2021-12-22T10:57:56Z
null
Hi there, I am trying to add my custom `ag_news` with its own loading script on the Hugging Face datasets hub. In particular, I would like to test the addition of a second configuration to the existing `ag_news` dataset. Once it works in my hub, I plan to make a PR to the original dataset. However, in trying to do so I have encountered certain problems as detailed below. Issues I have encountered: - Without a loading script, the train and test files are loaded together into a unique `dataset.Dataset` -> so I wrote a loading script. Also, I need a loading script otherwise I cannot specify multiple configurations - Once my loading script is working locally, I do not manage to make it work on the hub. In particular, I would like to be able to load the dataset like this ```python load_dataset("pietrolesci/ag_news", name="my_configuration") ``` Apparently, the `load_dataset` is able to pick up the loading script from the hub and run it. However, it errors because it is unable to find the files. The structure of my hub repo is the following ``` ag_news.py train.csv test.csv ``` and the loading script I specify `data_dir=Path(__file__).parent` and `data_files=DataFilesDict({"train": "train.csv", "test": "test.csv"})`. In the documentation I could not find info regarding loading a dataset from the hub using a loading script present on the hub. Any suggestion is very much appreciated. Best, Pietro Link to the hub repo: https://huggingface.co/datasets/pietrolesci/ag_news BONUS: how can I make the data viewer work in this specific case? :)
{ "+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/3300/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3300/timeline
null
completed
null
null
false
[ "Hi ! In the next version of `datasets`, your train and test splits will be correctly separated (changes from #3027) if you create a dataset repository with only your CSV files.\r\n\r\nAlso it seems that you overwrite the `data_files` and `data_dir` arguments in your code, when you instantiate the AGNewsConfig objects. Those parameters are not necessary since you already know which files you want to load.\r\n\r\nYou can find an example on how to specify which file the dataset has to download in this [example script](https://huggingface.co/datasets/lhoestq/custom_squad/blob/main/custom_squad.py#L101-L107):\r\n```python\r\n_URLS = {\r\n \"train\": \"train-v1.1.json\", # you can use a URL or a relative path from the python script to your file in the repository\r\n \"dev\": \"dev-v1.1.json\",\r\n}\r\n```\r\n```python\r\n def _split_generators(self, dl_manager):\r\n downloaded_files = dl_manager.download_and_extract(_URLS)\r\n\r\n return [\r\n datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={\"filepath\": downloaded_files[\"train\"]}),\r\n datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={\"filepath\": downloaded_files[\"dev\"]}),\r\n ]\r\n```", "Also I think the viewer will be updated when you fix the dataset script, let me know if it doesn't", "Hi @lhoestq,\r\n\r\nThanks a lot for the super quick answer!\r\n\r\nYour suggestion solves my issue. I am now able to load the dataset properly πŸš€ \r\nHowever, the dataviewer is not working yet.\r\n\r\nReally, thanks a lot for your help and consideration!\r\n\r\nBest,\r\nPietro", "Great ! We'll take a look at the viewer to fix it", "@lhoestq I think I am having a related problem.\r\nMy call to load_dataset() looks like this:\r\n\r\n```\r\n datasets = load_dataset(\r\n os.path.abspath(layoutlmft.data.datasets.xfun.__file__),\r\n f\"xfun.{data_args.lang}\",\r\n additional_langs=data_args.additional_langs,\r\n keep_in_memory=True,\r\n )\r\n\r\n```\r\n\r\nMy _split_generation code is:\r\n\r\n```\r\n def _split_generators(self, dl_manager):\r\n \"\"\"Returns SplitGenerators.\"\"\"\r\n\r\n downloaded_file = dl_manager.download_and_extract(\"https://guillaumejaume.github.io/FUNSD/dataset.zip\")\r\n return [\r\n datasets.SplitGenerator(\r\n name=datasets.Split.TRAIN, gen_kwargs={\"filepath\": f\"{downloaded_file}/dataset/training_data/\"}\r\n ),\r\n datasets.SplitGenerator(\r\n name=datasets.Split.TEST, gen_kwargs={\"filepath\": f\"{downloaded_file}/dataset/testing_data/\"}\r\n ),\r\n ]\r\n\r\n```\r\nHowever I get the error \"TypeError: _generate_examples() got an unexpected keyword argument 'filepath'\"\r\nThe path looks right and I see the data in the path so I think the only problem I have is that it doesn't like the key \"filepath\". However, the documentation (example [here](https://huggingface.co/datasets/lhoestq/custom_squad/blob/main/custom_squad.py#L101-L107)) seems to show that this is the correct parameter. \r\n\r\nHere is the full stack trace:\r\n\r\n```\r\nDownloading and preparing dataset xfun/xfun.en (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /Users/caseygre/.cache/huggingface/datasets/xfun/xfun.en/0.0.0/96b8cb7c57f6f822f0ab37ae3be7b82d84ac57062e774c9361ccf0a4b9ef61cc...\r\nTraceback (most recent call last):\r\n File \"/Users/caseygre/PycharmProjects/aegis-ml-new/unilm/venv-LayoutLM/lib/python3.9/site-packages/datasets/builder.py\", line 574, in download_and_prepare\r\n self._download_and_prepare(\r\n File \"/Users/caseygre/PycharmProjects/aegis-ml-new/unilm/venv-LayoutLM/lib/python3.9/site-packages/datasets/builder.py\", line 652, in _download_and_prepare\r\n self._prepare_split(split_generator, **prepare_split_kwargs)\r\n File \"/Users/caseygre/PycharmProjects/aegis-ml-new/unilm/venv-LayoutLM/lib/python3.9/site-packages/datasets/builder.py\", line 975, in _prepare_split\r\n generator = self._generate_examples(**split_generator.gen_kwargs)\r\nTypeError: _generate_examples() got an unexpected keyword argument 'filepath'\r\npython-BaseException\r\n```", "Hi ! The `gen_kwargs` dictionary is passed to `_generate_examples`, so in your case it must be defined this way:\r\n```python\r\ndef _generate_examples(self, filepath):\r\n ...\r\n```\r\n\r\nAnd here is an additional tip: you can use `os.path.join(downloaded_file, \"dataset/testing_data\")` instead of `f\"downloaded_file}/dataset/testing_data/\"` to get compatibility with Windows and streaming.\r\n\r\nIndeed Windows uses a backslash separator, not a slash, and streaming uses chained URLs (like `zip://dataset/testing_data::https://https://guillaumejaume.github.io/FUNSD/dataset.zip` for example)", "Thanks for you quick reply @lhoestq and so sorry for my very delayed response.\r\nWe have gotten around the error another way but I will try to duplicate this when I can. We may have had \"filepaths\" instead of \"filepath\" in our def of _generate_examples() and not noticed the difference. If I find a more useful answer for others I will add to this ticket so they know what the issue was.\r\nNote: we do have our own _generate_examples() defined with the same def as Quentin has. (But one version does have \"filepaths\".)\r\n", "Fixed in the viewer: https://huggingface.co/datasets/pietrolesci/ag_news" ]
https://api.github.com/repos/huggingface/datasets/issues/5566
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5566/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5566/comments
https://api.github.com/repos/huggingface/datasets/issues/5566/events
https://github.com/huggingface/datasets/issues/5566
1,595,916,674
I_kwDODunzps5fH8GC
5,566
Directly reading parquet files in a s3 bucket from the load_dataset method
[ { "color": "cfd3d7", "default": true, "description": "This issue or pull request already exists", "id": 1935892865, "name": "duplicate", "node_id": "MDU6TGFiZWwxOTM1ODkyODY1", "url": "https://api.github.com/repos/huggingface/datasets/labels/duplicate" }, { "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
1
2023-02-22T22:13:40Z
2023-02-23T11:03:29Z
null
null
### Feature request Right now, we have to read the get the parquet file to the local storage. So having ability to read given the bucket directly address would be benificial ### Motivation In a production set up, this feature can help us a lot. So we do not need move training datafiles in between storage. ### Your contribution I am willing to help if there's anyway.
{ "+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/5566/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5566/timeline
null
null
null
null
false
[ "Hi ! I think is in the scope of this other issue: to https://github.com/huggingface/datasets/issues/5281 " ]
https://api.github.com/repos/huggingface/datasets/issues/2529
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/2529/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/2529/comments
https://api.github.com/repos/huggingface/datasets/issues/2529/events
https://github.com/huggingface/datasets/pull/2529
926,378,812
MDExOlB1bGxSZXF1ZXN0Njc0NjkxNjA5
2,529
Add summarization template
[]
closed
false
null
2
2021-06-21T16:08:31Z
2021-06-23T14:22:11Z
2021-06-23T13:30:10Z
null
This PR adds a task template for text summarization. As far as I can tell, we do not need to distinguish between "extractive" or "abstractive" summarization - both can be handled with this template. Usage: ```python from datasets import load_dataset from datasets.tasks import Summarization ds = load_dataset("xsum", split="train") # Dataset({ # features: ['document', 'summary', 'id'], # num_rows: 204045 # }) summarization = Summarization(text_column="document", summary_column="summary") ds.prepare_for_task(summarization) # Dataset({ # features: ['text', 'summary'], # num_rows: 204045 # }) ```
{ "+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/2529/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/2529/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/2529.diff", "html_url": "https://github.com/huggingface/datasets/pull/2529", "merged_at": "2021-06-23T13:30:10Z", "patch_url": "https://github.com/huggingface/datasets/pull/2529.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/2529" }
true
[ "> Nice thanks !\r\n> Could you just move the test outside of the BaseDatasetTest class please ? Otherwise it will unnecessarily be run twice.\r\n\r\nsure, on it! thanks for the explanations about the `self._to` method :)", "@lhoestq i've moved all the task template tests outside of `BaseDatasetTest` and collected them in their dedicated test case. (at some point i'll revisit this so we can just use `pytest` natively, but the PR is already getting out-of-scope :))" ]
https://api.github.com/repos/huggingface/datasets/issues/1159
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1159/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1159/comments
https://api.github.com/repos/huggingface/datasets/issues/1159/events
https://github.com/huggingface/datasets/pull/1159
757,661,128
MDExOlB1bGxSZXF1ZXN0NTMzMDAyNzYx
1,159
Add Roman Urdu dataset
[]
closed
false
null
0
2020-12-05T11:36:43Z
2020-12-07T13:41:21Z
2020-12-07T09:59:03Z
null
This PR adds the [Roman Urdu dataset](https://archive.ics.uci.edu/ml/datasets/Roman+Urdu+Data+Set#).
{ "+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/1159/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1159/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/1159.diff", "html_url": "https://github.com/huggingface/datasets/pull/1159", "merged_at": "2020-12-07T09:59:03Z", "patch_url": "https://github.com/huggingface/datasets/pull/1159.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/1159" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/558
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/558/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/558/comments
https://api.github.com/repos/huggingface/datasets/issues/558/events
https://github.com/huggingface/datasets/pull/558
690,318,105
MDExOlB1bGxSZXF1ZXN0NDc3MjI2ODA0
558
Rerun pip install -e
[]
closed
false
null
0
2020-09-01T17:24:39Z
2020-09-01T17:24:51Z
2020-09-01T17:24:50Z
null
Hopefully it fixes the github actions
{ "+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/558/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/558/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/558.diff", "html_url": "https://github.com/huggingface/datasets/pull/558", "merged_at": "2020-09-01T17:24:50Z", "patch_url": "https://github.com/huggingface/datasets/pull/558.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/558" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/4954
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/4954/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/4954/comments
https://api.github.com/repos/huggingface/datasets/issues/4954/events
https://github.com/huggingface/datasets/pull/4954
1,366,369,682
PR_kwDODunzps4-mhl5
4,954
Pin TensorFlow temporarily
[]
closed
false
null
1
2022-09-08T13:46:15Z
2022-09-08T14:12:33Z
2022-09-08T14:10:03Z
null
Temporarily fix TensorFlow until a permanent solution is found. Related to: - #4953
{ "+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/4954/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/4954/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/4954.diff", "html_url": "https://github.com/huggingface/datasets/pull/4954", "merged_at": "2022-09-08T14:10:03Z", "patch_url": "https://github.com/huggingface/datasets/pull/4954.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/4954" }
true
[ "_The documentation is not available anymore as the PR was closed or merged._" ]
https://api.github.com/repos/huggingface/datasets/issues/1543
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1543/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1543/comments
https://api.github.com/repos/huggingface/datasets/issues/1543/events
https://github.com/huggingface/datasets/pull/1543
765,476,196
MDExOlB1bGxSZXF1ZXN0NTM4OTcwOTU5
1,543
adding HindEncorp
[]
closed
false
null
3
2020-12-13T15:39:07Z
2020-12-13T23:35:53Z
2020-12-13T23:35:53Z
null
adding Hindi Wikipedia corpus
{ "+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/1543/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1543/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/1543.diff", "html_url": "https://github.com/huggingface/datasets/pull/1543", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/1543.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/1543" }
true
[ "@lhoestq I have created a new PR by reforking and creating a new branch ", "@rahul-art unfortunately this didn't quite work, here's how you can try again:\r\n- `git checkout master` to go back to the main branch\r\n- `git pull upstream master` to make it up to date\r\n- `git checkout -b add_hind_encorp` to create a new branch\r\n\r\nThen add the dataset script, `README.md`, `dummy_data.zip`, and `dataset_infos.json` to the tracked files for the branch with `git add` (please add all of these files individually, NOT the whole directory as we don't want the other data files)\r\nThen after you have passed the style checks and the local tests, do:\r\n- `git commit . -m initial_commit`\r\n- `git push --set-upstream origin add_hind_encorp`\r\n\r\nThen you can go to this branch on the WebApp and open a new PR", "@yjernite #1557 created new PR" ]
https://api.github.com/repos/huggingface/datasets/issues/3990
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/3990/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/3990/comments
https://api.github.com/repos/huggingface/datasets/issues/3990/events
https://github.com/huggingface/datasets/issues/3990
1,176,976,247
I_kwDODunzps5GJzt3
3,990
Improve AutomaticSpeechRecognition task template
[ { "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" } ]
closed
false
null
2
2022-03-22T15:41:08Z
2022-03-23T17:12:40Z
2022-03-23T17:12:40Z
null
**Is your feature request related to a problem? Please describe.** [AutomaticSpeechRecognition task template](https://github.com/huggingface/datasets/blob/master/src/datasets/tasks/automatic_speech_recognition.py) is outdated as it uses path to audiofile as an audio column instead of a Audio feature itself (I guess it's because Audio feature didn't exist at the time this template was created). **Describe the solution you'd like** Change audio columns from string path to Audio feature.
{ "+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/3990/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/3990/timeline
null
completed
null
null
false
[ "There is an open PR to do that: #3364. I just haven't had time to finish it... ", "> There is an open PR to do that: #3364. I just haven't had time to finish it...\r\n\r\n😬 thanks..." ]
https://api.github.com/repos/huggingface/datasets/issues/1180
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1180/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1180/comments
https://api.github.com/repos/huggingface/datasets/issues/1180/events
https://github.com/huggingface/datasets/pull/1180
757,784,612
MDExOlB1bGxSZXF1ZXN0NTMzMDk1MzI2
1,180
Add KorQuAD v2 Dataset
[]
closed
false
null
3
2020-12-05T21:33:34Z
2020-12-16T16:10:30Z
2020-12-16T16:10:30Z
null
# The Korean Question Answering Dataset v2 Adding the [KorQuAD](https://korquad.github.io/) v2 dataset as part of the sprint πŸŽ‰ This dataset is very similar to SQuAD and is an extension of [squad_kor_v1](https://github.com/huggingface/datasets/pull/1178) which is why I added it as `squad_kor_v2`. - Crowd generated questions and answer (1-answer per question) for Wikipedia articles. Differently from V1 it includes the html structure and markup, which makes it a different enough dataset. (doesn't share ids between v1 and v2 either) - [x] All tests passed - [x] Added dummy data - [x] Added data card (as much as I could) Edit: 🀦 looks like squad_kor_v1 commit sneaked in here too
{ "+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/1180/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1180/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/1180.diff", "html_url": "https://github.com/huggingface/datasets/pull/1180", "merged_at": "2020-12-16T16:10:30Z", "patch_url": "https://github.com/huggingface/datasets/pull/1180.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/1180" }
true
[ "looks like this PR also includes the changes for the V1\r\nCould you only include the files of the V2 ?", "hmm I have made the dummy data lighter retested on local and it passed not sure why it fails here?", "merging since the CI is fixed on master" ]
https://api.github.com/repos/huggingface/datasets/issues/2017
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/2017/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/2017/comments
https://api.github.com/repos/huggingface/datasets/issues/2017/events
https://github.com/huggingface/datasets/pull/2017
826,428,578
MDExOlB1bGxSZXF1ZXN0NTg4NDMyNDc2
2,017
Add TF-based Features to handle different modes of data
[]
closed
false
null
0
2021-03-09T18:29:52Z
2021-03-17T12:32:08Z
2021-03-17T12:32:07Z
null
Hi, I am creating this draft PR to work on add features similar to [TF datasets](https://github.com/tensorflow/datasets/tree/master/tensorflow_datasets/core/features). I'll be starting with `Tensor` and `FeatureConnector` classes, and build upon them to add other features as well. This is a work in progress.
{ "+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/2017/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/2017/timeline
null
null
true
{ "diff_url": "https://github.com/huggingface/datasets/pull/2017.diff", "html_url": "https://github.com/huggingface/datasets/pull/2017", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/2017.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/2017" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/2165
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/2165/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/2165/comments
https://api.github.com/repos/huggingface/datasets/issues/2165/events
https://github.com/huggingface/datasets/issues/2165
849,771,665
MDU6SXNzdWU4NDk3NzE2NjU=
2,165
How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
[]
closed
false
null
7
2021-04-04T01:01:48Z
2021-08-24T15:55:35Z
2021-04-07T15:06:04Z
null
Hi, I'm trying to pretraine deep-speed model using HF arxiv dataset like: ``` train_ds = nlp.load_dataset('scientific_papers', 'arxiv') train_ds.set_format( type="torch", columns=["input_ids", "attention_mask", "global_attention_mask", "labels"], ) engine, _, _, _ = deepspeed.initialize( args=args, model=model, model_parameters=[p for p in model.parameters() if p.requires_grad], training_data=train_ds) ``` but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
{ "+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/2165/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/2165/timeline
null
completed
null
null
false
[ "Hi,\r\n\r\na HF dataset can be converted to a Torch Dataset with a simple wrapper as follows:\r\n```python\r\nfrom torch.utils.data import Dataset\r\n \r\nclass HFDataset(Dataset):\r\n def __init__(self, dset):\r\n self.dset = dset\r\n\r\n def __getitem__(self, idx):\r\n return self.dset[idx]\r\n\r\n def __len__(self):\r\n return len(self.dset)\r\n\r\ntrain_ds = HFDataset(train_ds)\r\n```\r\n@lhoestq Since the Arrow Dataset already provides `__getitem__` and `__len__`, I think we could use the [virtual subclass](https://docs.python.org/3/library/abc.html#abc.ABCMeta.register) mechanism from the `abc` module to elegantly solve this issue. This mechanism would allow the Arrow Dataset to be used in place of the Torch Dataset because the `isinstance(instance of Arrow Dataset, TorchDataset)` check would return True (DeepSpeed has this check [here](https://github.com/microsoft/DeepSpeed/blob/ab5534fc4c0f8ca21ada321f9730d723aa31288b/deepspeed/runtime/engine.py#L823)).\r\n\r\nAnd it requires a minimal change in the `arrow_dataset.py` file:\r\n```python\r\nif config.TORCH_AVAILABLE:\r\n from torch.utils.data import Dataset as TorchDataset\r\n TorchDataset.register(Dataset)\r\n```", "Interesting ! Thanks for sharing this @mariosasko . I like the idea\r\nThis looks like something we should add IMO", "@mariosasko \r\nThx for your code!\r\nIt perfectly works with a small modification for HF NLP dataset:\r\n```\r\noriginal_ds = nlp.load_dataset('scientific_papers', 'arxiv')\r\ntrain_ds = HFDataset(train_ds['train']) # needs splitting\r\n```", "@lhoestq Sadly, from Python 3.7 onwards `torch.utils.data.Dataset` doesn't support the virtual subclass mechanism due to `typing.Generic` type no longer having `abc.ABCMeta` as its metaclass.\r\n\r\nWith that in mind, another option is to remove a direct type check (`isinstance(dataset, torch.utils.data.Dataset)`) in `deepspeed.initalize` and to rewrite the checks in a manner similar to `torch.utils.data.DataLoader` ([link](https://github.com/pytorch/pytorch/blob/b80c6f863f2327c712c478f67c248b94d66b65ac/torch/utils/data/dataloader.py#L197-L239)). This is exactly why the `DataLoader` works with arbitrary objects that provide `__getitem__` and `__len__` (and in our case, the `ArrowDataset`). By doing so, their code wouldn't be any stricter in comparison to the `DataLoader`.\r\n\r\nSo if you agree, I can open an issue in their repo and fix this if they like the idea.", "That makes sense ! Feel free to open an issue on their repo and discuss this idea", "@y-rokutan Hi, now if you install `deepspeed` from master (this feature will be available in the next official release), the code should work without subclassing. Let us know if you still have any issues.", "Worth mentioning that any function that expects a `torch..Dataset` (like `torch..DataLoader`) will fail a mypy-esque typecheck if a `datasets.Dataset` is passed, even though it implements the interface correctly (I think). The virtual subclass idea was a good one- I wonder if there's another workaround given the Generic issue. What we're really talking about is something similar to the structural subtyping semantics that `typing.Protocol` defines. If `torch..DataLoader` accepted anything that supports `__getitem__` and `__len__` methods this would be much easier. Not sure if there's a way to do this without the wrapper from the perspective of `datasets`." ]
https://api.github.com/repos/huggingface/datasets/issues/587
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/587/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/587/comments
https://api.github.com/repos/huggingface/datasets/issues/587/events
https://github.com/huggingface/datasets/pull/587
695,246,018
MDExOlB1bGxSZXF1ZXN0NDgxNTE2Mzkx
587
Support pathlike obj in load dataset
[]
closed
false
null
0
2020-09-07T16:09:16Z
2020-09-07T16:10:35Z
2020-09-07T16:10:35Z
null
Fix #582
{ "+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/587/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/587/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/587.diff", "html_url": "https://github.com/huggingface/datasets/pull/587", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/587.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/587" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/1096
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/1096/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/1096/comments
https://api.github.com/repos/huggingface/datasets/issues/1096/events
https://github.com/huggingface/datasets/pull/1096
756,952,461
MDExOlB1bGxSZXF1ZXN0NTMyNDA5MDIx
1,096
FIX matinf link in ADD_NEW_DATASET.md
[]
closed
false
null
0
2020-12-04T09:33:25Z
2020-12-04T14:25:35Z
2020-12-04T14:25:35Z
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/1096/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/1096/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/1096.diff", "html_url": "https://github.com/huggingface/datasets/pull/1096", "merged_at": "2020-12-04T14:25:35Z", "patch_url": "https://github.com/huggingface/datasets/pull/1096.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/1096" }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/5693
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5693/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5693/comments
https://api.github.com/repos/huggingface/datasets/issues/5693/events
https://github.com/huggingface/datasets/pull/5693
1,649,934,749
PR_kwDODunzps5NYdPS
5,693
[docs] Split pattern search order
[]
closed
false
null
2
2023-03-31T19:51:38Z
2023-04-03T18:43:30Z
2023-04-03T18:29:58Z
null
This PR addresses #5681 about the order of split patterns πŸ€— Datasets searches for when generating dataset splits.
{ "+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/5693/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5693/timeline
null
null
false
{ "diff_url": "https://github.com/huggingface/datasets/pull/5693.diff", "html_url": "https://github.com/huggingface/datasets/pull/5693", "merged_at": "2023-04-03T18:29:58Z", "patch_url": "https://github.com/huggingface/datasets/pull/5693.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5693" }
true
[ "_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.007841 / 0.011353 (-0.003512) | 0.005640 / 0.011008 (-0.005368) | 0.096465 / 0.038508 (0.057957) | 0.036476 / 0.023109 (0.013367) | 0.306431 / 0.275898 (0.030533) | 0.339545 / 0.323480 (0.016065) | 0.006064 / 0.007986 (-0.001922) | 0.004404 / 0.004328 (0.000076) | 0.073130 / 0.004250 (0.068879) | 0.052765 / 0.037052 (0.015713) | 0.309895 / 0.258489 (0.051406) | 0.354037 / 0.293841 (0.060196) | 0.037127 / 0.128546 (-0.091420) | 0.012387 / 0.075646 (-0.063260) | 0.333503 / 0.419271 (-0.085769) | 0.059799 / 0.043533 (0.016266) | 0.305496 / 0.255139 (0.050358) | 0.324122 / 0.283200 (0.040922) | 0.107007 / 0.141683 (-0.034676) | 1.416743 / 1.452155 (-0.035411) | 1.520772 / 1.492716 (0.028055) |\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.261233 / 0.018006 (0.243227) | 0.573806 / 0.000490 (0.573316) | 0.000390 / 0.000200 (0.000190) | 0.000058 / 0.000054 (0.000003) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.027672 / 0.037411 (-0.009740) | 0.112803 / 0.014526 (0.098278) | 0.121085 / 0.176557 (-0.055471) | 0.176056 / 0.737135 (-0.561080) | 0.127171 / 0.296338 (-0.169167) |\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.414756 / 0.215209 (0.199547) | 4.148743 / 2.077655 (2.071088) | 1.883940 / 1.504120 (0.379820) | 1.698771 / 1.541195 (0.157576) | 1.811926 / 1.468490 (0.343436) | 0.708293 / 4.584777 (-3.876484) | 3.780456 / 3.745712 (0.034744) | 2.098556 / 5.269862 (-3.171306) | 1.323512 / 4.565676 (-3.242164) | 0.086253 / 0.424275 (-0.338022) | 0.012587 / 0.007607 (0.004980) | 0.514824 / 0.226044 (0.288779) | 5.157415 / 2.268929 (2.888487) | 2.382519 / 55.444624 (-53.062105) | 2.014539 / 6.876477 (-4.861938) | 2.215239 / 2.142072 (0.073166) | 0.847178 / 4.805227 (-3.958049) | 0.170053 / 6.500664 (-6.330611) | 0.066461 / 0.075469 (-0.009008) |\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.199056 / 1.841788 (-0.642732) | 15.244999 / 8.074308 (7.170691) | 14.661593 / 10.191392 (4.470201) | 0.168855 / 0.680424 (-0.511569) | 0.017889 / 0.534201 (-0.516312) | 0.424961 / 0.579283 (-0.154322) | 0.428632 / 0.434364 (-0.005732) | 0.502680 / 0.540337 (-0.037658) | 0.597827 / 1.386936 (-0.789109) |\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.007749 / 0.011353 (-0.003604) | 0.005527 / 0.011008 (-0.005482) | 0.074774 / 0.038508 (0.036266) | 0.035367 / 0.023109 (0.012258) | 0.340594 / 0.275898 (0.064696) | 0.373970 / 0.323480 (0.050490) | 0.006094 / 0.007986 (-0.001892) | 0.004428 / 0.004328 (0.000100) | 0.074120 / 0.004250 (0.069869) | 0.054852 / 0.037052 (0.017800) | 0.357173 / 0.258489 (0.098684) | 0.388877 / 0.293841 (0.095036) | 0.037002 / 0.128546 (-0.091545) | 0.012337 / 0.075646 (-0.063309) | 0.086962 / 0.419271 (-0.332310) | 0.050370 / 0.043533 (0.006837) | 0.342989 / 0.255139 (0.087850) | 0.358065 / 0.283200 (0.074865) | 0.111063 / 0.141683 (-0.030620) | 1.516704 / 1.452155 (0.064549) | 1.634359 / 1.492716 (0.141643) |\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.261493 / 0.018006 (0.243487) | 0.566288 / 0.000490 (0.565799) | 0.000439 / 0.000200 (0.000239) | 0.000056 / 0.000054 (0.000002) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.030426 / 0.037411 (-0.006985) | 0.114606 / 0.014526 (0.100080) | 0.126134 / 0.176557 (-0.050423) | 0.175324 / 0.737135 (-0.561812) | 0.132766 / 0.296338 (-0.163573) |\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.426785 / 0.215209 (0.211576) | 4.243555 / 2.077655 (2.165900) | 2.089631 / 1.504120 (0.585511) | 1.994562 / 1.541195 (0.453367) | 2.140284 / 1.468490 (0.671794) | 0.698645 / 4.584777 (-3.886132) | 3.807471 / 3.745712 (0.061759) | 3.275343 / 5.269862 (-1.994519) | 1.796756 / 4.565676 (-2.768921) | 0.085986 / 0.424275 (-0.338289) | 0.012213 / 0.007607 (0.004606) | 0.536815 / 0.226044 (0.310771) | 5.344611 / 2.268929 (3.075683) | 2.498578 / 55.444624 (-52.946047) | 2.153260 / 6.876477 (-4.723217) | 2.251310 / 2.142072 (0.109237) | 0.839104 / 4.805227 (-3.966123) | 0.169639 / 6.500664 (-6.331025) | 0.065880 / 0.075469 (-0.009589) |\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.268610 / 1.841788 (-0.573178) | 15.624915 / 8.074308 (7.550606) | 15.163684 / 10.191392 (4.972292) | 0.172992 / 0.680424 (-0.507432) | 0.018154 / 0.534201 (-0.516047) | 0.440485 / 0.579283 (-0.138798) | 0.431949 / 0.434364 (-0.002415) | 0.547935 / 0.540337 (0.007597) | 0.662442 / 1.386936 (-0.724494) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#5c8a6ba43c4aaa0ca0665d8dadd87ef33e28e8e4 \"CML watermark\")\n" ]