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/5533 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5533/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5533/comments | https://api.github.com/repos/huggingface/datasets/issues/5533/events | https://github.com/huggingface/datasets/pull/5533 | 1,585,885,871 | PR_kwDODunzps5KCR5I | 5,533 | Add reduce function | [] | closed | false | null | 19 | 2023-02-15T13:44:01Z | 2023-02-28T14:46:13Z | 2023-02-28T14:46:12Z | null | This PR closes #5496 .
I tried to imitate the `reduce`-method from `functools`, i.e. the function input must be a binary operation. I assume that the input type has an empty element, i.e. `input_type()` is defined, as the acumulant is instantiated as this object - im not sure that is this a reasonable assumption?
If `batched= True` the reduction of each shard is _not_ returned, but the reduction of the entire dataset. I was unsure wether this was an intuitive API, or it would make more sense to return the reduction of each shard? | {
"+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/5533/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5533/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/5533.diff",
"html_url": "https://github.com/huggingface/datasets/pull/5533",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/5533.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/5533"
} | true | [
"I agree that it would be a good idea to introduce a `combiner` argument in another PR.\r\n\r\nI did take quite a lot of inspiration from the implementation of `map`, but it did not seem obvious how to resuse `map` for the implementation. Do you have any suggestions, i could give a try?\r\n\r\nThose were exactly my thoughts, regarding the non-obvious initializer for batched and formatted datasets, so i agree! I'll introduce a `initializer` argument, and have it mandatory when `batched=True`.",
"I added `initializer`. It is optional for `batched=False` and mandatory for `batched=True`. It has to be of the same length as `input_columns`, if `input_columns=None` it has to have the same length as `_data.column_names`. \r\n\r\nIf the initializer is not set for `batched=False` the first example is set as the `initializer`. \r\n\r\nThe initializer is used to initiliaze for each shard, so that means if that:\r\n```python\r\ndset = Dataset.from_dict({\"x\": [1, 2, 3]})\r\nsum_reduce = lambda x, y: x + y\r\nreduction = dset.reduce(sum_reduce, batched=True, initializer=1, input_columns='x', num_proc=2)\r\n# reduction is 8, i.e. reduction + num_proc * initializer\r\n```",
"> I added initializer. It is optional for batched=False and mandatory for batched=True. It has to be of the same length as input_columns, if input_columns=None it has to have the same length as _data.column_names.\r\n> \r\n> If the initializer is not set for batched=False the first example is set as the initializer.\r\n\r\nSounds good to me !\r\n\r\n> The initializer is used to initiliaze for each shard, so that means if that:\r\n> \r\n> ```python\r\n> dset = Dataset.from_dict({\"x\": [1, 2, 3]})\r\n> sum_reduce = lambda x, y: x + y\r\n> reduction = dset.reduce(sum_reduce, batched=True, initializer=1, input_columns='x', num_proc=2)\r\n> # reduction is 8, i.e. reduction + num_proc * initializer\r\n> ```\r\n\r\nHmm this can be confusing for some users. Maybe we should consider making `combiner` mandatory for multiprocessing.\r\n\r\nIf we agree on this, maybe for this PR you can either:\r\n- remove multiprocessing (and we add combiner + multiprocessing in a subsequent PR)\r\n- OR add `combiner` directly\r\n\r\nMaybe we can get more feedback from @huggingface/datasets as well",
"> > I added initializer. It is optional for batched=False and mandatory for batched=True. It has to be of the same length as input_columns, if input_columns=None it has to have the same length as _data.column_names.\r\n> > If the initializer is not set for batched=False the first example is set as the initializer.\r\n> \r\n> Sounds good to me !\r\n> \r\n> > The initializer is used to initiliaze for each shard, so that means if that:\r\n> > ```python\r\n> > dset = Dataset.from_dict({\"x\": [1, 2, 3]})\r\n> > sum_reduce = lambda x, y: x + y\r\n> > reduction = dset.reduce(sum_reduce, batched=True, initializer=1, input_columns='x', num_proc=2)\r\n> > # reduction is 8, i.e. reduction + num_proc * initializer\r\n> > ```\r\n> \r\n> Hmm this can be confusing for some users. Maybe we should consider making `combiner` mandatory for multiprocessing.\r\n> \r\n> If we agree on this, maybe for this PR you can either:\r\n> \r\n> * remove multiprocessing (and we add combiner + multiprocessing in a subsequent PR)\r\n> * OR add `combiner` directly\r\n> \r\n> Maybe we can get more feedback from @huggingface/datasets as well\r\n\r\nI think i prefer adding `combiner` in this PR. I think ill make `combiner` mandatory for `batched=True`, instead of assuming that `combiner=function`. Ill look at this one of the coming days. Also at some point i have to define `reduce` for `DatasetDict`, and not just `Dataset`.",
"I added the `combiner` parameter as described. I added some examples in the docstring, as i felt it might still be a bit confusing what happens during multiprocessing / batching.\r\n\r\nStill need to look at `DatasetDict`.",
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_5533). All of your documentation changes will be reflected on that endpoint.",
"Feel free to merge `main` into your branch - we fixed some CI failures today",
"The proposed API doesn't seem intuitive to me - one can already use `functools.reduce` or `Dataset.map` for this purpose ([Colab](https://colab.research.google.com/drive/1jCLv31Y4cDfqD0lhO0AnqEv3Or-LLvWe?usp=sharing) with examples), so perhaps we could have a section in the docs that uses these methods to perform reductions rather than introducing a new method (which needs to be maintained later)",
"Thanks for sharing this google colab, it has nice examples !\r\n\r\nThough I still think `functools.reduce` with multiprocessing can be a pain - we offer something easier here:\r\n- no need to use a pool yourself\r\n- no need to use `map` just to iterate on the dataset (not its main purpose)\r\n- native support for lambdas (using dill)\r\n- the combiner is **mandatory** for multiprocessing to avoid ending up with an incorrect result as in your example\r\n\r\nHowever I agree that maintaining this can be challenging, especially if you think about how `map` already is, and if we also have to deal with dataset formatting.",
"> native support for lambdas (using dill)\r\n\r\nReplacing `multiprocessing` with `multiprocess` in the example would allow that.\r\n\r\n> no need to use map just to iterate on the dataset (not its main purpose)\r\n\r\nNot the main purpose, but this was mentioned as a \"feature\" in the previous docs if I remember.\r\n\r\nAnd all this is related to the multi-processing case, which we can document.\r\n\r\nBesides the linked issue, I can't find requests for `Dataset.reduce`, which makes me think `functools.reduce` does the job for most users.",
"> Besides the linked issue, I can't find requests for Dataset.reduce, which makes me think functools.reduce does the job for most users.\r\n\r\nI think @srush was looking for a way to do a word count but ended up using a single processed `map`. I also saw some users on the forum wanting to compute `max`\r\n\r\n> Not the main purpose, but this was mentioned as a \"feature\" in the previous docs if I remember.\r\n> \r\n> And all this is related to the multi-processing case, which we can document.\r\n\r\nYup indeed",
"While counting is one example, I often find I want to compute different statistics over a dataset. This seems like a natural way to do it in a stateless manner.\n\n\nI guess you could use functools reduce, but that wouldn't allow batching, right?",
"I've updated the [Colab](https://colab.research.google.com/drive/1jCLv31Y4cDfqD0lhO0AnqEv3Or-LLvWe?usp=sharing) with an example that reduces batches with `map` and then computes the final result. It would be nice to have a similar example (explained in detail) in the docs to show the full power of `map`.\r\n\r\nPlus, for simple reductions such as `max`, one can do `pc.max(ds.with_format(\"arrow\")[\"col\"])` to directly get the result (without loading the entire column in RAM).\r\n\r\n@srush \r\n\r\n> I guess you could use functools reduce, but that wouldn't allow batching, right?\r\n\r\nYou can use `.iter(batch_size)` to get batches\r\n ",
"That `functools` tools example is clean. I didn't know about `iter`. That would handle my use case.\n\nThe stateful `map` with a global variable is pretty hairy. I don't think we should recommend people do that.\n\n",
"Whenever I in the past wanted to calculate statistics for datasets I used `functools` similarly to how it's described in the colab, but I always felt it was a bit of a hassle to use it together with multiprocessing, which is why I picked up the issue, to do it \"once and for all\".",
"Should i close this and open another PR, with descriptions of how to use `map` for reduction, or?",
"Yes I think good documentation is the way to go here. @mariosasko 's examples are clear and efficient.\r\n\r\nMaybe we could have an `Aggregations` section in the `Process` page with some guides on how to:\r\n- use `.map()` to compute aggregates\r\n- use `.with_format(\"arrow\")` for max, min, etc. to save RAM and get max speed\r\n- use a multiprocessed `.map()` to get partial results in parallel and combine them (max text length example)\r\n- (advanced) use multiprocessing with an arbitrary accumulator (word count example)\r\n\r\nAnd also a new conceptual guide on `Multiprocessed mapping` to say that it helps speed up CPU intensive processing but why it may lead to incorrect results when computing aggregates.\r\n\r\ncc @stevhliu for visibility and if you have some comments",
"I would create a `Reduce` - to be more exact - subsection under `Map` to demonstrate these examples since we're showing how they can be done with the `Dataset.map` function. It'd also be good to add a link to the new concept guide from this section to solidify user understanding :)",
"Coolio. Ill close this PR and get going on another one adding what we've discussed during the next couple of days!"
] |
https://api.github.com/repos/huggingface/datasets/issues/374 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/374/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/374/comments | https://api.github.com/repos/huggingface/datasets/issues/374/events | https://github.com/huggingface/datasets/pull/374 | 654,895,066 | MDExOlB1bGxSZXF1ZXN0NDQ3NTMxMzUy | 374 | Add dataset post processing for faiss indexes | [] | closed | false | null | 2 | 2020-07-10T16:25:59Z | 2020-07-13T13:44:03Z | 2020-07-13T13:44:01Z | null | # Post processing of datasets for faiss indexes
Now that we can have datasets with embeddings (see `wiki_pr` for example), we can allow users to load the dataset + get the Faiss index that comes with it to do nearest neighbors queries.
## Implementation proposition
- Faiss indexes have to be added to the `nlp.Dataset` object, and therefore it's in a different scope that what are doing the `_split_generators` and `_generate_examples` methods of `nlp.DatasetBuilder`. Therefore I added a new method for post processing of the `nlp.Dataset` object called `_post_process` (name could change)
- The role of `_post_process` is to apply dataset transforms (filter/map etc.) or indexing functions (add_faiss_index) to modify/enrich the `nlp.Dataset` object. It is not part of the `download_and_prepare` process (that is focused on arrow files creation) so the post processing is run inside the `as_dataset` method.
- `_post_process` can generate new files (cached files from dataset transforms or serialized faiss indexes) and their names are defined by `_post_processing_resources`
- as we know what are the post processing resources, we can download them automatically from google storage instead of computing them if they're available (as we do for arrow files)
I'd happy to discuss these choices !
## The `wiki_dpr` index
It takes 1h20 and ~7GB of memory to compute. The final index is 1.42GB and takes ~1.5GB of memory.
This is pretty cool given that a naive flat index would take 170GB of memory to store the 21M vectors of dim 768.
I couldn't use directly the Faiss `index_factory` as I needed to set the metric to inner product.
## Example of usage
```python
import nlp
dset = nlp.load_dataset(
"wiki_dpr",
"psgs_w100_with_nq_embeddings",
split="train",
with_index=True
)
print(len(dset), dset.list_indexes()) # (21015300, ['embeddings'])
```
(it also works with the dataset configuration without the embeddings because I added the index file in google storage for this one too)
## Demo
You can also check a demo on google colab that shows how to use it with the DPRQuestionEncoder from transformers:
https://colab.research.google.com/drive/1FakNU8W5EPMcWff7iP1H6REg3XSS0YLp?usp=sharing
| {
"+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/374/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/374/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/374.diff",
"html_url": "https://github.com/huggingface/datasets/pull/374",
"merged_at": "2020-07-13T13:44:01Z",
"patch_url": "https://github.com/huggingface/datasets/pull/374.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/374"
} | true | [
"I changed the `wiki_dpr` script to ignore the last 24 examples for now. Hopefully we'll have the full version soon.\r\nThe datasets_infos.json and the data on GCS are updated.\r\n\r\nAnd I also added a check to make sure we don't have post processing resources in sub-directories.",
"I added a dummy config that can be loaded with:\r\n```python\r\nwiki = load_dataset(\"wiki_dpr\", \"dummy_psgs_w100_no_embeddings\", with_index=True, split=\"train\")\r\n```\r\nIt's only 6MB of arrow files and 30MB of index"
] |
https://api.github.com/repos/huggingface/datasets/issues/3283 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3283/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3283/comments | https://api.github.com/repos/huggingface/datasets/issues/3283/events | https://github.com/huggingface/datasets/issues/3283 | 1,055,495,874 | I_kwDODunzps4-6ZbC | 3,283 | Add Speech Commands 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"
},
{
"color": "d93f0b",
"default": false,
"description": "",
"id": 2725241052,
"name": "speech",
"node_id": "MDU6TGFiZWwyNzI1MjQxMDUy",
"url": "https://api.github.com/repos/huggingface/datasets/labels/speech"
}
] | closed | false | null | 1 | 2021-11-16T22:39:56Z | 2021-12-10T10:30:15Z | 2021-12-10T10:30:15Z | null | ## Adding a Dataset
- **Name:** Speech commands
- **Description:** A Dataset for Limited-Vocabulary Speech Recognition
- **Paper:** https://arxiv.org/abs/1804.03209
- **Data:** https://www.tensorflow.org/datasets/catalog/speech_commands, Available:
http://download.tensorflow.org/data/speech_commands_v0.02.tar.gz
- **Motivation:** Nice dataset for audio classification training
cc @anton-l
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| {
"+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/3283/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3283/timeline | null | completed | null | null | false | [
"#self-assign"
] |
https://api.github.com/repos/huggingface/datasets/issues/6019 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6019/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6019/comments | https://api.github.com/repos/huggingface/datasets/issues/6019/events | https://github.com/huggingface/datasets/pull/6019 | 1,799,532,822 | PR_kwDODunzps5VPAlD | 6,019 | Improve logging | [] | closed | false | null | 13 | 2023-07-11T18:30:23Z | 2023-07-12T19:34:14Z | 2023-07-12T17:19:28Z | null | Adds the StreamHandler (as `hfh` and `transformers` do) to the library's logger to log INFO messages and logs the messages about "loading a cached result" (and some other warnings) as INFO
(Also removes the `leave=False` arg in the progress bars to be consistent with `hfh` and `transformers` - progress bars serve as an indicator that a result is not cached, so it makes more sense not to delete them)
Fix #2832, fix https://github.com/huggingface/datasets/issues/1948, fix https://github.com/huggingface/datasets/issues/5444 | {
"+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/6019/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6019/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/6019.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6019",
"merged_at": "2023-07-12T17:19:28Z",
"patch_url": "https://github.com/huggingface/datasets/pull/6019.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6019"
} | 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.007782 / 0.011353 (-0.003571) | 0.004451 / 0.011008 (-0.006557) | 0.099928 / 0.038508 (0.061420) | 0.081534 / 0.023109 (0.058425) | 0.379382 / 0.275898 (0.103484) | 0.410652 / 0.323480 (0.087172) | 0.005967 / 0.007986 (-0.002019) | 0.003702 / 0.004328 (-0.000627) | 0.076359 / 0.004250 (0.072109) | 0.066721 / 0.037052 (0.029669) | 0.383595 / 0.258489 (0.125106) | 0.423854 / 0.293841 (0.130013) | 0.032796 / 0.128546 (-0.095750) | 0.009728 / 0.075646 (-0.065918) | 0.344347 / 0.419271 (-0.074925) | 0.056320 / 0.043533 (0.012788) | 0.379974 / 0.255139 (0.124835) | 0.401294 / 0.283200 (0.118094) | 0.024110 / 0.141683 (-0.117572) | 1.804194 / 1.452155 (0.352039) | 1.860240 / 1.492716 (0.367523) |\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.233803 / 0.018006 (0.215797) | 0.506893 / 0.000490 (0.506404) | 0.003894 / 0.000200 (0.003694) | 0.000090 / 0.000054 (0.000035) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.033328 / 0.037411 (-0.004083) | 0.098661 / 0.014526 (0.084136) | 0.114971 / 0.176557 (-0.061586) | 0.186815 / 0.737135 (-0.550321) | 0.115490 / 0.296338 (-0.180848) |\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.422590 / 0.215209 (0.207381) | 4.277189 / 2.077655 (2.199535) | 2.095565 / 1.504120 (0.591445) | 2.040825 / 1.541195 (0.499630) | 2.162562 / 1.468490 (0.694072) | 0.578602 / 4.584777 (-4.006175) | 4.203474 / 3.745712 (0.457762) | 6.674595 / 5.269862 (1.404734) | 3.913251 / 4.565676 (-0.652426) | 0.067777 / 0.424275 (-0.356498) | 0.008716 / 0.007607 (0.001109) | 0.548704 / 0.226044 (0.322660) | 5.162120 / 2.268929 (2.893192) | 2.600250 / 55.444624 (-52.844374) | 2.232730 / 6.876477 (-4.643747) | 2.485617 / 2.142072 (0.343544) | 0.650872 / 4.805227 (-4.154355) | 0.148022 / 6.500664 (-6.352642) | 0.064795 / 0.075469 (-0.010674) |\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.399439 / 1.841788 (-0.442349) | 22.438959 / 8.074308 (14.364651) | 16.447831 / 10.191392 (6.256439) | 0.202003 / 0.680424 (-0.478421) | 0.026200 / 0.534201 (-0.508001) | 0.472966 / 0.579283 (-0.106317) | 0.491621 / 0.434364 (0.057257) | 0.551580 / 0.540337 (0.011242) | 0.751420 / 1.386936 (-0.635516) |\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.007241 / 0.011353 (-0.004112) | 0.004434 / 0.011008 (-0.006574) | 0.075872 / 0.038508 (0.037364) | 0.080094 / 0.023109 (0.056985) | 0.459244 / 0.275898 (0.183346) | 0.492482 / 0.323480 (0.169002) | 0.005791 / 0.007986 (-0.002194) | 0.003657 / 0.004328 (-0.000671) | 0.075214 / 0.004250 (0.070964) | 0.064208 / 0.037052 (0.027156) | 0.464195 / 0.258489 (0.205706) | 0.497809 / 0.293841 (0.203968) | 0.036301 / 0.128546 (-0.092245) | 0.009855 / 0.075646 (-0.065791) | 0.080826 / 0.419271 (-0.338445) | 0.056700 / 0.043533 (0.013167) | 0.452850 / 0.255139 (0.197711) | 0.490738 / 0.283200 (0.207538) | 0.024145 / 0.141683 (-0.117538) | 1.689911 / 1.452155 (0.237757) | 1.789803 / 1.492716 (0.297087) |\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.247741 / 0.018006 (0.229735) | 0.486769 / 0.000490 (0.486279) | 0.000418 / 0.000200 (0.000218) | 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.036317 / 0.037411 (-0.001094) | 0.104943 / 0.014526 (0.090417) | 0.120972 / 0.176557 (-0.055585) | 0.188461 / 0.737135 (-0.548674) | 0.120926 / 0.296338 (-0.175412) |\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.465788 / 0.215209 (0.250579) | 4.662369 / 2.077655 (2.584714) | 2.442241 / 1.504120 (0.938121) | 2.266328 / 1.541195 (0.725133) | 2.438998 / 1.468490 (0.970508) | 0.531384 / 4.584777 (-4.053393) | 4.125286 / 3.745712 (0.379574) | 3.920912 / 5.269862 (-1.348950) | 2.292149 / 4.565676 (-2.273528) | 0.070146 / 0.424275 (-0.354129) | 0.008887 / 0.007607 (0.001280) | 0.598181 / 0.226044 (0.372137) | 5.726454 / 2.268929 (3.457526) | 3.081836 / 55.444624 (-52.362788) | 2.683508 / 6.876477 (-4.192969) | 2.587350 / 2.142072 (0.445278) | 0.604736 / 4.805227 (-4.200491) | 0.141303 / 6.500664 (-6.359362) | 0.065020 / 0.075469 (-0.010449) |\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.481850 / 1.841788 (-0.359938) | 22.259592 / 8.074308 (14.185284) | 16.304290 / 10.191392 (6.112898) | 0.173514 / 0.680424 (-0.506909) | 0.021590 / 0.534201 (-0.512611) | 0.471753 / 0.579283 (-0.107531) | 0.472132 / 0.434364 (0.037768) | 0.563344 / 0.540337 (0.023007) | 0.738509 / 1.386936 (-0.648427) |\n\n</details>\n</details>\n\n\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.005910 / 0.011353 (-0.005443) | 0.004372 / 0.011008 (-0.006636) | 0.081583 / 0.038508 (0.043075) | 0.069598 / 0.023109 (0.046488) | 0.346360 / 0.275898 (0.070462) | 0.360733 / 0.323480 (0.037254) | 0.004725 / 0.007986 (-0.003261) | 0.003106 / 0.004328 (-0.001222) | 0.059916 / 0.004250 (0.055666) | 0.053242 / 0.037052 (0.016189) | 0.353551 / 0.258489 (0.095062) | 0.373052 / 0.293841 (0.079211) | 0.029036 / 0.128546 (-0.099510) | 0.007894 / 0.075646 (-0.067753) | 0.284131 / 0.419271 (-0.135140) | 0.049348 / 0.043533 (0.005815) | 0.347409 / 0.255139 (0.092270) | 0.355029 / 0.283200 (0.071830) | 0.022511 / 0.141683 (-0.119171) | 1.454495 / 1.452155 (0.002340) | 1.439551 / 1.492716 (-0.053166) |\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.218889 / 0.018006 (0.200883) | 0.478734 / 0.000490 (0.478244) | 0.003758 / 0.000200 (0.003558) | 0.000083 / 0.000054 (0.000029) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.025759 / 0.037411 (-0.011653) | 0.082511 / 0.014526 (0.067985) | 0.087578 / 0.176557 (-0.088979) | 0.137760 / 0.737135 (-0.599375) | 0.093312 / 0.296338 (-0.203027) |\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.378963 / 0.215209 (0.163754) | 3.645846 / 2.077655 (1.568191) | 1.741135 / 1.504120 (0.237015) | 1.599166 / 1.541195 (0.057972) | 1.610817 / 1.468490 (0.142327) | 0.459209 / 4.584777 (-4.125568) | 3.484857 / 3.745712 (-0.260855) | 3.928109 / 5.269862 (-1.341752) | 2.419784 / 4.565676 (-2.145892) | 0.051987 / 0.424275 (-0.372288) | 0.006495 / 0.007607 (-0.001112) | 0.427311 / 0.226044 (0.201267) | 4.226378 / 2.268929 (1.957450) | 2.212331 / 55.444624 (-53.232293) | 1.916213 / 6.876477 (-4.960264) | 1.978809 / 2.142072 (-0.163263) | 0.547351 / 4.805227 (-4.257876) | 0.121110 / 6.500664 (-6.379554) | 0.054163 / 0.075469 (-0.021306) |\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.228594 / 1.841788 (-0.613193) | 19.410901 / 8.074308 (11.336593) | 13.014722 / 10.191392 (2.823330) | 0.156449 / 0.680424 (-0.523975) | 0.021032 / 0.534201 (-0.513169) | 0.403976 / 0.579283 (-0.175307) | 0.413885 / 0.434364 (-0.020479) | 0.470465 / 0.540337 (-0.069873) | 0.641322 / 1.386936 (-0.745614) |\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.007210 / 0.011353 (-0.004143) | 0.003824 / 0.011008 (-0.007185) | 0.058227 / 0.038508 (0.019719) | 0.076211 / 0.023109 (0.053102) | 0.336626 / 0.275898 (0.060728) | 0.420542 / 0.323480 (0.097062) | 0.006178 / 0.007986 (-0.001808) | 0.003332 / 0.004328 (-0.000997) | 0.058073 / 0.004250 (0.053823) | 0.062485 / 0.037052 (0.025432) | 0.386175 / 0.258489 (0.127686) | 0.415659 / 0.293841 (0.121818) | 0.031264 / 0.128546 (-0.097282) | 0.007502 / 0.075646 (-0.068144) | 0.072079 / 0.419271 (-0.347192) | 0.055860 / 0.043533 (0.012327) | 0.343508 / 0.255139 (0.088369) | 0.437844 / 0.283200 (0.154645) | 0.032852 / 0.141683 (-0.108831) | 1.409241 / 1.452155 (-0.042913) | 1.623949 / 1.492716 (0.131233) |\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.207511 / 0.018006 (0.189504) | 0.464149 / 0.000490 (0.463660) | 0.003248 / 0.000200 (0.003048) | 0.000226 / 0.000054 (0.000172) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.030767 / 0.037411 (-0.006645) | 0.079169 / 0.014526 (0.064643) | 0.093111 / 0.176557 (-0.083445) | 0.153369 / 0.737135 (-0.583767) | 0.092939 / 0.296338 (-0.203400) |\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.375602 / 0.215209 (0.160392) | 3.968612 / 2.077655 (1.890957) | 2.081749 / 1.504120 (0.577629) | 1.899772 / 1.541195 (0.358577) | 1.847923 / 1.468490 (0.379433) | 0.442867 / 4.584777 (-4.141910) | 3.646664 / 3.745712 (-0.099048) | 5.870600 / 5.269862 (0.600739) | 3.356698 / 4.565676 (-1.208979) | 0.051422 / 0.424275 (-0.372853) | 0.006006 / 0.007607 (-0.001601) | 0.442439 / 0.226044 (0.216395) | 4.466256 / 2.268929 (2.197328) | 2.483832 / 55.444624 (-52.960792) | 2.105612 / 6.876477 (-4.770865) | 2.060650 / 2.142072 (-0.081422) | 0.531119 / 4.805227 (-4.274108) | 0.123436 / 6.500664 (-6.377228) | 0.059838 / 0.075469 (-0.015632) |\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.283042 / 1.841788 (-0.558746) | 19.688251 / 8.074308 (11.613943) | 13.346386 / 10.191392 (3.154994) | 0.197463 / 0.680424 (-0.482961) | 0.018484 / 0.534201 (-0.515717) | 0.391727 / 0.579283 (-0.187556) | 0.425061 / 0.434364 (-0.009303) | 0.448177 / 0.540337 (-0.092160) | 0.653694 / 1.386936 (-0.733242) |\n\n</details>\n</details>\n\n\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.008966 / 0.011353 (-0.002387) | 0.005195 / 0.011008 (-0.005813) | 0.102879 / 0.038508 (0.064371) | 0.090902 / 0.023109 (0.067792) | 0.434397 / 0.275898 (0.158498) | 0.454013 / 0.323480 (0.130534) | 0.008507 / 0.007986 (0.000521) | 0.005000 / 0.004328 (0.000671) | 0.075789 / 0.004250 (0.071538) | 0.067608 / 0.037052 (0.030555) | 0.435091 / 0.258489 (0.176602) | 0.469411 / 0.293841 (0.175570) | 0.050859 / 0.128546 (-0.077687) | 0.013560 / 0.075646 (-0.062086) | 0.345473 / 0.419271 (-0.073799) | 0.094974 / 0.043533 (0.051441) | 0.429626 / 0.255139 (0.174487) | 0.434290 / 0.283200 (0.151090) | 0.052269 / 0.141683 (-0.089413) | 1.700549 / 1.452155 (0.248395) | 1.890693 / 1.492716 (0.397976) |\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.296618 / 0.018006 (0.278612) | 0.613908 / 0.000490 (0.613419) | 0.000484 / 0.000200 (0.000284) | 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.034346 / 0.037411 (-0.003065) | 0.096836 / 0.014526 (0.082310) | 0.113332 / 0.176557 (-0.063224) | 0.194464 / 0.737135 (-0.542671) | 0.111732 / 0.296338 (-0.184606) |\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.624954 / 0.215209 (0.409745) | 6.442193 / 2.077655 (4.364538) | 2.818331 / 1.504120 (1.314211) | 2.529607 / 1.541195 (0.988413) | 2.549026 / 1.468490 (1.080536) | 0.967367 / 4.584777 (-3.617410) | 5.446885 / 3.745712 (1.701173) | 6.259099 / 5.269862 (0.989237) | 3.652936 / 4.565676 (-0.912740) | 0.106420 / 0.424275 (-0.317855) | 0.011293 / 0.007607 (0.003686) | 0.772026 / 0.226044 (0.545982) | 7.823986 / 2.268929 (5.555057) | 3.725328 / 55.444624 (-51.719297) | 2.851489 / 6.876477 (-4.024988) | 3.013722 / 2.142072 (0.871649) | 1.045090 / 4.805227 (-3.760137) | 0.213174 / 6.500664 (-6.287490) | 0.077104 / 0.075469 (0.001635) |\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.657135 / 1.841788 (-0.184652) | 24.547604 / 8.074308 (16.473296) | 19.989533 / 10.191392 (9.798141) | 0.257139 / 0.680424 (-0.423285) | 0.028448 / 0.534201 (-0.505753) | 0.490801 / 0.579283 (-0.088482) | 0.628072 / 0.434364 (0.193708) | 0.584873 / 0.540337 (0.044536) | 0.825258 / 1.386936 (-0.561678) |\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.009258 / 0.011353 (-0.002095) | 0.005660 / 0.011008 (-0.005348) | 0.080577 / 0.038508 (0.042069) | 0.095786 / 0.023109 (0.072676) | 0.473334 / 0.275898 (0.197436) | 0.527962 / 0.323480 (0.204482) | 0.006537 / 0.007986 (-0.001449) | 0.004411 / 0.004328 (0.000083) | 0.080702 / 0.004250 (0.076452) | 0.077020 / 0.037052 (0.039968) | 0.483205 / 0.258489 (0.224716) | 0.556916 / 0.293841 (0.263076) | 0.047670 / 0.128546 (-0.080877) | 0.016647 / 0.075646 (-0.058999) | 0.090653 / 0.419271 (-0.328619) | 0.062122 / 0.043533 (0.018589) | 0.498326 / 0.255139 (0.243187) | 0.546572 / 0.283200 (0.263372) | 0.037525 / 0.141683 (-0.104157) | 1.869520 / 1.452155 (0.417365) | 1.915335 / 1.492716 (0.422619) |\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.248287 / 0.018006 (0.230281) | 0.611440 / 0.000490 (0.610950) | 0.004102 / 0.000200 (0.003902) | 0.000132 / 0.000054 (0.000078) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.038228 / 0.037411 (0.000817) | 0.103510 / 0.014526 (0.088984) | 0.114337 / 0.176557 (-0.062219) | 0.189662 / 0.737135 (-0.547473) | 0.119078 / 0.296338 (-0.177260) |\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.606622 / 0.215209 (0.391413) | 6.053900 / 2.077655 (3.976246) | 2.857972 / 1.504120 (1.353852) | 2.549756 / 1.541195 (1.008561) | 2.584557 / 1.468490 (1.116067) | 0.930431 / 4.584777 (-3.654346) | 5.524077 / 3.745712 (1.778365) | 7.858406 / 5.269862 (2.588545) | 4.890697 / 4.565676 (0.325020) | 0.095356 / 0.424275 (-0.328919) | 0.008614 / 0.007607 (0.001007) | 0.774227 / 0.226044 (0.548182) | 7.470215 / 2.268929 (5.201287) | 3.784820 / 55.444624 (-51.659805) | 3.199364 / 6.876477 (-3.677113) | 3.212002 / 2.142072 (1.069929) | 1.054104 / 4.805227 (-3.751123) | 0.226044 / 6.500664 (-6.274620) | 0.092237 / 0.075469 (0.016768) |\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.801054 / 1.841788 (-0.040734) | 24.220404 / 8.074308 (16.146096) | 21.652936 / 10.191392 (11.461544) | 0.247004 / 0.680424 (-0.433420) | 0.029651 / 0.534201 (-0.504550) | 0.475702 / 0.579283 (-0.103581) | 0.621121 / 0.434364 (0.186757) | 0.570489 / 0.540337 (0.030151) | 0.768840 / 1.386936 (-0.618096) |\n\n</details>\n</details>\n\n\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.009223 / 0.011353 (-0.002130) | 0.005750 / 0.011008 (-0.005258) | 0.105264 / 0.038508 (0.066756) | 0.088478 / 0.023109 (0.065369) | 0.461119 / 0.275898 (0.185221) | 0.481115 / 0.323480 (0.157636) | 0.006366 / 0.007986 (-0.001619) | 0.004515 / 0.004328 (0.000186) | 0.079296 / 0.004250 (0.075045) | 0.063483 / 0.037052 (0.026430) | 0.444490 / 0.258489 (0.186001) | 0.496474 / 0.293841 (0.202634) | 0.048568 / 0.128546 (-0.079978) | 0.013574 / 0.075646 (-0.062073) | 0.379213 / 0.419271 (-0.040059) | 0.086464 / 0.043533 (0.042932) | 0.437526 / 0.255139 (0.182387) | 0.447117 / 0.283200 (0.163917) | 0.049502 / 0.141683 (-0.092180) | 1.749146 / 1.452155 (0.296992) | 1.831082 / 1.492716 (0.338365) |\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.268205 / 0.018006 (0.250199) | 0.627406 / 0.000490 (0.626917) | 0.005439 / 0.000200 (0.005239) | 0.000128 / 0.000054 (0.000074) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.030564 / 0.037411 (-0.006848) | 0.096365 / 0.014526 (0.081840) | 0.117484 / 0.176557 (-0.059072) | 0.189104 / 0.737135 (-0.548032) | 0.118073 / 0.296338 (-0.178266) |\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.618229 / 0.215209 (0.403019) | 6.437853 / 2.077655 (4.360199) | 2.789946 / 1.504120 (1.285826) | 2.339245 / 1.541195 (0.798050) | 2.588779 / 1.468490 (1.120289) | 0.921008 / 4.584777 (-3.663769) | 5.402940 / 3.745712 (1.657227) | 4.818783 / 5.269862 (-0.451078) | 3.162259 / 4.565676 (-1.403417) | 0.108501 / 0.424275 (-0.315774) | 0.009384 / 0.007607 (0.001777) | 0.766811 / 0.226044 (0.540766) | 7.624629 / 2.268929 (5.355701) | 3.442420 / 55.444624 (-52.002204) | 2.759967 / 6.876477 (-4.116510) | 3.049644 / 2.142072 (0.907572) | 1.113308 / 4.805227 (-3.691919) | 0.223923 / 6.500664 (-6.276741) | 0.079156 / 0.075469 (0.003687) |\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.683318 / 1.841788 (-0.158470) | 25.062141 / 8.074308 (16.987833) | 21.777131 / 10.191392 (11.585739) | 0.266939 / 0.680424 (-0.413485) | 0.029670 / 0.534201 (-0.504531) | 0.476761 / 0.579283 (-0.102522) | 0.622080 / 0.434364 (0.187716) | 0.601781 / 0.540337 (0.061443) | 0.785126 / 1.386936 (-0.601811) |\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.010198 / 0.011353 (-0.001155) | 0.005777 / 0.011008 (-0.005231) | 0.083003 / 0.038508 (0.044495) | 0.093411 / 0.023109 (0.070302) | 0.496178 / 0.275898 (0.220280) | 0.554670 / 0.323480 (0.231190) | 0.008351 / 0.007986 (0.000365) | 0.004678 / 0.004328 (0.000350) | 0.083631 / 0.004250 (0.079381) | 0.075538 / 0.037052 (0.038485) | 0.492410 / 0.258489 (0.233921) | 0.545209 / 0.293841 (0.251368) | 0.048365 / 0.128546 (-0.080181) | 0.014219 / 0.075646 (-0.061427) | 0.100749 / 0.419271 (-0.318523) | 0.063431 / 0.043533 (0.019898) | 0.511115 / 0.255139 (0.255976) | 0.532965 / 0.283200 (0.249765) | 0.037968 / 0.141683 (-0.103715) | 1.940268 / 1.452155 (0.488113) | 2.032934 / 1.492716 (0.540217) |\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.238179 / 0.018006 (0.220172) | 0.605767 / 0.000490 (0.605277) | 0.004033 / 0.000200 (0.003833) | 0.000125 / 0.000054 (0.000071) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.036436 / 0.037411 (-0.000975) | 0.108034 / 0.014526 (0.093509) | 0.118624 / 0.176557 (-0.057933) | 0.183079 / 0.737135 (-0.554056) | 0.121739 / 0.296338 (-0.174600) |\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.630538 / 0.215209 (0.415329) | 6.552184 / 2.077655 (4.474529) | 3.003412 / 1.504120 (1.499292) | 2.669026 / 1.541195 (1.127832) | 2.791109 / 1.468490 (1.322619) | 0.884003 / 4.584777 (-3.700774) | 5.538660 / 3.745712 (1.792947) | 5.126708 / 5.269862 (-0.143154) | 3.120825 / 4.565676 (-1.444852) | 0.101178 / 0.424275 (-0.323097) | 0.009027 / 0.007607 (0.001420) | 0.785914 / 0.226044 (0.559869) | 7.994720 / 2.268929 (5.725792) | 4.061996 / 55.444624 (-51.382629) | 3.263230 / 6.876477 (-3.613247) | 3.288622 / 2.142072 (1.146550) | 1.141867 / 4.805227 (-3.663360) | 0.255287 / 6.500664 (-6.245378) | 0.100637 / 0.075469 (0.025168) |\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.769821 / 1.841788 (-0.071967) | 24.994008 / 8.074308 (16.919700) | 21.765971 / 10.191392 (11.574579) | 0.268493 / 0.680424 (-0.411931) | 0.028047 / 0.534201 (-0.506154) | 0.489472 / 0.579283 (-0.089811) | 0.594809 / 0.434364 (0.160445) | 0.613578 / 0.540337 (0.073241) | 0.879360 / 1.386936 (-0.507576) |\n\n</details>\n</details>\n\n\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.006003 / 0.011353 (-0.005350) | 0.003590 / 0.011008 (-0.007418) | 0.084657 / 0.038508 (0.046149) | 0.057884 / 0.023109 (0.034775) | 0.318347 / 0.275898 (0.042449) | 0.345976 / 0.323480 (0.022496) | 0.004706 / 0.007986 (-0.003279) | 0.002921 / 0.004328 (-0.001407) | 0.061850 / 0.004250 (0.057600) | 0.050558 / 0.037052 (0.013505) | 0.320877 / 0.258489 (0.062388) | 0.356062 / 0.293841 (0.062222) | 0.027511 / 0.128546 (-0.101035) | 0.007954 / 0.075646 (-0.067693) | 0.260290 / 0.419271 (-0.158981) | 0.051207 / 0.043533 (0.007674) | 0.334423 / 0.255139 (0.079284) | 0.338575 / 0.283200 (0.055375) | 0.022330 / 0.141683 (-0.119353) | 1.445446 / 1.452155 (-0.006709) | 1.500626 / 1.492716 (0.007910) |\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.192440 / 0.018006 (0.174433) | 0.428455 / 0.000490 (0.427965) | 0.000318 / 0.000200 (0.000118) | 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.022933 / 0.037411 (-0.014478) | 0.072795 / 0.014526 (0.058269) | 0.081149 / 0.176557 (-0.095407) | 0.142941 / 0.737135 (-0.594195) | 0.082410 / 0.296338 (-0.213928) |\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.405220 / 0.215209 (0.190011) | 4.048585 / 2.077655 (1.970931) | 2.027908 / 1.504120 (0.523788) | 1.887828 / 1.541195 (0.346633) | 2.131780 / 1.468490 (0.663290) | 0.502847 / 4.584777 (-4.081930) | 3.069498 / 3.745712 (-0.676215) | 4.094774 / 5.269862 (-1.175088) | 2.544004 / 4.565676 (-2.021673) | 0.059540 / 0.424275 (-0.364735) | 0.006501 / 0.007607 (-0.001106) | 0.477218 / 0.226044 (0.251173) | 4.764961 / 2.268929 (2.496032) | 2.434594 / 55.444624 (-53.010030) | 2.104833 / 6.876477 (-4.771644) | 2.263059 / 2.142072 (0.120987) | 0.591755 / 4.805227 (-4.213472) | 0.131167 / 6.500664 (-6.369497) | 0.061808 / 0.075469 (-0.013661) |\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.345364 / 1.841788 (-0.496424) | 18.122584 / 8.074308 (10.048276) | 13.318689 / 10.191392 (3.127297) | 0.144526 / 0.680424 (-0.535898) | 0.016997 / 0.534201 (-0.517204) | 0.336036 / 0.579283 (-0.243247) | 0.359532 / 0.434364 (-0.074832) | 0.386945 / 0.540337 (-0.153392) | 0.538659 / 1.386936 (-0.848277) |\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.006088 / 0.011353 (-0.005265) | 0.003684 / 0.011008 (-0.007324) | 0.062340 / 0.038508 (0.023832) | 0.058461 / 0.023109 (0.035352) | 0.360134 / 0.275898 (0.084236) | 0.393298 / 0.323480 (0.069818) | 0.004664 / 0.007986 (-0.003322) | 0.002909 / 0.004328 (-0.001420) | 0.062668 / 0.004250 (0.058418) | 0.050145 / 0.037052 (0.013092) | 0.361897 / 0.258489 (0.103408) | 0.402008 / 0.293841 (0.108167) | 0.027491 / 0.128546 (-0.101055) | 0.008113 / 0.075646 (-0.067534) | 0.068114 / 0.419271 (-0.351157) | 0.043303 / 0.043533 (-0.000230) | 0.360569 / 0.255139 (0.105430) | 0.387144 / 0.283200 (0.103944) | 0.020194 / 0.141683 (-0.121489) | 1.418066 / 1.452155 (-0.034089) | 1.475640 / 1.492716 (-0.017076) |\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.200291 / 0.018006 (0.182285) | 0.432298 / 0.000490 (0.431809) | 0.003303 / 0.000200 (0.003103) | 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.027749 / 0.037411 (-0.009662) | 0.081890 / 0.014526 (0.067364) | 0.094319 / 0.176557 (-0.082238) | 0.148646 / 0.737135 (-0.588490) | 0.091830 / 0.296338 (-0.204509) |\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.433546 / 0.215209 (0.218337) | 4.326855 / 2.077655 (2.249200) | 2.230186 / 1.504120 (0.726066) | 2.052524 / 1.541195 (0.511329) | 2.117270 / 1.468490 (0.648779) | 0.500331 / 4.584777 (-4.084446) | 3.113662 / 3.745712 (-0.632050) | 2.931540 / 5.269862 (-2.338322) | 1.853615 / 4.565676 (-2.712062) | 0.058250 / 0.424275 (-0.366025) | 0.006546 / 0.007607 (-0.001061) | 0.508850 / 0.226044 (0.282806) | 5.081809 / 2.268929 (2.812880) | 2.687037 / 55.444624 (-52.757588) | 2.369317 / 6.876477 (-4.507160) | 2.383549 / 2.142072 (0.241477) | 0.587039 / 4.805227 (-4.218188) | 0.125858 / 6.500664 (-6.374806) | 0.062522 / 0.075469 (-0.012947) |\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.294929 / 1.841788 (-0.546858) | 18.056312 / 8.074308 (9.982004) | 13.755117 / 10.191392 (3.563725) | 0.132037 / 0.680424 (-0.548387) | 0.016866 / 0.534201 (-0.517335) | 0.339040 / 0.579283 (-0.240243) | 0.364371 / 0.434364 (-0.069993) | 0.399533 / 0.540337 (-0.140804) | 0.564524 / 1.386936 (-0.822412) |\n\n</details>\n</details>\n\n\n",
"@lhoestq This bar comes from: https://github.com/huggingface/datasets/blob/b8067c0262073891180869f700ebef5ac3dc5cce/src/datasets/builder.py#L1156-L1166\r\n\r\nDo you prefer not showing it or, e.g., having `desc=\"Generating splits\"`?",
"No strong opinion. Since there is a \"Generating\" progress bar already, maybe it can be \"Preparing splits\" (ref to download_and_prepare)",
"<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.006348 / 0.011353 (-0.005005) | 0.003721 / 0.011008 (-0.007287) | 0.084039 / 0.038508 (0.045531) | 0.067627 / 0.023109 (0.044517) | 0.308372 / 0.275898 (0.032474) | 0.335131 / 0.323480 (0.011652) | 0.005157 / 0.007986 (-0.002829) | 0.003266 / 0.004328 (-0.001062) | 0.065374 / 0.004250 (0.061124) | 0.055550 / 0.037052 (0.018498) | 0.314001 / 0.258489 (0.055512) | 0.350510 / 0.293841 (0.056669) | 0.030859 / 0.128546 (-0.097688) | 0.008286 / 0.075646 (-0.067361) | 0.287122 / 0.419271 (-0.132149) | 0.051494 / 0.043533 (0.007961) | 0.309868 / 0.255139 (0.054729) | 0.325845 / 0.283200 (0.042645) | 0.022622 / 0.141683 (-0.119061) | 1.468730 / 1.452155 (0.016575) | 1.547871 / 1.492716 (0.055155) |\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.202763 / 0.018006 (0.184757) | 0.456403 / 0.000490 (0.455914) | 0.003116 / 0.000200 (0.002916) | 0.000079 / 0.000054 (0.000024) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.027297 / 0.037411 (-0.010114) | 0.081204 / 0.014526 (0.066678) | 0.094274 / 0.176557 (-0.082282) | 0.154391 / 0.737135 (-0.582744) | 0.094312 / 0.296338 (-0.202026) |\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.387382 / 0.215209 (0.172173) | 3.865597 / 2.077655 (1.787943) | 1.855959 / 1.504120 (0.351839) | 1.685411 / 1.541195 (0.144216) | 1.732127 / 1.468490 (0.263637) | 0.482230 / 4.584777 (-4.102547) | 3.664947 / 3.745712 (-0.080765) | 5.114379 / 5.269862 (-0.155482) | 3.102803 / 4.565676 (-1.462873) | 0.056509 / 0.424275 (-0.367766) | 0.007230 / 0.007607 (-0.000377) | 0.456788 / 0.226044 (0.230744) | 4.575831 / 2.268929 (2.306902) | 2.335249 / 55.444624 (-53.109375) | 2.003805 / 6.876477 (-4.872672) | 2.141788 / 2.142072 (-0.000285) | 0.577501 / 4.805227 (-4.227726) | 0.130264 / 6.500664 (-6.370400) | 0.058889 / 0.075469 (-0.016580) |\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.252673 / 1.841788 (-0.589115) | 18.676897 / 8.074308 (10.602589) | 13.988101 / 10.191392 (3.796709) | 0.151376 / 0.680424 (-0.529048) | 0.018104 / 0.534201 (-0.516097) | 0.388413 / 0.579283 (-0.190870) | 0.414841 / 0.434364 (-0.019523) | 0.456078 / 0.540337 (-0.084259) | 0.641715 / 1.386936 (-0.745221) |\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.006315 / 0.011353 (-0.005038) | 0.003847 / 0.011008 (-0.007162) | 0.063989 / 0.038508 (0.025481) | 0.068244 / 0.023109 (0.045135) | 0.416201 / 0.275898 (0.140303) | 0.438446 / 0.323480 (0.114966) | 0.005820 / 0.007986 (-0.002166) | 0.003165 / 0.004328 (-0.001163) | 0.064143 / 0.004250 (0.059892) | 0.056529 / 0.037052 (0.019477) | 0.414916 / 0.258489 (0.156427) | 0.450771 / 0.293841 (0.156930) | 0.030611 / 0.128546 (-0.097935) | 0.008289 / 0.075646 (-0.067357) | 0.070725 / 0.419271 (-0.348546) | 0.047998 / 0.043533 (0.004465) | 0.405609 / 0.255139 (0.150470) | 0.421895 / 0.283200 (0.138696) | 0.022135 / 0.141683 (-0.119548) | 1.444238 / 1.452155 (-0.007916) | 1.515823 / 1.492716 (0.023107) |\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.227043 / 0.018006 (0.209037) | 0.439732 / 0.000490 (0.439242) | 0.001267 / 0.000200 (0.001067) | 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.029082 / 0.037411 (-0.008329) | 0.086201 / 0.014526 (0.071675) | 0.098653 / 0.176557 (-0.077903) | 0.152574 / 0.737135 (-0.584561) | 0.100696 / 0.296338 (-0.195642) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.411243 / 0.215209 (0.196034) | 4.100170 / 2.077655 (2.022515) | 2.118310 / 1.504120 (0.614190) | 1.935646 / 1.541195 (0.394451) | 1.970798 / 1.468490 (0.502307) | 0.478635 / 4.584777 (-4.106142) | 3.589396 / 3.745712 (-0.156316) | 3.312462 / 5.269862 (-1.957399) | 1.963081 / 4.565676 (-2.602595) | 0.056392 / 0.424275 (-0.367883) | 0.007134 / 0.007607 (-0.000473) | 0.485131 / 0.226044 (0.259086) | 4.838946 / 2.268929 (2.570017) | 2.624550 / 55.444624 (-52.820075) | 2.223046 / 6.876477 (-4.653431) | 2.230642 / 2.142072 (0.088570) | 0.594892 / 4.805227 (-4.210335) | 0.130523 / 6.500664 (-6.370141) | 0.059585 / 0.075469 (-0.015884) |\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.329941 / 1.841788 (-0.511847) | 19.199057 / 8.074308 (11.124748) | 14.166009 / 10.191392 (3.974617) | 0.190595 / 0.680424 (-0.489829) | 0.018419 / 0.534201 (-0.515782) | 0.392031 / 0.579283 (-0.187252) | 0.409395 / 0.434364 (-0.024969) | 0.475930 / 0.540337 (-0.064408) | 0.654412 / 1.386936 (-0.732524) |\n\n</details>\n</details>\n\n\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.007500 / 0.011353 (-0.003853) | 0.004328 / 0.011008 (-0.006681) | 0.086718 / 0.038508 (0.048209) | 0.098638 / 0.023109 (0.075529) | 0.335308 / 0.275898 (0.059409) | 0.369163 / 0.323480 (0.045683) | 0.005733 / 0.007986 (-0.002253) | 0.003738 / 0.004328 (-0.000590) | 0.066452 / 0.004250 (0.062202) | 0.066245 / 0.037052 (0.029192) | 0.337609 / 0.258489 (0.079120) | 0.388584 / 0.293841 (0.094744) | 0.031742 / 0.128546 (-0.096804) | 0.008721 / 0.075646 (-0.066925) | 0.290820 / 0.419271 (-0.128452) | 0.053323 / 0.043533 (0.009790) | 0.329192 / 0.255139 (0.074053) | 0.350560 / 0.283200 (0.067360) | 0.025402 / 0.141683 (-0.116281) | 1.476174 / 1.452155 (0.024020) | 1.578194 / 1.492716 (0.085478) |\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.256160 / 0.018006 (0.238154) | 0.560315 / 0.000490 (0.559825) | 0.005287 / 0.000200 (0.005088) | 0.000094 / 0.000054 (0.000040) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.029164 / 0.037411 (-0.008247) | 0.084881 / 0.014526 (0.070356) | 0.100979 / 0.176557 (-0.075577) | 0.156539 / 0.737135 (-0.580597) | 0.101510 / 0.296338 (-0.194828) |\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.381138 / 0.215209 (0.165929) | 3.791573 / 2.077655 (1.713918) | 1.841954 / 1.504120 (0.337834) | 1.672463 / 1.541195 (0.131268) | 1.785769 / 1.468490 (0.317279) | 0.483263 / 4.584777 (-4.101514) | 3.617391 / 3.745712 (-0.128322) | 5.607794 / 5.269862 (0.337933) | 3.359530 / 4.565676 (-1.206147) | 0.056826 / 0.424275 (-0.367449) | 0.007375 / 0.007607 (-0.000232) | 0.455853 / 0.226044 (0.229809) | 4.548965 / 2.268929 (2.280037) | 2.412716 / 55.444624 (-53.031908) | 1.991456 / 6.876477 (-4.885021) | 2.242851 / 2.142072 (0.100778) | 0.573070 / 4.805227 (-4.232157) | 0.134658 / 6.500664 (-6.366006) | 0.061539 / 0.075469 (-0.013930) |\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.278306 / 1.841788 (-0.563481) | 20.634317 / 8.074308 (12.560009) | 15.164246 / 10.191392 (4.972854) | 0.167487 / 0.680424 (-0.512937) | 0.019006 / 0.534201 (-0.515195) | 0.394617 / 0.579283 (-0.184666) | 0.423385 / 0.434364 (-0.010979) | 0.469968 / 0.540337 (-0.070370) | 0.630058 / 1.386936 (-0.756878) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.006793 / 0.011353 (-0.004559) | 0.004260 / 0.011008 (-0.006748) | 0.065398 / 0.038508 (0.026890) | 0.077850 / 0.023109 (0.054741) | 0.371754 / 0.275898 (0.095855) | 0.400652 / 0.323480 (0.077172) | 0.005729 / 0.007986 (-0.002256) | 0.003660 / 0.004328 (-0.000669) | 0.065119 / 0.004250 (0.060869) | 0.060714 / 0.037052 (0.023661) | 0.384592 / 0.258489 (0.126103) | 0.412806 / 0.293841 (0.118965) | 0.031865 / 0.128546 (-0.096681) | 0.008807 / 0.075646 (-0.066839) | 0.071156 / 0.419271 (-0.348115) | 0.049571 / 0.043533 (0.006038) | 0.367381 / 0.255139 (0.112242) | 0.386713 / 0.283200 (0.103513) | 0.024838 / 0.141683 (-0.116845) | 1.492986 / 1.452155 (0.040831) | 1.559243 / 1.492716 (0.066526) |\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.269737 / 0.018006 (0.251730) | 0.565177 / 0.000490 (0.564687) | 0.000404 / 0.000200 (0.000204) | 0.000060 / 0.000054 (0.000006) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.031631 / 0.037411 (-0.005780) | 0.087289 / 0.014526 (0.072764) | 0.102798 / 0.176557 (-0.073759) | 0.158977 / 0.737135 (-0.578158) | 0.105495 / 0.296338 (-0.190843) |\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.425067 / 0.215209 (0.209858) | 4.243121 / 2.077655 (2.165466) | 2.234567 / 1.504120 (0.730447) | 2.070810 / 1.541195 (0.529615) | 2.176802 / 1.468490 (0.708312) | 0.484987 / 4.584777 (-4.099790) | 3.647000 / 3.745712 (-0.098712) | 3.574843 / 5.269862 (-1.695019) | 2.092581 / 4.565676 (-2.473095) | 0.057299 / 0.424275 (-0.366976) | 0.007480 / 0.007607 (-0.000128) | 0.507838 / 0.226044 (0.281794) | 5.076594 / 2.268929 (2.807666) | 2.718858 / 55.444624 (-52.725766) | 2.362793 / 6.876477 (-4.513684) | 2.451962 / 2.142072 (0.309890) | 0.581355 / 4.805227 (-4.223872) | 0.133723 / 6.500664 (-6.366941) | 0.061896 / 0.075469 (-0.013573) |\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.325814 / 1.841788 (-0.515974) | 20.614502 / 8.074308 (12.540194) | 14.769422 / 10.191392 (4.578029) | 0.193797 / 0.680424 (-0.486627) | 0.018379 / 0.534201 (-0.515822) | 0.394153 / 0.579283 (-0.185130) | 0.409585 / 0.434364 (-0.024779) | 0.479107 / 0.540337 (-0.061231) | 0.668397 / 1.386936 (-0.718539) |\n\n</details>\n</details>\n\n\n",
"In the end, I decided to remove the progress bar to avoid having it displayed when loading a cached dataset.",
"<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.006673 / 0.011353 (-0.004680) | 0.004162 / 0.011008 (-0.006846) | 0.084017 / 0.038508 (0.045509) | 0.079536 / 0.023109 (0.056426) | 0.313594 / 0.275898 (0.037695) | 0.349200 / 0.323480 (0.025720) | 0.005544 / 0.007986 (-0.002441) | 0.003472 / 0.004328 (-0.000857) | 0.064742 / 0.004250 (0.060491) | 0.056857 / 0.037052 (0.019805) | 0.318635 / 0.258489 (0.060146) | 0.354378 / 0.293841 (0.060537) | 0.030856 / 0.128546 (-0.097690) | 0.008759 / 0.075646 (-0.066887) | 0.287760 / 0.419271 (-0.131511) | 0.052307 / 0.043533 (0.008775) | 0.316396 / 0.255139 (0.061257) | 0.351408 / 0.283200 (0.068208) | 0.024914 / 0.141683 (-0.116769) | 1.484592 / 1.452155 (0.032437) | 1.560662 / 1.492716 (0.067945) |\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.280938 / 0.018006 (0.262932) | 0.580236 / 0.000490 (0.579747) | 0.003369 / 0.000200 (0.003169) | 0.000090 / 0.000054 (0.000036) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.028736 / 0.037411 (-0.008675) | 0.082916 / 0.014526 (0.068390) | 0.097761 / 0.176557 (-0.078796) | 0.153515 / 0.737135 (-0.583620) | 0.099282 / 0.296338 (-0.197057) |\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.401244 / 0.215209 (0.186035) | 4.019866 / 2.077655 (1.942211) | 2.029642 / 1.504120 (0.525522) | 1.849591 / 1.541195 (0.308396) | 1.946829 / 1.468490 (0.478339) | 0.479750 / 4.584777 (-4.105027) | 3.482822 / 3.745712 (-0.262890) | 3.955859 / 5.269862 (-1.314003) | 2.370747 / 4.565676 (-2.194930) | 0.056905 / 0.424275 (-0.367370) | 0.007319 / 0.007607 (-0.000288) | 0.485310 / 0.226044 (0.259266) | 4.858228 / 2.268929 (2.589299) | 2.500476 / 55.444624 (-52.944148) | 2.171156 / 6.876477 (-4.705320) | 2.427266 / 2.142072 (0.285194) | 0.570199 / 4.805227 (-4.235029) | 0.130855 / 6.500664 (-6.369809) | 0.060269 / 0.075469 (-0.015200) |\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.258044 / 1.841788 (-0.583743) | 20.218657 / 8.074308 (12.144349) | 13.597970 / 10.191392 (3.406578) | 0.167656 / 0.680424 (-0.512768) | 0.018137 / 0.534201 (-0.516064) | 0.395309 / 0.579283 (-0.183975) | 0.406325 / 0.434364 (-0.028039) | 0.467457 / 0.540337 (-0.072880) | 0.613636 / 1.386936 (-0.773300) |\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.006846 / 0.011353 (-0.004507) | 0.004207 / 0.011008 (-0.006802) | 0.064525 / 0.038508 (0.026017) | 0.081329 / 0.023109 (0.058220) | 0.399838 / 0.275898 (0.123940) | 0.431305 / 0.323480 (0.107825) | 0.005859 / 0.007986 (-0.002127) | 0.003568 / 0.004328 (-0.000760) | 0.065262 / 0.004250 (0.061011) | 0.064796 / 0.037052 (0.027744) | 0.406858 / 0.258489 (0.148369) | 0.440971 / 0.293841 (0.147130) | 0.031421 / 0.128546 (-0.097125) | 0.008777 / 0.075646 (-0.066870) | 0.071418 / 0.419271 (-0.347853) | 0.049263 / 0.043533 (0.005730) | 0.384279 / 0.255139 (0.129140) | 0.410745 / 0.283200 (0.127546) | 0.024467 / 0.141683 (-0.117216) | 1.522379 / 1.452155 (0.070224) | 1.581636 / 1.492716 (0.088920) |\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.276161 / 0.018006 (0.258155) | 0.548842 / 0.000490 (0.548352) | 0.004523 / 0.000200 (0.004324) | 0.000098 / 0.000054 (0.000043) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.030747 / 0.037411 (-0.006664) | 0.087493 / 0.014526 (0.072967) | 0.106563 / 0.176557 (-0.069993) | 0.162949 / 0.737135 (-0.574186) | 0.105303 / 0.296338 (-0.191036) |\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.425854 / 0.215209 (0.210645) | 4.244797 / 2.077655 (2.167142) | 2.269006 / 1.504120 (0.764886) | 2.097428 / 1.541195 (0.556234) | 2.181038 / 1.468490 (0.712548) | 0.477286 / 4.584777 (-4.107491) | 3.591452 / 3.745712 (-0.154260) | 3.481281 / 5.269862 (-1.788580) | 2.066895 / 4.565676 (-2.498782) | 0.056576 / 0.424275 (-0.367699) | 0.007409 / 0.007607 (-0.000199) | 0.498411 / 0.226044 (0.272367) | 4.994873 / 2.268929 (2.725945) | 2.749148 / 55.444624 (-52.695476) | 2.378544 / 6.876477 (-4.497932) | 2.452859 / 2.142072 (0.310786) | 0.571340 / 4.805227 (-4.233887) | 0.132174 / 6.500664 (-6.368490) | 0.061507 / 0.075469 (-0.013962) |\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.370773 / 1.841788 (-0.471015) | 20.493342 / 8.074308 (12.419034) | 14.809886 / 10.191392 (4.618494) | 0.175730 / 0.680424 (-0.504693) | 0.018617 / 0.534201 (-0.515583) | 0.393808 / 0.579283 (-0.185476) | 0.416419 / 0.434364 (-0.017945) | 0.477183 / 0.540337 (-0.063155) | 0.668060 / 1.386936 (-0.718876) |\n\n</details>\n</details>\n\n\n",
"Nice one :)"
] |
https://api.github.com/repos/huggingface/datasets/issues/1044 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1044/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1044/comments | https://api.github.com/repos/huggingface/datasets/issues/1044/events | https://github.com/huggingface/datasets/pull/1044 | 756,111,647 | MDExOlB1bGxSZXF1ZXN0NTMxNzA5MTg0 | 1,044 | Add AMTTL Chinese Word Segmentation Dataset | [] | closed | false | null | 0 | 2020-12-03T11:27:52Z | 2020-12-03T17:13:14Z | 2020-12-03T17:13:13Z | 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/1044/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1044/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1044.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1044",
"merged_at": "2020-12-03T17:13:13Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1044.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1044"
} | true | [] |
|
https://api.github.com/repos/huggingface/datasets/issues/2142 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2142/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2142/comments | https://api.github.com/repos/huggingface/datasets/issues/2142/events | https://github.com/huggingface/datasets/pull/2142 | 843,919,420 | MDExOlB1bGxSZXF1ZXN0NjAzMjQwMzUy | 2,142 | Gem V1.1 | [] | closed | false | null | 0 | 2021-03-29T23:47:02Z | 2021-03-30T00:10:02Z | 2021-03-30T00:10:02Z | null | This branch updates the GEM benchmark to its 1.1 version which includes:
- challenge sets for most tasks
- detokenized TurkCorpus to match the rest of the text simplification subtasks
- fixed inputs for TurkCorpus and ASSET test sets
- 18 languages in WikiLingua
cc @sebastianGehrmann | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 1,
"hooray": 1,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/huggingface/datasets/issues/2142/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2142/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2142.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2142",
"merged_at": "2021-03-30T00:10:02Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2142.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2142"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/5193 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5193/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5193/comments | https://api.github.com/repos/huggingface/datasets/issues/5193/events | https://github.com/huggingface/datasets/issues/5193 | 1,433,883,780 | I_kwDODunzps5Vd1SE | 5,193 | "One or several metadata. were found, but not in the same directory or in a parent directory" | [] | closed | false | null | 5 | 2022-11-02T22:46:25Z | 2022-11-03T13:39:16Z | 2022-11-03T13:35:44Z | null | ### Describe the bug
When loading my own dataset, on loading it I get an error.
Here is my dataset link: https://huggingface.co/datasets/corentinm7/MyoQuant-SDH-Data
And the error after loading with:
```python
from datasets import load_dataset
load_dataset("corentinm7/MyoQuant-SDH-Data")
```
```python
Downloading readme: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.34k/3.34k [00:00<00:00, 4.45MB/s]
Using custom data configuration SDH_16k-53e7301a92ab0025
Downloading and preparing dataset None/SDH_16k to /home/corentin/.cache/huggingface/datasets/corentinm7___imagefolder/SDH_16k-53e7301a92ab0025/0.0.0/37fbb85cc714a338bea574ac6c7d0b5be5aff46c1862c1989b20e0771199e93f...
Downloading data: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.28M/3.28M [00:00<00:00, 4.31MB/s]
Downloading data files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.75s/it]
Downloading data: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.13G/1.13G [00:15<00:00, 74.3MB/s]
Downloading data files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:16<00:00, 16.09s/it]
Extracting data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:13<00:00, 13.16s/it]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/corentin/code-project/hugging_face_play/.venv/lib/python3.10/site-packages/datasets/load.py", line 1742, in load_dataset
builder_instance.download_and_prepare(
File "/home/corentin/code-project/hugging_face_play/.venv/lib/python3.10/site-packages/datasets/builder.py", line 814, in download_and_prepare
self._download_and_prepare(
File "/home/corentin/code-project/hugging_face_play/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1423, in _download_and_prepare
super()._download_and_prepare(
File "/home/corentin/code-project/hugging_face_play/.venv/lib/python3.10/site-packages/datasets/builder.py", line 905, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/corentin/code-project/hugging_face_play/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1374, in _prepare_split
for key, record in logging.tqdm(
File "/home/corentin/code-project/hugging_face_play/.venv/lib/python3.10/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/corentin/code-project/hugging_face_play/.venv/lib/python3.10/site-packages/datasets/packaged_modules/folder_based_builder/folder_based_builder.py", line 394, in _generate_examples
raise ValueError(
ValueError: One or several metadata. were found, but not in the same directory or in a parent directory of /home/corentin/.cache/huggingface/datasets/downloads/extracted/60c4aa8d4da3065bb3d310de4373dffd73bd4dc331aedcb4ee867febe4fdb7cd/validation/sick/2_CG_SDH_TAM_Bin1cKO_ko_pla_4_1640.tif.
```
However the test command is working fine. ```datasets-cli test hugging_face_play/ds_test/SDH_16k.py --save_info --all_configs --force_redownload```
```
Using custom data configuration SDH_16k
Testing builder 'SDH_16k' (1/1)
Downloading and preparing dataset sdh_16k/SDH_16k to /home/corentin/.cache/huggingface/datasets/sdh_16k/SDH_16k/1.0.0/21b584239a638aeeda33cba1ac2ca4869d48e4b4f20fb22274d5a5ddc487659d...
Downloading data: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.13G/1.13G [00:14<00:00, 76.5MB/s]
Downloading data files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:15<00:00, 15.66s/it]
Downloading data: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.28M/3.28M [00:02<00:00, 1.44MB/s]
Downloading data files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:03<00:00, 3.21s/it]
Downloading data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 11586.48it/s]
Extracting data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:13<00:00, 13.42s/it]
Dataset sdh_16k downloaded and prepared to /home/corentin/.cache/huggingface/datasets/sdh_16k/SDH_16k/1.0.0/21b584239a638aeeda33cba1ac2ca4869d48e4b4f20fb22274d5a5ddc487659d. Subsequent calls will reuse this data.
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 605.27it/s]
Dataset card saved at hugging_face_play/ds_test/README.md
Test successful.
```
### Steps to reproduce the bug
Simply run on python
```python
from datasets import load_dataset
load_dataset("corentinm7/MyoQuant-SDH-Data")
```
### Expected behavior
As the test command worked, this error should not appear
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.31
- Python version: 3.10.6
- PyArrow version: 10.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/5193/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5193/timeline | null | completed | null | null | false | [
"Also unrelated but still: https://huggingface.co/docs/datasets/image_dataset#generate-the-dataset\r\n```If your loading script passed the test, you should now have a dataset_infos.json file in your dataset folder.```\r\nIt's not the case anymore as it's now in the readme.md, it was confusing to me",
"And here is my data loader script: https://huggingface.co/datasets/corentinm7/MyoQuant-SDH-Data/blob/main/SDH_16k.py\r\nI have one file archive to download that contains the images for all splits and one `metadata.jsonl` to download that contains the informations about what image goes into what split.",
"Hi @lambda-science! It seems that your repo is recognized as a packaged module [ImageFolder](https://huggingface.co/docs/datasets/main/en/image_dataset#imagefolder), not as a dataset with the custom loading script, because loader looks for a script that has the same name as the dataset repo. So please try to rename your script to `MyoQuant-SDH-Data.py`, this should help.",
"> Hi @lambda-science! It seems that your repo is recognized as a packaged module [ImageFolder](https://huggingface.co/docs/datasets/main/en/image_dataset#imagefolder), not as a dataset with the custom loading script, because loader looks for a script that has the same name as the dataset repo. So please try to rename your script to `MyoQuant-SDH-Data.py`, this should help.\r\n\r\nHi !\r\n\r\nThank you for your answer. That was... embarrassingly easy, sorry for this issue, everything is fixed now ! \r\n\r\nHave a nice day ! :)",
"@lambda-science that's not embarrassing at all! it's actually not clear from the documentation that the script should have the same name, so thank you for the issue, we'll add this information to the docs :) "
] |
https://api.github.com/repos/huggingface/datasets/issues/5336 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5336/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5336/comments | https://api.github.com/repos/huggingface/datasets/issues/5336/events | https://github.com/huggingface/datasets/pull/5336 | 1,479,649,900 | PR_kwDODunzps5Egzed | 5,336 | Set `IterableDataset.map` param `batch_size` typing as optional | [] | closed | false | null | 3 | 2022-12-06T17:08:10Z | 2022-12-07T14:14:56Z | 2022-12-07T14:06:27Z | null | This PR solves #5325
~Indeed we're using the typing for optional values as `Union[type, None]` as it's similar to how Python 3.10 handles optional values as `type | None`, instead of using `Optional[type]`.~
~Do we want to start using `Union[type, None]` for type-hinting optional values or just keep on using `Optional`?~ -> Keeping `Optional` still for consistency with the rest of the code in `datasets`
Also we now allow `batch_size` to be `None` for `IterableDataset.map` and `IterableDataset.filter`e.g. `MappedExamplesIterable` as `map` is internally instantiating those and propagating the `batch_size` param so if it can be `None` for `map` it should also do so for `MappedExamplesIterable`, as well as for `FilteredExamplesIterable` when calling `IterableDataset.filter`.
## TODOs
- [x] Add integration tests
- [x] Handle scenario where `batched=True` and `batch_size=None` or `batch_size<=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/5336/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5336/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/5336.diff",
"html_url": "https://github.com/huggingface/datasets/pull/5336",
"merged_at": "2022-12-07T14:06:27Z",
"patch_url": "https://github.com/huggingface/datasets/pull/5336.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/5336"
} | true | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_5336). All of your documentation changes will be reflected on that endpoint.",
"Hi @mariosasko, @lhoestq I was wondering whether we should include `batched` as a `pytest.mark` param for the functions testing `IterableDataset.map` so as to ensure that the changes done in this PR work fine without breaking anything of the actual functionality.\r\n\r\nI've pushed updated tests just for one of the unit testing functions to be run as `pytest tests/test_iterable_dataset.py::test_mapped_examples_iterable -s --durations 0`, but some are still missing `batched` param, it was just to ask you whether we're supposed to do this for the rest of the functions or not, if it's a yes I'll push the commit as it's ready, but didn't want to push extra stuff that may be discarded later!\r\n\r\nThanks :hugs:",
"Thanks for the feedback @lhoestq, I agree with keeping `Optional` instead of `Union[type, None]` for now 👍🏻"
] |
https://api.github.com/repos/huggingface/datasets/issues/4471 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4471/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4471/comments | https://api.github.com/repos/huggingface/datasets/issues/4471/events | https://github.com/huggingface/datasets/issues/4471 | 1,267,475,268 | I_kwDODunzps5LjCNE | 4,471 | CI error with repo lhoestq/_dummy | [
{
"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-06-10T12:26:06Z | 2022-06-10T13:24:53Z | 2022-06-10T13:24:53Z | null | ## Describe the bug
CI is failing because of repo "lhoestq/_dummy". See: https://app.circleci.com/pipelines/github/huggingface/datasets/12461/workflows/1b040b45-9578-4ab9-8c44-c643c4eb8691/jobs/74269
```
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/api/datasets/lhoestq/_dummy?full=true
```
The repo seems to no longer exist: https://huggingface.co/api/datasets/lhoestq/_dummy
```
error: "Repository not found"
```
CC: @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/4471/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4471/timeline | null | completed | null | null | false | [
"fixed by https://github.com/huggingface/datasets/pull/4472"
] |
https://api.github.com/repos/huggingface/datasets/issues/2070 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2070/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2070/comments | https://api.github.com/repos/huggingface/datasets/issues/2070/events | https://github.com/huggingface/datasets/issues/2070 | 833,799,035 | MDU6SXNzdWU4MzM3OTkwMzU= | 2,070 | ArrowInvalid issue for squad v2 dataset | [] | closed | false | null | 1 | 2021-03-17T13:51:49Z | 2021-08-04T17:57:16Z | 2021-08-04T17:57:16Z | null | Hello, I am using the huggingface official question answering example notebook (https://colab.research.google.com/github/huggingface/notebooks/blob/master/examples/question_answering.ipynb).
In the prepare_validation_features function, I made some modifications to tokenize a new set of quesions with the original contexts and save them in three different list called candidate_input_dis, candidate_attetion_mask and candidate_token_type_ids. When I try to run the next cell for dataset.map, I got the following error:
`ArrowInvalid: Column 1 named candidate_attention_mask expected length 1180 but got length 1178`
My code is as follows:
```
def generate_candidate_questions(examples):
val_questions = examples["question"]
candididate_questions = random.sample(datasets["train"]["question"], len(val_questions))
candididate_questions = [x[:max_length] for x in candididate_questions]
return candididate_questions
def prepare_validation_features(examples, use_mixing=False):
pad_on_right = tokenizer.padding_side == "right"
tokenized_examples = tokenizer(
examples["question" if pad_on_right else "context"],
examples["context" if pad_on_right else "question"],
truncation="only_second" if pad_on_right else "only_first",
max_length=max_length,
stride=doc_stride,
return_overflowing_tokens=True,
return_offsets_mapping=True,
padding="max_length",
)
if use_mixing:
candidate_questions = generate_candidate_questions(examples)
tokenized_candidates = tokenizer(
candidate_questions if pad_on_right else examples["context"],
examples["context"] if pad_on_right else candidate_questions,
truncation="only_second" if pad_on_right else "only_first",
max_length=max_length,
stride=doc_stride,
return_overflowing_tokens=True,
return_offsets_mapping=True,
padding="max_length",
)
sample_mapping = tokenized_examples.pop("overflow_to_sample_mapping")
tokenized_examples["example_id"] = []
if use_mixing:
tokenized_examples["candidate_input_ids"] = tokenized_candidates["input_ids"]
tokenized_examples["candidate_attention_mask"] = tokenized_candidates["attention_mask"]
tokenized_examples["candidate_token_type_ids"] = tokenized_candidates["token_type_ids"]
for i in range(len(tokenized_examples["input_ids"])):
sequence_ids = tokenized_examples.sequence_ids(i)
context_index = 1 if pad_on_right else 0
sample_index = sample_mapping[i]
tokenized_examples["example_id"].append(examples["id"][sample_index])
tokenized_examples["offset_mapping"][i] = [
(o if sequence_ids[k] == context_index else None)
for k, o in enumerate(tokenized_examples["offset_mapping"][i])
]
return tokenized_examples
validation_features = datasets["validation"].map(
lambda xs: prepare_validation_features(xs, True),
batched=True,
remove_columns=datasets["validation"].column_names
)
```
I guess this might happen because of the batched=True. I see similar issues in this repo related to arrow table length mismatch error, but in their cases, the numbers vary a lot. In my case, this error always happens when the expected length and unexpected length are very close. 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/2070/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2070/timeline | null | completed | null | null | false | [
"Hi ! This error happens when you use `map` in batched mode and then your function doesn't return the same number of values per column.\r\n\r\nIndeed since you're using `map` in batched mode, `prepare_validation_features` must take a batch as input (i.e. a dictionary of multiple rows of the dataset), and return a batch.\r\n\r\nHowever it seems like `tokenized_examples` doesn't have the same number of elements in each field. One field seems to have `1180` elements while `candidate_attention_mask` only has `1178`."
] |
https://api.github.com/repos/huggingface/datasets/issues/3082 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3082/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3082/comments | https://api.github.com/repos/huggingface/datasets/issues/3082/events | https://github.com/huggingface/datasets/pull/3082 | 1,026,388,994 | PR_kwDODunzps4tM2BV | 3,082 | Fix error related to huggingface_hub timeout parameter | [] | closed | false | null | 0 | 2021-10-14T13:17:47Z | 2021-10-14T14:39:52Z | 2021-10-14T14:39:51Z | null | The `huggingface_hub` package added the parameter `timeout` from version 0.0.19.
This PR bumps this minimal version.
Fix #3080. | {
"+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/3082/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3082/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3082.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3082",
"merged_at": "2021-10-14T14:39:51Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3082.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3082"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/6043 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6043/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6043/comments | https://api.github.com/repos/huggingface/datasets/issues/6043/events | https://github.com/huggingface/datasets/issues/6043 | 1,807,771,750 | I_kwDODunzps5rwGhm | 6,043 | Compression kwargs have no effect when saving datasets as csv | [] | open | false | null | 3 | 2023-07-17T13:19:21Z | 2023-07-22T17:34:18Z | null | null | ### Describe the bug
Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed.
A warning is raised if explicitly providing a `compression` kwarg, but no warnings are raised if relying on the defaults. This can lead to datasets secretly not getting compressed for users expecting the behaviour to match panda's `.to_csv()`, where the compression format is automatically inferred from the destination path suffix.
### Steps to reproduce the bug
```python
# dataset is not compressed (but at least a warning is emitted)
import datasets
dataset = datasets.load_dataset("rotten_tomatoes", split="train")
dataset.to_csv("uncompressed.csv")
print(os.path.getsize("uncompressed.csv")) # 1008607
dataset.to_csv("compressed.csv.gz", compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1})
print(os.path.getsize("compressed.csv.gz")) # 1008607
```
```shell
>>>
RuntimeWarning: compression has no effect when passing a non-binary object as input.
csv_str = batch.to_pandas().to_csv(
```
```python
# dataset is not compressed and no warnings are emitted
dataset.to_csv("compressed.csv.gz")
print(os.path.getsize("compressed.csv.gz")) # 1008607
# compare with
dataset.to_pandas().to_csv("pandas.csv.gz")
print(os.path.getsize("pandas.csv.gz")) # 418561
```
---
I think that this is because behind the scenes `pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`, but users that are providing a path-like to `datasets.Dataset.to_csv` are likely not to expect / know that - leading to a mismatch in their understanding of the expected behaviour of the `compression` kwarg.
### Expected behavior
The dataset to be saved as a compressed csv file when providing a `compression` kwarg, or when relying on the default `compression='infer'`
### Environment info
`datasets == 2.13.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/6043/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6043/timeline | null | null | null | null | false | [
"Hello @exs-avianello, I have reproduced the bug successfully and have understood the problem. But I am confused regarding this part of the statement, \"`pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`\".\r\n\r\nCan you please elaborate on it?\r\n\r\nThanks!",
"Hi @aryanxk02 ! Sure, what I actually meant is that when passing a path-like `path_or_buf` here\r\n\r\nhttps://github.com/huggingface/datasets/blob/14f6edd9222e577dccb962ed5338b79b73502fa5/src/datasets/arrow_dataset.py#L4708-L4714 \r\n\r\nit gets converted to a file object behind the scenes here\r\n\r\nhttps://github.com/huggingface/datasets/blob/14f6edd9222e577dccb962ed5338b79b73502fa5/src/datasets/io/csv.py#L92-L94\r\n\r\nand the eventual pandas `.to_csv()` calls that write to it always get `path_or_buf=None`, making pandas ignore the `compression` kwarg in the `to_csv_kwargs`\r\n\r\nhttps://github.com/huggingface/datasets/blob/14f6edd9222e577dccb962ed5338b79b73502fa5/src/datasets/io/csv.py#L107-L109",
"@exs-avianello When `path_or_buf` is set to None, the `to_csv()` method will return the CSV data as a string instead of saving it to a file. Hence the compression doesn't take place. I think setting `path_or_buf=self.path_or_buf` should work. What you say?"
] |
https://api.github.com/repos/huggingface/datasets/issues/3149 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3149/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3149/comments | https://api.github.com/repos/huggingface/datasets/issues/3149/events | https://github.com/huggingface/datasets/pull/3149 | 1,033,747,625 | PR_kwDODunzps4tjuUt | 3,149 | Add CMU Hinglish DoG Dataset for MT | [] | closed | false | null | 2 | 2021-10-22T16:17:25Z | 2021-11-15T11:36:42Z | 2021-11-15T10:27:45Z | null | Address part of #2841
Added the CMU Hinglish DoG Dataset as in GLUECoS. Added it as a seperate dataset as unlike other tasks of GLUE CoS this can't be evaluated for a BERT like model.
Consists of parallel dataset between Hinglish (Hindi-English) and English, can be used for Machine Translation between the two.
The data processing part is inspired from the GLUECoS repo [here](https://github.com/microsoft/GLUECoS/blob/7fdc51653e37a32aee17505c47b7d1da364fa77e/Data/Preprocess_Scripts/preprocess_mt_en_hi.py)
The dummy data part is not working properly, it shows
``` UnboundLocalError: local variable 'generator_splits' referenced before assignment ```
when I run without ``--auto_generate``.
Please let me know how I can fix that.
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/3149/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3149/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3149.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3149",
"merged_at": "2021-11-15T10:27:45Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3149.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3149"
} | true | [
"Hi @lhoestq, thanks a lot for the help. I have moved the part as suggested. \r\nAlthough still while running the dummy data script, I face this issue\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/home/ishan/anaconda3/bin/datasets-cli\", line 8, in <module>\r\n sys.exit(main())\r\n File \"/home/ishan/anaconda3/lib/python3.8/site-packages/datasets/commands/datasets_cli.py\", line 33, in main\r\n service.run()\r\n File \"/home/ishan/anaconda3/lib/python3.8/site-packages/datasets/commands/dummy_data.py\", line 318, in run\r\n self._autogenerate_dummy_data(\r\n File \"/home/ishan/anaconda3/lib/python3.8/site-packages/datasets/commands/dummy_data.py\", line 363, in _autogenerate_dummy_data\r\n dataset_builder._prepare_split(split_generator)\r\n File \"/home/ishan/anaconda3/lib/python3.8/site-packages/datasets/builder.py\", line 1103, in _prepare_split\r\n example = self.info.features.encode_example(record)\r\n File \"/home/ishan/anaconda3/lib/python3.8/site-packages/datasets/features/features.py\", line 981, in encode_example\r\n return encode_nested_example(self, example)\r\n File \"/home/ishan/anaconda3/lib/python3.8/site-packages/datasets/features/features.py\", line 775, in encode_nested_example\r\n return {\r\n File \"/home/ishan/anaconda3/lib/python3.8/site-packages/datasets/features/features.py\", line 775, in <dictcomp>\r\n return {\r\n File \"/home/ishan/anaconda3/lib/python3.8/site-packages/datasets/utils/py_utils.py\", line 99, in zip_dict\r\n yield key, tuple(d[key] for d in dicts)\r\n File \"/home/ishan/anaconda3/lib/python3.8/site-packages/datasets/utils/py_utils.py\", line 99, in <genexpr>\r\n yield key, tuple(d[key] for d in dicts)\r\nKeyError: 'status'\r\n```\r\nThis KeyError is at times different from 'status' also.\r\nwhen I run \r\n```\r\ndatasets-cli dummy_data datasets/cmu_hinglish_dog --auto_generate --json_field='history'\r\n```\r\nI have tried removing unnecessary feature type definition, but that didn't help. Please let me know if I am missing something, thanks!",
"The CI fail is unrelated to this PR and fixed on master. Merging !"
] |
https://api.github.com/repos/huggingface/datasets/issues/314 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/314/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/314/comments | https://api.github.com/repos/huggingface/datasets/issues/314/events | https://github.com/huggingface/datasets/pull/314 | 645,461,174 | MDExOlB1bGxSZXF1ZXN0NDM5OTM4MTMw | 314 | Fixed singlular very minor spelling error | [] | closed | false | null | 1 | 2020-06-25T10:45:59Z | 2020-06-26T08:46:41Z | 2020-06-25T12:43:59Z | null | An instance of "independantly" was changed to "independently". That's all. | {
"+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/314/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/314/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/314.diff",
"html_url": "https://github.com/huggingface/datasets/pull/314",
"merged_at": "2020-06-25T12:43:59Z",
"patch_url": "https://github.com/huggingface/datasets/pull/314.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/314"
} | true | [
"Thank you BatJeti! The storm-joker, aka the typo, finally got caught!"
] |
https://api.github.com/repos/huggingface/datasets/issues/5073 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5073/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5073/comments | https://api.github.com/repos/huggingface/datasets/issues/5073/events | https://github.com/huggingface/datasets/pull/5073 | 1,397,832,183 | PR_kwDODunzps5AN3Gn | 5,073 | Restore saved format state in `load_from_disk` | [] | closed | false | null | 1 | 2022-10-05T13:51:47Z | 2022-10-11T16:55:07Z | 2022-10-11T16:49:23Z | null | Hello! @mariosasko
This pull request relates to issue #5050 and intends to add the format to datasets loaded from disk.
All I did was add a set_format in the Dataset.load_from_disk, as DatasetDict.load_from_disk relies on the first.
I don't know if I should add a test and where, so let me know if I should and I can work on that as well!
| {
"+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/5073/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5073/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/5073.diff",
"html_url": "https://github.com/huggingface/datasets/pull/5073",
"merged_at": "2022-10-11T16:49:23Z",
"patch_url": "https://github.com/huggingface/datasets/pull/5073.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/5073"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._"
] |
https://api.github.com/repos/huggingface/datasets/issues/4201 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4201/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4201/comments | https://api.github.com/repos/huggingface/datasets/issues/4201/events | https://github.com/huggingface/datasets/pull/4201 | 1,212,086,420 | PR_kwDODunzps42nIRm | 4,201 | Update GH template for dataset viewer issues | [] | closed | false | null | 2 | 2022-04-22T09:34:44Z | 2022-05-06T08:38:43Z | 2022-04-26T08:45:55Z | null | Update template to use new issue forms instead.
With this PR we can check if this new feature is useful for us.
Once validated, we can update the other templates.
CC: @severo | {
"+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/4201/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4201/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/4201.diff",
"html_url": "https://github.com/huggingface/datasets/pull/4201",
"merged_at": "2022-04-26T08:45:55Z",
"patch_url": "https://github.com/huggingface/datasets/pull/4201.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/4201"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._",
"You can see rendering at: https://github.com/huggingface/datasets/blob/6b48fedbdafe12a42c7b6edcecc32820af1a4822/.github/ISSUE_TEMPLATE/dataset-viewer.yml"
] |
https://api.github.com/repos/huggingface/datasets/issues/3781 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3781/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3781/comments | https://api.github.com/repos/huggingface/datasets/issues/3781/events | https://github.com/huggingface/datasets/pull/3781 | 1,148,599,680 | PR_kwDODunzps4zXr_O | 3,781 | Reddit dataset card additions | [] | closed | false | null | 1 | 2022-02-23T21:29:16Z | 2022-02-28T18:00:40Z | 2022-02-28T11:21:14Z | null | The changes proposed are based on the "TL;DR: Mining Reddit to Learn Automatic Summarization" paper & https://zenodo.org/record/1043504#.YhaKHpbQC38
It is a Reddit dataset indeed, but the name given to the dataset by the authors is Webis-TLDR-17 (corpus), so perhaps it should be modified as well.
The task at which the dataset is aimed is abstractive summarization.
| {
"+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/3781/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3781/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3781.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3781",
"merged_at": "2022-02-28T11:21:14Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3781.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3781"
} | true | [
"Hello! I added the tags and created a PR. Just to note, regarding the paperswithcode_id tag, that currently has the value \"reddit\"; the dataset described as reddit in paperswithcode is https://paperswithcode.com/dataset/reddit and it isn't the Webis-tldr-17. I could not find Webis-tldr-17 in paperswithcode neither in the Summarization category nor using the keywords reddit, webis, & tldr. I didn't change this tag."
] |
https://api.github.com/repos/huggingface/datasets/issues/3425 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3425/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3425/comments | https://api.github.com/repos/huggingface/datasets/issues/3425/events | https://github.com/huggingface/datasets/issues/3425 | 1,078,598,140 | I_kwDODunzps5AShn8 | 3,425 | Getting configs names takes too long | [
{
"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"
}
] | open | false | null | 3 | 2021-12-13T14:27:57Z | 2021-12-13T14:53:33Z | null | null |
## Steps to reproduce the bug
```python
from datasets import get_dataset_config_names
get_dataset_config_names("allenai/c4")
```
## Expected results
I would expect to get the answer quickly, at least in less than 10s
## Actual results
It takes about 45s on my environment
## Environment info
- `datasets` version: 1.16.1
- Platform: Linux-5.11.0-1022-aws-x86_64-with-glibc2.31
- Python version: 3.9.6
- PyArrow version: 4.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/3425/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3425/timeline | null | null | null | null | false | [
"maybe related to https://github.com/huggingface/datasets/issues/2859\r\n",
"It looks like it's currently calling `HfFileSystem.ls()` ~8 times at the root and for each subdirectory:\r\n- \"\"\r\n- \"en.noblocklist\"\r\n- \"en.noclean\"\r\n- \"en\"\r\n- \"multilingual\"\r\n- \"realnewslike\"\r\n\r\nCurrently `ls` is slow because it iterates on all the files inside the repository.\r\n\r\nAn easy optimization would be to cache the result of each call to `ls`.\r\nWe can also optimize `ls` by using a tree structure per directory instead of a list of all the files.\r\n",
"ok\r\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/5052 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5052/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5052/comments | https://api.github.com/repos/huggingface/datasets/issues/5052/events | https://github.com/huggingface/datasets/pull/5052 | 1,393,076,765 | PR_kwDODunzps4_-PZw | 5,052 | added from_generator method to IterableDataset class. | [] | closed | false | null | 3 | 2022-09-30T22:14:05Z | 2022-10-05T12:51:48Z | 2022-10-05T12:10:48Z | null | Hello,
This resolves issues #4988.
I added a method `from_generator` to class `IterableDataset`.
I modified the `read` method of input stream generator to also return Iterable_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/5052/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5052/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/5052.diff",
"html_url": "https://github.com/huggingface/datasets/pull/5052",
"merged_at": "2022-10-05T12:10:48Z",
"patch_url": "https://github.com/huggingface/datasets/pull/5052.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/5052"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._",
"I added a test and moved the `streaming` param from `read` to `__init_`. Then, I also decided to update the `read` method of the rest of the packaged modules to account for this param. \r\n\r\n@hamid-vakilzadeh Are you OK with these changes? ",
"@mariosasko these all look great! Thanks for the updates."
] |
https://api.github.com/repos/huggingface/datasets/issues/4680 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4680/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4680/comments | https://api.github.com/repos/huggingface/datasets/issues/4680/events | https://github.com/huggingface/datasets/issues/4680 | 1,304,534,770 | I_kwDODunzps5NwZ7y | 4,680 | Dataset Viewer issue for codeparrot/xlcost-text-to-code | [] | closed | false | null | 5 | 2022-07-14T09:45:50Z | 2022-07-18T16:37:00Z | 2022-07-18T16:04:36Z | null | ### Link
https://huggingface.co/datasets/codeparrot/xlcost-text-to-code
### Description
Error
```
Server Error
Status code: 400
Exception: TypeError
Message: 'NoneType' object is not iterable
```
Before I did a minor change in the dataset script (removing some comments), the viewer was working but not properely, it wasn't showing the dataset subsets. But the data can be loaded successfully.
Thanks!
### Owner
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/4680/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4680/timeline | null | completed | null | null | false | [
"There seems to be an issue with the `C++-snippet-level` config:\r\n\r\n```python\r\n>>> from datasets import get_dataset_split_names\r\n>>> get_dataset_split_names(\"codeparrot/xlcost-text-to-code\", \"C++-snippet-level\")\r\nTraceback (most recent call last):\r\n File \"/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py\", line 352, in get_dataset_config_info\r\n info.splits = {\r\nTypeError: 'NoneType' object is not iterable\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File \"<stdin>\", line 1, in <module>\r\n File \"/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py\", line 404, in get_dataset_split_names\r\n info = get_dataset_config_info(\r\n File \"/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py\", line 359, in get_dataset_config_info\r\n raise SplitsNotFoundError(\"The split names could not be parsed from the dataset config.\") from err\r\ndatasets.inspect.SplitsNotFoundError: The split names could not be parsed from the dataset config.\r\n```\r\n\r\nI remove the dataset-viewer tag since it's not directly related.\r\n\r\nPinging @huggingface/datasets ",
"Thanks I found that this subset wasn't properly defined the the config, I fixed it. Now I can see the subsets but I get this error for the viewer\r\n````\r\nStatus code: 400\r\nException: Status400Error\r\nMessage: The split cache is empty.\r\n```",
"Yes, the cache is being refreshed, hopefully, it will work in some minutes for all the splits. Some are already here:\r\n\r\nhttps://huggingface.co/datasets/codeparrot/xlcost-text-to-code/viewer/Python-snippet-level/train\r\n\r\n<img width=\"1533\" alt=\"Capture d’écran 2022-07-18 à 12 04 06\" src=\"https://user-images.githubusercontent.com/1676121/179553933-64d874fa-ada9-4b82-900e-082619523c20.png\">\r\n",
"I think all the splits are working as expected now",
"Perfect, thank you!"
] |
https://api.github.com/repos/huggingface/datasets/issues/3767 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3767/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3767/comments | https://api.github.com/repos/huggingface/datasets/issues/3767/events | https://github.com/huggingface/datasets/pull/3767 | 1,146,036,648 | PR_kwDODunzps4zPahh | 3,767 | Expose method and fix param | [] | closed | false | null | 0 | 2022-02-21T16:57:47Z | 2022-02-22T08:35:03Z | 2022-02-22T08:35:02Z | null | A fix + expose a new method, following https://github.com/huggingface/datasets/pull/3670 | {
"+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/3767/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3767/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3767.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3767",
"merged_at": "2022-02-22T08:35:02Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3767.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3767"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/465 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/465/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/465/comments | https://api.github.com/repos/huggingface/datasets/issues/465/events | https://github.com/huggingface/datasets/pull/465 | 669,889,779 | MDExOlB1bGxSZXF1ZXN0NDYwMjEwODYw | 465 | Keep features after transform | [] | closed | false | null | 3 | 2020-07-31T14:43:21Z | 2020-07-31T18:27:33Z | 2020-07-31T18:27:32Z | null | When applying a transform like `map`, some features were lost (and inferred features were used).
It was the case for ClassLabel, Translation, etc.
To fix that, I did some modifications in the `ArrowWriter`:
- added the `update_features` parameter. When it's `True`, then the features specified by the user (if any) can be updated with inferred features if their type don't match. `map` transform sets `update_features=True` when writing to cache file or buffer. Features won't change by default in `map`.
- added the `with_metadata` parameter. If `True`, the `features` (after update) will be written inside the metadata of the schema in this format:
```
{
"huggingface": {"features" : <serialized Features exactly like dataset_info.json>}
}
```
Then, once a dataset is instantiated without info/features, these metadata are used to set the features of the 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/465/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/465/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/465.diff",
"html_url": "https://github.com/huggingface/datasets/pull/465",
"merged_at": "2020-07-31T18:27:32Z",
"patch_url": "https://github.com/huggingface/datasets/pull/465.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/465"
} | true | [
"One note on features inference:\r\n\r\nif an arrow type is `struct of items` where each item is a `list`, then we return a `dict` in which each item is a `Sequence`.\r\nIt means that we don't use the Sequence <-> dict swap when we infer features.\r\n\r\nIt's fine because the swap is generally used in dataset scripts, in which features are defined (inferred features are discarded)",
"If it's fine for you @thomwolf we can merge this one :) ",
"Yes this is fine I think!"
] |
https://api.github.com/repos/huggingface/datasets/issues/1216 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1216/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1216/comments | https://api.github.com/repos/huggingface/datasets/issues/1216/events | https://github.com/huggingface/datasets/pull/1216 | 758,005,982 | MDExOlB1bGxSZXF1ZXN0NTMzMjU0ODE2 | 1,216 | Add limit | [] | closed | false | null | 1 | 2020-12-06T19:46:18Z | 2020-12-08T07:52:11Z | 2020-12-08T07:52:11Z | null | This PR adds [LiMiT](https://github.com/ilmgut/limit_dataset), a dataset for literal motion classification/extraction by [Manotas et al., 2020](https://www.aclweb.org/anthology/2020.findings-emnlp.88.pdf). | {
"+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/1216/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1216/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1216.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1216",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/1216.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1216"
} | true | [
"My bad, didn't see this on the open dataset list. Closing this since it overlaps with PR#1256"
] |
https://api.github.com/repos/huggingface/datasets/issues/28 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/28/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/28/comments | https://api.github.com/repos/huggingface/datasets/issues/28/events | https://github.com/huggingface/datasets/pull/28 | 610,241,907 | MDExOlB1bGxSZXF1ZXN0NDExNzE5MTQy | 28 | [Circle ci] Adds circle ci config | [] | closed | false | null | 0 | 2020-04-30T17:03:35Z | 2020-04-30T19:51:09Z | 2020-04-30T19:51:08Z | null | @thomwolf can you take a look and set up circle ci on:
https://app.circleci.com/projects/project-dashboard/github/huggingface
I think for `nlp` only admins can set it up, which I guess is you :-) | {
"+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/28/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/28/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/28.diff",
"html_url": "https://github.com/huggingface/datasets/pull/28",
"merged_at": "2020-04-30T19:51:08Z",
"patch_url": "https://github.com/huggingface/datasets/pull/28.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/28"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/4939 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4939/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4939/comments | https://api.github.com/repos/huggingface/datasets/issues/4939/events | https://github.com/huggingface/datasets/pull/4939 | 1,363,468,679 | PR_kwDODunzps4-cw4A | 4,939 | Fix NonMatchingChecksumError in adv_glue dataset | [] | closed | false | null | 1 | 2022-09-06T15:31:16Z | 2022-09-06T17:42:10Z | 2022-09-06T17:39:16Z | null | Fix issue reported on the Hub: https://huggingface.co/datasets/adv_glue/discussions/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/4939/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4939/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/4939.diff",
"html_url": "https://github.com/huggingface/datasets/pull/4939",
"merged_at": "2022-09-06T17:39:16Z",
"patch_url": "https://github.com/huggingface/datasets/pull/4939.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/4939"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._"
] |
https://api.github.com/repos/huggingface/datasets/issues/3291 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3291/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3291/comments | https://api.github.com/repos/huggingface/datasets/issues/3291/events | https://github.com/huggingface/datasets/pull/3291 | 1,056,689,876 | PR_kwDODunzps4urikR | 3,291 | Use f-strings in the dataset scripts | [] | closed | false | null | 0 | 2021-11-17T22:20:19Z | 2021-11-22T16:40:16Z | 2021-11-22T16:40:16Z | null | Uses f-strings to format the .py files in the dataset folder | {
"+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/3291/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3291/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3291.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3291",
"merged_at": "2021-11-22T16:40:16Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3291.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3291"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/4911 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4911/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4911/comments | https://api.github.com/repos/huggingface/datasets/issues/4911/events | https://github.com/huggingface/datasets/issues/4911 | 1,354,426,978 | I_kwDODunzps5Quupi | 4,911 | [Tests] Ensure `datasets` supports renamed repositories | [
{
"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 | 1 | 2022-08-29T14:46:14Z | 2022-08-29T15:31:03Z | null | null | On https://hf.co/datasets you can rename a dataset (or sometimes move it to another user/org). The website handles redirections correctly and AFAIK `datasets` does as well.
However it would be nice to have an integration test to make sure we don't break support for renamed datasets.
To implement this we can use the /api/repos/move endpoint on hub-ci to rename/move a repo (it is documented at https://huggingface.co/docs/hub/api) | {
"+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/4911/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4911/timeline | null | null | null | null | false | [
"You could also switch to using `huggingface_hub` more directly, where such a guarantee is already tested =)\r\n\r\ncc @Wauplin "
] |
https://api.github.com/repos/huggingface/datasets/issues/5835 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5835/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5835/comments | https://api.github.com/repos/huggingface/datasets/issues/5835/events | https://github.com/huggingface/datasets/pull/5835 | 1,702,522,620 | PR_kwDODunzps5QHquR | 5,835 | Always set nullable fields in the writer | [] | closed | false | null | 4 | 2023-05-09T18:16:59Z | 2023-05-23T16:10:29Z | 2023-05-19T13:04:30Z | null | This fixes loading of e.g. parquet data with non-nullable fields.
Indeed `datasets.Features` doesn't support non-nullable fields, which can lead to data not concatenable due to arrow schema mismatch. | {
"+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/5835/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5835/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/5835.diff",
"html_url": "https://github.com/huggingface/datasets/pull/5835",
"merged_at": "2023-05-19T13:04:30Z",
"patch_url": "https://github.com/huggingface/datasets/pull/5835.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/5835"
} | 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.006640 / 0.011353 (-0.004713) | 0.004606 / 0.011008 (-0.006402) | 0.098870 / 0.038508 (0.060362) | 0.028201 / 0.023109 (0.005092) | 0.304396 / 0.275898 (0.028498) | 0.339804 / 0.323480 (0.016324) | 0.005011 / 0.007986 (-0.002974) | 0.003530 / 0.004328 (-0.000799) | 0.075223 / 0.004250 (0.070973) | 0.037922 / 0.037052 (0.000870) | 0.310273 / 0.258489 (0.051784) | 0.348324 / 0.293841 (0.054483) | 0.030181 / 0.128546 (-0.098365) | 0.011584 / 0.075646 (-0.064062) | 0.322637 / 0.419271 (-0.096635) | 0.043119 / 0.043533 (-0.000414) | 0.314514 / 0.255139 (0.059375) | 0.334384 / 0.283200 (0.051185) | 0.092551 / 0.141683 (-0.049132) | 1.496694 / 1.452155 (0.044539) | 1.555426 / 1.492716 (0.062710) |\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.205078 / 0.018006 (0.187072) | 0.399200 / 0.000490 (0.398710) | 0.004881 / 0.000200 (0.004681) | 0.000200 / 0.000054 (0.000146) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.025042 / 0.037411 (-0.012369) | 0.101501 / 0.014526 (0.086975) | 0.107430 / 0.176557 (-0.069127) | 0.170107 / 0.737135 (-0.567028) | 0.111253 / 0.296338 (-0.185086) |\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.460358 / 0.215209 (0.245149) | 4.592037 / 2.077655 (2.514383) | 2.222612 / 1.504120 (0.718493) | 2.022804 / 1.541195 (0.481610) | 2.040824 / 1.468490 (0.572334) | 0.700485 / 4.584777 (-3.884292) | 3.427847 / 3.745712 (-0.317866) | 2.836916 / 5.269862 (-2.432946) | 1.505055 / 4.565676 (-3.060621) | 0.083206 / 0.424275 (-0.341069) | 0.046492 / 0.007607 (0.038885) | 0.555562 / 0.226044 (0.329518) | 5.563574 / 2.268929 (3.294645) | 2.635273 / 55.444624 (-52.809351) | 2.299377 / 6.876477 (-4.577100) | 2.394512 / 2.142072 (0.252440) | 0.809541 / 4.805227 (-3.995686) | 0.151814 / 6.500664 (-6.348850) | 0.067241 / 0.075469 (-0.008228) |\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.188396 / 1.841788 (-0.653392) | 13.714596 / 8.074308 (5.640288) | 14.076906 / 10.191392 (3.885514) | 0.143447 / 0.680424 (-0.536977) | 0.016514 / 0.534201 (-0.517687) | 0.383075 / 0.579283 (-0.196209) | 0.386997 / 0.434364 (-0.047367) | 0.441941 / 0.540337 (-0.098396) | 0.522145 / 1.386936 (-0.864791) |\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.006266 / 0.011353 (-0.005086) | 0.004562 / 0.011008 (-0.006446) | 0.077472 / 0.038508 (0.038964) | 0.027596 / 0.023109 (0.004486) | 0.400498 / 0.275898 (0.124600) | 0.406728 / 0.323480 (0.083248) | 0.004745 / 0.007986 (-0.003241) | 0.003375 / 0.004328 (-0.000954) | 0.076645 / 0.004250 (0.072394) | 0.037756 / 0.037052 (0.000703) | 0.415183 / 0.258489 (0.156694) | 0.413758 / 0.293841 (0.119917) | 0.030624 / 0.128546 (-0.097922) | 0.011525 / 0.075646 (-0.064121) | 0.086033 / 0.419271 (-0.333238) | 0.039307 / 0.043533 (-0.004226) | 0.418192 / 0.255139 (0.163053) | 0.403152 / 0.283200 (0.119952) | 0.094141 / 0.141683 (-0.047542) | 1.459012 / 1.452155 (0.006857) | 1.546493 / 1.492716 (0.053777) |\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.239494 / 0.018006 (0.221488) | 0.420918 / 0.000490 (0.420428) | 0.000411 / 0.000200 (0.000211) | 0.000057 / 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.024525 / 0.037411 (-0.012886) | 0.099793 / 0.014526 (0.085267) | 0.105888 / 0.176557 (-0.070669) | 0.155912 / 0.737135 (-0.581223) | 0.109937 / 0.296338 (-0.186401) |\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.470108 / 0.215209 (0.254899) | 4.696390 / 2.077655 (2.618735) | 2.467841 / 1.504120 (0.963721) | 2.275012 / 1.541195 (0.733818) | 2.430736 / 1.468490 (0.962245) | 0.700442 / 4.584777 (-3.884335) | 3.458451 / 3.745712 (-0.287261) | 1.921120 / 5.269862 (-3.348742) | 1.183292 / 4.565676 (-3.382384) | 0.083985 / 0.424275 (-0.340290) | 0.012510 / 0.007607 (0.004903) | 0.589066 / 0.226044 (0.363022) | 5.896070 / 2.268929 (3.627141) | 2.935379 / 55.444624 (-52.509245) | 2.599524 / 6.876477 (-4.276953) | 2.663426 / 2.142072 (0.521354) | 0.812096 / 4.805227 (-3.993131) | 0.152559 / 6.500664 (-6.348105) | 0.066906 / 0.075469 (-0.008563) |\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.333341 / 1.841788 (-0.508446) | 14.441667 / 8.074308 (6.367359) | 14.754069 / 10.191392 (4.562677) | 0.155707 / 0.680424 (-0.524716) | 0.016983 / 0.534201 (-0.517218) | 0.389386 / 0.579283 (-0.189897) | 0.394106 / 0.434364 (-0.040258) | 0.447355 / 0.540337 (-0.092982) | 0.533142 / 1.386936 (-0.853794) |\n\n</details>\n</details>\n\n\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.007801 / 0.011353 (-0.003552) | 0.004884 / 0.011008 (-0.006124) | 0.114754 / 0.038508 (0.076245) | 0.040427 / 0.023109 (0.017318) | 0.402064 / 0.275898 (0.126166) | 0.428830 / 0.323480 (0.105350) | 0.006429 / 0.007986 (-0.001556) | 0.004394 / 0.004328 (0.000066) | 0.087681 / 0.004250 (0.083431) | 0.053684 / 0.037052 (0.016632) | 0.399967 / 0.258489 (0.141478) | 0.445298 / 0.293841 (0.151457) | 0.033194 / 0.128546 (-0.095352) | 0.010288 / 0.075646 (-0.065359) | 0.390719 / 0.419271 (-0.028552) | 0.059311 / 0.043533 (0.015778) | 0.393651 / 0.255139 (0.138512) | 0.418395 / 0.283200 (0.135196) | 0.121494 / 0.141683 (-0.020189) | 1.735470 / 1.452155 (0.283315) | 1.820485 / 1.492716 (0.327769) |\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.012887 / 0.018006 (-0.005119) | 0.491652 / 0.000490 (0.491162) | 0.005481 / 0.000200 (0.005281) | 0.000127 / 0.000054 (0.000073) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.030931 / 0.037411 (-0.006480) | 0.125212 / 0.014526 (0.110686) | 0.136004 / 0.176557 (-0.040552) | 0.201686 / 0.737135 (-0.535449) | 0.140181 / 0.296338 (-0.156157) |\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.475003 / 0.215209 (0.259794) | 4.743918 / 2.077655 (2.666263) | 2.149422 / 1.504120 (0.645302) | 1.925016 / 1.541195 (0.383821) | 2.061441 / 1.468490 (0.592951) | 0.619845 / 4.584777 (-3.964932) | 4.534691 / 3.745712 (0.788979) | 2.248198 / 5.269862 (-3.021664) | 1.409868 / 4.565676 (-3.155808) | 0.080265 / 0.424275 (-0.344010) | 0.014455 / 0.007607 (0.006848) | 0.597810 / 0.226044 (0.371765) | 5.845492 / 2.268929 (3.576564) | 2.729139 / 55.444624 (-52.715486) | 2.313879 / 6.876477 (-4.562598) | 2.418763 / 2.142072 (0.276690) | 0.748687 / 4.805227 (-4.056540) | 0.165278 / 6.500664 (-6.335387) | 0.076848 / 0.075469 (0.001379) |\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.416349 / 1.841788 (-0.425439) | 17.440903 / 8.074308 (9.366595) | 17.025733 / 10.191392 (6.834341) | 0.167428 / 0.680424 (-0.512995) | 0.020484 / 0.534201 (-0.513717) | 0.470273 / 0.579283 (-0.109010) | 0.494380 / 0.434364 (0.060016) | 0.566131 / 0.540337 (0.025794) | 0.690444 / 1.386936 (-0.696492) |\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.007695 / 0.011353 (-0.003657) | 0.005551 / 0.011008 (-0.005457) | 0.087812 / 0.038508 (0.049304) | 0.039107 / 0.023109 (0.015998) | 0.436461 / 0.275898 (0.160563) | 0.465116 / 0.323480 (0.141636) | 0.006590 / 0.007986 (-0.001396) | 0.004672 / 0.004328 (0.000343) | 0.087109 / 0.004250 (0.082858) | 0.054227 / 0.037052 (0.017175) | 0.442660 / 0.258489 (0.184171) | 0.484296 / 0.293841 (0.190455) | 0.033308 / 0.128546 (-0.095238) | 0.010780 / 0.075646 (-0.064866) | 0.095255 / 0.419271 (-0.324016) | 0.054399 / 0.043533 (0.010866) | 0.431734 / 0.255139 (0.176595) | 0.453583 / 0.283200 (0.170383) | 0.116067 / 0.141683 (-0.025616) | 1.780701 / 1.452155 (0.328546) | 1.851077 / 1.492716 (0.358360) |\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.228000 / 0.018006 (0.209994) | 0.485733 / 0.000490 (0.485243) | 0.003955 / 0.000200 (0.003755) | 0.000109 / 0.000054 (0.000054) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.033974 / 0.037411 (-0.003437) | 0.134504 / 0.014526 (0.119978) | 0.144421 / 0.176557 (-0.032135) | 0.202171 / 0.737135 (-0.534964) | 0.152015 / 0.296338 (-0.144323) |\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.520462 / 0.215209 (0.305253) | 5.233339 / 2.077655 (3.155684) | 2.575013 / 1.504120 (1.070893) | 2.384119 / 1.541195 (0.842924) | 2.403856 / 1.468490 (0.935366) | 0.618656 / 4.584777 (-3.966121) | 4.663582 / 3.745712 (0.917870) | 3.738594 / 5.269862 (-1.531268) | 1.794903 / 4.565676 (-2.770773) | 0.077903 / 0.424275 (-0.346372) | 0.014681 / 0.007607 (0.007074) | 0.648615 / 0.226044 (0.422570) | 6.503721 / 2.268929 (4.234792) | 3.326239 / 55.444624 (-52.118386) | 2.989791 / 6.876477 (-3.886685) | 2.995479 / 2.142072 (0.853407) | 0.765483 / 4.805227 (-4.039744) | 0.169783 / 6.500664 (-6.330882) | 0.077533 / 0.075469 (0.002064) |\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.518736 / 1.841788 (-0.323051) | 17.989119 / 8.074308 (9.914811) | 15.484365 / 10.191392 (5.292973) | 0.168507 / 0.680424 (-0.511917) | 0.020289 / 0.534201 (-0.513912) | 0.467491 / 0.579283 (-0.111793) | 0.501714 / 0.434364 (0.067350) | 0.553418 / 0.540337 (0.013081) | 0.662199 / 1.386936 (-0.724737) |\n\n</details>\n</details>\n\n\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.007044 / 0.011353 (-0.004309) | 0.004750 / 0.011008 (-0.006258) | 0.096694 / 0.038508 (0.058186) | 0.035682 / 0.023109 (0.012573) | 0.300613 / 0.275898 (0.024715) | 0.334831 / 0.323480 (0.011351) | 0.006428 / 0.007986 (-0.001558) | 0.004456 / 0.004328 (0.000128) | 0.075060 / 0.004250 (0.070810) | 0.053166 / 0.037052 (0.016114) | 0.299601 / 0.258489 (0.041112) | 0.359521 / 0.293841 (0.065680) | 0.028072 / 0.128546 (-0.100474) | 0.009216 / 0.075646 (-0.066430) | 0.328895 / 0.419271 (-0.090377) | 0.050881 / 0.043533 (0.007349) | 0.298265 / 0.255139 (0.043126) | 0.318095 / 0.283200 (0.034896) | 0.116046 / 0.141683 (-0.025637) | 1.491312 / 1.452155 (0.039157) | 1.556053 / 1.492716 (0.063337) |\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.014248 / 0.018006 (-0.003758) | 0.551455 / 0.000490 (0.550965) | 0.006096 / 0.000200 (0.005897) | 0.000145 / 0.000054 (0.000091) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.030598 / 0.037411 (-0.006813) | 0.109549 / 0.014526 (0.095023) | 0.123207 / 0.176557 (-0.053350) | 0.181940 / 0.737135 (-0.555195) | 0.128965 / 0.296338 (-0.167374) |\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.404552 / 0.215209 (0.189343) | 4.030674 / 2.077655 (1.953020) | 1.841819 / 1.504120 (0.337699) | 1.650055 / 1.541195 (0.108860) | 1.763208 / 1.468490 (0.294718) | 0.532715 / 4.584777 (-4.052062) | 3.774810 / 3.745712 (0.029098) | 3.221927 / 5.269862 (-2.047934) | 1.607974 / 4.565676 (-2.957702) | 0.067160 / 0.424275 (-0.357116) | 0.012479 / 0.007607 (0.004872) | 0.498801 / 0.226044 (0.272757) | 4.980567 / 2.268929 (2.711638) | 2.356017 / 55.444624 (-53.088608) | 2.018975 / 6.876477 (-4.857502) | 2.218343 / 2.142072 (0.076270) | 0.645714 / 4.805227 (-4.159514) | 0.145470 / 6.500664 (-6.355195) | 0.065666 / 0.075469 (-0.009803) |\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.205756 / 1.841788 (-0.636031) | 15.682779 / 8.074308 (7.608470) | 14.748987 / 10.191392 (4.557595) | 0.167105 / 0.680424 (-0.513319) | 0.017554 / 0.534201 (-0.516647) | 0.393924 / 0.579283 (-0.185359) | 0.432659 / 0.434364 (-0.001705) | 0.502033 / 0.540337 (-0.038304) | 0.602244 / 1.386936 (-0.784692) |\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.007077 / 0.011353 (-0.004276) | 0.004911 / 0.011008 (-0.006097) | 0.075120 / 0.038508 (0.036612) | 0.035460 / 0.023109 (0.012351) | 0.362569 / 0.275898 (0.086671) | 0.398995 / 0.323480 (0.075515) | 0.006587 / 0.007986 (-0.001398) | 0.004571 / 0.004328 (0.000242) | 0.074647 / 0.004250 (0.070397) | 0.057331 / 0.037052 (0.020279) | 0.365123 / 0.258489 (0.106634) | 0.408617 / 0.293841 (0.114776) | 0.028911 / 0.128546 (-0.099635) | 0.009533 / 0.075646 (-0.066113) | 0.081566 / 0.419271 (-0.337705) | 0.048841 / 0.043533 (0.005308) | 0.367245 / 0.255139 (0.112106) | 0.375975 / 0.283200 (0.092776) | 0.123211 / 0.141683 (-0.018472) | 1.471588 / 1.452155 (0.019433) | 1.569342 / 1.492716 (0.076625) |\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.328443 / 0.018006 (0.310436) | 0.541402 / 0.000490 (0.540912) | 0.000440 / 0.000200 (0.000240) | 0.000058 / 0.000054 (0.000004) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.030772 / 0.037411 (-0.006639) | 0.115833 / 0.014526 (0.101307) | 0.127837 / 0.176557 (-0.048719) | 0.180897 / 0.737135 (-0.556238) | 0.132458 / 0.296338 (-0.163881) |\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.445979 / 0.215209 (0.230770) | 4.453101 / 2.077655 (2.375447) | 2.276625 / 1.504120 (0.772505) | 2.102167 / 1.541195 (0.560972) | 2.181583 / 1.468490 (0.713093) | 0.525069 / 4.584777 (-4.059708) | 3.803446 / 3.745712 (0.057734) | 1.954173 / 5.269862 (-3.315688) | 1.088734 / 4.565676 (-3.476942) | 0.066020 / 0.424275 (-0.358255) | 0.012158 / 0.007607 (0.004551) | 0.546828 / 0.226044 (0.320783) | 5.454060 / 2.268929 (3.185132) | 2.756154 / 55.444624 (-52.688470) | 2.476501 / 6.876477 (-4.399976) | 2.525875 / 2.142072 (0.383803) | 0.647515 / 4.805227 (-4.157712) | 0.144511 / 6.500664 (-6.356153) | 0.067060 / 0.075469 (-0.008409) |\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.306456 / 1.841788 (-0.535332) | 15.822623 / 8.074308 (7.748315) | 14.929114 / 10.191392 (4.737721) | 0.168650 / 0.680424 (-0.511773) | 0.018043 / 0.534201 (-0.516158) | 0.396712 / 0.579283 (-0.182572) | 0.425800 / 0.434364 (-0.008564) | 0.466452 / 0.540337 (-0.073885) | 0.564370 / 1.386936 (-0.822566) |\n\n</details>\n</details>\n\n\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/463 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/463/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/463/comments | https://api.github.com/repos/huggingface/datasets/issues/463/events | https://github.com/huggingface/datasets/pull/463 | 669,735,455 | MDExOlB1bGxSZXF1ZXN0NDYwMDcyNjQ1 | 463 | Add dataset/mlsum | [] | closed | false | null | 3 | 2020-07-31T11:50:52Z | 2020-08-24T14:54:42Z | 2020-08-24T14:54:42Z | null | New pull request that should correct the previous errors.
The load_real_data stills fails because it is looking for a default dataset URL that does not exists, this does not happen when loading the dataset with load_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/463/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/463/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/463.diff",
"html_url": "https://github.com/huggingface/datasets/pull/463",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/463.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/463"
} | true | [
"I think the problem is related to `wiki_dpr` dataset which is making the circle CI failed as you can see:\r\n```\r\nFAILED tests/test_dataset_common.py::AWSDatasetTest::test_load_dataset_wiki_dpr\r\nFAILED tests/test_hf_gcp.py::TestDatasetOnHfGcp::test_script_synced_with_s3_wiki_dpr/dummy_psgs_w100_no_embeddings\r\nFAILED tests/test_hf_gcp.py::TestDatasetOnHfGcp::test_script_synced_with_s3_wiki_dpr/dummy_psgs_w100_with_nq_embeddings\r\nFAILED tests/test_hf_gcp.py::TestDatasetOnHfGcp::test_script_synced_with_s3_wiki_dpr/psgs_w100_no_embeddings\r\nFAILED tests/test_hf_gcp.py::TestDatasetOnHfGcp::test_script_synced_with_s3_wiki_dpr/psgs_w100_with_nq_embeddings\r\n\r\n```\r\nI'm facing the same issues with my last commits, I tried to rebase from master but it still not working. Maybe @lhoestq can help with.",
"Hello, I am confused about the next steps I need to do. Did the forced merge solve the issue ?",
"Hello :)\r\nI think you can just rebase from master and it should solve the CI error"
] |
https://api.github.com/repos/huggingface/datasets/issues/5583 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5583/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5583/comments | https://api.github.com/repos/huggingface/datasets/issues/5583/events | https://github.com/huggingface/datasets/pull/5583 | 1,601,583,625 | PR_kwDODunzps5K2mIz | 5,583 | Do no write index by default when exporting a dataset | [] | closed | false | null | 3 | 2023-02-27T17:04:46Z | 2023-02-28T13:52:15Z | 2023-02-28T13:44:04Z | null | Ensures all the writers that use Pandas for conversion (JSON, CSV, SQL) do not export `index` by default (https://github.com/huggingface/datasets/pull/5490 only did this for CSV) | {
"+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/5583/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5583/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/5583.diff",
"html_url": "https://github.com/huggingface/datasets/pull/5583",
"merged_at": "2023-02-28T13:44:04Z",
"patch_url": "https://github.com/huggingface/datasets/pull/5583.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/5583"
} | 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.009044 / 0.011353 (-0.002309) | 0.004244 / 0.011008 (-0.006765) | 0.106705 / 0.038508 (0.068197) | 0.029779 / 0.023109 (0.006670) | 0.289684 / 0.275898 (0.013786) | 0.347100 / 0.323480 (0.023620) | 0.007071 / 0.007986 (-0.000915) | 0.003734 / 0.004328 (-0.000595) | 0.077971 / 0.004250 (0.073720) | 0.035323 / 0.037052 (-0.001730) | 0.334520 / 0.258489 (0.076031) | 0.375804 / 0.293841 (0.081964) | 0.049211 / 0.128546 (-0.079335) | 0.016992 / 0.075646 (-0.058654) | 0.337208 / 0.419271 (-0.082064) | 0.053700 / 0.043533 (0.010167) | 0.295750 / 0.255139 (0.040611) | 0.330157 / 0.283200 (0.046958) | 0.097017 / 0.141683 (-0.044666) | 1.379353 / 1.452155 (-0.072802) | 1.402670 / 1.492716 (-0.090047) |\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.012685 / 0.018006 (-0.005321) | 0.474541 / 0.000490 (0.474051) | 0.006752 / 0.000200 (0.006552) | 0.000097 / 0.000054 (0.000042) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.025735 / 0.037411 (-0.011676) | 0.092507 / 0.014526 (0.077982) | 0.100275 / 0.176557 (-0.076281) | 0.180359 / 0.737135 (-0.556777) | 0.104312 / 0.296338 (-0.192026) |\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.456558 / 0.215209 (0.241349) | 4.786667 / 2.077655 (2.709012) | 1.873169 / 1.504120 (0.369050) | 1.640935 / 1.541195 (0.099741) | 1.614543 / 1.468490 (0.146053) | 0.936144 / 4.584777 (-3.648633) | 4.699886 / 3.745712 (0.954174) | 2.398545 / 5.269862 (-2.871317) | 1.642808 / 4.565676 (-2.922868) | 0.124803 / 0.424275 (-0.299472) | 0.011848 / 0.007607 (0.004241) | 0.631684 / 0.226044 (0.405639) | 6.096052 / 2.268929 (3.827124) | 2.463052 / 55.444624 (-52.981572) | 1.928551 / 6.876477 (-4.947926) | 1.927790 / 2.142072 (-0.214283) | 1.098912 / 4.805227 (-3.706315) | 0.196343 / 6.500664 (-6.304321) | 0.063296 / 0.075469 (-0.012173) |\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.255032 / 1.841788 (-0.586755) | 13.853623 / 8.074308 (5.779315) | 16.303280 / 10.191392 (6.111888) | 0.227287 / 0.680424 (-0.453137) | 0.037527 / 0.534201 (-0.496674) | 0.449345 / 0.579283 (-0.129938) | 0.522054 / 0.434364 (0.087690) | 0.552848 / 0.540337 (0.012511) | 0.642994 / 1.386936 (-0.743942) |\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.008470 / 0.011353 (-0.002883) | 0.005167 / 0.011008 (-0.005841) | 0.077794 / 0.038508 (0.039286) | 0.029228 / 0.023109 (0.006119) | 0.340828 / 0.275898 (0.064930) | 0.400170 / 0.323480 (0.076691) | 0.005485 / 0.007986 (-0.002500) | 0.003854 / 0.004328 (-0.000475) | 0.077597 / 0.004250 (0.073346) | 0.036519 / 0.037052 (-0.000533) | 0.335522 / 0.258489 (0.077033) | 0.412622 / 0.293841 (0.118781) | 0.044587 / 0.128546 (-0.083959) | 0.016024 / 0.075646 (-0.059623) | 0.092312 / 0.419271 (-0.326960) | 0.055660 / 0.043533 (0.012127) | 0.343140 / 0.255139 (0.088001) | 0.386403 / 0.283200 (0.103203) | 0.098634 / 0.141683 (-0.043049) | 1.326126 / 1.452155 (-0.126029) | 1.430316 / 1.492716 (-0.062400) |\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.222807 / 0.018006 (0.204801) | 0.473622 / 0.000490 (0.473132) | 0.000376 / 0.000200 (0.000176) | 0.000066 / 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.024599 / 0.037411 (-0.012813) | 0.100743 / 0.014526 (0.086217) | 0.112086 / 0.176557 (-0.064471) | 0.198294 / 0.737135 (-0.538842) | 0.111210 / 0.296338 (-0.185129) |\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.494120 / 0.215209 (0.278911) | 5.117958 / 2.077655 (3.040303) | 2.305131 / 1.504120 (0.801011) | 2.015591 / 1.541195 (0.474396) | 2.027284 / 1.468490 (0.558794) | 1.014241 / 4.584777 (-3.570536) | 4.738836 / 3.745712 (0.993124) | 2.519718 / 5.269862 (-2.750143) | 1.706379 / 4.565676 (-2.859298) | 0.122452 / 0.424275 (-0.301824) | 0.011500 / 0.007607 (0.003893) | 0.632864 / 0.226044 (0.406820) | 6.295457 / 2.268929 (4.026529) | 2.824897 / 55.444624 (-52.619727) | 2.324359 / 6.876477 (-4.552117) | 2.281046 / 2.142072 (0.138974) | 1.173570 / 4.805227 (-3.631657) | 0.197195 / 6.500664 (-6.303469) | 0.064845 / 0.075469 (-0.010624) |\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.273224 / 1.841788 (-0.568563) | 14.531155 / 8.074308 (6.456847) | 15.892176 / 10.191392 (5.700784) | 0.208051 / 0.680424 (-0.472373) | 0.023119 / 0.534201 (-0.511082) | 0.422317 / 0.579283 (-0.156966) | 0.519946 / 0.434364 (0.085582) | 0.544517 / 0.540337 (0.004179) | 0.605955 / 1.386936 (-0.780981) |\n\n</details>\n</details>\n\n\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.010806 / 0.011353 (-0.000547) | 0.005631 / 0.011008 (-0.005378) | 0.113166 / 0.038508 (0.074657) | 0.042980 / 0.023109 (0.019871) | 0.344856 / 0.275898 (0.068958) | 0.404417 / 0.323480 (0.080938) | 0.012222 / 0.007986 (0.004236) | 0.004470 / 0.004328 (0.000141) | 0.088072 / 0.004250 (0.083822) | 0.049815 / 0.037052 (0.012763) | 0.366532 / 0.258489 (0.108043) | 0.392558 / 0.293841 (0.098717) | 0.045411 / 0.128546 (-0.083135) | 0.014118 / 0.075646 (-0.061529) | 0.392894 / 0.419271 (-0.026378) | 0.067713 / 0.043533 (0.024181) | 0.353013 / 0.255139 (0.097874) | 0.378375 / 0.283200 (0.095175) | 0.123686 / 0.141683 (-0.017996) | 1.665272 / 1.452155 (0.213118) | 1.748383 / 1.492716 (0.255667) |\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.011672 / 0.018006 (-0.006335) | 0.481667 / 0.000490 (0.481178) | 0.003644 / 0.000200 (0.003444) | 0.000092 / 0.000054 (0.000037) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.030436 / 0.037411 (-0.006976) | 0.122577 / 0.014526 (0.108052) | 0.135409 / 0.176557 (-0.041148) | 0.220385 / 0.737135 (-0.516750) | 0.143140 / 0.296338 (-0.153199) |\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.471146 / 0.215209 (0.255937) | 4.645023 / 2.077655 (2.567368) | 2.126783 / 1.504120 (0.622663) | 1.907905 / 1.541195 (0.366710) | 1.969561 / 1.468490 (0.501071) | 0.798670 / 4.584777 (-3.786107) | 4.394787 / 3.745712 (0.649075) | 2.353535 / 5.269862 (-2.916327) | 1.501013 / 4.565676 (-3.064664) | 0.097472 / 0.424275 (-0.326803) | 0.014015 / 0.007607 (0.006408) | 0.589365 / 0.226044 (0.363320) | 5.897331 / 2.268929 (3.628402) | 2.656198 / 55.444624 (-52.788427) | 2.256082 / 6.876477 (-4.620395) | 2.271122 / 2.142072 (0.129050) | 0.961566 / 4.805227 (-3.843661) | 0.188303 / 6.500664 (-6.312361) | 0.073258 / 0.075469 (-0.002211) |\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.445266 / 1.841788 (-0.396522) | 16.876710 / 8.074308 (8.802402) | 16.004287 / 10.191392 (5.812895) | 0.212252 / 0.680424 (-0.468172) | 0.033186 / 0.534201 (-0.501015) | 0.520564 / 0.579283 (-0.058719) | 0.516865 / 0.434364 (0.082501) | 0.638482 / 0.540337 (0.098144) | 0.761959 / 1.386936 (-0.624977) |\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.008101 / 0.011353 (-0.003252) | 0.005512 / 0.011008 (-0.005497) | 0.086138 / 0.038508 (0.047630) | 0.038605 / 0.023109 (0.015496) | 0.413082 / 0.275898 (0.137184) | 0.444016 / 0.323480 (0.120536) | 0.006196 / 0.007986 (-0.001790) | 0.005736 / 0.004328 (0.001408) | 0.086938 / 0.004250 (0.082688) | 0.052307 / 0.037052 (0.015255) | 0.415206 / 0.258489 (0.156717) | 0.481510 / 0.293841 (0.187669) | 0.041469 / 0.128546 (-0.087077) | 0.013481 / 0.075646 (-0.062165) | 0.101528 / 0.419271 (-0.317744) | 0.056507 / 0.043533 (0.012974) | 0.418166 / 0.255139 (0.163027) | 0.443834 / 0.283200 (0.160634) | 0.116434 / 0.141683 (-0.025249) | 1.651223 / 1.452155 (0.199068) | 1.746429 / 1.492716 (0.253713) |\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.242381 / 0.018006 (0.224375) | 0.478826 / 0.000490 (0.478337) | 0.000463 / 0.000200 (0.000264) | 0.000067 / 0.000054 (0.000013) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.031743 / 0.037411 (-0.005668) | 0.126141 / 0.014526 (0.111616) | 0.134539 / 0.176557 (-0.042018) | 0.216546 / 0.737135 (-0.520590) | 0.143513 / 0.296338 (-0.152825) |\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.486915 / 0.215209 (0.271706) | 4.833812 / 2.077655 (2.756158) | 2.317785 / 1.504120 (0.813666) | 2.114181 / 1.541195 (0.572986) | 2.153896 / 1.468490 (0.685406) | 0.797490 / 4.584777 (-3.787287) | 4.369950 / 3.745712 (0.624238) | 2.305492 / 5.269862 (-2.964370) | 1.488860 / 4.565676 (-3.076816) | 0.098071 / 0.424275 (-0.326204) | 0.014129 / 0.007607 (0.006522) | 0.611311 / 0.226044 (0.385266) | 6.087482 / 2.268929 (3.818554) | 2.837676 / 55.444624 (-52.606948) | 2.451819 / 6.876477 (-4.424657) | 2.456763 / 2.142072 (0.314690) | 0.957637 / 4.805227 (-3.847590) | 0.190974 / 6.500664 (-6.309690) | 0.074497 / 0.075469 (-0.000972) |\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.466214 / 1.841788 (-0.375574) | 17.063925 / 8.074308 (8.989617) | 14.630326 / 10.191392 (4.438934) | 0.170570 / 0.680424 (-0.509854) | 0.023794 / 0.534201 (-0.510407) | 0.509175 / 0.579283 (-0.070108) | 0.506485 / 0.434364 (0.072121) | 0.616965 / 0.540337 (0.076628) | 0.718176 / 1.386936 (-0.668760) |\n\n</details>\n</details>\n\n\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/1556 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1556/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1556/comments | https://api.github.com/repos/huggingface/datasets/issues/1556/events | https://github.com/huggingface/datasets/pull/1556 | 765,689,730 | MDExOlB1bGxSZXF1ZXN0NTM5MDM2OTYz | 1,556 | add bswac | [] | closed | false | null | 1 | 2020-12-13T22:55:35Z | 2020-12-18T15:14:28Z | 2020-12-18T15:14:27Z | 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/1556/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1556/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1556.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1556",
"merged_at": "2020-12-18T15:14:27Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1556.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1556"
} | true | [
"merging since the CI is fixed on master"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/696 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/696/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/696/comments | https://api.github.com/repos/huggingface/datasets/issues/696/events | https://github.com/huggingface/datasets/pull/696 | 712,942,977 | MDExOlB1bGxSZXF1ZXN0NDk2MzQzMjEy | 696 | Elasticsearch index docs | [] | closed | false | null | 0 | 2020-10-01T15:18:58Z | 2020-10-02T07:48:19Z | 2020-10-02T07:48:18Z | null | I added the docs for ES indexes.
I also added a `load_elasticsearch_index` method to load an index that has already been built.
I checked the tests for the ES index and we have tests that mock ElasticSearch.
I think this is good for now but at some point it would be cool to have an end-to-end test with a real ES running. | {
"+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/696/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/696/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/696.diff",
"html_url": "https://github.com/huggingface/datasets/pull/696",
"merged_at": "2020-10-02T07:48:18Z",
"patch_url": "https://github.com/huggingface/datasets/pull/696.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/696"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/3003 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3003/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3003/comments | https://api.github.com/repos/huggingface/datasets/issues/3003/events | https://github.com/huggingface/datasets/pull/3003 | 1,014,137,933 | PR_kwDODunzps4smExP | 3,003 | common_language: Fix license in README.md | [] | closed | false | null | 0 | 2021-10-02T18:47:37Z | 2021-10-04T09:27:01Z | 2021-10-04T09:27:01Z | null | ...it's correct elsewhere | {
"+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/3003/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3003/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3003.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3003",
"merged_at": "2021-10-04T09:27:01Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3003.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3003"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/289 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/289/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/289/comments | https://api.github.com/repos/huggingface/datasets/issues/289/events | https://github.com/huggingface/datasets/pull/289 | 641,934,194 | MDExOlB1bGxSZXF1ZXN0NDM3MDc0MTM3 | 289 | update xsum | [] | closed | false | null | 3 | 2020-06-19T12:28:32Z | 2020-06-22T13:27:26Z | 2020-06-22T07:20:07Z | null | This PR makes the following update to the xsum dataset:
- Manual download is not required anymore
- dataset can be loaded as follow: `nlp.load_dataset('xsum')`
**Important**
Instead of using on outdated url to download the data: "https://raw.githubusercontent.com/EdinburghNLP/XSum/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json"
a more up-to-date url stored here: https://s3.amazonaws.com/datasets.huggingface.co/summarization/xsum.tar.gz is used
, so that the user does not need to manually download the data anymore.
There might be slight breaking changes here for xsum. | {
"+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/289/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/289/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/289.diff",
"html_url": "https://github.com/huggingface/datasets/pull/289",
"merged_at": "2020-06-22T07:20:07Z",
"patch_url": "https://github.com/huggingface/datasets/pull/289.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/289"
} | true | [
"Looks cool!\r\n@mariamabarham can you add a detailed description here what exactly is changed and how the user can load xsum now?",
"And a rebase should solve the conflicts",
"This is a super useful PR :-) @sshleifer - maybe you can take a look at the updated version of xsum if you can use it for your use case. Now, one should be able to just load it with:\r\n\r\n```python \r\nnlp.load_datasets(\"xsum\", ....) # no manual dir required anymore\r\n```\r\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/2742 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2742/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2742/comments | https://api.github.com/repos/huggingface/datasets/issues/2742/events | https://github.com/huggingface/datasets/issues/2742 | 958,114,064 | MDU6SXNzdWU5NTgxMTQwNjQ= | 2,742 | Improve detection of streamable file types | [
{
"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": "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-08-02T12:55:09Z | 2021-11-12T17:18:10Z | 2021-11-12T17:18:10Z | null | **Is your feature request related to a problem? Please describe.**
```python
from datasets import load_dataset_builder
from datasets.utils.streaming_download_manager import StreamingDownloadManager
builder = load_dataset_builder("journalists_questions", name="plain_text")
builder._split_generators(StreamingDownloadManager(base_path=builder.base_path))
```
raises
```
NotImplementedError: Extraction protocol for file at https://drive.google.com/uc?export=download&id=1CBrh-9OrSpKmPQBxTK_ji6mq6WTN_U9U is not implemented yet
```
But the file at https://drive.google.com/uc?export=download&id=1CBrh-9OrSpKmPQBxTK_ji6mq6WTN_U9U is a text file and it can be streamed:
```bash
curl --header "Range: bytes=0-100" -L https://drive.google.com/uc\?export\=download\&id\=1CBrh-9OrSpKmPQBxTK_ji6mq6WTN_U9U
506938088174940160 yes 1
302221719412830209 yes 1
289761704907268096 yes 1
513820885032378369 yes %
```
Yet, it's wrongly categorized as a file type that cannot be streamed because the test is currently based on 1. the presence of a file extension at the end of the URL (here: no extension), and 2. the inclusion of this extension in a list of supported formats.
**Describe the solution you'd like**
In the case of an URL (instead of a local path), ask for the MIME type, and decide on that value? Note that it would not work in that case, because the value of `content_type` is `text/html; charset=UTF-8`.
**Describe alternatives you've considered**
Add a variable in the dataset script to set the data format by hand.
| {
"+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/2742/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2742/timeline | null | completed | null | null | false | [
"maybe we should rather attempt to download a `Range` from the server and see if it works?"
] |
https://api.github.com/repos/huggingface/datasets/issues/1454 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1454/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1454/comments | https://api.github.com/repos/huggingface/datasets/issues/1454/events | https://github.com/huggingface/datasets/pull/1454 | 761,199,862 | MDExOlB1bGxSZXF1ZXN0NTM1OTAxNjk4 | 1,454 | Add kinnews_kirnews | [] | closed | false | null | 1 | 2020-12-10T12:29:08Z | 2020-12-17T18:34:16Z | 2020-12-17T18:34:16Z | null | Add kinnews and kirnews | {
"+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/1454/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1454/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1454.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1454",
"merged_at": "2020-12-17T18:34:16Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1454.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1454"
} | true | [
"merging since the CI is fixed on master"
] |
https://api.github.com/repos/huggingface/datasets/issues/1329 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1329/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1329/comments | https://api.github.com/repos/huggingface/datasets/issues/1329/events | https://github.com/huggingface/datasets/pull/1329 | 759,654,174 | MDExOlB1bGxSZXF1ZXN0NTM0NjIxNzg0 | 1,329 | Add yoruba ner corpus | [] | closed | false | null | 0 | 2020-12-08T17:54:00Z | 2020-12-08T23:11:12Z | 2020-12-08T23:11:12Z | 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/1329/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1329/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1329.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1329",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/1329.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1329"
} | true | [] |
|
https://api.github.com/repos/huggingface/datasets/issues/4326 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4326/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4326/comments | https://api.github.com/repos/huggingface/datasets/issues/4326/events | https://github.com/huggingface/datasets/pull/4326 | 1,233,818,489 | PR_kwDODunzps43tjWy | 4,326 | Fix type hint and documentation for `new_fingerprint` | [] | closed | false | null | 1 | 2022-05-12T11:05:08Z | 2022-06-01T13:04:45Z | 2022-06-01T12:56:18Z | null | Currently, there are no type hints nor `Optional` for the argument `new_fingerprint` in several methods of `datasets.arrow_dataset.Dataset`.
There was some documentation missing as well.
Note that pylance is happy with the type hints, but pyright does not detect that `new_fingerprint` is set within the decorator.
The modifications in this PR are fine since here https://github.com/huggingface/datasets/blob/aa743886221d76afb409d263e1b136e7a71fe2b4/src/datasets/fingerprint.py#L446-L454
for the non-inplace case we make sure to auto-generate a new fingerprint (as indicated in the doc). | {
"+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/4326/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4326/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/4326.diff",
"html_url": "https://github.com/huggingface/datasets/pull/4326",
"merged_at": "2022-06-01T12:56:18Z",
"patch_url": "https://github.com/huggingface/datasets/pull/4326.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/4326"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._"
] |
https://api.github.com/repos/huggingface/datasets/issues/393 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/393/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/393/comments | https://api.github.com/repos/huggingface/datasets/issues/393/events | https://github.com/huggingface/datasets/pull/393 | 657,330,911 | MDExOlB1bGxSZXF1ZXN0NDQ5NDY1MTAz | 393 | Fix extracted files directory for the DownloadManager | [] | closed | false | null | 0 | 2020-07-15T12:59:55Z | 2020-07-17T17:02:16Z | 2020-07-17T17:02:14Z | null | The cache dir was often cluttered by extracted files because of the download manager.
For downloaded files, we are using the `downloads` directory to make things easier to navigate, but extracted files were still placed at the root of the cache directory. To fix that I changed the directory for extracted files to cache_dir/downloads/extracted. | {
"+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/393/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/393/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/393.diff",
"html_url": "https://github.com/huggingface/datasets/pull/393",
"merged_at": "2020-07-17T17:02:14Z",
"patch_url": "https://github.com/huggingface/datasets/pull/393.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/393"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/3575 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3575/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3575/comments | https://api.github.com/repos/huggingface/datasets/issues/3575/events | https://github.com/huggingface/datasets/pull/3575 | 1,101,947,955 | PR_kwDODunzps4w8Usm | 3,575 | Add Arrow type casting to struct for Image and Audio + Support nested casting | [] | closed | false | null | 9 | 2022-01-13T15:36:59Z | 2022-11-29T11:14:16Z | 2022-01-21T13:22:27Z | null | ## Intro
1. Currently, it's not possible to have nested features containing Audio or Image.
2. Moreover one can keep an Arrow array as a StringArray to store paths to images, but such arrays can't be directly concatenated to another image array if it's stored an another Arrow type (typically, a StructType).
3. Allowing several Arrow types for a single HF feature type also leads to bugs like this one #3497
4. Issues like #3247 are quite frequent and happen when Arrow fails to reorder StructArrays.
5. Casting Audio feature type is blocking preparation for the ASR task template: https://github.com/huggingface/datasets/pull/3364
All those issues are linked together by the fact that:
- we are limited by the Arrow type casting which is lacking features for nested types.
- and especially for Audio and Image: they are not robust enough for concatenation and feature inference.
## Proposed solution
To fix 1 and 4 I implemented nested array type casting (which is missing in PyArrow).
To fix 2, 3 and 5 while having a simple implementation for nested array type casting, I changed the storage type of Audio and Image to always be a StructType. Also casting from StringType is directly implemented via a new function `cast_storage` that is defined individually for Audio and Image. I also added nested decoding.
## Implementation details
### I. Better Arrow data type casting for nested data structures
I implemented new functions `array_cast` and `table_cast` that do the exact same as `pyarrow.Array.cast` or `pyarrow.Table.cast` but support nested struct casting and array re-ordering.
These functions can be used on PyArrow objects, and are already integrated in our own `datasets.table.Table.cast` functions. So one can do `my_dataset.data.cast(pyarrow_schema_with_custom_hf_types)` directly.
### II. New image and audio extension types with custom casting
I used PyArrow extension types to be able to define what casting is allowed or not. For example both StringType->ImageExtensionType and StructType->ImageExtensionType are allowed, via the `cast_storage` method.
I factorized all the PyArrow + Pandas extension stuff in the `base_extension.py` file. This aims at separating the front-facing API code of `datasets` from the Arrow back-end which requires advanced knowledge.
### III. Nested feature decoding
I added a new function `decode_nested_example` to decode image and audio data in nested data structures. For optimization's sake, this function is only called if a column has at least one feature that requires decoding.
## Alternative considered
The casting to struct type could have been done directly with python objects using some Audio and Image methods, but bringing arrow data to python objects is expensive. The Audio and Image types could also have been able to convert the arrow data directly, but this is not convenient to use when casting a full Arrow Table with nested fields. Therefore I decided to keep the Arrow data casting logic in Arrow extension types.
## Future work
This work can be used to allow the ArrayND feature types to be nested too (see issue #887)
## TODO
- [x] fix current tests
- [x] add new tests
- [x] docstrings/comments | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 2,
"total_count": 2,
"url": "https://api.github.com/repos/huggingface/datasets/issues/3575/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3575/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3575.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3575",
"merged_at": "2022-01-21T13:22:27Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3575.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3575"
} | true | [
"Regarding the tests I'm just missing the FixedSizeListType type casting for ListArray objects, will to it tomorrow as well as adding new tests + docstrings\r\n\r\nand also adding soundfile in the CI",
"While writing some tests I noticed that the ExtensionArray can't be directly concatenated - maybe we can get rid of the extension types/arrays and only keep their storages in native arrow types.\r\n\r\nIn this case the `cast_storage` functions should be the responsibility of the Image and Audio classes directly. And therefore we would need to never cast to a pyarrow type again but to a HF feature - since they'd end up being the one able to tell what's castable or not. This is fine in my opinion but let me know what you think. I can take care of this on monday I think",
"Alright I got rid of all the extension type stuff, I'm writing the new tests now :)",
"Tests are done, I'll finish the comments and docstrings tomorrow and set the PR on ready for review once it's done !",
"> While writing some tests I noticed that the ExtensionArray can't be directly concatenated - maybe we can get rid of the extension types/arrays and only keep their storages in native arrow types.\r\n>\r\n>In this case the cast_storage functions should be the responsibility of the Image and Audio classes directly. And therefore we would need two never cast to a pyarrow type again but to a HF feature - since they'd end up being the one able to tell what's castable or not. This is fine in my opinion but let me know what you think. I can take care of this on monday I think\r\n\r\nDoes this change affect performance?",
"> Does this change affect performance?\r\n\r\nIn general it shouldn't have a significant impact on performance since the structure of the features is rarely complex (in general we have <20 features and <4 levels of nesting)\r\n\r\nRegarding Audio and Image specifically, casting from a StringArray is a little bit more costly since it creates the \"bytes\" BinaryArray with `None` values with the same length as the \"path\" array. From the tests I did locally this is very fast though and shouldn't affect the user experience at the current scale of the audio/image datasets we have. It also requires a little bit of RAM though\r\n",
"Alright this is ready for review now ! Let me know if you have comments and/or improvements :)",
"I am facing the issue ArrowNotImplementedError but no solution is working. Please help me",
"Can you open an new issue and share the error message as well as the script you used ? We'd be happy to help :)"
] |
https://api.github.com/repos/huggingface/datasets/issues/1435 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1435/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1435/comments | https://api.github.com/repos/huggingface/datasets/issues/1435/events | https://github.com/huggingface/datasets/pull/1435 | 760,867,325 | MDExOlB1bGxSZXF1ZXN0NTM1NjIwODE4 | 1,435 | Add FreebaseQA dataset | [] | closed | false | null | 12 | 2020-12-10T04:03:27Z | 2021-02-05T09:47:30Z | 2021-02-05T09:47:30Z | null | This PR adds the FreebaseQA dataset: A Trivia-type QA Data Set over the Freebase Knowledge Graph
Repo: https://github.com/kelvin-jiang/FreebaseQA
Paper: https://www.aclweb.org/anthology/N19-1028.pdf
## TODO: create dummy data
Error encountered when running `python datasets-cli dummy_data datasets/freebase_qa --auto_generate`
```
f"Couldn't parse columns {list(json_data.keys())}. "
ValueError: Couldn't parse columns ['Dataset', 'Version', 'Questions']. Maybe specify which json field must be used to read the data with --json_field <my_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/1435/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1435/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1435.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1435",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/1435.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1435"
} | true | [
"@yjernite @lhoestq Any suggestions on how to get the dummy data generator to recognize the columns? The structure of the json is:\r\n```\r\n{\r\n \"Dataset\": \"FreebaseQA-eval\", \r\n \"Version\": \"1.0\", \r\n \"Questions\": [\r\n {\r\n \"Question-ID\": \"FreebaseQA-eval-0\", \r\n \"RawQuestion\": \"Who is the female presenter of the Channel 4 quiz show '1001 things you should know'?\", \r\n \"ProcessedQuestion\": \"who is the female presenter of the channel 4 quiz show '1001 things you should know'\", \r\n \"Parses\": [\r\n {\r\n \"Parse-Id\": \"FreebaseQA-eval-0.P0\", \r\n \"PotentialTopicEntityMention\": \"1001 things you should know\", \r\n \"TopicEntityName\": \"1001 things you should know\", \r\n \"TopicEntityMid\": \"m.0nd3t34\", \r\n \"InferentialChain\": \"tv.tv_program.regular_personal_appearances..tv.tv_regular_personal_appearance.person\", \r\n \"Answers\": [\r\n {\r\n \"AnswersMid\": \"m.0216y_\", \r\n \"AnswersName\": [\r\n \"sandi toksvig\"\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }, \r\n ...\r\n ]\r\n}\r\n```\r\n\r\nThanks!",
"Unfortunately this json structure is not recognized by the auto-generation yet, so you'd have to create the dummy data manually. \r\nYou can get some instructions on how to do that with: `python datasets-cli dummy_data datasets/freebase_qa`\r\nWe can definitely help you with that if there are too many files! ",
"@yjernite Thanks for the instructions. I manually added dummy data and created the zip file but one of the splits seem to return an empty list.\r\n\r\n```\r\ntests/test_dataset_common.py F [100%]\r\n\r\n========================= FAILURES ==========================\r\n_ LocalDatasetTest.test_load_dataset_all_configs_freebase_qa _\r\n\r\nself = <tests.test_dataset_common.LocalDatasetTest testMethod=test_load_dataset_all_configs_freebase_qa>\r\ndataset_name = 'freebase_qa'\r\n\r\n @slow\r\n def test_load_dataset_all_configs(self, dataset_name):\r\n configs = self.dataset_tester.load_all_configs(dataset_name, is_local=True)\r\n> self.dataset_tester.check_load_dataset(dataset_name, configs, is_local=True)\r\n\r\ntests/test_dataset_common.py:237:\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\ntests/test_dataset_common.py:198: in check_load_dataset\r\n self.parent.assertTrue(len(dataset[split]) > 0)\r\nE AssertionError: False is not true\r\n```\r\n\r\nNote that the dataset has `train`, `eval`, and `dev` (no test split). I am not sure if I am mapping them correctly when I called the Split Generator.\r\n",
"The dummy json files must follow the exact same structure as the original json files.\r\n\r\nHowever it looks like the dummy json files you have in your dummy_data.zip file are not structured the same way.\r\nFor example the original json is a dict with a field \"Questions\" that is a list of items.\r\nHowever your dummy json is simply a list of items.\r\n\r\nCan you update your dummy json files to follow the same structure ?",
"And I'm pretty sure that this structure is supported by the dummy data auto-generation tool\r\n```\r\npython datasets-cli dummy_data ./datasets/freebase_qa --json_field \"Questions\"\r\n```",
"Hi @anaerobeth did you manage to get the dummy data right ?\r\n\r\nFeel free to ping me if you have questions or when you're ready for a review",
"Thanks for your help! I am able to create the dummy data with the dict structure as suggested. I'll add the tags and update this PR shortly.",
"Also don't forget to run `make style` to fix the code formatting check in the CI :)",
"Hi @anaerobeth ! Have you had a chance to consider updating the dataset script to yield one example per question ?\r\n\r\nFeel free to ping me if you have questions or if I can help :) ",
"Hi @lhoestq,\r\n\r\nI am willing to take this forward if you and @anaerobeth don't mind.\r\n",
"Hi @gchhablani thanks for proposing your help :) \r\nSure if you want to take this forward feel free to do so.\r\nAlso pinging @anaerobeth to make sure that you both don't work on the same thing at the same time",
"Hi ! Closing this one since the dataset was added in #1814 \r\n\r\nThanks you two @anaerobeth and @gchhablani for adding this dataset !"
] |
https://api.github.com/repos/huggingface/datasets/issues/5013 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5013/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5013/comments | https://api.github.com/repos/huggingface/datasets/issues/5013/events | https://github.com/huggingface/datasets/issues/5013 | 1,383,415,971 | I_kwDODunzps5SdUCj | 5,013 | would huggingface like publish cpp binding for datasets package ? | [
{
"color": "ffffff",
"default": true,
"description": "This will not be worked on",
"id": 1935892913,
"name": "wontfix",
"node_id": "MDU6TGFiZWwxOTM1ODkyOTEz",
"url": "https://api.github.com/repos/huggingface/datasets/labels/wontfix"
}
] | closed | false | null | 5 | 2022-09-23T07:42:49Z | 2023-02-24T16:20:57Z | 2023-02-24T16:20:57Z | null | HI:
I use cpp env libtorch, I like use hugggingface ,but huggingface not cpp binding, would you like publish cpp binding for it.
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/5013/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5013/timeline | null | completed | null | null | false | [
"Hi ! Can you share more information about your use case ? How could it help you to have cpp bindings versus using the python libraries ?",
"> Hi ! Can you share more information about your use case ? How could it help you to have cpp bindings versus using the python libraries ?\r\n\r\nfor example ,the huggingface load_model() and load_dataset() can execute in cpp env",
"If it's a viable option for you, you can check [tch-rs](https://github.com/LaurentMazare/tch-rs) to load models in Rust. Regarding datasets, you can first download them in python and then use Arrow C++ or Rust to load them",
"If you are more adventurous, another option is to embed python calls inside c++ e.g. with `pybind11`.",
"> pybind11\r\n\r\nI think it is not the best solution"
] |
https://api.github.com/repos/huggingface/datasets/issues/4731 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4731/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4731/comments | https://api.github.com/repos/huggingface/datasets/issues/4731/events | https://github.com/huggingface/datasets/pull/4731 | 1,313,773,348 | PR_kwDODunzps474dlZ | 4,731 | docs: ✏️ fix TranslationVariableLanguages example | [] | closed | false | null | 1 | 2022-07-21T20:35:41Z | 2022-07-22T07:01:00Z | 2022-07-22T06:48:42Z | 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/4731/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4731/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/4731.diff",
"html_url": "https://github.com/huggingface/datasets/pull/4731",
"merged_at": "2022-07-22T06:48:42Z",
"patch_url": "https://github.com/huggingface/datasets/pull/4731.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/4731"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._"
] |
https://api.github.com/repos/huggingface/datasets/issues/5742 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5742/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5742/comments | https://api.github.com/repos/huggingface/datasets/issues/5742/events | https://github.com/huggingface/datasets/pull/5742 | 1,666,209,738 | PR_kwDODunzps5OOH-W | 5,742 | Warning specifying future change in to_tf_dataset behaviour | [] | closed | false | null | 2 | 2023-04-13T11:10:00Z | 2023-04-21T13:18:14Z | 2023-04-21T13:11:09Z | null | Warning specifying future changes happening to `to_tf_dataset` behaviour when #5602 is merged in | {
"+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/5742/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5742/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/5742.diff",
"html_url": "https://github.com/huggingface/datasets/pull/5742",
"merged_at": "2023-04-21T13:11:09Z",
"patch_url": "https://github.com/huggingface/datasets/pull/5742.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/5742"
} | 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.006693 / 0.011353 (-0.004660) | 0.004586 / 0.011008 (-0.006422) | 0.097238 / 0.038508 (0.058730) | 0.027912 / 0.023109 (0.004802) | 0.347339 / 0.275898 (0.071441) | 0.393847 / 0.323480 (0.070368) | 0.005105 / 0.007986 (-0.002880) | 0.004750 / 0.004328 (0.000422) | 0.074671 / 0.004250 (0.070421) | 0.037912 / 0.037052 (0.000860) | 0.368973 / 0.258489 (0.110483) | 0.403983 / 0.293841 (0.110142) | 0.030817 / 0.128546 (-0.097730) | 0.011813 / 0.075646 (-0.063833) | 0.324470 / 0.419271 (-0.094802) | 0.044232 / 0.043533 (0.000699) | 0.347623 / 0.255139 (0.092484) | 0.382458 / 0.283200 (0.099259) | 0.086603 / 0.141683 (-0.055080) | 1.485778 / 1.452155 (0.033623) | 1.549776 / 1.492716 (0.057059) |\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.200154 / 0.018006 (0.182147) | 0.440645 / 0.000490 (0.440155) | 0.003664 / 0.000200 (0.003464) | 0.000069 / 0.000054 (0.000015) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.023635 / 0.037411 (-0.013776) | 0.094969 / 0.014526 (0.080443) | 0.103630 / 0.176557 (-0.072927) | 0.168655 / 0.737135 (-0.568480) | 0.105850 / 0.296338 (-0.190488) |\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.425224 / 0.215209 (0.210015) | 4.236618 / 2.077655 (2.158963) | 1.917091 / 1.504120 (0.412971) | 1.746984 / 1.541195 (0.205789) | 1.817766 / 1.468490 (0.349276) | 0.700989 / 4.584777 (-3.883788) | 3.412577 / 3.745712 (-0.333135) | 3.049311 / 5.269862 (-2.220551) | 1.607692 / 4.565676 (-2.957984) | 0.083410 / 0.424275 (-0.340865) | 0.012601 / 0.007607 (0.004994) | 0.528244 / 0.226044 (0.302200) | 5.284134 / 2.268929 (3.015206) | 2.391885 / 55.444624 (-53.052740) | 2.020018 / 6.876477 (-4.856459) | 2.105908 / 2.142072 (-0.036164) | 0.801262 / 4.805227 (-4.003965) | 0.151467 / 6.500664 (-6.349197) | 0.066529 / 0.075469 (-0.008940) |\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.203894 / 1.841788 (-0.637894) | 13.827561 / 8.074308 (5.753253) | 14.136730 / 10.191392 (3.945338) | 0.143829 / 0.680424 (-0.536595) | 0.016410 / 0.534201 (-0.517791) | 0.378194 / 0.579283 (-0.201089) | 0.391235 / 0.434364 (-0.043129) | 0.439261 / 0.540337 (-0.101076) | 0.527181 / 1.386936 (-0.859755) |\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.006639 / 0.011353 (-0.004714) | 0.004469 / 0.011008 (-0.006540) | 0.076495 / 0.038508 (0.037987) | 0.027880 / 0.023109 (0.004771) | 0.342807 / 0.275898 (0.066909) | 0.374258 / 0.323480 (0.050778) | 0.005543 / 0.007986 (-0.002443) | 0.003362 / 0.004328 (-0.000966) | 0.075064 / 0.004250 (0.070813) | 0.039209 / 0.037052 (0.002156) | 0.342490 / 0.258489 (0.084001) | 0.382135 / 0.293841 (0.088294) | 0.030356 / 0.128546 (-0.098191) | 0.011762 / 0.075646 (-0.063884) | 0.086031 / 0.419271 (-0.333241) | 0.041991 / 0.043533 (-0.001542) | 0.340323 / 0.255139 (0.085184) | 0.364160 / 0.283200 (0.080961) | 0.088483 / 0.141683 (-0.053200) | 1.502836 / 1.452155 (0.050681) | 1.570438 / 1.492716 (0.077722) |\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.218486 / 0.018006 (0.200480) | 0.405251 / 0.000490 (0.404761) | 0.000398 / 0.000200 (0.000198) | 0.000062 / 0.000054 (0.000008) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.025738 / 0.037411 (-0.011673) | 0.100390 / 0.014526 (0.085864) | 0.109913 / 0.176557 (-0.066644) | 0.161310 / 0.737135 (-0.575826) | 0.113269 / 0.296338 (-0.183069) |\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.438083 / 0.215209 (0.222874) | 4.377742 / 2.077655 (2.300087) | 2.069949 / 1.504120 (0.565829) | 1.857807 / 1.541195 (0.316613) | 1.881315 / 1.468490 (0.412825) | 0.695373 / 4.584777 (-3.889404) | 3.440287 / 3.745712 (-0.305425) | 1.842888 / 5.269862 (-3.426973) | 1.146655 / 4.565676 (-3.419022) | 0.083386 / 0.424275 (-0.340889) | 0.012290 / 0.007607 (0.004683) | 0.545672 / 0.226044 (0.319628) | 5.469568 / 2.268929 (3.200639) | 2.511886 / 55.444624 (-52.932739) | 2.184210 / 6.876477 (-4.692267) | 2.329822 / 2.142072 (0.187749) | 0.804114 / 4.805227 (-4.001114) | 0.151651 / 6.500664 (-6.349013) | 0.067269 / 0.075469 (-0.008200) |\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.272564 / 1.841788 (-0.569223) | 14.180708 / 8.074308 (6.106400) | 14.181657 / 10.191392 (3.990265) | 0.131443 / 0.680424 (-0.548981) | 0.016513 / 0.534201 (-0.517688) | 0.383786 / 0.579283 (-0.195497) | 0.397678 / 0.434364 (-0.036686) | 0.447003 / 0.540337 (-0.093334) | 0.539453 / 1.386936 (-0.847483) |\n\n</details>\n</details>\n\n\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/4740 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4740/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4740/comments | https://api.github.com/repos/huggingface/datasets/issues/4740/events | https://github.com/huggingface/datasets/pull/4740 | 1,316,478,007 | PR_kwDODunzps48BX5l | 4,740 | Fix multiprocessing in map_nested | [] | closed | false | null | 3 | 2022-07-25T08:44:19Z | 2022-07-28T10:53:23Z | 2022-07-28T10:40:31Z | null | As previously discussed:
Before, multiprocessing was not used in `map_nested` if `num_proc` was greater than or equal to `len(iterable)`.
- Multiprocessing was not used e.g. when passing `num_proc=20` but having 19 files to download
- As by default, `DownloadManager` sets `num_proc=16`, before multiprocessing was only used when `len(iterable)>16` by default
Now, if `num_proc` is greater than or equal to ``len(iterable)``, `num_proc` is set to ``len(iterable)`` and multiprocessing is used.
- We pass the variable `parallel_min_length=16`, so that multiprocessing is only used if at least 16 files to be downloaded
- ~As by default, `DownloadManager` sets `num_proc=16`, now multiprocessing is used when `len(iterable)>1` by default~
See discussion below.
~After having had to fix some tests (87602ac), I am wondering:~
- ~do we want to have multiprocessing by default?~
- ~please note that `DownloadManager.download` sets `num_proc=16` by default~
- ~or would it be better to ask the user to set it explicitly if they want multiprocessing (and default to `num_proc=1`)?~
Fix #4636.
CC: @nateraw | {
"+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/4740/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4740/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/4740.diff",
"html_url": "https://github.com/huggingface/datasets/pull/4740",
"merged_at": "2022-07-28T10:40:31Z",
"patch_url": "https://github.com/huggingface/datasets/pull/4740.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/4740"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._",
"@lhoestq as a workaround to preserve previous behavior, the parameter `multiprocessing_min_length=16` is passed from `download` to `map_nested`, so that multiprocessing is only used if at least 16 files to be downloaded.\r\n\r\nNote that there is a small breaking change (I think previously it was unintended behavior, so that I have fixed it):\r\n- Before (with default `num_proc=16`) if there were 16 files to be downloaded, multiprocessing was not used\r\n- Now (with default `num_proc=16`) if there are 16 files to be downloaded, multiprocessing is used",
"Thanks for the workaround !"
] |
https://api.github.com/repos/huggingface/datasets/issues/4878 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4878/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4878/comments | https://api.github.com/repos/huggingface/datasets/issues/4878/events | https://github.com/huggingface/datasets/issues/4878 | 1,348,270,141 | I_kwDODunzps5QXPg9 | 4,878 | [not really a bug] `identical_ok` is deprecated in huggingface-hub's `upload_file` | [
{
"color": "008672",
"default": true,
"description": "Extra attention is needed",
"id": 1935892884,
"name": "help wanted",
"node_id": "MDU6TGFiZWwxOTM1ODkyODg0",
"url": "https://api.github.com/repos/huggingface/datasets/labels/help%20wanted"
},
{
"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"
}
] | closed | false | null | 1 | 2022-08-23T17:09:55Z | 2022-09-13T14:00:06Z | 2022-09-13T14:00:05Z | null | In the huggingface-hub dependency, the `identical_ok` argument has no effect in `upload_file` (and it will be removed soon)
See
https://github.com/huggingface/huggingface_hub/blob/43499582b19df1ed081a5b2bd7a364e9cacdc91d/src/huggingface_hub/hf_api.py#L2164-L2169
It's used here:
https://github.com/huggingface/datasets/blob/fcfcc951a73efbc677f9def9a8707d0af93d5890/src/datasets/dataset_dict.py#L1373-L1381
https://github.com/huggingface/datasets/blob/fdcb8b144ce3ef241410281e125bd03e87b8caa1/src/datasets/arrow_dataset.py#L4354-L4362
https://github.com/huggingface/datasets/blob/fdcb8b144ce3ef241410281e125bd03e87b8caa1/src/datasets/arrow_dataset.py#L4197-L4213
We should remove it.
Maybe the third code sample has an unexpected behavior since it uses the non-default value `identical_ok = False`, but the argument is ignored. | {
"+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/4878/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4878/timeline | null | completed | null | null | false | [
"Resolved via https://github.com/huggingface/datasets/pull/4937."
] |
https://api.github.com/repos/huggingface/datasets/issues/3854 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3854/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3854/comments | https://api.github.com/repos/huggingface/datasets/issues/3854/events | https://github.com/huggingface/datasets/issues/3854 | 1,162,434,199 | I_kwDODunzps5FSVaX | 3,854 | load only England English dataset from common voice english dataset | [
{
"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"
}
] | closed | false | null | 1 | 2022-03-08T09:40:52Z | 2022-03-09T08:13:33Z | 2022-03-09T08:13:33Z | null | training_data = load_dataset("common_voice", "en",split='train[:250]+validation[:250]')
testing_data = load_dataset("common_voice", "en", split="test[:200]")
I'm trying to load only 8% of the English common voice data with accent == "England English." Can somebody assist me with this?
**Typical Voice Accent Proportions:**
- 24% United States English
- 8% England English
- 5% India and South Asia (India, Pakistan, Sri Lanka)
- 3% Australian English
- 3% Canadian English
- 2% Scottish English
- 1% Irish English
- 1% Southern African (South Africa, Zimbabwe, Namibia)
- 1% New Zealand English
Can we replicate this for Age as well?
**Age proportions of the common voice:-**
- 24% 19 - 29
- 14% 30 - 39
- 10% 40 - 49
- 6% < 19
- 4% 50 - 59
- 4% 60 - 69
- 1% 70 – 79 | {
"+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/3854/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3854/timeline | null | completed | null | null | false | [
"Hi @amanjaiswal777,\r\n\r\nFirst note that the dataset you are trying to load is deprecated: it was the Common Voice dataset release as of Dec 2020.\r\n\r\nCurrently, Common Voice dataset releases are directly hosted on the Hub, under the Mozilla Foundation organization: https://huggingface.co/mozilla-foundation\r\n\r\nFor example, to get their latest Common Voice relase (8.0):\r\n- Go to the dataset page and request access permission (Mozilla Foundation requires this for people willing to use their datasets): https://huggingface.co/datasets/mozilla-foundation/common_voice_8_0\r\n- Looking at the dataset card, you can check that data instances have, among other fields, the ones you are interested in: \"accent\", \"age\",... \r\n- Then you can load their \"en\" language dataset as usual, besides passing your authentication token (more info on auth token here: https://huggingface.co/docs/hub/security)\r\n ```python\r\n from datasets import load_dataset\r\n ds_en = load_dataset(\"mozilla-foundation/common_voice_8_0\", \"en\", use_auth_token=True)\r\n ```\r\n- Finally, you can filter only the data instances you are interested in (more info on `filter` here: https://huggingface.co/docs/datasets/process#select-and-filter):\r\n ```python\r\n ds_england_en = ds_en.filter(lambda item: item[\"accent\"] == \"England English\")\r\n ```\r\n\r\nFeel free to reopen this issue if you need further assistance."
] |
https://api.github.com/repos/huggingface/datasets/issues/198 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/198/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/198/comments | https://api.github.com/repos/huggingface/datasets/issues/198/events | https://github.com/huggingface/datasets/issues/198 | 625,200,627 | MDU6SXNzdWU2MjUyMDA2Mjc= | 198 | Index outside of table length | [] | closed | false | null | 2 | 2020-05-26T21:09:40Z | 2020-05-26T22:43:49Z | 2020-05-26T22:43:49Z | null | The offset input box warns of numbers larger than a limit (like 2000) but then the errors start at a smaller value than that limit (like 1955).
> ValueError: Index (2000) outside of table length (2000).
> Traceback:
> File "/home/sasha/.local/lib/python3.7/site-packages/streamlit/ScriptRunner.py", line 322, in _run_script
> exec(code, module.__dict__)
> File "/home/sasha/nlp_viewer/run.py", line 116, in <module>
> v = d[item][k]
> File "/home/sasha/.local/lib/python3.7/site-packages/nlp/arrow_dataset.py", line 338, in __getitem__
> output_all_columns=self._output_all_columns,
> File "/home/sasha/.local/lib/python3.7/site-packages/nlp/arrow_dataset.py", line 290, in _getitem
> raise ValueError(f"Index ({key}) outside of table length ({self._data.num_rows}).") | {
"+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/198/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/198/timeline | null | completed | null | null | false | [
"Sounds like something related to the nlp viewer @srush ",
"Fixed. "
] |
https://api.github.com/repos/huggingface/datasets/issues/3626 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3626/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3626/comments | https://api.github.com/repos/huggingface/datasets/issues/3626/events | https://github.com/huggingface/datasets/issues/3626 | 1,113,534,436 | I_kwDODunzps5CXy_k | 3,626 | The Pile cannot connect to host | [
{
"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 | 2022-01-25T07:43:33Z | 2022-02-14T08:40:58Z | 2022-02-14T08:40:58Z | null | ## Describe the bug
The Pile had issues with their previous host server and have mirrored its content to another server.
The new URL server should be updated.
| {
"+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/3626/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3626/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/huggingface/datasets/issues/2211 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2211/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2211/comments | https://api.github.com/repos/huggingface/datasets/issues/2211/events | https://github.com/huggingface/datasets/issues/2211 | 855,988,410 | MDU6SXNzdWU4NTU5ODg0MTA= | 2,211 | Getting checksum error when trying to load lc_quad dataset | [] | closed | false | null | 2 | 2021-04-12T13:38:58Z | 2021-04-14T13:42:25Z | 2021-04-14T13:42:25Z | null | I'm having issues loading the [lc_quad](https://huggingface.co/datasets/fquad) dataset by running:
```Python
lc_quad = load_dataset("lc_quad")
```
which is giving me the following error:
```
Using custom data configuration default
Downloading and preparing dataset lc_quad/default (download: 3.69 MiB, generated: 19.77 MiB, post-processed: Unknown size, total: 23.46 MiB) to /root/.cache/huggingface/datasets/lc_quad/default/2.0.0/5a98fe174603f5dec6df07edf1c2b4d2317210d2ad61f5a393839bca4d64e5a7...
---------------------------------------------------------------------------
NonMatchingChecksumError Traceback (most recent call last)
<ipython-input-42-404ace83f73c> in <module>()
----> 1 lc_quad = load_dataset("lc_quad")
3 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name)
37 if len(bad_urls) > 0:
38 error_msg = "Checksums didn't match" + for_verification_name + ":\n"
---> 39 raise NonMatchingChecksumError(error_msg + str(bad_urls))
40 logger.info("All the checksums matched successfully" + for_verification_name)
41
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/AskNowQA/LC-QuAD2.0/archive/master.zip']
```
Does anyone know why this could be and how I fix 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/2211/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2211/timeline | null | completed | null | null | false | [
"Hi,\r\n\r\nI've already opened a PR with the fix. If you are in a hurry, just build the project from source and run:\r\n```bash\r\ndatasets-cli test datasets/lc_quad --save_infos --all_configs --ignore_verifications\r\n```\r\n\r\n",
"Ah sorry, I tried searching but couldn't find any related PR. \r\n\r\nThank you! "
] |
https://api.github.com/repos/huggingface/datasets/issues/6026 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6026/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6026/comments | https://api.github.com/repos/huggingface/datasets/issues/6026/events | https://github.com/huggingface/datasets/pull/6026 | 1,802,929,222 | PR_kwDODunzps5VanI8 | 6,026 | Fix style with ruff 0.0.278 | [] | closed | false | null | 3 | 2023-07-13T12:34:24Z | 2023-07-13T12:46:26Z | 2023-07-13T12:37:01Z | 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/6026/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6026/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/6026.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6026",
"merged_at": "2023-07-13T12:37:01Z",
"patch_url": "https://github.com/huggingface/datasets/pull/6026.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6026"
} | true | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6026). All of your documentation changes will be reflected on that endpoint.",
"<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.006444 / 0.011353 (-0.004909) | 0.003768 / 0.011008 (-0.007240) | 0.079625 / 0.038508 (0.041117) | 0.064490 / 0.023109 (0.041381) | 0.313858 / 0.275898 (0.037960) | 0.350810 / 0.323480 (0.027330) | 0.004804 / 0.007986 (-0.003182) | 0.002904 / 0.004328 (-0.001425) | 0.061728 / 0.004250 (0.057477) | 0.052265 / 0.037052 (0.015213) | 0.321246 / 0.258489 (0.062757) | 0.353873 / 0.293841 (0.060032) | 0.027510 / 0.128546 (-0.101036) | 0.007942 / 0.075646 (-0.067704) | 0.260518 / 0.419271 (-0.158754) | 0.045686 / 0.043533 (0.002153) | 0.316821 / 0.255139 (0.061682) | 0.337086 / 0.283200 (0.053886) | 0.022188 / 0.141683 (-0.119495) | 1.427345 / 1.452155 (-0.024810) | 1.476059 / 1.492716 (-0.016657) |\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.189640 / 0.018006 (0.171634) | 0.429724 / 0.000490 (0.429235) | 0.005314 / 0.000200 (0.005114) | 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.024412 / 0.037411 (-0.013000) | 0.073488 / 0.014526 (0.058962) | 0.083843 / 0.176557 (-0.092714) | 0.147849 / 0.737135 (-0.589286) | 0.085465 / 0.296338 (-0.210873) |\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.405314 / 0.215209 (0.190105) | 4.071471 / 2.077655 (1.993816) | 1.916252 / 1.504120 (0.412132) | 1.721616 / 1.541195 (0.180422) | 1.807187 / 1.468490 (0.338697) | 0.498045 / 4.584777 (-4.086732) | 3.057526 / 3.745712 (-0.688187) | 4.451424 / 5.269862 (-0.818437) | 2.764020 / 4.565676 (-1.801656) | 0.057665 / 0.424275 (-0.366610) | 0.006679 / 0.007607 (-0.000928) | 0.485733 / 0.226044 (0.259688) | 4.844367 / 2.268929 (2.575438) | 2.435359 / 55.444624 (-53.009265) | 2.111478 / 6.876477 (-4.764999) | 2.377448 / 2.142072 (0.235375) | 0.587997 / 4.805227 (-4.217230) | 0.125545 / 6.500664 (-6.375120) | 0.061509 / 0.075469 (-0.013960) |\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.229210 / 1.841788 (-0.612577) | 18.553994 / 8.074308 (10.479686) | 14.037877 / 10.191392 (3.846485) | 0.144230 / 0.680424 (-0.536194) | 0.016891 / 0.534201 (-0.517310) | 0.329039 / 0.579283 (-0.250244) | 0.357269 / 0.434364 (-0.077095) | 0.384222 / 0.540337 (-0.156115) | 0.521292 / 1.386936 (-0.865644) |\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.006359 / 0.011353 (-0.004994) | 0.003721 / 0.011008 (-0.007287) | 0.062047 / 0.038508 (0.023539) | 0.065267 / 0.023109 (0.042158) | 0.360164 / 0.275898 (0.084266) | 0.402292 / 0.323480 (0.078812) | 0.005603 / 0.007986 (-0.002382) | 0.002966 / 0.004328 (-0.001363) | 0.062580 / 0.004250 (0.058330) | 0.053634 / 0.037052 (0.016582) | 0.362210 / 0.258489 (0.103721) | 0.404285 / 0.293841 (0.110444) | 0.027567 / 0.128546 (-0.100979) | 0.008119 / 0.075646 (-0.067528) | 0.067577 / 0.419271 (-0.351694) | 0.042867 / 0.043533 (-0.000666) | 0.361576 / 0.255139 (0.106437) | 0.389061 / 0.283200 (0.105862) | 0.021923 / 0.141683 (-0.119760) | 1.446259 / 1.452155 (-0.005895) | 1.490724 / 1.492716 (-0.001992) |\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.206433 / 0.018006 (0.188427) | 0.424178 / 0.000490 (0.423688) | 0.002340 / 0.000200 (0.002140) | 0.000069 / 0.000054 (0.000015) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.024955 / 0.037411 (-0.012456) | 0.077446 / 0.014526 (0.062920) | 0.088540 / 0.176557 (-0.088017) | 0.141225 / 0.737135 (-0.595910) | 0.089747 / 0.296338 (-0.206592) |\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.443738 / 0.215209 (0.228529) | 4.208887 / 2.077655 (2.131233) | 2.155127 / 1.504120 (0.651007) | 2.028178 / 1.541195 (0.486983) | 2.084903 / 1.468490 (0.616413) | 0.497530 / 4.584777 (-4.087247) | 3.069012 / 3.745712 (-0.676700) | 3.025184 / 5.269862 (-2.244678) | 1.904687 / 4.565676 (-2.660990) | 0.057526 / 0.424275 (-0.366749) | 0.006482 / 0.007607 (-0.001125) | 0.494692 / 0.226044 (0.268647) | 4.944437 / 2.268929 (2.675508) | 2.655989 / 55.444624 (-52.788635) | 2.331677 / 6.876477 (-4.544800) | 2.382396 / 2.142072 (0.240324) | 0.582019 / 4.805227 (-4.223209) | 0.125866 / 6.500664 (-6.374799) | 0.062908 / 0.075469 (-0.012561) |\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.294612 / 1.841788 (-0.547176) | 19.016152 / 8.074308 (10.941844) | 14.088828 / 10.191392 (3.897436) | 0.160842 / 0.680424 (-0.519582) | 0.017054 / 0.534201 (-0.517146) | 0.333647 / 0.579283 (-0.245636) | 0.348094 / 0.434364 (-0.086270) | 0.394970 / 0.540337 (-0.145367) | 0.551141 / 1.386936 (-0.835795) |\n\n</details>\n</details>\n\n\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.007442 / 0.011353 (-0.003911) | 0.004302 / 0.011008 (-0.006707) | 0.087159 / 0.038508 (0.048651) | 0.095094 / 0.023109 (0.071985) | 0.315422 / 0.275898 (0.039524) | 0.346672 / 0.323480 (0.023192) | 0.005811 / 0.007986 (-0.002174) | 0.003597 / 0.004328 (-0.000731) | 0.066400 / 0.004250 (0.062150) | 0.065947 / 0.037052 (0.028894) | 0.323269 / 0.258489 (0.064780) | 0.353309 / 0.293841 (0.059468) | 0.032268 / 0.128546 (-0.096278) | 0.008696 / 0.075646 (-0.066950) | 0.291486 / 0.419271 (-0.127786) | 0.054609 / 0.043533 (0.011076) | 0.321061 / 0.255139 (0.065922) | 0.336907 / 0.283200 (0.053707) | 0.027338 / 0.141683 (-0.114345) | 1.496442 / 1.452155 (0.044287) | 1.576946 / 1.492716 (0.084229) |\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.229140 / 0.018006 (0.211134) | 0.487500 / 0.000490 (0.487010) | 0.002425 / 0.000200 (0.002225) | 0.000089 / 0.000054 (0.000034) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.029351 / 0.037411 (-0.008060) | 0.089610 / 0.014526 (0.075084) | 0.097880 / 0.176557 (-0.078676) | 0.155947 / 0.737135 (-0.581189) | 0.098593 / 0.296338 (-0.197745) |\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.382911 / 0.215209 (0.167702) | 3.820363 / 2.077655 (1.742708) | 1.866385 / 1.504120 (0.362265) | 1.712910 / 1.541195 (0.171716) | 1.813863 / 1.468490 (0.345373) | 0.484884 / 4.584777 (-4.099893) | 3.678911 / 3.745712 (-0.066801) | 5.249908 / 5.269862 (-0.019953) | 3.099614 / 4.565676 (-1.466063) | 0.057449 / 0.424275 (-0.366826) | 0.007728 / 0.007607 (0.000120) | 0.462123 / 0.226044 (0.236078) | 4.603942 / 2.268929 (2.335014) | 2.380957 / 55.444624 (-53.063668) | 2.059621 / 6.876477 (-4.816856) | 2.293764 / 2.142072 (0.151691) | 0.636471 / 4.805227 (-4.168756) | 0.150112 / 6.500664 (-6.350552) | 0.063705 / 0.075469 (-0.011764) |\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.358099 / 1.841788 (-0.483689) | 20.193750 / 8.074308 (12.119442) | 14.297350 / 10.191392 (4.105958) | 0.164477 / 0.680424 (-0.515947) | 0.018259 / 0.534201 (-0.515942) | 0.399010 / 0.579283 (-0.180273) | 0.417306 / 0.434364 (-0.017058) | 0.456961 / 0.540337 (-0.083377) | 0.631068 / 1.386936 (-0.755868) |\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.007324 / 0.011353 (-0.004028) | 0.004463 / 0.011008 (-0.006545) | 0.066148 / 0.038508 (0.027640) | 0.093909 / 0.023109 (0.070799) | 0.399122 / 0.275898 (0.123224) | 0.430226 / 0.323480 (0.106746) | 0.005505 / 0.007986 (-0.002481) | 0.003579 / 0.004328 (-0.000749) | 0.066529 / 0.004250 (0.062278) | 0.063471 / 0.037052 (0.026418) | 0.406351 / 0.258489 (0.147862) | 0.439987 / 0.293841 (0.146146) | 0.032640 / 0.128546 (-0.095906) | 0.008770 / 0.075646 (-0.066877) | 0.072592 / 0.419271 (-0.346680) | 0.050429 / 0.043533 (0.006896) | 0.390873 / 0.255139 (0.135734) | 0.412438 / 0.283200 (0.129239) | 0.027113 / 0.141683 (-0.114570) | 1.458281 / 1.452155 (0.006126) | 1.536819 / 1.492716 (0.044103) |\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.228309 / 0.018006 (0.210303) | 0.454042 / 0.000490 (0.453552) | 0.000387 / 0.000200 (0.000187) | 0.000055 / 0.000054 (0.000001) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.029573 / 0.037411 (-0.007838) | 0.086433 / 0.014526 (0.071907) | 0.097992 / 0.176557 (-0.078565) | 0.152464 / 0.737135 (-0.584671) | 0.099901 / 0.296338 (-0.196437) |\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.413807 / 0.215209 (0.198598) | 4.126395 / 2.077655 (2.048740) | 2.113544 / 1.504120 (0.609424) | 1.967829 / 1.541195 (0.426635) | 2.037123 / 1.468490 (0.568633) | 0.489403 / 4.584777 (-4.095374) | 3.689508 / 3.745712 (-0.056204) | 3.503909 / 5.269862 (-1.765952) | 2.113812 / 4.565676 (-2.451864) | 0.057988 / 0.424275 (-0.366287) | 0.007336 / 0.007607 (-0.000271) | 0.490840 / 0.226044 (0.264795) | 4.885040 / 2.268929 (2.616112) | 2.627864 / 55.444624 (-52.816760) | 2.231467 / 6.876477 (-4.645010) | 2.251307 / 2.142072 (0.109235) | 0.577370 / 4.805227 (-4.227857) | 0.131770 / 6.500664 (-6.368895) | 0.061313 / 0.075469 (-0.014156) |\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.362052 / 1.841788 (-0.479735) | 21.332694 / 8.074308 (13.258386) | 15.562019 / 10.191392 (5.370627) | 0.170874 / 0.680424 (-0.509550) | 0.019226 / 0.534201 (-0.514975) | 0.400311 / 0.579283 (-0.178972) | 0.423060 / 0.434364 (-0.011304) | 0.469946 / 0.540337 (-0.070391) | 0.647745 / 1.386936 (-0.739191) |\n\n</details>\n</details>\n\n\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/5134 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5134/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5134/comments | https://api.github.com/repos/huggingface/datasets/issues/5134/events | https://github.com/huggingface/datasets/issues/5134 | 1,413,623,687 | I_kwDODunzps5UQi-H | 5,134 | Raise ImportError instead of OSError if required extraction library is not installed | [
{
"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"
},
{
"color": "DF8D62",
"default": false,
"description": "",
"id": 4614514401,
"name": "hacktoberfest",
"node_id": "LA_kwDODunzps8AAAABEwvm4Q",
"url": "https://api.github.com/repos/huggingface/datasets/labels/hacktoberfest"
}
] | closed | false | null | 2 | 2022-10-18T17:53:46Z | 2022-10-25T15:56:59Z | 2022-10-25T15:56:59Z | null | According to the official Python docs, `OSError` should be thrown in the following situations:
> This exception is raised when a system function returns a system-related error, including I/O failures such as “file not found” or “disk full” (not for illegal argument types or other incidental errors).
Hence, it makes more sense to raise `ImportError` instead of `OSError` when the required extraction/decompression library is not installed. | {
"+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/5134/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5134/timeline | null | completed | null | null | false | [
"hey ,i would like to work on this issue . Please assign it to me.",
"hey @mariosasko , i made a pr for this issue. Could you please review it.\r\nAlso i found multiple `OSError` in `extract.py` file which i thought could be replaced too but wasn't sure about them.\r\nPlease do tell if that also needs to be done."
] |
https://api.github.com/repos/huggingface/datasets/issues/3608 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3608/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3608/comments | https://api.github.com/repos/huggingface/datasets/issues/3608/events | https://github.com/huggingface/datasets/issues/3608 | 1,109,310,981 | I_kwDODunzps5CHr4F | 3,608 | Add support for continuous metrics (RMSE, MAE) | [
{
"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 | 2022-01-20T13:35:36Z | 2022-03-09T17:18:20Z | 2022-03-09T17:18:20Z | null | **Is your feature request related to a problem? Please describe.**
I am uploading our dataset and models for the "Constructing interval measures" method we've developed, which uses item response theory to convert multiple discrete labels into a continuous spectrum for hate speech. Once we have this outcome our NLP models conduct regression rather than classification, so binary metrics are not relevant. The only continuous metrics available at https://huggingface.co/metrics are pearson & spearman correlation, which don't ensure that the prediction is on the same scale as the outcome.
**Describe the solution you'd like**
I would like to be able to tag our models on the Hub with the following metrics:
- RMSE
- MAE
**Describe alternatives you've considered**
I don't know if there are any alternatives.
**Additional context**
Our preprint is available here: https://arxiv.org/abs/2009.10277 . We are making it available for use in Jigsaw's Toxic Severity Rating Kaggle competition: https://www.kaggle.com/c/jigsaw-toxic-severity-rating/overview . I have our first model uploaded to the Hub at https://huggingface.co/ucberkeley-dlab/hate-measure-roberta-large
Thanks,
Chris
| {
"+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/3608/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3608/timeline | null | completed | null | null | false | [
"Hey @ck37 \r\n\r\nYou can always use a custom metric as explained [in this guide from HF](https://huggingface.co/docs/datasets/master/loading_metrics.html#using-a-custom-metric-script).\r\n\r\nIf this issue needs to be contributed to (for enhancing the metric API) I think [this link](https://scikit-learn.org/stable/modules/generated/sklearn.metrics.mean_absolute_error.html) would be helpful for the `MAE` metric.",
"You can use a local metric script just by providing its path instead of the usual shortcut name ",
"#self-assign I have starting working on this issue to enhance the metric API."
] |
https://api.github.com/repos/huggingface/datasets/issues/2970 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2970/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2970/comments | https://api.github.com/repos/huggingface/datasets/issues/2970/events | https://github.com/huggingface/datasets/issues/2970 | 1,007,340,089 | I_kwDODunzps48Cso5 | 2,970 | Magnet’s | [
{
"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 | 0 | 2021-09-26T09:50:29Z | 2021-09-26T10:38:59Z | 2021-09-26T10:38:59Z | null | ## Adding a Dataset
- **Name:** *name of the dataset*
- **Description:** *short description of the dataset (or link to social media or blog post)*
- **Paper:** *link to the dataset paper if available*
- **Data:** *link to the Github repository or current dataset location*
- **Motivation:** *what are some good reasons to have this dataset*
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). | {
"+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/2970/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2970/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/huggingface/datasets/issues/719 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/719/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/719/comments | https://api.github.com/repos/huggingface/datasets/issues/719/events | https://github.com/huggingface/datasets/pull/719 | 716,492,263 | MDExOlB1bGxSZXF1ZXN0NDk5MjE5Mjg2 | 719 | Fix train_test_split output format | [] | closed | false | null | 0 | 2020-10-07T12:39:01Z | 2020-10-07T13:38:08Z | 2020-10-07T13:38:06Z | null | There was an issue in the `transmit_format` wrapper that returned bad formats when using train_test_split.
This was due to `column_names` being handled as a List[str] instead of Dict[str, List[str]] when the dataset transform (train_test_split) returns a DatasetDict (one set of column names per split).
This should fix @timothyjlaurent 's issue in #620 and fix #676
I added tests for `transmit_format` so that 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/719/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/719/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/719.diff",
"html_url": "https://github.com/huggingface/datasets/pull/719",
"merged_at": "2020-10-07T13:38:06Z",
"patch_url": "https://github.com/huggingface/datasets/pull/719.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/719"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/5284 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5284/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5284/comments | https://api.github.com/repos/huggingface/datasets/issues/5284/events | https://github.com/huggingface/datasets/issues/5284 | 1,461,519,733 | I_kwDODunzps5XHQV1 | 5,284 | Features of IterableDataset set to None by remove column | [
{
"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": "fef2c0",
"default": false,
"description": "",
"id": 3287858981,
"name": "streaming",
"node_id": "MDU6TGFiZWwzMjg3ODU4OTgx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/streaming"
}
] | closed | false | null | 18 | 2022-11-23T10:54:59Z | 2023-02-02T09:05:51Z | 2022-11-28T12:53:24Z | null | ### Describe the bug
The `remove_column` method of the IterableDataset sets the dataset features to None.
### Steps to reproduce the bug
```python
from datasets import Audio, load_dataset
# load LS in streaming mode
dataset = load_dataset("librispeech_asr", "clean", split="validation", streaming=True)
# check original features
print("Original features: ", dataset.features.keys())
# define features to remove: we KEEP audio and text
COLUMNS_TO_REMOVE = ['chapter_id', 'speaker_id', 'file', 'id']
dataset = dataset.remove_columns(COLUMNS_TO_REMOVE)
# check processed features, uh-oh!
print("Processed features: ", dataset.features)
# streaming the first audio sample still works
print("First sample:", next(iter(ds)))
```
**Print Output:**
```
Original features: dict_keys(['file', 'audio', 'text', 'speaker_id', 'chapter_id', 'id'])
Processed features: None
First sample: {'audio': {'path': '2277-149896-0000.flac', 'array': array([ 0.00186157, 0.0005188 , 0.00024414, ..., -0.00097656,
-0.00109863, -0.00146484]), 'sampling_rate': 16000}, 'text': "HE WAS IN A FEVERED STATE OF MIND OWING TO THE BLIGHT HIS WIFE'S ACTION THREATENED TO CAST UPON HIS ENTIRE FUTURE"}
```
### Expected behavior
The features should be those **not** removed by the `remove_column` method, i.e. audio and text.
### Environment info
- `datasets` version: 2.7.1
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.15
- PyArrow version: 9.0.0
- Pandas version: 1.3.5
(Running on Google Colab for a blog post: https://colab.research.google.com/drive/1ySCQREPZEl4msLfxb79pYYOWjUZhkr9y#scrollTo=8pRDGiVmH2ml)
cc @polinaeterna @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/5284/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5284/timeline | null | completed | null | null | false | [
"Related to https://github.com/huggingface/datasets/issues/5245",
"#self-assign",
"Thanks @lhoestq and @alvarobartt!\r\n\r\nThis would be extremely helpful to have working for the Whisper fine-tuning event - we're **only** training using streaming mode, so it'll be quite important to have this feature working to make training as easy as possible!\r\n\r\n_c.f._ https://twitter.com/sanchitgandhi99/status/1592188332171493377",
"> Thanks @lhoestq and @alvarobartt!\n> \n> \n> \n> This would be extremely helpful to have working for the Whisper fine-tuning event - we're **only** training using streaming mode, so it'll be quite important to have this feature working to make training as easy as possible!\n> \n> \n> \n> _c.f._ https://twitter.com/sanchitgandhi99/status/1592188332171493377\n\nI'm almost done with at least a temporary fix to `rename_column`, `rename_columns`, and `remove_columns`, just trying to figure out how to extend it to the `map` function itself!\n\nI'll probably open the PR for review either tomorrow or Sunday hopefully! Glad I can help you and HuggingFace 🤗 ",
"Awesome - thank you so much for this PR @alvarobartt! Is much appreciated!",
"@sanchit-gandhi PR is ready and open for review at #5287, but there's still one issue I may need @lhoestq's input :hugs:",
"Let us know @sanchit-gandhi if you need a new release of `datasets` soon with this fix included :)",
"Thanks for the fix guys! We can direct people to install `datasets` from main if that's easier!",
"Hey guys, any update around this? I'm facing the same issue with a streamable dataset. ",
"Hi @asennoussi so this was already fixed and released as part of https://github.com/huggingface/datasets/releases/tag/2.8.0, so you should be able to install it as `pip install datasets==2.8.0` or just to use `pip install datasets --upgrade` to get the latest version, as of now, the https://github.com/huggingface/datasets/releases/tag/2.9.0 released last week! 🤗",
"Still facing the same issue though: \r\n```\r\nfrom datasets import IterableDatasetDict, load_dataset\r\n\r\nraw_datasets = vectorized_datasets = IterableDatasetDict()\r\n\r\n\r\nraw_datasets[\"train\"] = load_dataset(\"asennoussi/private\", split=\"train\", use_auth_token=True, streaming=True)\r\nraw_datasets[\"test\"] = load_dataset(\"asennoussi/private\", split=\"test\", use_auth_token=True, streaming=True)\r\n\r\nprint(\"Original features: \", raw_datasets['train'].features.keys())\r\n\r\n...\r\n\r\ndef prepare_dataset(batch):\r\n\r\n # load and (possibly) resample audio datato 16kHz\r\n audio = batch[\"audio\"]\r\n\r\n # compute log-Mel input features from input audio array \r\n batch[\"input_features\"] = processor.feature_extractor(audio[\"array\"], sampling_rate=audio[\"sampling_rate\"]).input_features[0]\r\n # compute input length of audio sample in seconds\r\n batch[\"input_length\"] = len(audio[\"array\"]) / audio[\"sampling_rate\"]\r\n \r\n # optional pre-processing steps\r\n transcription = batch[\"sentence\"]\r\n \r\n # encode target text to label ids\r\n batch[\"labels\"] = processor.tokenizer(transcription).input_ids\r\n batch[\"labels_length\"] = len(batch[\"labels\"])\r\n return batch\r\n...\r\nvectorized_datasets = vectorized_datasets.remove_columns(['input_length', 'labels_length']+list(next(iter(raw_datasets.values())).features))\r\nprint(\"Processed features: \", vectorized_datasets['train'].features)\r\nprint(\"First sample:\", next(iter(vectorized_datasets['train'])))\r\n\r\n```\r\n\r\nOutput: \r\n```\r\nOriginal features: dict_keys(['path', 'audio', 'sentence'])\r\nProcessed features: None\r\n```",
"Hmm weird, could you try to print\r\n\r\n```python\r\nprint(\"Processed features: \", vectorized_datasets['train'].features)\r\n```\r\n\r\nagain after iterating over the `vectorized_datasets`? In the code above, should be last line :)",
"Didn't seem to fix it: \r\n```\r\nOriginal features: dict_keys(['path', 'audio', 'sentence'])\r\nProcessed features: None\r\nProcessed features: None\r\n```",
"Actually the culprit looks to be this one: \r\n`vectorized_datasets = raw_datasets.map(prepare_dataset).with_format(\"torch\")`\r\nWhen I remove this line: `vectorized_datasets = vectorized_datasets.remove_columns(['input_length', 'labels_length']+list(next(iter(raw_datasets.values())).features))`\r\n\r\nI still get \r\n```\r\nProcessed features: None\r\n```",
"The culprit is definitely `.map` \r\nJust validated it. \r\nAny idea please? ",
"> The culprit is definitely `.map` Just validated it. Any idea please?\r\n\r\nYes, indeed `.map` losses the features, because AFAIK pre-fetching the data to infer the features is expensive and not ideal, that's part of this issue https://github.com/huggingface/datasets/issues/3888\r\n\r\nAnyway, now you can pass the `features` as a param to `.map` as follows:\r\n\r\n```python\r\nfrom datasets import Features\r\nvectorized_datasets = raw_datasets.map(\r\n prepare_dataset,\r\n features=Features(\r\n {\"path\": raw_datasets[\"train\"].info.features[\"path\"], \"audio\": raw_datasets[\"train\"].info.features[\"audio\"], \"sentence\": raw_datasets[\"train\"].info.features[\"sentence\"]}\r\n ),\r\n).with_format(\"torch\")\r\n```\r\n\r\nAlso, to let you know, when calling `.remove_columns` over an `IterableDataset`, the `features` are not lost, as well as `.rename_column` and `rename_columns` :)\r\n\r\nMore information about the latter at https://github.com/huggingface/datasets/pull/5287",
"@asennoussi alternatively you can just call `._resolve_features()` from your `IterableDataset` and it will pre-fetch the data to resolve the features, but note that feature-inference is not as accurate as if you manually specify which features and feature-types the `IterableDataset` has, as mentioned in the comment above, the alternative is to provide `features` param to `.map` :hugs:",
"Got it thanks a lot! "
] |
https://api.github.com/repos/huggingface/datasets/issues/5146 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5146/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5146/comments | https://api.github.com/repos/huggingface/datasets/issues/5146/events | https://github.com/huggingface/datasets/pull/5146 | 1,418,331,282 | PR_kwDODunzps5BSUWW | 5,146 | Delete duplicate issue template file | [] | closed | false | null | 1 | 2022-10-21T13:18:46Z | 2022-10-21T13:52:30Z | 2022-10-21T13:50:04Z | null | A conflict between two PRs:
- #5116
- #5136
was not properly resolved, resulting in a duplicate issue template.
This PR removes the duplicate template. | {
"+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/5146/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5146/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/5146.diff",
"html_url": "https://github.com/huggingface/datasets/pull/5146",
"merged_at": "2022-10-21T13:50:04Z",
"patch_url": "https://github.com/huggingface/datasets/pull/5146.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/5146"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._"
] |
https://api.github.com/repos/huggingface/datasets/issues/64 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/64/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/64/comments | https://api.github.com/repos/huggingface/datasets/issues/64/events | https://github.com/huggingface/datasets/pull/64 | 614,737,057 | MDExOlB1bGxSZXF1ZXN0NDE1MjMwMjYy | 64 | [Datasets] Make master ready for datasets adding | [] | closed | false | null | 0 | 2020-05-08T13:17:00Z | 2020-05-08T13:17:31Z | 2020-05-08T13:17:30Z | null | Add all relevant files so that datasets can now be added on master | {
"+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/64/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/64/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/64.diff",
"html_url": "https://github.com/huggingface/datasets/pull/64",
"merged_at": "2020-05-08T13:17:30Z",
"patch_url": "https://github.com/huggingface/datasets/pull/64.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/64"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/756 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/756/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/756/comments | https://api.github.com/repos/huggingface/datasets/issues/756/events | https://github.com/huggingface/datasets/pull/756 | 728,211,373 | MDExOlB1bGxSZXF1ZXN0NTA4OTYwNTc3 | 756 | Start community-provided dataset docs | [] | closed | false | null | 1 | 2020-10-23T13:17:41Z | 2020-10-26T12:55:20Z | 2020-10-26T12:55:19Z | null | Continuation of #736 with clean fork.
#### Old description
This is what I did to get the pseudo-labels updated. Not sure if it generalizes, but I figured I would write it down. It was pretty easy because all I had to do was make properly formatted directories and change URLs.
In slack @thomwolf called it a user-namespace dataset, but the docs call it community dataset.
I think the first naming is clearer, but I didn't address that here.
I didn't add metadata, will try 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/756/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/756/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/756.diff",
"html_url": "https://github.com/huggingface/datasets/pull/756",
"merged_at": "2020-10-26T12:55:19Z",
"patch_url": "https://github.com/huggingface/datasets/pull/756.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/756"
} | true | [
"Oh, really cool @sshleifer!"
] |
https://api.github.com/repos/huggingface/datasets/issues/1347 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1347/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1347/comments | https://api.github.com/repos/huggingface/datasets/issues/1347/events | https://github.com/huggingface/datasets/pull/1347 | 759,845,231 | MDExOlB1bGxSZXF1ZXN0NTM0Nzc3NjQ0 | 1,347 | Add spanish billion words corpus | [] | closed | false | null | 4 | 2020-12-08T22:51:38Z | 2020-12-11T11:26:39Z | 2020-12-11T11:15:28Z | null | Add an unannotated Spanish corpus of nearly 1.5 billion words, compiled from different resources from the web. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 2,
"total_count": 2,
"url": "https://api.github.com/repos/huggingface/datasets/issues/1347/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1347/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1347.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1347",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/1347.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1347"
} | true | [
"Thank you for your feedback! I've reduced the dummy data size to 2KB.\r\n\r\nI had to rebase to fix `RemoteDatasetTest` fails, sorry about the 80 commits. \r\nI could create a new clean PR if you prefer.",
"I have seen that in similar cases you have suggested to other contributors to create another branch and another PR, so I will do that.",
"Yes thank you !",
"The new PR is #1476 :)"
] |
https://api.github.com/repos/huggingface/datasets/issues/2986 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2986/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2986/comments | https://api.github.com/repos/huggingface/datasets/issues/2986/events | https://github.com/huggingface/datasets/pull/2986 | 1,010,792,783 | PR_kwDODunzps4scSHR | 2,986 | Refac module factory + avoid etag requests for hub datasets | [] | closed | false | null | 6 | 2021-09-29T10:42:00Z | 2021-10-11T11:05:53Z | 2021-10-11T11:05:52Z | null | ## Refactor the module factory
When trying to extend the `data_files` logic to avoid doing unnecessary ETag requests, I noticed that the module preparation mechanism needed a refactor:
- the function was 600 lines long
- it was not readable
- it contained many different cases that made it complex to maintain
- it was hard to properly test it
- it was hard to extend without breaking anything
The module preparation mechanism is in charge of taking the name of a dataset or a metric given by the user (ex: "squad", "accuracy", "lhoestq/test", "path/to/my/script.py", "path/to/my/data/directory", "json", "csv") and return a module (possibly downloaded from the Hub) that contains the dataset builder or the metric class to use.
### Implementation details
I decided to separate all these use cases into different dataset/metric module factories.
First, the metric module factories:
- **CanonicalMetricModuleFactory**: "accuracy", "rouge", ...
- **LocalMetricModuleFactory**: "path/to/my/metric.py"
Then, the dataset module factories:
- **CanonicalDatasetModuleFactory**: "squad", "glue", ...
- **CommunityDatasetModuleFactoryWithScript**: "lhoestq/test"
- **CommunityDatasetModuleFactoryWithoutScript**: "lhoestq/demo1"
- **PackagedDatasetModuleFactory**: "json", "csv", ...
- **LocalDatasetModuleFactoryWithScript**: "path/to/my/script.py"
- **LocalDatasetModuleFactoryWithoutScript**: "path/to/my/data/directory"
And finally, additional factories when users have no internet:
- **CachedDatasetModuleFactory**
- **CachedMetricModuleFactory**
### Breaking changes
One thing is that I still don't know at what extent we want to keep backward compatibility for `prepare_module`. For now I just kept it (except I removed two parameters) just in case, but it's not used anywhere anymore.
## Avoid etag requests for hub datasets
To do this I added a class `DataFilesDict` that can be hashed to define the cache directory of the dataset.
It contains the usual data files formatted as `{"train": ["train.txt"]}` for example.
But each list of file is a `DataFilesList` that also has a `origin_metadata` attribute that contains metadata about the origin of each file:
- for URLs: it stores the ETags of the files
- for local files: it stores the last modification data
- for files from a Hugging Face repository on the Hub: it stores the pattern (`*`, `*.csv`, "train.txt", etc.) and the commit sha of the repository (so there're no ETag requests !)
This way if any file changes, the hash of the `DataFilesDict` changes too !
You can instantiate a `DataFilesDict` by using patterns for local/remote files or files in a HF repository:
- for local/remote files: `DataFilesDict.from_local_or_remote(patterns)`
- for files in a HF repository: `DataFilesDict.from_hf_repo(patterns, dataset_info)`
Fix #2859
## TODO
Fix the latest test:
- [x] fix the call to dataset_info in offline mode (related to https://github.com/huggingface/huggingface_hub/issues/372)
Add some more tests:
- [x] test all the factories
- [x] test the new data files logic
Other:
- [x] docstrings
- [x] comments | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 1,
"hooray": 2,
"laugh": 0,
"rocket": 0,
"total_count": 3,
"url": "https://api.github.com/repos/huggingface/datasets/issues/2986/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2986/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2986.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2986",
"merged_at": "2021-10-11T11:05:51Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2986.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2986"
} | true | [
"> One thing is that I still don't know at what extent we want to keep backward compatibility for prepare_module. For now I just kept it (except I removed two parameters) just in case, but it's not used anywhere anymore.\r\n\r\nFYI, various other projects currently use it, thus clearly a major version would be required:\r\n\r\nhttps://github.com/search?q=org%3Ahuggingface+prepare_module&type=code",
"Yea so I kept `prepare_module` and changed it to use all the factories I added, so all the use cases in the link you shared are still working. The only two parameters I removed are minor IMO and were a bit hacky anyway (return_resolved_file_path and return_associated_base_path). I think they were only used internally in `datasets` but let me know if you're aware of a use case I didn't think of.",
"I think I'm done with the tests :) I'll do the comments/docs and then we just wait for https://github.com/huggingface/huggingface_hub/pull/373 to get merged",
"When there's a new release of `huggingface_hub` (probably on monday), it will fix the CI.\r\n\r\nThe PR is ready for review. Let me know if I need to clarify some parts",
"One additional change I did: the tests won't affect the number of downloads on the website anymore. And users can choose to not update the number of downloads with `HF_UPDATE_DOWNLOAD_COUNTS=0`",
"CI failures are simply due to RAM issues with circleci workers.\r\nAnd on windows there is an issue with installing `ruamel.yaml` from the bump of `huggingface_hub` (fixed on master)"
] |
https://api.github.com/repos/huggingface/datasets/issues/5617 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5617/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5617/comments | https://api.github.com/repos/huggingface/datasets/issues/5617/events | https://github.com/huggingface/datasets/pull/5617 | 1,612,947,422 | PR_kwDODunzps5LcvI- | 5,617 | Fix CI by temporarily pinning fsspec < 2023.3.0 | [] | closed | false | null | 2 | 2023-03-07T08:18:20Z | 2023-03-07T08:44:55Z | 2023-03-07T08:37:28Z | null | As a hotfix for our CI, temporarily pin `fsspec`:
Fix #5616.
Until root cause is fixed, see:
- #5614 | {
"+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/5617/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5617/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/5617.diff",
"html_url": "https://github.com/huggingface/datasets/pull/5617",
"merged_at": "2023-03-07T08:37:28Z",
"patch_url": "https://github.com/huggingface/datasets/pull/5617.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/5617"
} | 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.008771 / 0.011353 (-0.002582) | 0.004665 / 0.011008 (-0.006343) | 0.101645 / 0.038508 (0.063137) | 0.030190 / 0.023109 (0.007081) | 0.298581 / 0.275898 (0.022683) | 0.371206 / 0.323480 (0.047727) | 0.007272 / 0.007986 (-0.000714) | 0.003432 / 0.004328 (-0.000896) | 0.078645 / 0.004250 (0.074395) | 0.037640 / 0.037052 (0.000588) | 0.314014 / 0.258489 (0.055525) | 0.345682 / 0.293841 (0.051841) | 0.033675 / 0.128546 (-0.094871) | 0.011513 / 0.075646 (-0.064134) | 0.320683 / 0.419271 (-0.098589) | 0.041633 / 0.043533 (-0.001900) | 0.302697 / 0.255139 (0.047558) | 0.323560 / 0.283200 (0.040361) | 0.089309 / 0.141683 (-0.052374) | 1.477570 / 1.452155 (0.025415) | 1.528004 / 1.492716 (0.035287) |\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.184710 / 0.018006 (0.166704) | 0.412794 / 0.000490 (0.412305) | 0.001421 / 0.000200 (0.001221) | 0.000069 / 0.000054 (0.000014) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.023133 / 0.037411 (-0.014278) | 0.099492 / 0.014526 (0.084967) | 0.104806 / 0.176557 (-0.071751) | 0.150765 / 0.737135 (-0.586370) | 0.110127 / 0.296338 (-0.186211) |\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.438642 / 0.215209 (0.223433) | 4.349753 / 2.077655 (2.272098) | 2.178754 / 1.504120 (0.674634) | 1.952839 / 1.541195 (0.411645) | 1.840574 / 1.468490 (0.372084) | 0.694016 / 4.584777 (-3.890761) | 3.375186 / 3.745712 (-0.370526) | 1.892391 / 5.269862 (-3.377470) | 1.177643 / 4.565676 (-3.388033) | 0.082328 / 0.424275 (-0.341947) | 0.012280 / 0.007607 (0.004673) | 0.534478 / 0.226044 (0.308434) | 5.377043 / 2.268929 (3.108114) | 2.645273 / 55.444624 (-52.799351) | 2.336391 / 6.876477 (-4.540086) | 2.387917 / 2.142072 (0.245845) | 0.814399 / 4.805227 (-3.990828) | 0.149226 / 6.500664 (-6.351438) | 0.066614 / 0.075469 (-0.008855) |\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.205467 / 1.841788 (-0.636321) | 13.857481 / 8.074308 (5.783173) | 14.269958 / 10.191392 (4.078566) | 0.152199 / 0.680424 (-0.528225) | 0.029083 / 0.534201 (-0.505118) | 0.397590 / 0.579283 (-0.181693) | 0.410587 / 0.434364 (-0.023777) | 0.480479 / 0.540337 (-0.059858) | 0.576014 / 1.386936 (-0.810922) |\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.006956 / 0.011353 (-0.004397) | 0.004914 / 0.011008 (-0.006094) | 0.077571 / 0.038508 (0.039063) | 0.028309 / 0.023109 (0.005200) | 0.344523 / 0.275898 (0.068625) | 0.383039 / 0.323480 (0.059560) | 0.005202 / 0.007986 (-0.002783) | 0.003513 / 0.004328 (-0.000816) | 0.076393 / 0.004250 (0.072142) | 0.042035 / 0.037052 (0.004982) | 0.342950 / 0.258489 (0.084461) | 0.387432 / 0.293841 (0.093591) | 0.032267 / 0.128546 (-0.096280) | 0.011914 / 0.075646 (-0.063732) | 0.087140 / 0.419271 (-0.332131) | 0.042624 / 0.043533 (-0.000909) | 0.342391 / 0.255139 (0.087253) | 0.367016 / 0.283200 (0.083817) | 0.091757 / 0.141683 (-0.049926) | 1.515845 / 1.452155 (0.063690) | 1.607929 / 1.492716 (0.115213) |\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.234461 / 0.018006 (0.216455) | 0.420430 / 0.000490 (0.419941) | 0.000403 / 0.000200 (0.000203) | 0.000059 / 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.026639 / 0.037411 (-0.010772) | 0.101860 / 0.014526 (0.087334) | 0.109696 / 0.176557 (-0.066860) | 0.160902 / 0.737135 (-0.576233) | 0.112431 / 0.296338 (-0.183907) |\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.438444 / 0.215209 (0.223235) | 4.378881 / 2.077655 (2.301226) | 2.063975 / 1.504120 (0.559855) | 1.863069 / 1.541195 (0.321874) | 1.955684 / 1.468490 (0.487193) | 0.694106 / 4.584777 (-3.890671) | 3.467683 / 3.745712 (-0.278029) | 2.882441 / 5.269862 (-2.387421) | 1.484533 / 4.565676 (-3.081143) | 0.082682 / 0.424275 (-0.341593) | 0.012597 / 0.007607 (0.004990) | 0.539219 / 0.226044 (0.313174) | 5.384838 / 2.268929 (3.115909) | 2.528273 / 55.444624 (-52.916351) | 2.190332 / 6.876477 (-4.686145) | 2.252573 / 2.142072 (0.110500) | 0.801047 / 4.805227 (-4.004180) | 0.151082 / 6.500664 (-6.349582) | 0.067564 / 0.075469 (-0.007905) |\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.306469 / 1.841788 (-0.535319) | 14.220154 / 8.074308 (6.145846) | 13.300979 / 10.191392 (3.109586) | 0.153827 / 0.680424 (-0.526597) | 0.016818 / 0.534201 (-0.517383) | 0.383528 / 0.579283 (-0.195755) | 0.393970 / 0.434364 (-0.040394) | 0.468395 / 0.540337 (-0.071943) | 0.558748 / 1.386936 (-0.828188) |\n\n</details>\n</details>\n\n\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/3564 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3564/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3564/comments | https://api.github.com/repos/huggingface/datasets/issues/3564/events | https://github.com/huggingface/datasets/pull/3564 | 1,099,214,403 | PR_kwDODunzps4wzSOL | 3,564 | Add the KMWP & DKTC dataset. | [] | closed | false | null | 3 | 2022-01-11T14:14:08Z | 2022-01-12T15:33:49Z | 2022-01-12T15:33:28Z | null | Add the DKTC dataset.
- https://github.com/tunib-ai/DKTC | {
"+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/3564/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3564/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3564.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3564",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/3564.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3564"
} | true | [
"I reflect your review. cc. @lhoestq ",
"Ah sorry, I missed KMWP comment, wait.",
"I request 2 new pull requests. #3569 #3570"
] |
https://api.github.com/repos/huggingface/datasets/issues/5053 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5053/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5053/comments | https://api.github.com/repos/huggingface/datasets/issues/5053/events | https://github.com/huggingface/datasets/issues/5053 | 1,393,739,882 | I_kwDODunzps5TEshq | 5,053 | Intermittent JSON parse error when streaming the Pile | [
{
"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"
}
] | open | false | null | 3 | 2022-10-02T11:56:46Z | 2022-10-04T17:59:03Z | null | null | ## Describe the bug
I have an intermittent error when streaming the Pile, where I get a JSON parse error which causes my program to crash.
This is intermittent - when I rerun the program with the same random seed it does not crash in the same way. The exact point this happens also varied - it happened to me 11B tokens and 4 days into a training run, and now just happened 2 minutes into one, but I can't reliably reproduce it.
I'm using a remote machine with 8 A6000 GPUs via runpod.io
## Expected results
I have a DataLoader which can iterate through the whole Pile
## Actual results
Stack trace:
```
Failed to read file 'zstd://12.jsonl::https://the-eye.eu/public/AI/pile/train/12.jsonl.zst' with error <class 'pyarrow.lib.ArrowInvalid'>: JSON parse error: Invalid value. in row 0
```
I'm currently using HuggingFace accelerate, which also gave me the following stack trace, but I've also experienced this problem intermittently when using DataParallel, so I don't think it's to do with parallelisation
```
Traceback (most recent call last):
File "ddp_script.py", line 1258, in <module>
main()
File "ddp_script.py", line 1143, in main
for c, batch in tqdm.tqdm(enumerate(data_iter)):
File "/opt/conda/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/opt/conda/lib/python3.7/site-packages/accelerate/data_loader.py", line 503, in __iter__
next_batch, next_batch_info, next_skip = self._fetch_batches(main_iterator)
File "/opt/conda/lib/python3.7/site-packages/accelerate/data_loader.py", line 454, in _fetch_batches
broadcast_object_list(batch_info)
File "/opt/conda/lib/python3.7/site-packages/accelerate/utils/operations.py", line 333, in broadcast_object_list
torch.distributed.broadcast_object_list(object_list, src=from_process)
File "/opt/conda/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 1900, in broadcast_object_list
object_list[i] = _tensor_to_object(obj_view, obj_size)
File "/opt/conda/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 1571, in _tensor_to_object
return _unpickler(io.BytesIO(buf)).load()
_pickle.UnpicklingError: invalid load key, '@'.
```
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset(
cfg["dataset_name"], streaming=True, split="train")
dataset = dataset.remove_columns("meta")
dataset = dataset.map(tokenize_and_concatenate, batched=True)
dataset = dataset.with_format(type="torch")
train_data_loader = DataLoader(
dataset, batch_size=cfg["batch_size"], num_workers=3)
for batch in train_data_loader:
continue
```
`tokenize_and_concatenate` is a custom tokenization function I defined on the GPT-NeoX tokenizer to tokenize the text, separated by endoftext tokens, and reshape to have length batch_size, I don't think this is related to tokenization:
```
import numpy as np
import einops
import torch
def tokenize_and_concatenate(examples):
texts = examples["text"]
full_text = tokenizer.eos_token.join(texts)
div = 20
length = len(full_text) // div
text_list = [full_text[i * length: (i + 1) * length]
for i in range(div)]
tokens = tokenizer(text_list, return_tensors="np", padding=True)[
"input_ids"
].flatten()
tokens = tokens[tokens != tokenizer.pad_token_id]
n = len(tokens)
curr_batch_size = n // (seq_len - 1)
tokens = tokens[: (seq_len - 1) * curr_batch_size]
tokens = einops.rearrange(
tokens,
"(batch_size seq) -> batch_size seq",
batch_size=curr_batch_size,
seq=seq_len - 1,
)
prefix = np.ones((curr_batch_size, 1), dtype=np.int64) * \
tokenizer.bos_token_id
return {
"text": np.concatenate([prefix, tokens], axis=1)
}
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-105-generic-x86_64-with-debian-buster-sid
- Python version: 3.7.13
- PyArrow version: 9.0.0
- Pandas version: 1.3.5
ZStandard data:
Version: 0.18.0
Summary: Zstandard bindings for Python
Home-page: https://github.com/indygreg/python-zstandard
Author: Gregory Szorc
Author-email: gregory.szorc@gmail.com
License: BSD
Location: /opt/conda/lib/python3.7/site-packages
Requires:
Required-by: | {
"+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/5053/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5053/timeline | null | null | null | null | false | [
"Maybe #2838 can help. In this PR we allow to skip bad chunks of JSON data to not crash the training\r\n\r\nDid you have warning messages before the error ?\r\n\r\nsomething like this maybe ?\r\n```\r\n03/24/2022 02:19:46 - WARNING - datasets.utils.streaming_download_manager - Got disconnected from remote data host. Retrying in 5sec [1/20]\r\n03/24/2022 02:20:01 - WARNING - datasets.utils.streaming_download_manager - Got disconnected from remote data host. Retrying in 5sec [2/20]\r\n03/24/2022 02:20:09 - ERROR - datasets.packaged_modules.json.json - Failed to read file 'gzip://file-000000000007.json::https://huggingface.co/datasets/lvwerra/codeparrot-clean-train/resolve/1d740acb9d09cf7a3307553323e2c677a6535407/file-000000000007.json.gz' with error <class 'pyarrow.lib.ArrowInvalid'>: JSON parse error: Invalid value. in row 0\r\n```",
"Ah, thanks! I did get errors like that. Sad that PR wasn't merged in! \r\n\r\nI'm currently just downloading 200GB of the Pile locally to avoid streaming (I have space and it's faster anyway), but that's really useful! I can probably apply the dumb patch of just commenting out the bits that raise the JSON Parse Error lol, based on your code - if I continue the loop should it be fine?",
"Yup you can get some inspiration from this PR. It simply ignores the bad chunks (a chunk is ~a few MBs of data).\r\nWe'll try to merge this PR soon"
] |
https://api.github.com/repos/huggingface/datasets/issues/3314 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3314/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3314/comments | https://api.github.com/repos/huggingface/datasets/issues/3314/events | https://github.com/huggingface/datasets/pull/3314 | 1,061,448,227 | PR_kwDODunzps4u6mdX | 3,314 | Adding arg to pass process rank to `map` | [] | closed | false | null | 1 | 2021-11-23T15:55:21Z | 2021-11-24T11:54:13Z | 2021-11-24T11:54:13Z | null | This PR adds a `with_rank` argument to `map` that gives the user the possibility to pass the rank of each process to their function. This is mostly designed for multi-GPU map (each process can be sent to a different device thanks to the rank). I've also added tests. I'm putting the PR up so you can check the code, I'll add a multi-GPU example to the doc (+ write a bit in the doc for the new arg) | {
"+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/3314/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3314/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3314.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3314",
"merged_at": "2021-11-24T11:54:13Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3314.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3314"
} | true | [
"Some commits seem to be there twice (made the mistake of rebasing because I wasn't sure whether the doc had changed), is this an issue @lhoestq ?"
] |
https://api.github.com/repos/huggingface/datasets/issues/4744 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4744/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4744/comments | https://api.github.com/repos/huggingface/datasets/issues/4744/events | https://github.com/huggingface/datasets/issues/4744 | 1,317,822,345 | I_kwDODunzps5OjF-J | 4,744 | Remove instructions to generate dummy data from our docs | [
{
"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 | 2 | 2022-07-26T07:32:58Z | 2022-08-02T23:50:30Z | 2022-08-02T23:50:30Z | null | In our docs, we indicate to generate the dummy data: https://huggingface.co/docs/datasets/dataset_script#testing-data-and-checksum-metadata
However:
- dummy data makes sense only for datasets in our GitHub repo: so that we can test their loading with our CI
- for datasets on the Hub:
- they do not pass any CI test requiring dummy data
- there are no instructions on how they can test their dataset locally using the dummy data
- the generation of the dummy data assumes our GitHub directory structure:
- the dummy data will be generated under `./datasets/<dataset_name>/dummy` even if locally there is no `./datasets` directory (which is the usual case). See issue:
- #4742
CC: @stevhliu | {
"+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/4744/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4744/timeline | null | completed | null | null | false | [
"Note that for me personally, conceptually all the dummy data (even for \"canonical\" datasets) should be superseded by `datasets-server`, which performs some kind of CI/CD of datasets (including the canonical ones)",
"I totally agree: next step should be rethinking if dummy data makes sense for canonical datasets (once we have datasets-server) and eventually remove it.\r\n\r\nBut for now, we could at least start by removing the indication to generate dummy data from our docs."
] |
https://api.github.com/repos/huggingface/datasets/issues/5872 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5872/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5872/comments | https://api.github.com/repos/huggingface/datasets/issues/5872/events | https://github.com/huggingface/datasets/pull/5872 | 1,713,174,662 | PR_kwDODunzps5QrQ5o | 5,872 | Fix infer module for uppercase extensions | [] | closed | false | null | 2 | 2023-05-17T05:56:45Z | 2023-05-17T14:26:59Z | 2023-05-17T14:19:18Z | null | Fix the `infer_module_for_data_files` and `infer_module_for_data_files_in_archives` functions when passed a data file name with uppercase extension, e.g. `filename.TXT`.
Before, `None` module was returned. | {
"+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/5872/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5872/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/5872.diff",
"html_url": "https://github.com/huggingface/datasets/pull/5872",
"merged_at": "2023-05-17T14:19:18Z",
"patch_url": "https://github.com/huggingface/datasets/pull/5872.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/5872"
} | 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.007049 / 0.011353 (-0.004304) | 0.005034 / 0.011008 (-0.005974) | 0.097737 / 0.038508 (0.059229) | 0.033280 / 0.023109 (0.010170) | 0.301017 / 0.275898 (0.025119) | 0.336593 / 0.323480 (0.013113) | 0.005567 / 0.007986 (-0.002419) | 0.005384 / 0.004328 (0.001056) | 0.072980 / 0.004250 (0.068730) | 0.045030 / 0.037052 (0.007978) | 0.303280 / 0.258489 (0.044791) | 0.367528 / 0.293841 (0.073687) | 0.034131 / 0.128546 (-0.094415) | 0.012118 / 0.075646 (-0.063528) | 0.331677 / 0.419271 (-0.087594) | 0.049211 / 0.043533 (0.005678) | 0.297535 / 0.255139 (0.042396) | 0.318136 / 0.283200 (0.034936) | 0.101574 / 0.141683 (-0.040109) | 1.472769 / 1.452155 (0.020615) | 1.541724 / 1.492716 (0.049007) |\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.014646 / 0.018006 (-0.003360) | 0.439050 / 0.000490 (0.438560) | 0.008575 / 0.000200 (0.008375) | 0.000297 / 0.000054 (0.000242) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.027591 / 0.037411 (-0.009820) | 0.111639 / 0.014526 (0.097113) | 0.117098 / 0.176557 (-0.059458) | 0.173281 / 0.737135 (-0.563855) | 0.123197 / 0.296338 (-0.173141) |\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.397507 / 0.215209 (0.182298) | 3.971457 / 2.077655 (1.893803) | 1.781158 / 1.504120 (0.277038) | 1.590419 / 1.541195 (0.049224) | 1.716374 / 1.468490 (0.247884) | 0.687150 / 4.584777 (-3.897627) | 3.691009 / 3.745712 (-0.054703) | 2.050900 / 5.269862 (-3.218961) | 1.304893 / 4.565676 (-3.260784) | 0.084507 / 0.424275 (-0.339768) | 0.012231 / 0.007607 (0.004624) | 0.493033 / 0.226044 (0.266988) | 4.929957 / 2.268929 (2.661028) | 2.209069 / 55.444624 (-53.235555) | 1.885992 / 6.876477 (-4.990485) | 2.007004 / 2.142072 (-0.135069) | 0.827265 / 4.805227 (-3.977963) | 0.168225 / 6.500664 (-6.332439) | 0.064988 / 0.075469 (-0.010481) |\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.182341 / 1.841788 (-0.659447) | 14.691983 / 8.074308 (6.617674) | 14.350720 / 10.191392 (4.159328) | 0.164307 / 0.680424 (-0.516117) | 0.017480 / 0.534201 (-0.516720) | 0.421843 / 0.579283 (-0.157441) | 0.417481 / 0.434364 (-0.016883) | 0.496587 / 0.540337 (-0.043751) | 0.581208 / 1.386936 (-0.805728) |\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.007070 / 0.011353 (-0.004283) | 0.005083 / 0.011008 (-0.005926) | 0.075009 / 0.038508 (0.036500) | 0.032343 / 0.023109 (0.009234) | 0.366788 / 0.275898 (0.090890) | 0.392273 / 0.323480 (0.068794) | 0.005512 / 0.007986 (-0.002474) | 0.003999 / 0.004328 (-0.000329) | 0.073743 / 0.004250 (0.069492) | 0.046203 / 0.037052 (0.009151) | 0.367874 / 0.258489 (0.109385) | 0.409154 / 0.293841 (0.115313) | 0.035227 / 0.128546 (-0.093319) | 0.012223 / 0.075646 (-0.063424) | 0.087149 / 0.419271 (-0.332122) | 0.045648 / 0.043533 (0.002115) | 0.362414 / 0.255139 (0.107275) | 0.379970 / 0.283200 (0.096770) | 0.100631 / 0.141683 (-0.041052) | 1.439733 / 1.452155 (-0.012422) | 1.506266 / 1.492716 (0.013550) |\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.227071 / 0.018006 (0.209065) | 0.451243 / 0.000490 (0.450753) | 0.000406 / 0.000200 (0.000206) | 0.000060 / 0.000054 (0.000006) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.028952 / 0.037411 (-0.008459) | 0.111934 / 0.014526 (0.097408) | 0.124080 / 0.176557 (-0.052477) | 0.174022 / 0.737135 (-0.563113) | 0.126811 / 0.296338 (-0.169527) |\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.436423 / 0.215209 (0.221214) | 4.331959 / 2.077655 (2.254304) | 2.111914 / 1.504120 (0.607794) | 1.921338 / 1.541195 (0.380143) | 1.994425 / 1.468490 (0.525935) | 0.699164 / 4.584777 (-3.885613) | 3.722143 / 3.745712 (-0.023569) | 3.516538 / 5.269862 (-1.753323) | 1.867245 / 4.565676 (-2.698431) | 0.085923 / 0.424275 (-0.338352) | 0.012059 / 0.007607 (0.004452) | 0.586147 / 0.226044 (0.360102) | 5.395823 / 2.268929 (3.126894) | 2.594430 / 55.444624 (-52.850194) | 2.275021 / 6.876477 (-4.601456) | 2.347810 / 2.142072 (0.205737) | 0.835118 / 4.805227 (-3.970109) | 0.167089 / 6.500664 (-6.333575) | 0.064893 / 0.075469 (-0.010576) |\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.291423 / 1.841788 (-0.550365) | 14.992696 / 8.074308 (6.918388) | 13.307842 / 10.191392 (3.116450) | 0.163799 / 0.680424 (-0.516625) | 0.017315 / 0.534201 (-0.516886) | 0.461319 / 0.579283 (-0.117965) | 0.430474 / 0.434364 (-0.003889) | 0.568115 / 0.540337 (0.027777) | 0.647909 / 1.386936 (-0.739027) |\n\n</details>\n</details>\n\n\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/2952 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2952/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2952/comments | https://api.github.com/repos/huggingface/datasets/issues/2952/events | https://github.com/huggingface/datasets/pull/2952 | 1,002,704,096 | PR_kwDODunzps4sDU8S | 2,952 | Fix missing conda deps | [] | closed | false | null | 0 | 2021-09-21T15:23:01Z | 2021-09-22T04:39:59Z | 2021-09-21T15:30:44Z | null | `aiohttp` was added as a dependency in #2662 but was missing for the conda build, which causes the 1.12.0 and 1.12.1 to fail.
Fix #2932. | {
"+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/2952/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2952/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2952.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2952",
"merged_at": "2021-09-21T15:30:44Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2952.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2952"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/602 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/602/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/602/comments | https://api.github.com/repos/huggingface/datasets/issues/602/events | https://github.com/huggingface/datasets/pull/602 | 697,636,605 | MDExOlB1bGxSZXF1ZXN0NDgzNTU3NDM0 | 602 | apply offset to indices in multiprocessed map | [] | closed | false | null | 0 | 2020-09-10T08:54:30Z | 2020-09-10T11:03:39Z | 2020-09-10T11:03:37Z | null | Fix #597
I fixed the indices by applying an offset.
I added the case to our tests to make sure it doesn't happen again.
I also added the message proposed by @thomwolf in #597
```python
>>> d.select(range(10)).map(fn, with_indices=True, batched=True, num_proc=2, load_from_cache_file=False)
Done writing 10 indices in 80 bytes .
Testing the mapped function outputs
[0, 1]
Testing finished, running the mapping function on the dataset
Done writing 5 indices in 41 bytes .
Done writing 5 indices in 41 bytes .
Spawning 2 processes
[0, 1, 2, 3, 4]
[5, 6, 7, 8, 9]
#0: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 377.90ba/s]
#1: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 378.92ba/s]
Concatenating 2 shards from multiprocessing
# Dataset(features: {'label': ClassLabel(num_classes=2, names=['neg', 'pos'], names_file=None, id=None), 'text': Value(dtype='string', id=None)}, num_rows: 10)
``` | {
"+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/602/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/602/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/602.diff",
"html_url": "https://github.com/huggingface/datasets/pull/602",
"merged_at": "2020-09-10T11:03:37Z",
"patch_url": "https://github.com/huggingface/datasets/pull/602.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/602"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/4922 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4922/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4922/comments | https://api.github.com/repos/huggingface/datasets/issues/4922/events | https://github.com/huggingface/datasets/issues/4922 | 1,357,684,018 | I_kwDODunzps5Q7J0y | 4,922 | I/O error on Google Colab in streaming mode | [
{
"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 | 2022-08-31T18:08:26Z | 2022-08-31T18:15:48Z | 2022-08-31T18:15:48Z | null | ## Describe the bug
When trying to load a streaming dataset in Google Colab the loading fails with an I/O error
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
hf_ds = load_dataset(path='wmt19', name='cs-en', streaming=True, split=datasets.Split.VALIDATION)
list(hf_ds.take(5))
```
## Expected results
It should load five data points
## Actual results
```
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-13-7b5b8b1e7e58>](https://localhost:8080/#) in <module>
2 from datasets import load_dataset
3 hf_ds = load_dataset(path='wmt19', name='cs-en', streaming=True, split=datasets.Split.VALIDATION)
----> 4 list(hf_ds.take(5))
6 frames
[/usr/local/lib/python3.7/dist-packages/datasets/iterable_dataset.py](https://localhost:8080/#) in __iter__(self)
716
717 def __iter__(self):
--> 718 for key, example in self._iter():
719 if self.features:
720 # `IterableDataset` automatically fills missing columns with None.
[/usr/local/lib/python3.7/dist-packages/datasets/iterable_dataset.py](https://localhost:8080/#) in _iter(self)
706 else:
707 ex_iterable = self._ex_iterable
--> 708 yield from ex_iterable
709
710 def _iter_shard(self, shard_idx: int):
[/usr/local/lib/python3.7/dist-packages/datasets/iterable_dataset.py](https://localhost:8080/#) in __iter__(self)
582
583 def __iter__(self):
--> 584 yield from islice(self.ex_iterable, self.n)
585
586 def shuffle_data_sources(self, generator: np.random.Generator) -> "TakeExamplesIterable":
[/usr/local/lib/python3.7/dist-packages/datasets/iterable_dataset.py](https://localhost:8080/#) in __iter__(self)
110
111 def __iter__(self):
--> 112 yield from self.generate_examples_fn(**self.kwargs)
113
114 def shuffle_data_sources(self, generator: np.random.Generator) -> "ExamplesIterable":
[~/.cache/huggingface/modules/datasets_modules/datasets/wmt19/aeadcbe9f1cbf9969e603239d33d3e43670cf250c1158edf74f5f6e74d4f21d0/wmt_utils.py](https://localhost:8080/#) in _generate_examples(self, split_subsets, extraction_map, with_translation)
845 raise ValueError("Invalid number of files: %d" % len(files))
846
--> 847 for sub_key, ex in sub_generator(*sub_generator_args):
848 if not all(ex.values()):
849 continue
[~/.cache/huggingface/modules/datasets_modules/datasets/wmt19/aeadcbe9f1cbf9969e603239d33d3e43670cf250c1158edf74f5f6e74d4f21d0/wmt_utils.py](https://localhost:8080/#) in _parse_parallel_sentences(f1, f2, filename1, filename2)
923 l2_sentences, l2 = parse_file(f2_i, filename2)
924
--> 925 for line_id, (s1, s2) in enumerate(zip(l1_sentences, l2_sentences)):
926 key = f"{f_id}/{line_id}"
927 yield key, {l1: s1, l2: s2}
[~/.cache/huggingface/modules/datasets_modules/datasets/wmt19/aeadcbe9f1cbf9969e603239d33d3e43670cf250c1158edf74f5f6e74d4f21d0/wmt_utils.py](https://localhost:8080/#) in gen()
895
896 def gen():
--> 897 with open(path, encoding="utf-8") as f:
898 for line in f:
899 seg_match = re.match(seg_re, line)
ValueError: I/O operation on closed file.
```
## Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.4.0
- Platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 9.0.0. (the same error happened with PyArrow version 6.0.0)
- Pandas version: 1.3.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/4922/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4922/timeline | null | not_planned | null | null | false | [] |
https://api.github.com/repos/huggingface/datasets/issues/3368 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3368/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3368/comments | https://api.github.com/repos/huggingface/datasets/issues/3368/events | https://github.com/huggingface/datasets/pull/3368 | 1,069,403,624 | PR_kwDODunzps4vTObo | 3,368 | Fix dict source_datasets tagset validator | [] | closed | false | null | 0 | 2021-12-02T10:52:20Z | 2021-12-02T15:48:38Z | 2021-12-02T15:48:37Z | null | Currently, the `source_datasets` tag validation does not support passing a dict with configuration keys.
This PR:
- Extends `tagset_validator` to support regex tags
- Uses `tagset_validator` to validate dict `source_datasets` | {
"+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/3368/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3368/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3368.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3368",
"merged_at": "2021-12-02T15:48:37Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3368.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3368"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/2256 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2256/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2256/comments | https://api.github.com/repos/huggingface/datasets/issues/2256/events | https://github.com/huggingface/datasets/issues/2256 | 866,708,609 | MDU6SXNzdWU4NjY3MDg2MDk= | 2,256 | Running `datase.map` with `num_proc > 1` uses a lot of memory | [
{
"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-04-24T09:56:20Z | 2021-04-26T17:12:15Z | 2021-04-26T17:12:15Z | null | ## Describe the bug
Running `datase.map` with `num_proc > 1` leads to a tremendous memory usage that requires swapping on disk and it becomes very slow.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dstc8_datset = load_dataset("roskoN/dstc8-reddit-corpus", keep_in_memory=False)
def _prepare_sample(batch):
return {"input_ids": list(), "attention_mask": list()}
for split_name, dataset_split in list(dstc8_datset.items()):
print(f"Processing {split_name}")
encoded_dataset_split = dataset_split.map(
function=_prepare_sample,
batched=True,
num_proc=4,
remove_columns=dataset_split.column_names,
batch_size=10,
writer_batch_size=10,
keep_in_memory=False,
)
print(encoded_dataset_split)
path = f"./data/encoded_{split_name}"
encoded_dataset_split.save_to_disk(path)
```
## Expected results
Memory usage should stay within reasonable boundaries.
## Actual results
This is htop-output from running the provided script.

## Versions
```
- Datasets: 1.6.0
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-4.19.128-microsoft-standard-x86_64-with-glibc2.10
```
Running on WSL2
| {
"+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/2256/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2256/timeline | null | completed | null | null | false | [
"Thanks for reporting ! We are working on this and we'll do a patch release very soon.",
"We did a patch release to fix this issue.\r\nIt should be fixed in the new version 1.6.1\r\n\r\nThanks again for reporting and for the details :)"
] |
https://api.github.com/repos/huggingface/datasets/issues/3556 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3556/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3556/comments | https://api.github.com/repos/huggingface/datasets/issues/3556/events | https://github.com/huggingface/datasets/pull/3556 | 1,097,907,724 | PR_kwDODunzps4wvALx | 3,556 | Preserve encoding/decoding with features in `Iterable.map` call | [] | closed | false | null | 0 | 2022-01-10T13:32:20Z | 2022-01-18T19:54:08Z | 2022-01-18T19:54:07Z | null | As described in https://github.com/huggingface/datasets/issues/3505#issuecomment-1004755657, this PR uses a generator expression to encode/decode examples with `features` (which are set to None in `map`) before applying a map transform.
Fix #3505 | {
"+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/3556/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3556/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3556.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3556",
"merged_at": "2022-01-18T19:54:07Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3556.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3556"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/2405 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2405/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2405/comments | https://api.github.com/repos/huggingface/datasets/issues/2405/events | https://github.com/huggingface/datasets/pull/2405 | 901,227,658 | MDExOlB1bGxSZXF1ZXN0NjUyNzA2OTk1 | 2,405 | Add dataset tags | [] | closed | false | null | 1 | 2021-05-25T18:57:29Z | 2021-05-26T16:54:16Z | 2021-05-26T16:40:07Z | null | The dataset tags were provided by Peter Clark following the guide. | {
"+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/2405/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2405/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2405.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2405",
"merged_at": "2021-05-26T16:40:07Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2405.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2405"
} | true | [
"Thanks!"
] |
https://api.github.com/repos/huggingface/datasets/issues/2760 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2760/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2760/comments | https://api.github.com/repos/huggingface/datasets/issues/2760/events | https://github.com/huggingface/datasets/issues/2760 | 961,372,667 | MDU6SXNzdWU5NjEzNzI2Njc= | 2,760 | Add Nuswide 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"
},
{
"color": "bfdadc",
"default": false,
"description": "Vision datasets",
"id": 3608941089,
"name": "vision",
"node_id": "LA_kwDODunzps7XHBIh",
"url": "https://api.github.com/repos/huggingface/datasets/labels/vision"
}
] | open | false | null | 0 | 2021-08-05T03:00:41Z | 2021-12-08T12:06:23Z | null | null | ## Adding a Dataset
- **Name:** *NUSWIDE*
- **Description:** *[A Real-World Web Image Dataset from National University of Singapore](https://lms.comp.nus.edu.sg/wp-content/uploads/2019/research/nuswide/NUS-WIDE.html)*
- **Paper:** *[here](https://lms.comp.nus.edu.sg/wp-content/uploads/2019/research/nuswide/nuswide-civr2009.pdf)*
- **Data:** *[here](https://github.com/wenting-zhao/nuswide)*
- **Motivation:** *This dataset is a benchmark in the Text Retrieval task.*
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| {
"+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/2760/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2760/timeline | null | null | null | null | false | [] |
https://api.github.com/repos/huggingface/datasets/issues/3677 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3677/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3677/comments | https://api.github.com/repos/huggingface/datasets/issues/3677/events | https://github.com/huggingface/datasets/issues/3677 | 1,123,192,866 | I_kwDODunzps5C8pAi | 3,677 | Discovery cannot be streamed anymore | [
{
"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-02-03T15:02:03Z | 2022-02-10T16:51:24Z | 2022-02-10T16:51:24Z | null | ## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
from datasets import load_dataset
iterable_dataset = load_dataset("discovery", name="discovery", split="train", streaming=True)
list(iterable_dataset.take(1))
```
## Expected results
The first row of the train split.
## Actual results
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 365, in __iter__
for key, example in self._iter():
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 362, in _iter
yield from ex_iterable
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 272, in __iter__
yield from islice(self.ex_iterable, self.n)
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 79, in __iter__
yield from self.generate_examples_fn(**self.kwargs)
File "/home/slesage/.cache/huggingface/modules/datasets_modules/datasets/discovery/542fab7a9ddc1d9726160355f7baa06a1ccc44c40bc8e12c09e9bc743aca43a2/discovery.py", line 333, in _generate_examples
with open(data_file, encoding="utf8") as f:
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/streaming.py", line 64, in wrapper
return function(*args, use_auth_token=use_auth_token, **kwargs)
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/utils/streaming_download_manager.py", line 369, in xopen
file_obj = fsspec.open(file, mode=mode, *args, **kwargs).open()
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/core.py", line 456, in open
return open_files(
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/core.py", line 288, in open_files
fs, fs_token, paths = get_fs_token_paths(
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/core.py", line 611, in get_fs_token_paths
fs = filesystem(protocol, **inkwargs)
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/registry.py", line 253, in filesystem
return cls(**storage_options)
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/spec.py", line 68, in __call__
obj = super().__call__(*args, **kwargs)
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/implementations/zip.py", line 57, in __init__
self.zip = zipfile.ZipFile(self.fo)
File "/home/slesage/.pyenv/versions/3.9.6/lib/python3.9/zipfile.py", line 1257, in __init__
self._RealGetContents()
File "/home/slesage/.pyenv/versions/3.9.6/lib/python3.9/zipfile.py", line 1320, in _RealGetContents
endrec = _EndRecData(fp)
File "/home/slesage/.pyenv/versions/3.9.6/lib/python3.9/zipfile.py", line 263, in _EndRecData
fpin.seek(0, 2)
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/implementations/http.py", line 676, in seek
raise ValueError("Cannot seek streaming HTTP file")
ValueError: Cannot seek streaming HTTP file
```
## Environment info
- `datasets` version: 1.18.3
- Platform: Linux-5.11.0-1027-aws-x86_64-with-glibc2.31
- Python version: 3.9.6
- 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/3677/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3677/timeline | null | completed | null | null | false | [
"Seems like a regression from https://github.com/huggingface/datasets/pull/2843\r\n\r\nOr maybe it's an issue with the hosting. I don't think so, though, because https://www.dropbox.com/s/aox84z90nyyuikz/discovery.zip seems to work as expected\r\n\r\n",
"Hi @severo, thanks for reporting.\r\n\r\nSome servers do not support HTTP range requests, and those are required to stream some file formats (like ZIP in this case).\r\n\r\nLet me try to propose a workaround. "
] |
https://api.github.com/repos/huggingface/datasets/issues/4542 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4542/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4542/comments | https://api.github.com/repos/huggingface/datasets/issues/4542/events | https://github.com/huggingface/datasets/issues/4542 | 1,280,269,445 | I_kwDODunzps5MT1yF | 4,542 | [to_tf_dataset] Use Feather for better compatibility with TensorFlow ? | [
{
"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"
}
] | open | false | null | 48 | 2022-06-22T14:42:00Z | 2022-10-11T08:45:45Z | null | null | To have better performance in TensorFlow, it is important to provide lists of data files in supported formats. For example sharded TFRecords datasets are extremely performant. This is because tf.data can better leverage parallelism in this case, and load one file at a time in memory.
It seems that using `tensorflow_io` we could have something similar for `to_tf_dataset` if we provide sharded Feather files: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowFeatherDataset
Feather is a format almost equivalent to the Arrow IPC Stream format we're using in `datasets`: Feather V2 is equivalent to Arrow IPC File format, which is an extension of the stream format (it has an extra footer). Therefore we could store datasets as Feather instead of Arrow IPC Stream format without breaking the whole library.
Here are a few points to explore
- [ ] check the performance of ArrowFeatherDataset in tf.data
- [ ] check what would change if we were to switch to Feather if needed, in particular check that those are fine: memory mapping, typing, writing, reading to python objects, etc.
We would also need to implement sharding when loading a dataset (this will be done anyway for #546)
cc @Rocketknight1 @gante feel free to comment in case I missed anything !
I'll share some files and scripts, so that we can benchmark performance of Feather files with tf.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/4542/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4542/timeline | null | null | null | null | false | [
"This has so much potential to be great! Also I think you tagged some poor random dude on the internet whose name is also Joao, lol, edited that for you! ",
"cc @sayakpaul here too, since he was interested in our new approaches to converting datasets!",
"Noted and I will look into the thread in detail tomorrow once I log back in. ",
"@lhoestq I have used TFRecords with `tf.data` for both vision and text and I can say that they are quite performant. I haven't worked with Feather yet as similarly as I have with TFRecords. If you haven't started the benchmarking script yet, I can prepare a Colab notebook that loads Feather files, converts them into a `tf.data` pipeline, and does some basic preprocessing. \r\n\r\nBut in my limited understanding, Feather might be better suited for CSV files. Not yet sure if it's good for modalities like images. ",
"> Not yet sure if it's good for modalities like images.\r\n\r\nWe store images pretty much the same way as tensorflow_datasets (i.e. storing the encoded image bytes, or a path to the local image, so that the image can be decoded on-the-fly), so as long as we use something similar as TFDS for image decoding it should be ok",
"So for image datasets, we could potentially store the paths in the feather format and decode and read them on the fly? But it introduces an I/O redundancy of having to read the images every time.\r\n\r\nWith caching it could be somewhat mitigated but it's not a good solution for bigger image datasets. ",
"> So for image datasets, we could potentially store the paths in the feather format and decode and read them on the fly?\r\n\r\nhopefully yes :) \r\n\r\nI double-checked the TFDS source code and they always save the bytes actually, not the path. Anyway we'll see if we run into issues or not (as a first step we can require the bytes to be in the feather file)",
"Yes. For images, TFDS actually prepares TFRecords first for encoding and then reuses them for every subsequent call. ",
"@lhoestq @Rocketknight1 I worked on [this PoC](https://gist.github.com/sayakpaul/f7d5cc312cd01cb31098fad3fd9c6b59) that\r\n\r\n* Creates Feather files from a medium resolution dataset (`tf_flowers`).\r\n* Explores different options with TensorFlow IO to load the Feather files. \r\n\r\nI haven't benchmarked those different options yet. There's also a gotcha that I have noted in the PoC. I hope it gets us started but I'm sorry if this is redundant. ",
"Cool thanks ! If I understand correctly in your PoC you store the flattened array of pixels in the feather file. This will take a lot of disk space.\r\n\r\nMaybe we could just save the encoded bytes and let users apply a `map` to decode/transform them into the format they need for training ? Users can use tf.image to do so for example",
"@lhoestq this is what I tried:\r\n\r\n```py\r\ndef read_image(path):\r\n with open(path, \"rb\") as f:\r\n return f.read()\r\n\r\n\r\ntotal_images_written = 0\r\n\r\nfor step in tqdm.tnrange(int(math.ceil(len(image_paths) / batch_size))):\r\n batch_image_paths = image_paths[step * batch_size : (step + 1) * batch_size]\r\n batch_image_labels = all_integer_labels[step * batch_size : (step + 1) * batch_size]\r\n\r\n data = [read_image(path) for path in batch_image_paths]\r\n table = pa.Table.from_arrays([data, batch_image_labels], [\"data\", \"labels\"])\r\n write_feather(table, f\"/tmp/flowers_feather_{step}.feather\", chunksize=chunk_size)\r\n total_images_written += len(batch_image_paths)\r\n print(f\"Total images written: {total_images_written}.\")\r\n\r\n del data\r\n```\r\n\r\nI got the feather files done (no resizing required as you can see):\r\n\r\n```sh\r\nls -lh /tmp/*.feather\r\n\r\n-rw-r--r-- 1 sayakpaul wheel 64M Jun 24 09:28 /tmp/flowers_feather_0.feather\r\n-rw-r--r-- 1 sayakpaul wheel 59M Jun 24 09:28 /tmp/flowers_feather_1.feather\r\n-rw-r--r-- 1 sayakpaul wheel 51M Jun 24 09:28 /tmp/flowers_feather_2.feather\r\n-rw-r--r-- 1 sayakpaul wheel 45M Jun 24 09:28 /tmp/flowers_feather_3.feather\r\n```\r\n\r\nNow there seems to be a problem with `tfio.arrow`:\r\n\r\n```py\r\nimport tensorflow_io.arrow as arrow_io\r\n\r\n\r\ndataset = arrow_io.ArrowFeatherDataset(\r\n [\"/tmp/flowers_feather_0.feather\"],\r\n columns=(0, 1),\r\n output_types=(tf.string, tf.int64),\r\n output_shapes=([], []),\r\n batch_mode=\"auto\",\r\n)\r\n\r\nprint(dataset.element_spec) \r\n```\r\n\r\nPrints:\r\n\r\n```\r\n(TensorSpec(shape=(None,), dtype=tf.string, name=None),\r\n TensorSpec(shape=(None,), dtype=tf.int64, name=None))\r\n```\r\n\r\nBut when I do `sample = next(iter(dataset))` it goes into:\r\n\r\n```py\r\nInternalError Traceback (most recent call last)\r\nInput In [30], in <cell line: 1>()\r\n----> 1 sample = next(iter(dataset))\r\n\r\nFile ~/.local/bin/.virtualenvs/jax/lib/python3.8/site-packages/tensorflow/python/data/ops/iterator_ops.py:766, in OwnedIterator.__next__(self)\r\n 764 def __next__(self):\r\n 765 try:\r\n--> 766 return self._next_internal()\r\n 767 except errors.OutOfRangeError:\r\n 768 raise StopIteration\r\n\r\nFile ~/.local/bin/.virtualenvs/jax/lib/python3.8/site-packages/tensorflow/python/data/ops/iterator_ops.py:749, in OwnedIterator._next_internal(self)\r\n 746 # TODO(b/77291417): This runs in sync mode as iterators use an error status\r\n 747 # to communicate that there is no more data to iterate over.\r\n 748 with context.execution_mode(context.SYNC):\r\n--> 749 ret = gen_dataset_ops.iterator_get_next(\r\n 750 self._iterator_resource,\r\n 751 output_types=self._flat_output_types,\r\n 752 output_shapes=self._flat_output_shapes)\r\n 754 try:\r\n 755 # Fast path for the case `self._structure` is not a nested structure.\r\n 756 return self._element_spec._from_compatible_tensor_list(ret) # pylint: disable=protected-access\r\n\r\nFile ~/.local/bin/.virtualenvs/jax/lib/python3.8/site-packages/tensorflow/python/ops/gen_dataset_ops.py:3017, in iterator_get_next(iterator, output_types, output_shapes, name)\r\n 3015 return _result\r\n 3016 except _core._NotOkStatusException as e:\r\n-> 3017 _ops.raise_from_not_ok_status(e, name)\r\n 3018 except _core._FallbackException:\r\n 3019 pass\r\n\r\nFile ~/.local/bin/.virtualenvs/jax/lib/python3.8/site-packages/tensorflow/python/framework/ops.py:7164, in raise_from_not_ok_status(e, name)\r\n 7162 def raise_from_not_ok_status(e, name):\r\n 7163 e.message += (\" name: \" + name if name is not None else \"\")\r\n-> 7164 raise core._status_to_exception(e) from None\r\n\r\nInternalError: Invalid: INVALID_ARGUMENT: arrow data type 0x7ff9899d8038 is not supported: Type error: Arrow data type is not supported [Op:IteratorGetNext]\r\n```\r\n\r\nSome additional notes:\r\n\r\n* I can actually decode an image encoded with `read_image()` (shown earlier):\r\n\r\n ```py\r\n sample_image_path = image_paths[0]\r\n encoded_image = read_image(sample_image_path)\r\n image = tf.image.decode_png(encoded_image, 3)\r\n print(image.shape)\r\n ```\r\n\r\n* If the above `tf.data.Dataset` object would have succeeded my plan was to just map the decoder like so:\r\n\r\n ```py\r\n autotune = tf.data.AUTOTUNE\r\n dataset = dataset.map(lambda x, y: (tf.image.decode_png(x, 3), y), num_parallel_calls=autotune)\r\n ```",
"@lhoestq I think I was able to make it work in the way you were envisioning. Here's the PoC:\r\nhttps://gist.github.com/sayakpaul/f7d5cc312cd01cb31098fad3fd9c6b59#file-feather-tf-poc-bytes-ipynb\r\n\r\nSome details:\r\n\r\n* I am currently serializing the images as strings with `base64`). In comparison to the flattened arrays as before, the size of the individual feather files has reduced (144 MB -> 85 MB, largest).\r\n* When decoding, I am first decoding the base64 string and then decoding that string (with `tf.io.decode_base64`) as an image with `tf.image.decode_png()`. \r\n* The entire workflow (from generating the Feather files to loading them and preparing the batched `tf.data` pipeline) involves the following libraries: `pyarraow`, `tensorflow-io`, and `tensorflow`. \r\n\r\nCc: @Rocketknight1 @gante ",
"Cool thanks ! Too bad the Arrow binary type doesn't seem to be supported in `arrow_io.ArrowFeatherDataset` :/ We would also need it to support Arrow struct type. Indeed images in `datasets` are represented using an Arrow type\r\n```python\r\npa.struct({\"path\": pa.string(), \"bytes\": pa.binary()})\r\n```\r\nnot sure yet how hard it is to support this though.\r\n\r\nChanging the typing on our side would create concerning breaking changes, that's why it would be awesome if it could work using these types",
"If the ArrowFeatherDataset doesn't yet support it, I guess our hands are a bit tied at the moment. \r\n\r\nIIUC, in my [latest PoC notebook](https://gist.github.com/sayakpaul/f7d5cc312cd01cb31098fad3fd9c6b59#file-feather-tf-poc-bytes-ipynb), you wanted to see each entry in the feather file to be represented like so?\r\n\r\n```\r\npa.struct({\"path\": pa.string(), \"bytes\": pa.binary()})\r\n``` \r\n\r\nIn that case, `pa.binary()` isn't yet supported.",
"> IIUC, in my [latest PoC notebook](https://gist.github.com/sayakpaul/f7d5cc312cd01cb31098fad3fd9c6b59#file-feather-tf-poc-bytes-ipynb), you wanted to see each entry in the feather file to be represented like so?\r\n> \r\n> pa.struct({\"path\": pa.string(), \"bytes\": pa.binary()})\r\n\r\nYea because that's the data format we're using. If we were to use base64, then we would have to process the full dataset to convert it, which can take some time. Converting to TFRecords would be simpler than converting to base64 in Feather files.\r\n\r\nMaybe it would take too much time to be worth exploring, but according to https://github.com/tensorflow/io/issues/1361#issuecomment-819029002 it's possible to add support for binary type in ArrowFeatherDataset. What do you think ? Any other alternative in mind ?",
"> Maybe it would take too much time to be worth exploring, but according to https://github.com/tensorflow/io/issues/1361#issuecomment-819029002 it's possible to add support for binary type in ArrowFeatherDataset.\r\n\r\nShould be possible as per the comment but there hasn't been any progress and it's been more than a year. \r\n\r\n> If we were to use base64, then we would have to process the full dataset to convert it, which can take some time.\r\n\r\nI don't understand this. I would think TFRecords would also need something similar but I need the context you're coming from. \r\n\r\n> What do you think ? Any other alternative in mind ?\r\n\r\nTFRecords since the TensorFlow ecosystem has developed good support for it over the years. ",
"> I don't understand this. I would think TFRecords would also need something similar but I need the context you're coming from.\r\n\r\nUsers already have a copy of the dataset in Arrow format (we can change this to Feather). So to load the Arrow/feather files to a TF dataset we need TF IO or something like that. Otherwise the user has to convert all the files from Arrow to TFRecords to use TF data efficiently. But the conversion needs resources: CPU, disk, time. Converting the images to base64 require the same sort of resources.\r\n\r\nSo the issue we're trying to tackle is how to load the Arrow data in TF without having to convert anything ^^",
"Yeah, it looks like in its current state the tfio support for `Feather` is incomplete, so we'd end up having to write a lot of it, or do a conversion that defeats the whole point (because if we're going to convert the whole dataset we might as well convert to `TFRecord`).",
"Understood @lhoestq. Thanks for explaining!\r\n\r\nAgreed with @Rocketknight1. ",
"@lhoestq Although I think this is a dead-end for now unfortunately, because of the limitations at TF's end, we could still explore automatic conversion to TFRecord, or I could dive into refining `to_tf_dataset()` to yield unbatched samples and/or load samples with multiprocessing to improve throughput. Do you have any preferences there?",
"> @lhoestq Although I think this is a dead-end for now unfortunately, because of the limitations at TF's end, we could still explore automatic conversion to TFRecord, or I could dive into refining `to_tf_dataset()` to yield unbatched samples and/or load samples with multiprocessing to improve throughput. Do you have any preferences there?\r\n\r\nHappy to take part there @Rocketknight1.",
"If `to_tf_dataset` can be unbatched, then it should be fairly easy for users to convert the TF dataset to TFRecords right ?",
"@lhoestq why one would convert to TFRecords after unbatching? ",
"> If to_tf_dataset can be unbatched, then it should be fairly easy for users to convert the TF dataset to TFRecords right ?\r\n\r\nSort of! A `tf.data.Dataset` is more like an iterator, and does not support sample indexing. `to_tf_dataset()` creates an iterator, but to convert that to `TFRecord`, the user would have to iterate over the whole thing and manually save the stream of samples to files. ",
"Someone would like to try to dive into tfio to fix this ? Sounds like a good opportunity to learn what are the best ways to load a dataset for TF, and also the connections between Arrow and TF.\r\n\r\nIf we can at least have the Arrow `binary` type working for TF that would be awesome already (issue https://github.com/tensorflow/io/issues/1361)\r\n\r\nalso cc @nateraw in case you'd be interested ;)",
"> Sounds like a good opportunity to learn what are the best ways to load a dataset for TF\r\n\r\nThe recommended way would likely be a combination of TFRecords and `tf.data`. \r\n\r\nExploring the connection between Arrow and TensorFlow is definitely worth pursuing though. But I am not sure about the implications of storing images in a format supported by Arrow. I guess we'll know more once we have at least figured out the support for `binary` type for TFIO. I will spend some time on it and keep this thread updated. ",
"I am currently working on a fine-tuning notebook for the TFSegFormer model (Semantic Segmentation). The resolution is high for both the input images and the labels - (512, 512, 3). Here's the [Colab Notebook](https://colab.research.google.com/drive/1jAtR7Z0lYX6m6JsDI5VByh5vFaNhHIbP?usp=sharing) (it's a WIP so please bear that in mind).\r\n\r\nI think the current implementation of `to_tf_dataset()` does create a bottleneck here since the GPU utilization is quite low. ",
"Here's a notebook showing the performance difference: https://colab.research.google.com/gist/sayakpaul/d7ca67c90beb47e354942c9d8c0bd8ef/scratchpad.ipynb. \r\n\r\nNote that I acknowledge that it's not an apples-to-apples comparison in many aspects (the dataset isn't the same, data serialization format isn't the same, etc.) but this is the best I could do. ",
"Thanks ! I think the speed difference can be partly explained: you use ds.shuffle in your dataset, which is an exact shuffling (compared to TFDS which does buffer shuffling): it slows down query time by 2x to 10x since it has to play with data that are not contiguous.\r\n\r\nThe rest of the speed difference seems to be caused by image decoding (from 330µs/image to 30ms/image)",
"Fair enough. Can do one without shuffling too. But it's an important one to consider I guess. "
] |
https://api.github.com/repos/huggingface/datasets/issues/3123 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3123/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3123/comments | https://api.github.com/repos/huggingface/datasets/issues/3123/events | https://github.com/huggingface/datasets/issues/3123 | 1,031,793,207 | I_kwDODunzps49f-o3 | 3,123 | Segmentation fault when loading datasets from file | [
{
"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-10-20T20:16:11Z | 2021-11-02T14:57:07Z | 2021-11-02T14:57:07Z | null | ## Describe the bug
Custom dataset loading sometimes segfaults and kills the process if chunks contain a variety of features/
## Steps to reproduce the bug
Download an example file:
```
wget https://gist.githubusercontent.com/TevenLeScao/11e2184394b3fa47d693de2550942c6b/raw/4232704d08fbfcaf93e5b51def9e5051507651ad/tiny_kelm.jsonl
```
Then in Python:
```
import datasets
tiny_kelm = datasets.load_dataset("json", data_files="tiny_kelm.jsonl", chunksize=100000)
```
## Expected results
a `tiny_kelm` functional dataset
## Actual results
☠️ `Segmentation fault (core dumped)` ☠️
## Environment info
- `datasets` version: 1.14.0
- Platform: Linux-5.11.0-38-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 5.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/3123/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3123/timeline | null | completed | null | null | false | [
"Hi ! I created an issue on Arrow's JIRA after making a minimum reproducible example\r\n\r\nhttps://issues.apache.org/jira/browse/ARROW-14439\r\n\r\n```python\r\nimport io\r\n\r\nimport pyarrow.json as paj\r\n\r\nbatch = b'{\"a\": [], \"b\": 1}\\n{\"b\": 1}'\r\nblock_size = 12\r\n\r\npaj.read_json(\r\n io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size)\r\n)\r\n```\r\n\r\nI don't see a way to workaround this properly now without hurting the performance of the JSON loader significantly though",
"The issue has been fixed in pyarrow 6.0.0, please update pyarrow :)\r\n\r\nThe issue was due to missing fields in the JSON data of type list. Now it's working fine and missing list fields are replaced with empty lists"
] |
https://api.github.com/repos/huggingface/datasets/issues/1016 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1016/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1016/comments | https://api.github.com/repos/huggingface/datasets/issues/1016/events | https://github.com/huggingface/datasets/pull/1016 | 755,521,862 | MDExOlB1bGxSZXF1ZXN0NTMxMjE3MjM3 | 1,016 | Add CLINC150 dataset | [] | closed | false | null | 0 | 2020-12-02T18:44:30Z | 2020-12-03T10:32:04Z | 2020-12-03T10:32:04Z | 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/1016/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1016/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1016.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1016",
"merged_at": "2020-12-03T10:32:04Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1016.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1016"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/1193 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1193/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1193/comments | https://api.github.com/repos/huggingface/datasets/issues/1193/events | https://github.com/huggingface/datasets/pull/1193 | 757,840,830 | MDExOlB1bGxSZXF1ZXN0NTMzMTM1NDAy | 1,193 | add taskmaster-1 | [] | closed | false | null | 0 | 2020-12-06T04:09:57Z | 2020-12-07T15:23:24Z | 2020-12-07T15:08:39Z | null | Adding Taskmaster-1 dataset
https://github.com/google-research-datasets/Taskmaster/tree/master/TM-1-2019 | {
"+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/1193/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1193/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1193.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1193",
"merged_at": "2020-12-07T15:08:39Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1193.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1193"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/2324 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2324/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2324/comments | https://api.github.com/repos/huggingface/datasets/issues/2324/events | https://github.com/huggingface/datasets/pull/2324 | 876,602,064 | MDExOlB1bGxSZXF1ZXN0NjMwNzE1NTQz | 2,324 | Create Audio feature | [] | closed | false | {
"closed_at": null,
"closed_issues": 2,
"created_at": "2021-07-21T15:34:56Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4",
"events_url": "https://api.github.com/users/albertvillanova/events{/privacy}",
"followers_url": "https://api.github.com/users/albertvillanova/followers",
"following_url": "https://api.github.com/users/albertvillanova/following{/other_user}",
"gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/albertvillanova",
"id": 8515462,
"login": "albertvillanova",
"node_id": "MDQ6VXNlcjg1MTU0NjI=",
"organizations_url": "https://api.github.com/users/albertvillanova/orgs",
"received_events_url": "https://api.github.com/users/albertvillanova/received_events",
"repos_url": "https://api.github.com/users/albertvillanova/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions",
"type": "User",
"url": "https://api.github.com/users/albertvillanova"
},
"description": "Next minor release",
"due_on": "2021-08-30T07:00:00Z",
"html_url": "https://github.com/huggingface/datasets/milestone/8",
"id": 6968069,
"labels_url": "https://api.github.com/repos/huggingface/datasets/milestones/8/labels",
"node_id": "MI_kwDODunzps4AalMF",
"number": 8,
"open_issues": 4,
"state": "open",
"title": "1.12",
"updated_at": "2021-10-13T10:26:33Z",
"url": "https://api.github.com/repos/huggingface/datasets/milestones/8"
} | 30 | 2021-05-05T15:55:22Z | 2021-10-13T10:26:33Z | 2021-10-13T10:26:33Z | null | Create `Audio` feature to handle raw audio files.
Some decisions to be further discussed:
- I have chosen `soundfile` as the audio library; another interesting library is `librosa`, but this requires `soundfile` (see [here](https://github.com/librosa/librosa/blob/main/setup.cfg#L53)). If we require some more advanced functionalities, we could eventually switch the library.
- I have implemented the audio feature as an extra: `pip install datasets[audio]`. For the moment, the typical datasets user uses only text datasets, and there is no need for them for additional package requirements for audio/image if they do not need them.
- For tests, I require audio dependencies (so that all audio functionalities are checked with our CI test suite); I exclude Linux platforms, which require an additional library to be installed with the distribution package manager
- I also require `pytest-datadir`, which allow to have (audio) data files for tests
- The audio data contain: array and sample_rate.
- The array is reshaped as 1D array (expected input for `Wav2Vec2`).
Note that to install `soundfile` on Linux, you need to install `libsndfile` using your distribution’s package manager, for example `sudo apt-get install libsndfile1`.
## Requirements Specification
- Access example with audio loading and resampling:
```python
ds[0]["audio"]
```
- Map with audio loading & resampling:
```python
def preprocess(batch):
batch["input_values"] = processor(batch["audio"]).input_values
return batch
ds = ds.map(preprocess)
```
- Map without audio loading and resampling:
```python
def preprocess(batch):
batch["labels"] = processor(batch["target_text"]).input_values
return batch
ds = ds.map(preprocess)
```
- Additional requirement specification (see https://github.com/huggingface/datasets/pull/2324#pullrequestreview-768864998): Cast audio column to change sampling sate:
```python
ds = ds.cast_column("audio", Audio(sampling_rate=16_000))
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 3,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 3,
"url": "https://api.github.com/repos/huggingface/datasets/issues/2324/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2324/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2324.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2324",
"merged_at": "2021-10-13T10:26:33Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2324.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2324"
} | true | [
"For optimal storage, it would be better to:\r\n- store only the audio file path in the cache Arrow file\r\n- perform decoding of the audio file (into audio array and sample rate) on the fly, while loading the dataset from cache (or by adding a convenient `load_audio` function)",
"Thanks a lot @lhoestq for your helpful insights! 🤗 ",
"Just one step before having a first running example to benchmark.\r\n\r\nDecision to make: how to call the function `dataset.features.decode_example`:\r\n- The usual approach until now in speech applications: call it in a subsequent `.map` function\r\n - Pros: multiprocessing can be used out of the box\r\n - Cons: large disk storage required for caching decoded audio files, although having it cached will enhance speed for further usage\r\n- Approach suggested by @lhoestq (see above: https://github.com/huggingface/datasets/pull/2324#discussion_r660758683): doing it in formatting\r\n - Pros: no large disk storage required, as it will be done on the fly while iterating on the dataset\r\n - Cons: it is not cached; need to implement multiprocessing for this case\r\n- Other pros/cons for the previous options?\r\n- Other options?\r\n\r\ncc: @lhoestq @patrickvonplaten @anton-l ",
"@albertvillanova I'm in two minds about this, to be honest. For example, if we consider CommonVoice, which is encoded in lossy `mp3`:\n\n- If we decompress `mp3` into raw `wav` arrays, loading a batch will speed up about 40x.\n- However, a 60gb English mp3 dataset will blow up to about 600gb raw (iirc), which is why loading on-the-fly (optionally?) could be very beneficial as well.",
"Users can do the conversion from mp3 to wav by themselves if they want to using `map`.\r\n\r\nIMO it's better if we can keep the decoding part with the minimal features to be both easy to understand and flexible, i.e. just having the on-the-fly decoding of the audio data (with the sampling rate parameter)\r\n\r\nDecompressing from mp3 to wav sounds like an optimization that depends on the problem that the user wants to solve, the constrains from its environment (disk space, IO speed), and other parameters (optimal training speed for example). Therefore I would leave this to the user to decide whether it has to do it or not.\r\n\r\nLet me know what you think about this",
"@albertvillanova, In my opinion the pros strongly outweigh the cons in the @lhoestq's suggestion which is why I think we should go forward with it. \r\n\r\nThe cons:\r\n- \"the operation won't be cached\" is not to important as the user will most likely access just a couple of audio array to see how it looks like and then for the \"full\" feature extraction she/he will make use of `.map(...)` anyways which means that the result will be cached. \r\n- Regarding the multi-processing - if I understand correctly it'll follow the same logic here -> the user will only access some audio arrays for testing playing around with the model but use `.map(...)` for larger operations where multi-processing would still work as before.\r\n\r\nThe advantages mostly solve the main poinpoints being:\r\n- exploding disk space\r\n- bad user experience since the audio is not loaded on the go\r\n\r\n=> So I'm very much in favor of the \"direct-access\" feature",
"Update: I've retaken this issue.\r\n\r\nIf the decoding logic is implemented when \"examples are accessed\", then if afterwards we use the `.map`, it tries to apply the decoding twice (as maps iterates over the examples, thus \"accessing them\", before trying to apply the map function)...\r\n\r\nI'm thinking on some other approach...",
"I have reimplemented the previous approach, so that we can discuss about it: examples are decoded when accessed.",
"What about creating a new specific formatting, just for decoding? This would be only active within a context manager.",
"Hi @lhoestq, as we discussed, I've followed your suggestion of implementing the decoding step within the formatting logic: extract-decode-format. Feel free to tell me what you think.\r\n\r\n@patrickvonplaten and @anton-l, could you have a look at the use case in the test (https://github.com/huggingface/datasets/pull/2324/files#diff-58e348f6e4deaa5f3119e420a5d48ebb82875a78c28628831748fb54f59b2c78R34-R50) and tell me if this is aligned with your needs? Thanks.",
"Hi @lhoestq, if you validate this approach, we could merge the Audio feature this (or early next) week.",
"Sure it looks nice this way :) Feel free to continue !",
"As discussed, we should pay attention when applying `map` to a dataset with `Audio` feature, in order to avoid decoding the audio data twice.\r\n\r\nOne proposed solution is to pass `input_columns` to `map`. Just, note that the field containing the Audio feature should not be passed in `input_columns` (not possible, for example, to map the audio file path to a new directory).\r\n\r\nI suggest again (3rd time, sorry, lol) using a formatting context manager (as we already use for PyTorch/TensorFlow: https://huggingface.co/docs/datasets/torch_tensorflow.html).\r\n\r\nAbove (https://github.com/huggingface/datasets/pull/2324#issuecomment-915244003), I suggested to define a formatting just for decoding: the decoding of the audio data is only performed if this specific formatting is set (`ds.set_format(\"decoding\")`) or within a context manager (`with ds.formatted_as(\"decoding\"): ...`)\r\n\r\nNow, I would like also to suggest an alternative formatting for **non-decoding** (if decoding is the default behavior), for a use case like this:\r\n```python\r\ndef change_dir(example):\r\n example[\"audio\"] = \"dir/\" + example[\"audio\"]\r\n\r\n\r\nwith ds.formatted_as(\"no_decoding\"):\r\n print(ds[0]) # {\"audio\": \"path/to/file.wav\"}\r\n ds.map(change_dir)\r\n print(ds[0]) # {\"audio\": \"dir/path/to/file.wav\"}\r\n\r\nprint(ds[0]) # {\"audio\": {\"path\": \"dir/path/to/file.wav\", \"array\": np.array([1., 2., 3...]), \"sampling_rate\": 44100}}\r\n```\r\n\r\nPlease, just tell me what you think.\r\nCC: @lhoestq @patrickvonplaten @anton-l ",
"> As discussed, we should pay attention when applying `map` to a dataset with `Audio` feature, in order to avoid decoding the audio data twice.\r\n> \r\n> One proposed solution is to pass `input_columns` to `map`. Just, note that the field containing the Audio feature should not be passed in `input_columns` (not possible, for example, to map the audio file path to a new directory).\r\n> \r\n> I suggest again (3rd time, sorry, lol) using a formatting context manager (as we already use for PyTorch/TensorFlow: https://huggingface.co/docs/datasets/torch_tensorflow.html).\r\n> \r\n> Above ([#2324 (comment)](https://github.com/huggingface/datasets/pull/2324#issuecomment-915244003)), I suggested to define a formatting just for decoding: the decoding of the audio data is only performed if this specific formatting is set (`ds.set_format(\"decoding\")`) or within a context manager (`with ds.formatted_as(\"decoding\"): ...`)\r\n> \r\n> Now, I would like also to suggest an alternative formatting for **non-decoding** (if decoding is the default behavior), for a use case like this:\r\n> \r\n> ```python\r\n> def change_dir(example):\r\n> example[\"audio\"] = \"dir/\" + example[\"audio\"]\r\n> \r\n> \r\n> with ds.formatted_as(\"no_decoding\"):\r\n> print(ds[0]) # {\"audio\": \"path/to/file.wav\"}\r\n> ds.map(change_dir)\r\n> print(ds[0]) # {\"audio\": \"dir/path/to/file.wav\"}\r\n> \r\n> print(ds[0]) # {\"audio\": {\"path\": \"dir/path/to/file.wav\", \"array\": np.array([1., 2., 3...]), \"sampling_rate\": 44100}}\r\n> ```\r\n> \r\n> Please, just tell me what you think.\r\n> CC: @lhoestq @patrickvonplaten @anton-l\r\n\r\nI'm fine with a context manager! There is no way to **not** decode the audio if its key is not accessed no?\r\n\r\nE.g.\r\n\r\n```python\r\ndef load(batch):\r\n batch[\"speech_array\"] = torchaudio.load(batch[\"file\"])\r\n return batch\r\n\r\nds.map(load)\r\n```\r\n\r\ndoes *e.g.* not access the \"audio\" key `batch[\"audio\"}` but there is no way to not decode it without major changes no? \r\n\r\n=> I'm happy with both the context manager and using `input_colmuns`. Both of those solutions are equally good to me if a \"not-access-key-no-decoding\" solution is just not feasible. I let you guys decide :-)",
"> \r\n> There is no way to **not** decode the audio if its key is not accessed no?\r\n> \r\n> E.g...\r\n> \r\n> does _e.g._ not access the \"audio\" key `batch[\"audio\"}` but there is no way to not decode it without major changes no?\r\n\r\n@patrickvonplaten I think therefore we should rethink the implementation of the Audio feature: its goal is to enrich/simplify the user experience when working with audio files. If on the other hand, you see that the current implementation may be problematic/unsatisfying/not-optimal, then we miss the point of creating this feature. This feature should be useful to users, not inconvenient.",
"> > There is no way to **not** decode the audio if its key is not accessed no?\r\n> > E.g...\r\n> > does _e.g._ not access the \"audio\" key `batch[\"audio\"}` but there is no way to not decode it without major changes no?\r\n> \r\n> @patrickvonplaten I think therefore we should rethink the implementation of the Audio feature: its goal is to enrich/simplify the user experience when working with audio files. If on the other hand, you see that the current implementation may be problematic/unsatisfying/not-optimal, then we miss the point of creating this feature. This feature should be useful to users, not inconvenient.\r\n\r\nThanks a lot for the message! I'm discussing a bit with @anton-l at the moment - will share our results as soon as possible",
"Current implementation: see use cases in file https://github.com/huggingface/datasets/blob/0f80e6eaa6f596ff6287eb33587e2d9c69af0e73/tests/features/test_audio.py\r\n\r\nAutomatic decoding:\r\n- when directly accessing an example or a batch\r\n ```python\r\n dset[0]\r\n dset[:2]\r\n ```\r\n- during map, only if audio field is accessed:\r\n ```python\r\n def process_audio_sampling_rate(example):\r\n example[\"double_sampling_rate\"] = 2 * example[\"audio\"][\"sampling_rate\"]\r\n return example\r\n\r\n decoded_dset = dset.map(process_audio_sampling_rate)\r\n ```\r\n\r\nNo automatic decoding:\r\n- during map if audio field is not accessed:\r\n ```python\r\n def process_text(example):\r\n example[\"text\"] = example[\"text\"] + \" World!\"\r\n return example\r\n\r\n decoded_dset = dset.map(process_text)\r\n ```\r\n\r\nThe types of example and batch are kept as usual, `dict[str, Any]` and `dict[str, list[Any]]` respectively.\r\n\r\nCC: @patrickvonplaten @anton-l @lhoestq ",
"That's awesome! Thanks so much for your work on this @albertvillanova!",
"Oh and maybe have a test to make sure that casting the Audio feature to change the sampling rate works as expected ?",
"@lhoestq the test for the resampling is already in place in `test_audio_resampling`: \r\nhttps://github.com/huggingface/datasets/pull/2324/files#diff-58e348f6e4deaa5f3119e420a5d48ebb82875a78c28628831748fb54f59b2c78R48-R56",
"Please note that we should agree in the API: see 53d6d73\r\n\r\nThis is just a proposal implementation:\r\n- Create a new method named `cast_column`, which performs a shallow kind of cast (without using `map()` or caching)\r\n\r\nWe should agree in the name, because as it is, it might be confused with `cast` (and users might think `cast_column` caches the result as `cast`)\r\n\r\nCC: @lhoestq @patrickvonplaten @anton-l ",
"IMO cast and cast_column should have the exact same behavior, to make the experience simple for the user (no distinction between shallow or deep cast).\r\n\r\nMaybe we should change `cast` to use `cast_column` on every column and make `cast_column` use `map` if and only if it's necessary. For Audio for example `map` is not needed.\r\n\r\nWe just need to do some tests to know which casts always need map and which ones don't. This implies either looking at the PyArrow source code (the documentation doesn't mention all these details) or playing with PyArrow to figure it out.\r\n\r\nI guess for now we can just have the simplest `cast_column` which always uses map unless it's an Audio feature type.\r\n\r\nLet me know what you think !",
"@lhoestq I totally agree: `cast` and `cast_column` should be analog to each other.\r\n\r\nFor the implementation, let me try something simpler than the one suggested by you...",
"@lhoestq what do you think of an approach like this 633ef09?\r\n\r\nIf it's OK, then we should implement passing parameters to `cast`.",
"@lhoestq maybe for now we could make a simple implementation and finish this PR. Then we could make a follow-up PR to deal specifically with the optimal implementation of `cast_column` and `cast`, as this issue is not specific to the Audio feature.",
"> @lhoestq what do you think of an approach like this 633ef09?\r\n\r\nYea that's good enough for the time being :)\r\n\r\nI think the last thing we need to do is make sure that `cast_column` changes the fingerprint of the dataset. Feel free to use the `fingerprint_transform` decorator, as for `remove_columns`.\r\n\r\n(note that cast currently doesn't use the decorator since it's based on `map` that already updates the fingerprint).",
"> \r\n> I think the last thing we need to do is make sure that `cast_column` changes the fingerprint of the dataset. Feel free to use the `fingerprint_transform` decorator, as for `remove_columns`.\r\n> \r\n> (note that cast currently doesn't use the decorator since it's based on `map` that already updates the fingerprint).\r\n\r\n@lhoestq note that `cast_column` may call `cast` in some cases, and the decorator would not be necessary for these cases...\r\n- I did it by setting `inplace=False`, and updating fingerprint explicitly only when `cast` is not called.",
"I think current state of this PR could be included in our next release, as experimental feature, for stress testing it and try to find all potential issues. What do you think?\r\n\r\nCC: @lhoestq @patrickvonplaten @anton-l ",
"Looks great! Ready to try it out on the transformers examples after the release :)",
"Think we are good to merge here no? :-)"
] |
https://api.github.com/repos/huggingface/datasets/issues/2833 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2833/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2833/comments | https://api.github.com/repos/huggingface/datasets/issues/2833/events | https://github.com/huggingface/datasets/issues/2833 | 978,296,140 | MDU6SXNzdWU5NzgyOTYxNDA= | 2,833 | IndexError when accessing first element of a Dataset if first RecordBatch is empty | [] | closed | false | null | 0 | 2021-08-24T16:49:20Z | 2021-08-24T17:21:17Z | 2021-08-24T17:21:17Z | null | The computation of the offsets of the underlying Table of a Dataset has some issues if the first RecordBatch is empty.
```python
from datasets import Dataset
import pyarrow as pa
pa_table = pa.Table.from_pydict({"a": [1]})
pa_table2 = pa.Table.from_pydict({"a": []}, schema=pa_table.schema)
ds_table = pa.concat_tables([pa_table2, pa_table])
dataset = Dataset(ds_table)
print([len(b) for b in dataset.data._batches])
# [0, 1]
print(dataset.data._offsets)
# [0 0 1] (should be [0, 1])
dataset[0]
```
raises
```python
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/datasets/table.py in _interpolation_search(arr, x)
90 else:
91 i, j = i, k
---> 92 raise IndexError(f"Invalid query '{x}' for size {arr[-1] if len(arr) else 'none'}.")
93
94
IndexError: Invalid query '0' for size 1.
```
This can be fixed by ignoring empty batches when computing `table._batches` and `table._offsets`
cc @SaulLu | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 1,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/huggingface/datasets/issues/2833/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2833/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/huggingface/datasets/issues/343 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/343/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/343/comments | https://api.github.com/repos/huggingface/datasets/issues/343/events | https://github.com/huggingface/datasets/pull/343 | 651,419,630 | MDExOlB1bGxSZXF1ZXN0NDQ0Njc4NDEw | 343 | Fix nested tensorflow format | [] | closed | false | null | 0 | 2020-07-06T10:13:45Z | 2020-07-06T13:11:52Z | 2020-07-06T13:11:51Z | null | In #339 and #337 we are thinking about adding a way to export datasets to tfrecords.
However I noticed that it was not possible to do `dset.set_format("tensorflow")` on datasets with nested features like `squad`. I fixed that using a nested map operations to convert features to `tf.ragged.constant`.
I also added tests on the `set_format` function. | {
"+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/343/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/343/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/343.diff",
"html_url": "https://github.com/huggingface/datasets/pull/343",
"merged_at": "2020-07-06T13:11:51Z",
"patch_url": "https://github.com/huggingface/datasets/pull/343.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/343"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/1033 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1033/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1033/comments | https://api.github.com/repos/huggingface/datasets/issues/1033/events | https://github.com/huggingface/datasets/pull/1033 | 755,921,927 | MDExOlB1bGxSZXF1ZXN0NTMxNTUxNzYw | 1,033 | Add support for ".txm" format | [] | closed | false | null | 5 | 2020-12-03T06:52:08Z | 2021-02-21T19:47:11Z | 2021-02-21T19:47:11Z | null | In dummy data generation, add support for XML-like ".txm" file format.
Also support filenames with additional compression extension: ".txm.gz". | {
"+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/1033/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1033/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1033.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1033",
"merged_at": "2021-02-21T19:47:11Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1033.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1033"
} | true | [
"Neat! Looks like you need a rebase and then should be good to go :) ",
"Done, @yjernite, @lhoestq.",
"If you agree, we could merge this.",
"Hi ! yes sure :) can you just merge master into this branch before we merge ?",
"Done @lhoestq "
] |
https://api.github.com/repos/huggingface/datasets/issues/5926 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5926/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5926/comments | https://api.github.com/repos/huggingface/datasets/issues/5926/events | https://github.com/huggingface/datasets/issues/5926 | 1,743,922,028 | I_kwDODunzps5n8iNs | 5,926 | Uncaught exception when generating the splits from a dataset that miss data | [] | open | false | null | 1 | 2023-06-06T13:51:01Z | 2023-06-07T07:53:16Z | null | null | ### Describe the bug
Dataset https://huggingface.co/datasets/blog_authorship_corpus has an issue with its hosting platform, since https://drive.google.com/u/0/uc?id=1cGy4RNDV87ZHEXbiozABr9gsSrZpPaPz&export=download returns 404 error.
But when trying to generate the split names, we get an exception which is now correctly caught.
Seen originally in https://github.com/huggingface/datasets-server/blob/adbdcd6710ffed4e2eb2e4cd905b5e0dff530a15/services/worker/src/worker/job_runners/config/parquet_and_info.py#L435
### Steps to reproduce the bug
```python
>>> from datasets import StreamingDownloadManager, load_dataset_builder
>>> builder = load_dataset_builder(path="blog_authorship_corpus")
Downloading builder script: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5.60k/5.60k [00:00<00:00, 23.1MB/s]
Downloading metadata: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.81k/2.81k [00:00<00:00, 14.7MB/s]
Downloading readme: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7.30k/7.30k [00:00<00:00, 30.8MB/s]
>>> dl_manager = StreamingDownloadManager(base_path=builder.base_path)
>>> builder._split_generators(dl_manager)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/slesage/.cache/huggingface/modules/datasets_modules/datasets/blog_authorship_corpus/6f5d78241afd8313111956f877a57db7a0e9fc6718255dc85df0928197feb683/blog_authorship_corpus.py", line 79, in _split_generators
data = dl_manager.download_and_extract(_DATA_URL)
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 1087, in download_and_extract
return self.extract(self.download(url_or_urls))
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 1039, in extract
urlpaths = map_nested(self._extract, url_or_urls, map_tuple=True)
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 435, in map_nested
return function(data_struct)
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 1044, in _extract
protocol = _get_extraction_protocol(urlpath, use_auth_token=self.download_config.use_auth_token)
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 433, in _get_extraction_protocol
with fsspec.open(urlpath, **kwargs) as f:
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/fsspec/core.py", line 439, in open
return open_files(
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/fsspec/core.py", line 194, in __getitem__
out = super().__getitem__(item)
IndexError: list index out of range
```
### Expected behavior
We should have an Exception raised by the datasets library.
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-5.19.0-1026-aws-x86_64-with-glibc2.35
- Python version: 3.9.15
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.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/5926/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5926/timeline | null | null | null | null | false | [
"Thanks for reporting, @severo.\r\n\r\nThis is a known issue with `fsspec`:\r\n- #5862\r\n- https://github.com/fsspec/filesystem_spec/issues/1265"
] |
https://api.github.com/repos/huggingface/datasets/issues/1753 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1753/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1753/comments | https://api.github.com/repos/huggingface/datasets/issues/1753/events | https://github.com/huggingface/datasets/pull/1753 | 789,867,685 | MDExOlB1bGxSZXF1ZXN0NTU4MTQ3Njkx | 1,753 | fix comet citations | [] | closed | false | null | 0 | 2021-01-20T10:52:38Z | 2021-01-20T14:39:30Z | 2021-01-20T14:39:30Z | null | I realized COMET citations were not showing in the hugging face metrics page:
<img width="814" alt="Screenshot 2021-01-20 at 09 48 44" src="https://user-images.githubusercontent.com/17256847/105164848-8b9da900-5b0d-11eb-9e20-a38f559d2037.png">
This pull request is intended to fix that.
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/1753/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1753/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1753.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1753",
"merged_at": "2021-01-20T14:39:30Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1753.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1753"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/1877 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1877/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1877/comments | https://api.github.com/repos/huggingface/datasets/issues/1877/events | https://github.com/huggingface/datasets/issues/1877 | 808,462,272 | MDU6SXNzdWU4MDg0NjIyNzI= | 1,877 | Allow concatenation of both in-memory and on-disk datasets | [] | closed | false | null | 6 | 2021-02-15T11:39:46Z | 2021-03-26T16:51:58Z | 2021-03-26T16:51:58Z | null | This is a prerequisite for the addition of the `add_item` feature (see #1870).
Currently there is one assumption that we would need to change: a dataset is either fully in memory (dataset._data_files is empty), or the dataset can be reloaded from disk (using the dataset._data_files).
This assumption is used for pickling for example:
- in-memory dataset can just be pickled/unpickled in-memory
- on-disk dataset can be unloaded to only keep the filepaths when pickling, and then reloaded from the disk when unpickling
Maybe let's have a design that allows a Dataset to have a Table that can be rebuilt from heterogenous sources like in-memory tables or on-disk tables ? This could also be further extended in the future
One idea would be to define a list of sources and each source implements a way to reload its corresponding pyarrow Table.
Then the dataset would be the concatenation of all these tables.
Depending on the source type, the serialization using pickle would be different. In-memory data would be copied while on-disk data would simply be replaced by the path to these data.
If you have some ideas you would like to share about the design/API feel free to do so :)
cc @albertvillanova | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 1,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/huggingface/datasets/issues/1877/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1877/timeline | null | completed | null | null | false | [
"I started working on this. My idea is to first add the pyarrow Table wrappers InMemoryTable and MemoryMappedTable that both implement what's necessary regarding copy/pickle. Then have another wrapper that takes the concatenation of InMemoryTable/MemoryMappedTable objects.\r\n\r\nWhat's important here is that concatenating two tables into one doesn't double the memory used (`total_allocated_bytes()` stays the same).",
"Hi @lhoestq @albertvillanova,\r\n\r\nI checked the linked issues and PR, this seems like a great idea. Would you mind elaborating on the in-memory and memory-mapped datasets? \r\nBased on my understanding, it is something like this, please correct me if I am wrong:\r\n1. For in-memory datasets, we don't have any dataset files so the entire dataset is pickled to the cache during loading, and then whenever required it is unpickled .\r\n2. For on-disk/memory-mapped datasets, we have the data files provided, so they can be re-loaded from the paths, and only the file-paths are stored while pickling.\r\n\r\nIf this is correct, will the feature also handle pickling/unpickling of a concatenated dataset? Will this be cached?\r\n\r\nThis also leads me to ask whether datasets are chunked during pickling? \r\n\r\nThanks,\r\nGunjan",
"Hi ! Yes you're totally right about your two points :)\r\n\r\nAnd in the case of a concatenated dataset, then we should reload each sub-table depending on whether it's in-memory or memory mapped. That means the dataset will be made of several blocks in order to keep track of what's from memory and what's memory mapped. This allows to pickle/unpickle concatenated datasets",
"Hi @lhoestq\r\n\r\nThanks, that sounds nice. Can you explain where the issue of the double memory may arise? Also, why is the existing `concatenate_datasets` not sufficient for this purpose?",
"Hi @lhoestq,\r\n\r\nWill the `add_item` feature also help with lazy writing (or no caching) during `map`/`filter`?",
"> Can you explain where the issue of the double memory may arise?\r\n\r\nWe have to keep each block (in-memory vs memory mapped) separated in order to be able to reload them with pickle.\r\nOn the other hand we also need to have the full table from mixed in-memory and memory mapped data in order to iterate or extract data conveniently. That means that each block is accessible twice: once in the full table, and once in the separated blocks. But since pyarrow tables concatenation doesn't double the memory, then building the full table doesn't cost memory which is what we want :)\r\n\r\n> Also, why is the existing concatenate_datasets not sufficient for this purpose?\r\n\r\nThe existing `concatenate_datasets` doesn't support having both in-memory and memory mapped data together (there's no fancy block separation logic). It works for datasets fully in-memory or fully memory mapped but not a mix of the two.\r\n\r\n> Will the add_item feature also help with lazy writing (or no caching) during map/filter?\r\n\r\nIt will enable the implementation of the fast, masked filter from this discussion: https://github.com/huggingface/datasets/issues/1949\r\nHowever I don't think this will affect map."
] |
https://api.github.com/repos/huggingface/datasets/issues/5510 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5510/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5510/comments | https://api.github.com/repos/huggingface/datasets/issues/5510/events | https://github.com/huggingface/datasets/pull/5510 | 1,575,191,549 | PR_kwDODunzps5JehbR | 5,510 | Milvus integration for search | [] | open | false | null | 5 | 2023-02-07T23:30:26Z | 2023-02-24T16:45:09Z | null | null | Signed-off-by: Filip Haltmayer <filip.haltmayer@zilliz.com> | {
"+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/5510/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5510/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/5510.diff",
"html_url": "https://github.com/huggingface/datasets/pull/5510",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/5510.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/5510"
} | true | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_5510). All of your documentation changes will be reflected on that endpoint.",
"To the maintainer, sorry about the repeated run requests for formatting. Missed the `make style` outlined in contributing guidelines. ",
"Anything I can do to get the workflow to run? @lhoestq ",
"cc @mariosasko \r\n\r\n> Anything I can do to get the workflow to run?\r\n\r\nYou can merge `main` into your branch to fix code formatting (we switched from isort+flake8 to ruff this week), and then run `make style`",
"I believe that should be good. @mariosasko"
] |
https://api.github.com/repos/huggingface/datasets/issues/402 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/402/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/402/comments | https://api.github.com/repos/huggingface/datasets/issues/402/events | https://github.com/huggingface/datasets/pull/402 | 658,001,288 | MDExOlB1bGxSZXF1ZXN0NDUwMDI2NTE0 | 402 | Search qa | [] | closed | false | null | 0 | 2020-07-16T09:00:10Z | 2020-07-16T14:27:00Z | 2020-07-16T14:26:59Z | null | add SearchQA dataset
#336 | {
"+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/402/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/402/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/402.diff",
"html_url": "https://github.com/huggingface/datasets/pull/402",
"merged_at": "2020-07-16T14:26:59Z",
"patch_url": "https://github.com/huggingface/datasets/pull/402.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/402"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/5738 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5738/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5738/comments | https://api.github.com/repos/huggingface/datasets/issues/5738/events | https://github.com/huggingface/datasets/issues/5738 | 1,663,477,690 | I_kwDODunzps5jJqe6 | 5,738 | load_dataset("text","dataset.txt") loads the wrong dataset! | [] | closed | false | null | 1 | 2023-04-12T01:07:46Z | 2023-04-19T12:08:27Z | 2023-04-19T12:08:27Z | null | ### Describe the bug
I am trying to load my own custom text dataset using the load_dataset function. My dataset is a bunch of ordered text, think along the lines of shakespeare plays. However, after I load the dataset and I inspect it, the dataset is a table with a bunch of latitude and longitude values! What in the world??
### Steps to reproduce the bug
my_dataset = load_dataset("text","TextFile.txt")
my_dataset
### Expected behavior
I expected the dataset to contain the actual data from the text document that I used.
### Environment info
Google 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/5738/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5738/timeline | null | completed | null | null | false | [
"You need to provide a text file as `data_files`, not as a configuration:\r\n\r\n```python\r\nmy_dataset = load_dataset(\"text\", data_files=\"TextFile.txt\")\r\n```\r\n\r\nOtherwise, since `data_files` is `None`, it picks up Colab's sample datasets from the `content` dir."
] |
https://api.github.com/repos/huggingface/datasets/issues/375 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/375/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/375/comments | https://api.github.com/repos/huggingface/datasets/issues/375/events | https://github.com/huggingface/datasets/issues/375 | 655,023,307 | MDU6SXNzdWU2NTUwMjMzMDc= | 375 | TypeError when computing bertscore | [] | closed | false | null | 2 | 2020-07-10T20:37:44Z | 2022-06-01T15:15:59Z | 2022-06-01T15:15:59Z | null | Hi,
I installed nlp 0.3.0 via pip, and my python version is 3.7.
When I tried to compute bertscore with the code:
```
import nlp
bertscore = nlp.load_metric('bertscore')
# load hyps and refs
...
print (bertscore.compute(hyps, refs, lang='en'))
```
I got the following error.
```
Traceback (most recent call last):
File "bert_score_evaluate.py", line 16, in <module>
print (bertscore.compute(hyps, refs, lang='en'))
File "/home/willywsm/anaconda3/envs/torcher/lib/python3.7/site-packages/nlp/metric.py", line 200, in compute
output = self._compute(predictions=predictions, references=references, **metrics_kwargs)
File "/home/willywsm/anaconda3/envs/torcher/lib/python3.7/site-packages/nlp/metrics/bertscore/fb176889831bf0ce995ed197edc94b2e9a83f647a869bb8c9477dbb2d04d0f08/bertscore.py", line 105, in _compute
hashcode = bert_score.utils.get_hash(model_type, num_layers, idf, rescale_with_baseline)
TypeError: get_hash() takes 3 positional arguments but 4 were given
```
It seems like there is something wrong with get_hash() function? | {
"+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/375/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/375/timeline | null | completed | null | null | false | [
"I am not able to reproduce this issue on my side.\r\nCould you give us more details about the inputs you used ?\r\n\r\nI do get another error though:\r\n```\r\n~/.virtualenvs/hf-datasets/lib/python3.7/site-packages/bert_score/utils.py in bert_cos_score_idf(model, refs, hyps, tokenizer, idf_dict, verbose, batch_size, device, all_layers)\r\n 371 return sorted(list(set(l)), key=lambda x: len(x.split(\" \")))\r\n 372 \r\n--> 373 sentences = dedup_and_sort(refs + hyps)\r\n 374 embs = []\r\n 375 iter_range = range(0, len(sentences), batch_size)\r\n\r\nValueError: operands could not be broadcast together with shapes (0,) (2,)\r\n```\r\nThat's because it gets numpy arrays as input and not lists. See #387 ",
"The other issue was fixed by #403 \r\n\r\nDo you still get this issue @willywsm1013 ?\r\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/3725 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3725/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3725/comments | https://api.github.com/repos/huggingface/datasets/issues/3725/events | https://github.com/huggingface/datasets/pull/3725 | 1,138,835,625 | PR_kwDODunzps4y3bOG | 3,725 | Pin pandas to avoid bug in streaming mode | [] | closed | false | null | 0 | 2022-02-15T15:21:00Z | 2022-02-15T15:52:38Z | 2022-02-15T15:52:37Z | null | Temporarily pin pandas version to avoid bug in streaming mode (patching no longer works).
Related to #3724. | {
"+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/3725/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3725/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3725.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3725",
"merged_at": "2022-02-15T15:52:37Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3725.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3725"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/2076 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2076/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2076/comments | https://api.github.com/repos/huggingface/datasets/issues/2076/events | https://github.com/huggingface/datasets/issues/2076 | 834,445,296 | MDU6SXNzdWU4MzQ0NDUyOTY= | 2,076 | Issue: Dataset download error | [
{
"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 | 7 | 2021-03-18T06:36:06Z | 2021-03-22T11:52:31Z | null | null | The download link in `iwslt2017.py` file does not seem to work anymore.
For example, `FileNotFoundError: Couldn't find file at https://wit3.fbk.eu/archive/2017-01-trnted/texts/zh/en/zh-en.tgz`
Would be nice if we could modify it script and use the new downloadable link? | {
"+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/2076/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2076/timeline | null | null | null | null | false | [
"Hi @XuhuiZhou, thanks for reporting this issue. \r\n\r\nIndeed, the old links are no longer valid (404 Not Found error), and the script must be updated with the new links to Google Drive.",
"It would be nice to update the urls indeed !\r\n\r\nTo do this, you just need to replace the urls in `iwslt2017.py` and then update the dataset_infos.json file with\r\n```\r\ndatasets-cli test ./datasets/iwslt2017 --all_configs --save_infos --ignore_verifications\r\n```",
"Is this a command to update my local files or fix the file Github repo in general? (I am not so familiar with the datasets-cli command here)\r\n\r\nI also took a brief look at the **Sharing your dataset** section, looks like I could fix that locally and push it to the repo? I guess we are \"canonical\" category?",
"This command will update your local file. Then you can open a Pull Request to push your fix to the github repo :)\r\nAnd yes you are right, it is a \"canonical\" dataset, i.e. a dataset script defined in this github repo (as opposed to dataset repositories of users on the huggingface hub)",
"Hi, thanks for the answer. \r\n\r\nI gave a try to the problem today. But I encountered an upload error: \r\n\r\n```\r\ngit push -u origin fix_link_iwslt\r\nEnter passphrase for key '/home2/xuhuizh/.ssh/id_rsa': \r\nERROR: Permission to huggingface/datasets.git denied to XuhuiZhou.\r\nfatal: Could not read from remote repository.\r\n\r\nPlease make sure you have the correct access rights\r\nand the repository exists.\r\n```\r\n\r\nAny insight here? \r\n\r\nBy the way, when I run the datasets-cli command, it shows the following error, but does not seem to be the error coming from `iwslt.py`\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/home2/xuhuizh/anaconda3/envs/UMT/bin/datasets-cli\", line 33, in <module>\r\n sys.exit(load_entry_point('datasets', 'console_scripts', 'datasets-cli')())\r\n File \"/home2/xuhuizh/projects/datasets/src/datasets/commands/datasets_cli.py\", line 35, in main\r\n service.run()\r\n File \"/home2/xuhuizh/projects/datasets/src/datasets/commands/test.py\", line 141, in run\r\n try_from_hf_gcs=False,\r\n File \"/home2/xuhuizh/projects/datasets/src/datasets/builder.py\", line 579, in download_and_prepare\r\n dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs\r\n File \"/home2/xuhuizh/projects/datasets/src/datasets/builder.py\", line 639, in _download_and_prepare\r\n self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), \"dataset source files\"\r\n File \"/home2/xuhuizh/projects/datasets/src/datasets/utils/info_utils.py\", line 32, in verify_checksums\r\n raise ExpectedMoreDownloadedFiles(str(set(expected_checksums) - set(recorded_checksums)))\r\ndatasets.utils.info_utils.ExpectedMoreDownloadedFiles: {'https://wit3.fbk.eu/archive/2017-01-trnmted//texts/DeEnItNlRo/DeEnItNlRo/DeEnItNlRo-DeEnItNlRo.tgz'}\r\n```",
"Hi ! To create a PR on this repo your must fork it and create a branch on your fork. See how to fork the repo [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md#start-by-preparing-your-environment).\r\nAnd to make the command work without the `ExpectedMoreDownloadedFiles` error, you just need to use the `--ignore_verifications` flag.",
"Hi @XuhuiZhou,\r\n\r\nAs @lhoestq has well explained, you need to fork HF's repository, create a feature branch in your fork, push your changes to it and then open a Pull Request to HF's upstream repository. This is so because at HuggingFace Datasets we follow a development model called \"Fork and Pull Model\". You can find more information here:\r\n- [Understanding the GitHub flow](https://guides.github.com/introduction/flow/)\r\n- [Forking Projects](https://guides.github.com/activities/forking/)\r\n\r\nAlternatively, if you find all these steps too complicated, you can use the GitHub official command line tool: [GitHub CLI](https://cli.github.com/). Once installed, in order to create a Pull Request, you only need to use this command:\r\n```shell\r\ngh pr create --web\r\n```\r\nThis utility will automatically create the fork, push your changes and open a Pull Request, under the hood."
] |
https://api.github.com/repos/huggingface/datasets/issues/2085 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2085/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2085/comments | https://api.github.com/repos/huggingface/datasets/issues/2085/events | https://github.com/huggingface/datasets/pull/2085 | 835,870,994 | MDExOlB1bGxSZXF1ZXN0NTk2NDYyOTc2 | 2,085 | Fix max_wait_time in requests | [] | closed | false | null | 0 | 2021-03-19T11:22:26Z | 2021-03-23T15:36:38Z | 2021-03-23T15:36:37Z | null | it was handled as a min time, not max cc @SBrandeis | {
"+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/2085/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2085/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2085.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2085",
"merged_at": "2021-03-23T15:36:37Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2085.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2085"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/5624 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5624/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5624/comments | https://api.github.com/repos/huggingface/datasets/issues/5624/events | https://github.com/huggingface/datasets/issues/5624 | 1,617,400,192 | I_kwDODunzps5gZ5GA | 5,624 | glue datasets returning -1 for test split | [] | closed | false | null | 1 | 2023-03-09T14:47:18Z | 2023-03-09T16:49:29Z | 2023-03-09T16:49:29Z | null | ### Describe the bug
Downloading any dataset from GLUE has -1 as class labels for test split. Train and validation have regular 0/1 class labels. This is also present in the dataset card online.
### Steps to reproduce the bug
```
dataset = load_dataset("glue", "sst2")
for d in dataset:
# prints out -1
print(d["label"]
```
### Expected behavior
Expected behavior should be 0/1 instead of -1.
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.15.0-46-generic-x86_64-with-glibc2.17
- Python version: 3.8.16
- PyArrow version: 8.0.0
- Pandas version: 1.5.3
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/5624/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5624/timeline | null | completed | null | null | false | [
"Hi @lithafnium, thanks for reporting.\r\n\r\nPlease note that you can use the \"Community\" tab in the corresponding dataset page to start any discussion: https://huggingface.co/datasets/glue/discussions\r\n\r\nIndeed this issue was already raised there (https://huggingface.co/datasets/glue/discussions/5) and answered: https://huggingface.co/datasets/glue/discussions/5#63907885937867f0cb3cde31\r\n> The test labels are not public.\r\n>\r\n> Note this dataset belongs to a benchmark: people send their predictions for the test split to GLUE (https://gluebenchmark.com/) and then they get a score in their leaderboard...\r\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/2124 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2124/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2124/comments | https://api.github.com/repos/huggingface/datasets/issues/2124/events | https://github.com/huggingface/datasets/issues/2124 | 842,627,729 | MDU6SXNzdWU4NDI2Mjc3Mjk= | 2,124 | Adding ScaNN library to do MIPS? | [] | open | false | null | 1 | 2021-03-28T00:07:00Z | 2021-03-29T13:23:43Z | null | null | @lhoestq Hi I am thinking of adding this new google library to do the MIPS similar to **add_faiss_idex**. As the paper suggests, it is really fast when it comes to retrieving the nearest neighbors.
https://github.com/google-research/google-research/tree/master/scann

| {
"+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/2124/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2124/timeline | null | null | null | null | false | [
"I haven't played with it (yet) but it sounds really cool !\r\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/1841 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1841/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1841/comments | https://api.github.com/repos/huggingface/datasets/issues/1841/events | https://github.com/huggingface/datasets/issues/1841 | 803,561,123 | MDU6SXNzdWU4MDM1NjExMjM= | 1,841 | Add ljspeech | [
{
"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": "d93f0b",
"default": false,
"description": "",
"id": 2725241052,
"name": "speech",
"node_id": "MDU6TGFiZWwyNzI1MjQxMDUy",
"url": "https://api.github.com/repos/huggingface/datasets/labels/speech"
}
] | closed | false | null | 0 | 2021-02-08T13:22:26Z | 2021-03-15T05:59:02Z | 2021-03-15T05:59:02Z | null | ## Adding a Dataset
- **Name:** *ljspeech*
- **Description:** *This is a public domain speech dataset consisting of 13,100 short audio clips of a single speaker reading passages from 7 non-fiction books. A transcription is provided for each clip. Clips vary in length from 1 to 10 seconds and have a total length of approximately 24 hours.
The texts were published between 1884 and 1964, and are in the public domain. The audio was recorded in 2016-17 by the LibriVox project and is also in the public domain.)*
- **Paper:** *Homepage*: https://keithito.com/LJ-Speech-Dataset/
- **Data:** *https://keithito.com/LJ-Speech-Dataset/*
- **Motivation:** Important speech dataset
- **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/ljspeech
If interested in tackling this issue, feel free to tag @patrickvonplaten
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| {
"+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/1841/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1841/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/huggingface/datasets/issues/798 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/798/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/798/comments | https://api.github.com/repos/huggingface/datasets/issues/798/events | https://github.com/huggingface/datasets/issues/798 | 735,518,805 | MDU6SXNzdWU3MzU1MTg4MDU= | 798 | Cannot load TREC dataset: ConnectionError | [
{
"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 | 9 | 2020-11-03T17:45:22Z | 2022-02-14T15:34:22Z | 2022-02-14T15:34:22Z | null | ## Problem
I cannot load "trec" dataset, it results with ConnectionError as shown below. I've tried on both Google Colab and locally.
* `requests.head('http://cogcomp.org/Data/QA/QC/train_5500.label')` returns <Response [302]>.
* `requests.head('http://cogcomp.org/Data/QA/QC/train_5500.label', allow_redirects=True)` raises `requests.exceptions.TooManyRedirects: Exceeded 30 redirects.`
* Opening `http://cogcomp.org/Data/QA/QC/train_5500.label' in a browser works, but opens a different address
* Increasing max_redirects to 100 doesn't help
Also, while debugging I've seen that requesting 'https://storage.googleapis.com/huggingface-nlp/cache/datasets/trec/default/1.1.0/dataset_info.json' returns <Response [404]> before, but it doesn't raise any errors. Not sure if that's relevant.
* datasets.__version__ == '1.1.2'
* requests.__version__ == '2.24.0'
## Error trace
```
>>> import datasets
>>> datasets.__version__
'1.1.2'
>>> dataset = load_dataset("trec", split="train")
Using custom data configuration default
Downloading and preparing dataset trec/default (download: 350.79 KiB, generated: 403.39 KiB, post-processed: Unknown size, total: 754.18 KiB) to /home/przemyslaw/.cache/huggingface/datasets/trec/default/1.1.0/ca4248481ad244f235f4cf277186cad2ee8769f975119a2bbfc41b8932b88bd7...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/przemyslaw/.local/lib/python3.6/site-packages/datasets/load.py", line 611, in load_dataset
ignore_verifications=ignore_verifications,
File "/home/przemyslaw/.local/lib/python3.6/site-packages/datasets/builder.py", line 476, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/przemyslaw/.local/lib/python3.6/site-packages/datasets/builder.py", line 531, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/home/przemyslaw/.cache/huggingface/modules/datasets_modules/datasets/trec/ca4248481ad244f235f4cf277186cad2ee8769f975119a2bbfc41b8932b88bd7/trec.py", line 140, in _split_generators
dl_files = dl_manager.download_and_extract(_URLs)
File "/home/przemyslaw/.local/lib/python3.6/site-packages/datasets/utils/download_manager.py", line 254, in download_and_extract
return self.extract(self.download(url_or_urls))
File "/home/przemyslaw/.local/lib/python3.6/site-packages/datasets/utils/download_manager.py", line 179, in download
num_proc=download_config.num_proc,
File "/home/przemyslaw/.local/lib/python3.6/site-packages/datasets/utils/py_utils.py", line 225, in map_nested
_single_map_nested((function, obj, types, None, True)) for obj in tqdm(iterable, disable=disable_tqdm)
File "/home/przemyslaw/.local/lib/python3.6/site-packages/datasets/utils/py_utils.py", line 225, in <listcomp>
_single_map_nested((function, obj, types, None, True)) for obj in tqdm(iterable, disable=disable_tqdm)
File "/home/przemyslaw/.local/lib/python3.6/site-packages/datasets/utils/py_utils.py", line 163, in _single_map_nested
return function(data_struct)
File "/home/przemyslaw/.local/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 308, in cached_path
use_etag=download_config.use_etag,
File "/home/przemyslaw/.local/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 475, in get_from_cache
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach http://cogcomp.org/Data/QA/QC/train_5500.label
```
I would appreciate some suggestions here. | {
"+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/798/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/798/timeline | null | completed | null | null | false | [
"Hi ! Indeed there's an issue with those links.\r\nWe should probably use the target urls of the redirections instead",
"Hi, the same issue here, could you tell me how to download it through datasets? thanks ",
"Same issue. ",
"Actually it's already fixed on the master branch since #740 \r\nI'll do the 1.1.3 release soon",
"Hi\nthanks, but I did tried to install from the pip install git+... and it does\nnot work for me,. thanks for the help. I have the same issue with wmt16,\n\"ro-en\"\nthanks.\nBest\nRabeeh\n\nOn Mon, Nov 16, 2020 at 10:29 AM Quentin Lhoest <notifications@github.com>\nwrote:\n\n> Actually it's already fixed on the master branch since #740\n> <https://github.com/huggingface/datasets/pull/740>\n> I'll do the 1.1.3 release soon\n>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/huggingface/datasets/issues/798#issuecomment-727854736>,\n> or unsubscribe\n> <https://github.com/notifications/unsubscribe-auth/ABP4ZCEUBJKPOCLABXCKMPDSQDWH3ANCNFSM4TJBUKSA>\n> .\n>\n",
"I just tested on google colab using\r\n```python\r\n!pip install git+https://github.com/huggingface/datasets.git\r\nfrom datasets import load_dataset\r\nload_dataset(\"trec\")\r\n```\r\nand it works.\r\nCan you detail how you got the issue even when using the latest version on master ?\r\n\r\nAlso about wmt we'll look into it, thanks for reporting !",
"I think the new url with .edu is also broken:\r\n```\r\nConnectionError: Couldn't reach https://cogcomp.seas.upenn.edu/Data/QA/QC/train_5500.label\r\n```\r\nCant download the dataset anymore.",
"Hi ! The URL seems to work fine on my side, can you try again ?",
"Forgot to update, i wrote an email to the webmaster of seas.upenn.edu because i couldnt reach the url on any machine. This was the answer:\r\n```\r\nThank you for your report. The server was offline for maintenance and is now available again.\r\n```\r\nGuess all back to normal now 🙂 "
] |
https://api.github.com/repos/huggingface/datasets/issues/2248 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2248/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2248/comments | https://api.github.com/repos/huggingface/datasets/issues/2248/events | https://github.com/huggingface/datasets/pull/2248 | 864,853,447 | MDExOlB1bGxSZXF1ZXN0NjIxMDEyNzg5 | 2,248 | Implement Dataset to JSON | [
{
"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 | {
"closed_at": "2021-05-31T16:20:53Z",
"closed_issues": 3,
"created_at": "2021-04-09T13:16:31Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4",
"events_url": "https://api.github.com/users/albertvillanova/events{/privacy}",
"followers_url": "https://api.github.com/users/albertvillanova/followers",
"following_url": "https://api.github.com/users/albertvillanova/following{/other_user}",
"gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/albertvillanova",
"id": 8515462,
"login": "albertvillanova",
"node_id": "MDQ6VXNlcjg1MTU0NjI=",
"organizations_url": "https://api.github.com/users/albertvillanova/orgs",
"received_events_url": "https://api.github.com/users/albertvillanova/received_events",
"repos_url": "https://api.github.com/users/albertvillanova/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions",
"type": "User",
"url": "https://api.github.com/users/albertvillanova"
},
"description": "Next minor release",
"due_on": "2021-05-14T07:00:00Z",
"html_url": "https://github.com/huggingface/datasets/milestone/3",
"id": 6644287,
"labels_url": "https://api.github.com/repos/huggingface/datasets/milestones/3/labels",
"node_id": "MDk6TWlsZXN0b25lNjY0NDI4Nw==",
"number": 3,
"open_issues": 0,
"state": "closed",
"title": "1.7",
"updated_at": "2021-05-31T16:20:53Z",
"url": "https://api.github.com/repos/huggingface/datasets/milestones/3"
} | 0 | 2021-04-22T11:46:51Z | 2021-04-27T15:29:21Z | 2021-04-27T15:29:20Z | null | Implement `Dataset.to_json`. | {
"+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/2248/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2248/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2248.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2248",
"merged_at": "2021-04-27T15:29:20Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2248.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2248"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/3791 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3791/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3791/comments | https://api.github.com/repos/huggingface/datasets/issues/3791/events | https://github.com/huggingface/datasets/pull/3791 | 1,150,733,475 | PR_kwDODunzps4zevU2 | 3,791 | Add `data_dir` to `data_files` resolution and misc improvements to HfFileSystem | [] | closed | false | null | 0 | 2022-02-25T18:26:35Z | 2022-03-01T13:10:43Z | 2022-03-01T13:10:42Z | null | As discussed in https://github.com/huggingface/datasets/pull/2830#issuecomment-1048989764, this PR adds a QOL improvement to easily reference the files inside a directory in `load_dataset` using the `data_dir` param (very handy for ImageFolder because it avoids globbing, but also useful for the other loaders). Additionally, it fixes the issue with `HfFileSystem.isdir`, which would previously always return `False`, and aligns the path-handling logic in `HfFileSystem` with `fsspec.GitHubFileSystem`. | {
"+1": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/huggingface/datasets/issues/3791/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3791/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3791.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3791",
"merged_at": "2022-03-01T13:10:42Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3791.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3791"
} | true | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.