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/5272 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5272/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5272/comments | https://api.github.com/repos/huggingface/datasets/issues/5272/events | https://github.com/huggingface/datasets/issues/5272 | 1,456,940,021 | I_kwDODunzps5W1yP1 | 5,272 | Use pyarrow Tensor dtype | [
{
"color": "a2eeef",
"default": true,
"description": "New feature or request",
"id": 1935892871,
"name": "enhancement",
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement"
}
] | open | false | null | 15 | 2022-11-20T15:18:41Z | 2023-07-04T04:57:50Z | null | null | ### Feature request
I was going the discussion of converting tensors to lists.
Is there a way to leverage pyarrow's Tensors for nested arrays / embeddings?
For example:
```python
import pyarrow as pa
import numpy as np
x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)
pa.Tensor.from_numpy(x, dim_names=["dim1","dim2"])
```
[Apache docs](https://arrow.apache.org/docs/python/generated/pyarrow.Tensor.html)
Maybe this belongs into the pyarrow features / repo.
### Motivation
Working with big data, we need to make sure to use the best data structures and IO out there
### Your contribution
Can try to a PR if code changes necessary | {
"+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/5272/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5272/timeline | null | null | null | null | false | [
"Hi ! We're using the Arrow format for the datasets, and PyArrow tensors are not part of the Arrow format AFAIK:\r\n\r\n> There is no direct support in the arrow columnar format to store Tensors as column values.\r\n\r\nsource: https://github.com/apache/arrow/issues/4802#issuecomment-508494694",
"@wesm @rok its been around three years. any updates, regarding dataset arrow tensor support? ๐ I know you must be very busy, would appreciate to learn what is the state of art. I saw the PR is still open [#8510](https://github.com/apache/arrow/pull/8510)",
"Hey @franz101 & @lhoestq!\r\nThere is a plan and a PR to create an [ExtensionArray of Tensors](https://github.com/apache/arrow/pull/8510) of equal sizes as well as a plan to do the same for Tensors of different sizes [ARROW-8714](https://issues.apache.org/jira/browse/ARROW-8714).",
"The work stalled a little because it was not clear where TensorArray would live. However Arrow community recently agreed to make a [well-known-extension-type document](https://lists.apache.org/thread/sxd5fhc42hb6svs79t3fd79gkqj83pfh) and I would like https://github.com/apache/arrow/pull/8510 to land there and add an implementation to C++/Python + another language. Is that something you would find beneficial to you?",
"that is a great update, thank you.\r\nit looks like this feature would benefit datasets implementation of [ArrayExtensionArray](https://github.com/huggingface/datasets/blob/9f2ff14673cac1f1ad56d80221a793f5938b68c7/src/datasets/features/features.py#L585-L641). Is that correct @eladsegal @lhoestq?\r\n\r\n",
"TensorArray sounds great ! Looking forward to it :)\r\n\r\nWe've had our own ExtensionArray for fixed shape tensors for a while now, hoping to see something more standardized by the arrow community.\r\n\r\nAlso super interested in the extension array for tensors of different sizes cc @mariosasko ",
"[FixedShapeTensor ExtensionType](https://github.com/apache/arrow/pull/8510) was merged and will be in Arrow 12.0.0 (release is planned mid April).\r\n",
"@rok Thanks for keeping us updated! I think it's best to introduce a new feature type that would use this extension type under the hood. I'll create an issue to discuss the design with the community in the coming days.\r\n\r\nAlso, is there a tentative time frame for the variable-shape Tensor extension type?",
"@mariosasko please tag me in the discussion, perhaps I can contribute.\r\n\r\nAs for the [variable shape tensor array](https://github.com/apache/arrow/issues/24868) - I'd be interested in working on it but didn't see much interest in community yet. Are you saying `huggingface/datasets` could use it?",
"pyarrow 12 is out ๐, will have a look if I can work on it for the ExtensionArray",
"I think these two issues need to be fixed first on the Arrow side before adding the tensor feature type here: https://github.com/apache/arrow/issues/35573 and https://github.com/apache/arrow/issues/35599.\r\n\r\n@rok We've had a couple of requests for supporting variable-shape tensors on the forum/GH, but I did not manage to find the concrete issues using the search. TF/TFDS (and PyTorch with the `nested_tensor` API) support them, so it makes sense for us to do the same eventually (the Ray project has an [extension](https://github.com/ray-project/ray/blob/42a8d1489b37243f203120899a23d919dc85bf2a/python/ray/air/util/tensor_extensions/arrow.py#L634) type to support this case)",
"> @rok We've had a couple of requests for supporting variable-shape tensors on the forum/GH, but I did not manage to find the concrete issues using the search. TF/TFDS (and PyTorch with the `nested_tensor` API) support them, so it makes sense for us to do the same eventually (the Ray project has an [extension](https://github.com/ray-project/ray/blob/42a8d1489b37243f203120899a23d919dc85bf2a/python/ray/air/util/tensor_extensions/arrow.py#L634) type to support this case)\r\n\r\nThat does make sense indeed. We should probably also be careful about memory layout to enable zero-copy interface to TF/PyTorch.",
"So there is no way we can use [pyarrow.Tensor](https://arrow.apache.org/docs/python/generated/pyarrow.Tensor.html#pyarrow.Tensor) ?",
"Not with with the Arrow format, and therefore not in `datasets`. But they released a new [FixedShapeTensorArray](https://arrow.apache.org/docs/python/extending_types.html#fixed-size-tensor) to store tensors in Arrow format. We plan to support this in `datasets` at one point !",
"There is also an open issue to enable the conversion of `pyarrow.Tensor` to `pyarrow.FixedShapeTensorType`: https://github.com/apache/arrow/issues/35068. This way one could indirectly use `pyarrow.Tensor` in Arrow format."
] |
https://api.github.com/repos/huggingface/datasets/issues/1574 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1574/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1574/comments | https://api.github.com/repos/huggingface/datasets/issues/1574/events | https://github.com/huggingface/datasets/pull/1574 | 767,015,317 | MDExOlB1bGxSZXF1ZXN0NTM5ODY1Mzcy | 1,574 | Diplomacy detection 3 | [] | closed | false | null | 0 | 2020-12-14T23:28:51Z | 2020-12-14T23:29:32Z | 2020-12-14T23:29:32Z | 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/1574/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1574/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1574.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1574",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/1574.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1574"
} | true | [] |
|
https://api.github.com/repos/huggingface/datasets/issues/2137 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2137/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2137/comments | https://api.github.com/repos/huggingface/datasets/issues/2137/events | https://github.com/huggingface/datasets/pull/2137 | 843,502,835 | MDExOlB1bGxSZXF1ZXN0NjAyODc0MDYw | 2,137 | Fix missing infos from concurrent dataset loading | [] | closed | false | null | 0 | 2021-03-29T15:46:12Z | 2021-03-31T10:35:56Z | 2021-03-31T10:35:55Z | null | This should fix issue #2131
When calling `load_dataset` at the same time from 2 workers, one of the worker could have missing split infos when reloading the dataset from the cache.
| {
"+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/2137/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2137/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2137.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2137",
"merged_at": "2021-03-31T10:35:55Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2137.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2137"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/2904 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2904/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2904/comments | https://api.github.com/repos/huggingface/datasets/issues/2904/events | https://github.com/huggingface/datasets/issues/2904 | 995,814,222 | I_kwDODunzps47WutO | 2,904 | FORCE_REDOWNLOAD does not work | [
{
"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-09-14T09:45:26Z | 2021-10-06T09:37:19Z | null | null | ## Describe the bug
With GenerateMode.FORCE_REDOWNLOAD, the documentation says
+------------------------------------+-----------+---------+
| | Downloads | Dataset |
+====================================+===========+=========+
| `REUSE_DATASET_IF_EXISTS` (default)| Reuse | Reuse |
+------------------------------------+-----------+---------+
| `REUSE_CACHE_IF_EXISTS` | Reuse | Fresh |
+------------------------------------+-----------+---------+
| `FORCE_REDOWNLOAD` | Fresh | Fresh |
+------------------------------------+-----------+---------+
However, the old dataset is loaded even when FORCE_REDOWNLOAD is chosen.
## Steps to reproduce the bug
```python
import pandas as pd
from datasets import load_dataset, GenerateMode
pd.DataFrame(range(5), columns=['numbers']).to_csv('/tmp/test.tsv.gz', index=False)
ee = load_dataset('csv', data_files=['/tmp/test.tsv.gz'], delimiter='\t', split='train', download_mode=GenerateMode.FORCE_REDOWNLOAD)
print(ee)
pd.DataFrame(range(10), columns=['numerals']).to_csv('/tmp/test.tsv.gz', index=False)
ee = load_dataset('csv', data_files=['/tmp/test.tsv.gz'], delimiter='\t', split='train', download_mode=GenerateMode.FORCE_REDOWNLOAD)
print(ee)
```
## Expected results
Dataset({
features: ['numbers'],
num_rows: 5
})
Dataset({
features: ['numerals'],
num_rows: 10
})
## Actual results
Dataset({
features: ['numbers'],
num_rows: 5
})
Dataset({
features: ['numbers'],
num_rows: 5
})
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-4.14.181-108.257.amzn1.x86_64-x86_64-with-glibc2.10
- Python version: 3.7.10
- PyArrow version: 3.0.0
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/2904/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2904/timeline | null | null | null | null | false | [
"Hi ! Thanks for reporting. The error seems to happen only if you use compressed files.\r\n\r\nThe second dataset is prepared in another dataset cache directory than the first - which is normal, since the source file is different. However, it doesn't uncompress the new data file because it finds the old uncompressed data in the extraction cache directory.\r\n\r\nIf we fix the extraction cache mechanism to uncompress a local file if it changed then it should fix the issue.\r\nCurrently the extraction cache mechanism only takes into account the path of the compressed file, which is an issue.",
"Facing the same issue, is there any way to overtake this issue until it will be fixed? ",
"You can clear your extraction cache in the meantime (by default at `~/.cache/huggingface/datasets/downloads/extracted`)"
] |
https://api.github.com/repos/huggingface/datasets/issues/4673 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4673/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4673/comments | https://api.github.com/repos/huggingface/datasets/issues/4673/events | https://github.com/huggingface/datasets/issues/4673 | 1,301,010,331 | I_kwDODunzps5Ni9eb | 4,673 | load_datasets on csv returns everything as a string | [
{
"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-07-11T17:30:24Z | 2022-07-12T13:33:09Z | 2022-07-12T13:33:08Z | null | ## Describe the bug
If you use:
`conll_dataset.to_csv("ner_conll.csv")`
It will create a csv file with all of your data as expected, however when you load it with:
`conll_dataset = load_dataset("csv", data_files="ner_conll.csv")`
everything is read in as a string. For example if I look at everything in 'ner_tags' I get back `['[3 0 7 0 0 0 7 0 0]', '[1 2]', '[5 0]']` instead of what I originally saved which was `[[3, 0, 7, 0, 0, 0, 7, 0, 0], [1, 2], [5, 0]]`
I think maybe there is something funky going on with the csv delimiter
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
#load original conll dataset
orig_conll = load_dataset("conll2003")
#save original conll as a csv
orig_conll.to_csv("ner_conll.csv")
#reload conll data as a csv
new_conll = load_dataset("csv", data_files="ner_conll.csv")`
```
## Expected results
A clear and concise description of the expected results.
I would expect the data be returned as the data type I saved it as. I.e. if I save a list of ints
[[3, 0, 7, 0, 0, 0, 7, 0, 0]], I shouldnt get back a string ['[3 0 7 0 0 0 7 0 0]']
I also get back a string when I pass a list of strings ['EU', 'rejects', 'German', 'call', 'to', 'boycott', 'British', 'lamb', '.']
## Actual results
A list of strings `['[3 0 7 0 0 0 7 0 0]', '[1 2]', '[5 0]']`
A string "['EU' 'rejects' 'German' 'call' 'to' 'boycott' 'British' 'lamb' '.']"
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.18.3
- Platform: Linux-5.4.0-121-generic-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.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/4673/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4673/timeline | null | completed | null | null | false | [
"Hi @courtneysprouse, thanks for reporting.\r\n\r\nYes, you are right: by default the \"csv\" loader loads all columns as strings. \r\n\r\nYou could tweak this behavior by passing the `feature` argument to `load_dataset`, but it is also true that currently it is not possible to perform some kind of casts, due to lacking of implementation in PyArrow. For example:\r\n```python\r\nimport datasets\r\n\r\nfeatures = datasets.Features(\r\n {\r\n \"tokens\": datasets.Sequence(datasets.Value(\"string\")),\r\n \"ner_tags\": datasets.Sequence(datasets.Value(\"int32\")),\r\n }\r\n)\r\n\r\nnew_conll = datasets.load_dataset(\"csv\", data_files=\"ner_conll.csv\", features=features)\r\n```\r\ngives `ArrowNotImplementedError` error:\r\n```\r\n/usr/local/lib/python3.7/dist-packages/pyarrow/error.pxi in pyarrow.lib.check_status()\r\n\r\nArrowNotImplementedError: Unsupported cast from string to list using function cast_list\r\n```\r\n\r\nOn the other hand, if you just would like to save and afterwards load your dataset, you could use `save_to_disk` and `load_from_disk` instead. These functions preserve all data types.\r\n```python\r\n>>> orig_conll.save_to_disk(\"ner_conll\")\r\n\r\n>>> from datasets import load_from_disk\r\n\r\n>>> new_conll = load_from_disk(\"ner_conll\")\r\n>>> new_conll\r\nDatasetDict({\r\n train: Dataset({\r\n features: ['id', 'tokens', 'pos_tags', 'chunk_tags', 'ner_tags'],\r\n num_rows: 14042\r\n })\r\n validation: Dataset({\r\n features: ['id', 'tokens', 'pos_tags', 'chunk_tags', 'ner_tags'],\r\n num_rows: 3251\r\n })\r\n test: Dataset({\r\n features: ['id', 'tokens', 'pos_tags', 'chunk_tags', 'ner_tags'],\r\n num_rows: 3454\r\n })\r\n})\r\n>>> new_conll[\"train\"][0]\r\n{'chunk_tags': [11, 21, 11, 12, 21, 22, 11, 12, 0],\r\n 'id': '0',\r\n 'ner_tags': [3, 0, 7, 0, 0, 0, 7, 0, 0],\r\n 'pos_tags': [22, 42, 16, 21, 35, 37, 16, 21, 7],\r\n 'tokens': ['EU',\r\n 'rejects',\r\n 'German',\r\n 'call',\r\n 'to',\r\n 'boycott',\r\n 'British',\r\n 'lamb',\r\n '.']}\r\n>>> new_conll[\"train\"].features\r\n{'chunk_tags': Sequence(feature=ClassLabel(num_classes=23, names=['O', 'B-ADJP', 'I-ADJP', 'B-ADVP', 'I-ADVP', 'B-CONJP', 'I-CONJP', 'B-INTJ', 'I-INTJ', 'B-LST', 'I-LST', 'B-NP', 'I-NP', 'B-PP', 'I-PP', 'B-PRT', 'I-PRT', 'B-SBAR', 'I-SBAR', 'B-UCP', 'I-UCP', 'B-VP', 'I-VP'], id=None), length=-1, id=None),\r\n 'id': Value(dtype='string', id=None),\r\n 'ner_tags': Sequence(feature=ClassLabel(num_classes=9, names=['O', 'B-PER', 'I-PER', 'B-ORG', 'I-ORG', 'B-LOC', 'I-LOC', 'B-MISC', 'I-MISC'], id=None), length=-1, id=None),\r\n 'pos_tags': Sequence(feature=ClassLabel(num_classes=47, names=['\"', \"''\", '#', '$', '(', ')', ',', '.', ':', '``', 'CC', 'CD', 'DT', 'EX', 'FW', 'IN', 'JJ', 'JJR', 'JJS', 'LS', 'MD', 'NN', 'NNP', 'NNPS', 'NNS', 'NN|SYM', 'PDT', 'POS', 'PRP', 'PRP$', 'RB', 'RBR', 'RBS', 'RP', 'SYM', 'TO', 'UH', 'VB', 'VBD', 'VBG', 'VBN', 'VBP', 'VBZ', 'WDT', 'WP', 'WP$', 'WRB'], id=None), length=-1, id=None),\r\n 'tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)}\r\n```",
"Hi @albertvillanova!\r\n\r\nThanks so much for your suggestions! That worked! "
] |
https://api.github.com/repos/huggingface/datasets/issues/6065 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6065/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6065/comments | https://api.github.com/repos/huggingface/datasets/issues/6065/events | https://github.com/huggingface/datasets/pull/6065 | 1,819,334,932 | PR_kwDODunzps5WR8jI | 6,065 | Add column type guessing from map return function | [] | closed | false | null | 5 | 2023-07-25T00:34:17Z | 2023-07-26T15:13:45Z | 2023-07-26T15:13:44Z | null | As discussed [here](https://github.com/huggingface/datasets/issues/5965), there are some cases where datasets is unable to automatically promote columns during mapping. The fix is to explicitly provide a `features` definition so pyarrow can configure itself with the right column types from the outset.
This PR provides an alternative approach, which is functionally equivalent to specifying features but a bit cleaner within a larger mapping pipeline. It allows clients to typehint the return variable coming from the mapper function - if we find one of these type annotations specified, and no explicit features have been passed in, we'll try to convert it into a Features map. If the map function runs and casting is unable to succeed, it will raise a DatasetTransformationNotAllowedError that indicates the typehint may be to blame. It works for batched and non-batched mapping functions.
Currently supported column types:
- builtins primitives: string, int, float, bool
- dictionaries, lists (nested and one-deep)
- Optional types and None-Unions (synonymous with optional types)
It's used like:
```python
class DatasetTyped(TypedDict):
texts: list[str]
def dataset_typed_map(batch) -> DatasetTyped:
return {"texts": [text.split() for text in batch["raw_text"]]}
dataset = {"raw_text": ["", "This is a test", "This is another test"]}
with Dataset.from_dict(dataset) as dset:
new_dataset = dset.map(
dataset_typed_map,
batched=True,
batch_size=1,
num_proc=1,
)
```
Open questions:
- Should logging indicate we have automatically guessed these types? Or proceed quietly until we hit an error (as is the current implementation). | {
"+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/6065/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6065/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/6065.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6065",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/6065.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6065"
} | true | [
"Thanks for working on this. However, having thought about this issue a bit more, supporting this doesn't seem like a good idea - it's better to be explicit than implicit, according to the Zen of Python ๐. Also, I don't think many users would use this, so this raises the question of whether this is something we want to maintain.\r\n\r\ncc @lhoestq for the 2nd opinion",
"@mariosasko I was going to quote the Zen of Python in the other direction :) To me, this actually is much more explicit than the current behavior of guessing pyarrow types based on the raw dictionary return values. Explicit typehinting is increasingly the de facto way to deal with this dynamic type serialization - plus it feels like a clearer fit to me than separating out the mapper function from the feature column definition in the call to the actual `.map()`. Another benefit is providing typehinting support for clients that use mypy or other static typecheckers to detect return mismatches.\r\n\r\nBut will leave it to you and @lhoestq to see if it's something you'd like in core versus a support package.",
"I meant that explicitly specifying the target features (the `features` param) is cleaner (easier to track) than relying on type hints.",
"Passing features= to `map()` is richer and more explicit. Also I don't think users would guess that such API exist.\r\n\r\nOther libraries like dask also infer the type from the output or requires the typing to be specified using the `meta` argument",
"Point about discoverability is a fair one, would certainly need some docs around it. All good! Will close this out and keep in our extension utilities."
] |
https://api.github.com/repos/huggingface/datasets/issues/4060 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4060/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4060/comments | https://api.github.com/repos/huggingface/datasets/issues/4060/events | https://github.com/huggingface/datasets/pull/4060 | 1,186,281,033 | PR_kwDODunzps41Tbmg | 4,060 | Deprecate canonical Multilingual Librispeech | [] | closed | false | null | 7 | 2022-03-30T10:56:56Z | 2022-04-01T12:54:05Z | 2022-04-01T12:48:51Z | null | Deprecate canonical Multilingual Librispeech in favor of [the community one](https://huggingface.co/datasets/facebook/multilingual_librispeech) which supports streaming.
However, there is a problem regarding new ASR template schema: since it's changed, I guess all community datasets that use this template do not work with new version of the library, including MLS. Should we somehow notify users about that or is it possible to change this line ourselves? For MLS specifically, I cannot change the code directly as I'm not the member of the Facebook org.
Hm, and the code should be change after the release, no? | {
"+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/4060/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4060/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/4060.diff",
"html_url": "https://github.com/huggingface/datasets/pull/4060",
"merged_at": "2022-04-01T12:48:51Z",
"patch_url": "https://github.com/huggingface/datasets/pull/4060.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/4060"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._",
"Yes, as discussed in #4006 we should update facebook/multilingual_librispeech indeed before we do a release. @anton-l could you help taking care of updating facebook/multilingual_librispeech ? We need to update the task template\r\n```python\r\ntask_templates=[AutomaticSpeechRecognition(audio_column=\"audio\", transcription_column=\"text\")],\r\n```\r\nand write that `datasets>=2.1` is necessary to load it in the dataset card.\r\n\r\nOnce the change is done we can merge this PR and do the release I think",
"@polinaeterna @lhoestq \r\nUpdated the script and the dataset card: https://huggingface.co/datasets/facebook/multilingual_librispeech ",
"@anton-l @lhoestq now previewer doesn't work for this datasets as it cannot recognize new `audio_column` argument:\r\n\r\n\r\nI'm not an expert in previewer things, where should I look into the corresponding code?",
"Yes, there are several datasets with the same error, eg https://github.com/huggingface/datasets-preview-backend/issues/188. I'm not sure what I should do to fix this? Upgrade datasets to master?\r\n",
"@anton-l ended up removing the task template in facebook/multilingual_librispeech to make it work for the current version of `datasets` and fix the viewer :) thanks !",
"@lhoestq can we merge now? ^^"
] |
https://api.github.com/repos/huggingface/datasets/issues/162 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/162/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/162/comments | https://api.github.com/repos/huggingface/datasets/issues/162/events | https://github.com/huggingface/datasets/pull/162 | 620,513,554 | MDExOlB1bGxSZXF1ZXN0NDE5NzQ4Mzky | 162 | fix prev files hash in map | [] | closed | false | null | 3 | 2020-05-18T21:20:51Z | 2020-05-18T21:36:21Z | 2020-05-18T21:36:20Z | null | Fix the `.map` issue in #160.
This makes sure it takes the previous files when computing the hash. | {
"+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/162/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/162/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/162.diff",
"html_url": "https://github.com/huggingface/datasets/pull/162",
"merged_at": "2020-05-18T21:36:20Z",
"patch_url": "https://github.com/huggingface/datasets/pull/162.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/162"
} | true | [
"Awesome! ",
"Hi, yes, this seems to fix #160 -- I cloned the branch locally and verified",
"Perfect then :)"
] |
https://api.github.com/repos/huggingface/datasets/issues/5992 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5992/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5992/comments | https://api.github.com/repos/huggingface/datasets/issues/5992/events | https://github.com/huggingface/datasets/pull/5992 | 1,776,460,964 | PR_kwDODunzps5UAk3C | 5,992 | speedup | [] | closed | false | null | 1 | 2023-06-27T09:17:58Z | 2023-06-27T09:23:07Z | 2023-06-27T09:18:04Z | 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/5992/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5992/timeline | null | null | true | {
"diff_url": "https://github.com/huggingface/datasets/pull/5992.diff",
"html_url": "https://github.com/huggingface/datasets/pull/5992",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/5992.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/5992"
} | true | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_5992). All of your documentation changes will be reflected on that endpoint."
] |
https://api.github.com/repos/huggingface/datasets/issues/133 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/133/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/133/comments | https://api.github.com/repos/huggingface/datasets/issues/133/events | https://github.com/huggingface/datasets/issues/133 | 619,094,954 | MDU6SXNzdWU2MTkwOTQ5NTQ= | 133 | [Question] Using/adding a local dataset | [] | closed | false | null | 5 | 2020-05-15T16:26:06Z | 2020-07-23T16:44:09Z | 2020-07-23T16:44:09Z | null | Users may want to either create/modify a local copy of a dataset, or use a custom-built dataset with the same `Dataset` API as externally downloaded datasets.
It appears to be possible to point to a local dataset path rather than downloading the external ones, but I'm not exactly sure how to go about doing this.
A notebook/example script demonstrating this would be very helpful. | {
"+1": 6,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 6,
"url": "https://api.github.com/repos/huggingface/datasets/issues/133/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/133/timeline | null | completed | null | null | false | [
"Hi @zphang,\r\n\r\nSo you can just give the local path to a dataset script file and it should work.\r\n\r\nHere is an example:\r\n- you can download one of the scripts in the `datasets` folder of the present repo (or clone the repo)\r\n- then you can load it with `load_dataset('PATH/TO/YOUR/LOCAL/SCRIPT.py')`\r\n\r\nDoes it make sense?",
"Could you give a more concrete example, please? \r\n\r\nI looked up wikitext dataset script from the repo. Should I just overwrite the `data_file` on line 98 to point to the local dataset directory? Would it work for different configurations of wikitext (wikitext2, wikitext103 etc.)?\r\n\r\nOr maybe we can use DownloadManager to specify local dataset location? In that case, where do we use DownloadManager instance?\r\n\r\nThanks",
"Hi @MaveriQ , although what I am doing is to commit a new dataset, but I think looking at imdb script might help.\r\nYou may want to use `dl_manager.download_custom`, give it a url(arbitrary string), a custom_download(arbitrary function) and return a path, and finally use _get sample to fetch a sample.",
"The download manager supports local directories. You can specify a local directory instead of a url and it should work.",
"Closing this one.\r\nFeel free to re-open if you have other questions :)"
] |
https://api.github.com/repos/huggingface/datasets/issues/39 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/39/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/39/comments | https://api.github.com/repos/huggingface/datasets/issues/39/events | https://github.com/huggingface/datasets/pull/39 | 611,712,135 | MDExOlB1bGxSZXF1ZXN0NDEyODIxNTA4 | 39 | [Test] improve slow testing | [] | closed | false | null | 0 | 2020-05-04T08:58:33Z | 2020-05-04T08:59:50Z | 2020-05-04T08:59:49Z | 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/39/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/39/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/39.diff",
"html_url": "https://github.com/huggingface/datasets/pull/39",
"merged_at": "2020-05-04T08:59:49Z",
"patch_url": "https://github.com/huggingface/datasets/pull/39.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/39"
} | true | [] |
|
https://api.github.com/repos/huggingface/datasets/issues/660 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/660/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/660/comments | https://api.github.com/repos/huggingface/datasets/issues/660/events | https://github.com/huggingface/datasets/pull/660 | 706,324,032 | MDExOlB1bGxSZXF1ZXN0NDkwODkyMjQ0 | 660 | add openwebtext | [] | closed | false | null | 3 | 2020-09-22T12:05:22Z | 2020-10-06T09:20:10Z | 2020-09-28T09:07:26Z | null | This adds [The OpenWebText Corpus](https://skylion007.github.io/OpenWebTextCorpus/), which is a clean and large text corpus for nlp pretraining. It is an open source effort to reproduce OpenAIโs WebText dataset used by GPT-2, and it is also needed to reproduce ELECTRA.
It solves #132 .
### Besides dataset building script, I made some changes to the library.
1. Extract large amount of compressed files with multi processing
I add a `num_proc` argument to `DownloadManager.extract` and pass this `num_proc` to `map_nested`. So I can decompress 20 thousands compressed files faster. `num_proc` I add is default to `None`, so it shouldn't break any other thing.
2. In `cached_path`, I change the order to deal with different kind of compressed files (zip, tar, gzip)
Because there is no way to 100% detect a file is a zip file (see [this](https://stackoverflow.com/questions/18194688/how-can-i-determine-if-a-file-is-a-zip-file)), I found it wrongly detect `'./datasets/downloads/extracted/58764bd6898fa339b25d92e7fbbc3d8dbf64fb504edff1a30a1d7d99d1561027/openwebtext/urlsf_subset13-630_data.xz'` as a zip and try decompress it with zip, sure it will get error. So I made it detect wheter the file is tar or gzip first and detect zip in the last.
3. `MockDownloadManager.extract`
Cuz I pass `num_proc` to `DownloadManager.extract`, I also have to make `MockDownloadManager.extract` to accept extra keywork arguments. So I make it `extract(path, *args, **kwargs)`, but just return the path as original implementation.
**Note**: If there is better way for points mentioned above, thought I would like to help, unless we can solve point4 (make dataset building fast), I may not be able to afford rebuild the dataset again because of change of the dataset script (Building the dataset cost me 4 days).
### There is something I think we can improve
4. Long time to decompress compressed files
Even I decompress those 20 thousands compressed files with 12 process on my 16 core 3.x Ghz server. It still took about 3 ~ 4days to complete dataset building. Most of time spent on decompress those files.
### Info about the source data
The source data is an tar.xz file with following structure, files/directory beyond compressed file is what can we get after decompress it.
```
openwebtext.tar.xz
|__ openwebtext
|__subset000.xz
| |__ ....txt
| |__ ....txt
| ...
|__ subset001.xz
|
....
```
And this the structure of dummy data, same as the original one.
```
dummy_data.zip
|__ dummy_data
|__ openwebtext
|__fake_subset-1_data-dirxz # actually it is a directory
| |__ ....txt
| |__ ....txt
|__ fake_subset-2_data-dirxz
|__ ....txt
|__ ....txt
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 1,
"laugh": 0,
"rocket": 1,
"total_count": 2,
"url": "https://api.github.com/repos/huggingface/datasets/issues/660/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/660/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/660.diff",
"html_url": "https://github.com/huggingface/datasets/pull/660",
"merged_at": "2020-09-28T09:07:26Z",
"patch_url": "https://github.com/huggingface/datasets/pull/660.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/660"
} | true | [
"BTW, is there a one-line command to make our building scripts pass flake8 test? (included code quality test), I got like trailing space or mixed space and tab warning and error, and fixed them manually.",
"> BTW, is there a one-line command to make our building scripts pass flake8 test? (included code quality test), I got like trailing space or mixed space and tab warning and error, and fixed them manually.\r\n\r\nI don't think so.\r\nWe have a command for black and isort but not flake8 as far as I know.",
"Thanks for your awesome work too.\r\nBTW a little reminder, this solves #132 "
] |
https://api.github.com/repos/huggingface/datasets/issues/2672 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2672/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2672/comments | https://api.github.com/repos/huggingface/datasets/issues/2672/events | https://github.com/huggingface/datasets/pull/2672 | 947,294,605 | MDExOlB1bGxSZXF1ZXN0NjkyMjk2NDQ4 | 2,672 | Fix potential DuplicatedKeysError in LibriSpeech | [] | closed | false | null | 0 | 2021-07-19T06:00:49Z | 2021-07-19T06:28:57Z | 2021-07-19T06:28:56Z | null | DONE:
- Fix unnecessary path join.
- Fix potential DiplicatedKeysError by ensuring keys are unique.
We should promote as a good practice, that the keys should be programmatically generated as unique, instead of read from data (which might be not unique). | {
"+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/2672/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2672/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2672.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2672",
"merged_at": "2021-07-19T06:28:56Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2672.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2672"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/3565 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3565/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3565/comments | https://api.github.com/repos/huggingface/datasets/issues/3565/events | https://github.com/huggingface/datasets/pull/3565 | 1,099,296,693 | PR_kwDODunzps4wzjhH | 3,565 | Add parameter `preserve_index` to `from_pandas` | [] | closed | false | null | 2 | 2022-01-11T15:26:37Z | 2022-01-12T16:11:27Z | 2022-01-12T16:11:27Z | null | Added optional parameter, so that user can get rid of useless index preserving. [Issue](https://github.com/huggingface/datasets/issues/3563) | {
"+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/3565/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3565/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3565.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3565",
"merged_at": "2022-01-12T16:11:26Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3565.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3565"
} | true | [
"> \r\n\r\nI did `make style` and it affected over 500 files\r\n\r\n```\r\nAll done! โจ ๐ฐ โจ\r\n575 files reformatted, 372 files left unchanged.\r\nisort tests src benchmarks datasets/**/*.py metri\r\n```\r\n\r\n(result)\r\n\r\n",
"Nvm I was using wrong black version"
] |
https://api.github.com/repos/huggingface/datasets/issues/3441 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3441/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3441/comments | https://api.github.com/repos/huggingface/datasets/issues/3441/events | https://github.com/huggingface/datasets/issues/3441 | 1,081,571,784 | I_kwDODunzps5Ad3nI | 3,441 | Add QuALITY dataset | [
{
"color": "e99695",
"default": false,
"description": "Requesting to add a new dataset",
"id": 2067376369,
"name": "dataset request",
"node_id": "MDU6TGFiZWwyMDY3Mzc2MzY5",
"url": "https://api.github.com/repos/huggingface/datasets/labels/dataset%20request"
}
] | open | false | null | 1 | 2021-12-15T22:26:19Z | 2021-12-28T15:17:05Z | null | null | ## Adding a Dataset
- **Name:** QuALITY
- **Description:** A challenging question answering with very long contexts (Twitter [thread](https://twitter.com/sleepinyourhat/status/1471225421794529281?s=20))
- **Paper:** No ArXiv link yet, but draft is [here](https://github.com/nyu-mll/quality/blob/main/quality_preprint.pdf)
- **Data:** GitHub repo [here](https://github.com/nyu-mll/quality)
- **Motivation:** This dataset would serve as a nice way to benchmark long-range Transformer models like BigBird, Longformer and their descendants. In particular, it would be very interesting to see how the S4 model fares on this given it's impressive performance on the Long Range Arena
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/3441/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3441/timeline | null | null | null | null | false | [
"I'll take this one if no one hasn't yet!"
] |
https://api.github.com/repos/huggingface/datasets/issues/2636 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2636/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2636/comments | https://api.github.com/repos/huggingface/datasets/issues/2636/events | https://github.com/huggingface/datasets/pull/2636 | 943,044,514 | MDExOlB1bGxSZXF1ZXN0Njg4NzEyMTY4 | 2,636 | Streaming for the Pandas loader | [] | closed | false | null | 0 | 2021-07-13T09:18:21Z | 2021-07-13T14:37:24Z | 2021-07-13T14:37:23Z | null | It was not using open in the builder. Therefore pd.read_pickle could fail when streaming from a private repo for example.
Indeed, when streaming, open is extended to support reading from remote files and handles authentication to the HF Hub | {
"+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/2636/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2636/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2636.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2636",
"merged_at": "2021-07-13T14:37:23Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2636.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2636"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/2335 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2335/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2335/comments | https://api.github.com/repos/huggingface/datasets/issues/2335/events | https://github.com/huggingface/datasets/issues/2335 | 881,291,887 | MDU6SXNzdWU4ODEyOTE4ODc= | 2,335 | Index error in Dataset.map | [
{
"color": "d73a4a",
"default": true,
"description": "Something isn't working",
"id": 1935892857,
"name": "bug",
"node_id": "MDU6TGFiZWwxOTM1ODkyODU3",
"url": "https://api.github.com/repos/huggingface/datasets/labels/bug"
}
] | closed | false | null | 0 | 2021-05-08T20:44:57Z | 2021-05-10T13:26:12Z | 2021-05-10T13:26:12Z | null | The following code, if executed on master, raises an IndexError (due to overflow):
```python
>>> from datasets import *
>>> d = load_dataset("bookcorpus", split="train")
Reusing dataset bookcorpus (C:\Users\Mario\.cache\huggingface\datasets\bookcorpus\plain_text\1.0.0\44662c4a114441c35200992bea923b170e6f13f2f0beb7c14e43759cec498700)
2021-05-08 21:23:46.859818: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
>>> d.map(lambda ex: ex)
0%|โ | 289430/74004228 [00:13<58:41, 20935.33ex/s]c:\users\mario\desktop\projects\datasets-1\src\datasets\table.py:84: RuntimeWarning: overflow encountered in int_scalars
k = i + ((j - i) * (x - arr[i]) // (arr[j] - arr[i]))
0%|โ | 290162/74004228 [00:13<59:11, 20757.23ex/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\users\mario\desktop\projects\datasets-1\src\datasets\arrow_dataset.py", line 1498, in map
new_fingerprint=new_fingerprint,
File "c:\users\mario\desktop\projects\datasets-1\src\datasets\arrow_dataset.py", line 174, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "c:\users\mario\desktop\projects\datasets-1\src\datasets\fingerprint.py", line 340, in wrapper
out = func(self, *args, **kwargs)
File "c:\users\mario\desktop\projects\datasets-1\src\datasets\arrow_dataset.py", line 1799, in _map_single
for i, example in enumerate(pbar):
File "C:\Users\Mario\Anaconda3\envs\hf-datasets\lib\site-packages\tqdm\std.py", line 1133, in __iter__
for obj in iterable:
File "c:\users\mario\desktop\projects\datasets-1\src\datasets\arrow_dataset.py", line 1145, in __iter__
format_kwargs=format_kwargs,
File "c:\users\mario\desktop\projects\datasets-1\src\datasets\arrow_dataset.py", line 1337, in _getitem
pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
File "c:\users\mario\desktop\projects\datasets-1\src\datasets\formatting\formatting.py", line 368, in query_table
pa_subtable = _query_table(table, key)
File "c:\users\mario\desktop\projects\datasets-1\src\datasets\formatting\formatting.py", line 79, in _query_table
return table.fast_slice(key % table.num_rows, 1)
File "c:\users\mario\desktop\projects\datasets-1\src\datasets\table.py", line 128, in fast_slice
i = _interpolation_search(self._offsets, offset)
File "c:\users\mario\desktop\projects\datasets-1\src\datasets\table.py", line 91, in _interpolation_search
raise IndexError(f"Invalid query '{x}' for size {arr[-1] if len(arr) else 'none'}.")
IndexError: Invalid query '290162' for size 74004228.
```
Tested on Windows, can run on Linux if needed.
EDIT:
It seems like for this to happen, the default NumPy dtype has to be np.int32. | {
"+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/2335/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2335/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/huggingface/datasets/issues/4592 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4592/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4592/comments | https://api.github.com/repos/huggingface/datasets/issues/4592/events | https://github.com/huggingface/datasets/issues/4592 | 1,288,029,377 | I_kwDODunzps5MxcTB | 4,592 | Issue with jalFaizy/detect_chess_pieces when running datasets-cli test | [] | closed | false | null | 3 | 2022-06-29T00:15:54Z | 2022-06-29T10:30:03Z | 2022-06-29T07:49:27Z | null | ### Link
https://huggingface.co/datasets/jalFaizy/detect_chess_pieces
### Description
I am trying to write a appropriate data loader for [a custom dataset](https://huggingface.co/datasets/jalFaizy/detect_chess_pieces) using [this script](https://huggingface.co/datasets/jalFaizy/detect_chess_pieces/blob/main/detect_chess_pieces.py)
When I run the command
`$ datasets-cli test "D:\workspace\HF\detect_chess_pieces" --save_infos --all_configs`
It gives the following error
```
Using custom data configuration default
Traceback (most recent call last):
File "c:\users\faiza\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\faiza\anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\faiza\anaconda3\Scripts\datasets-cli.exe\__main__.py", line 7, in <module>
File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\datasets_cli.py", line 39, in main
service.run()
File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\test.py", line 132, in run
for j, builder in enumerate(get_builders()):
File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\test.py", line 125, in get_builders
yield builder_cls(
File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 1148, in __init__
super().__init__(*args, **kwargs)
File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 306, in __init__
info = self.get_exported_dataset_info()
File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 405, in get_exported_dataset_info
return self.get_all_exported_dataset_infos().get(self.config.name, DatasetInfo())
File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 390, in get_all_exported_dataset_infos
return DatasetInfosDict.from_directory(cls.get_imported_module_dir())
File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 309, in from_directory
dataset_infos_dict = {
File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 310, in <dictcomp>
config_name: DatasetInfo.from_dict(dataset_info_dict)
File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 272, in from_dict
return cls(**{k: v for k, v in dataset_info_dict.items() if k in field_names})
File "<string>", line 20, in __init__
File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 160, in __post_init__
templates = [
File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 161, in <listcomp>
template if isinstance(template, TaskTemplate) else task_template_from_dict(template)
File "c:\users\faiza\anaconda3\lib\site-packages\datasets\tasks\__init__.py", line 43, in task_template_from_dict
return template.from_dict(task_template_dict)
AttributeError: 'NoneType' object has no attribute 'from_dict'
```
My assumption is that there is some kind of issue in how the "task_templates" are read, because even if I keep them as None, or not include the argument at all, the same error occurs
### 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/4592/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4592/timeline | null | completed | null | null | false | [
"Hi @faizankshaikh\r\n\r\nPlease note that we have recently launched the Community feature, specifically targeted to create Discussions (about issues/questions/asking-for-help) on each Dataset on the Hub:\r\n- Blog post: https://huggingface.co/blog/community-update\r\n- Docs: https://huggingface.co/docs/hub/repositories-pull-requests-discussions\r\n\r\nThe Discussion tab for your \"jalFaizy/detect_chess_pieces\" dataset is here: https://huggingface.co/datasets/jalFaizy/detect_chess_pieces/discussions\r\nYou can use it to ask for help by pinging the Datasets maintainers: see our docs here: https://huggingface.co/docs/datasets/master/en/share#ask-for-a-help-and-reviews\r\n\r\nI'm transferring this discussion to your Discussion tab and trying to address it: https://huggingface.co/datasets/jalFaizy/detect_chess_pieces/discussions/1",
"Thank you @albertvillanova , I will keep that in mind.\r\n\r\nJust a quick note - I posted the issue on Github because the dataset viewer suggested me to \"open an issue for direct support\". Maybe it can be updated with your suggestion\r\n\r\n\r\n\r\n\r\n",
"Thank you pointing this out: yes, definitely, we should fix the error message. We are working on this."
] |
https://api.github.com/repos/huggingface/datasets/issues/6027 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6027/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6027/comments | https://api.github.com/repos/huggingface/datasets/issues/6027/events | https://github.com/huggingface/datasets/pull/6027 | 1,803,008,486 | PR_kwDODunzps5Va4g3 | 6,027 | Delete `task_templates` in `IterableDataset` when they are no longer valid | [] | closed | false | null | 3 | 2023-07-13T13:16:17Z | 2023-07-13T14:06:20Z | 2023-07-13T13:57:35Z | null | Fix #6025 | {
"+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/6027/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6027/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/6027.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6027",
"merged_at": "2023-07-13T13:57:35Z",
"patch_url": "https://github.com/huggingface/datasets/pull/6027.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6027"
} | 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.008698 / 0.011353 (-0.002655) | 0.005250 / 0.011008 (-0.005758) | 0.104101 / 0.038508 (0.065593) | 0.085021 / 0.023109 (0.061912) | 0.426653 / 0.275898 (0.150755) | 0.460449 / 0.323480 (0.136969) | 0.005222 / 0.007986 (-0.002763) | 0.006280 / 0.004328 (0.001951) | 0.083458 / 0.004250 (0.079207) | 0.066132 / 0.037052 (0.029079) | 0.433416 / 0.258489 (0.174927) | 0.482718 / 0.293841 (0.188877) | 0.048872 / 0.128546 (-0.079675) | 0.013699 / 0.075646 (-0.061948) | 0.365660 / 0.419271 (-0.053611) | 0.071008 / 0.043533 (0.027475) | 0.428688 / 0.255139 (0.173549) | 0.443554 / 0.283200 (0.160354) | 0.035901 / 0.141683 (-0.105782) | 1.829296 / 1.452155 (0.377141) | 1.862351 / 1.492716 (0.369635) |\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.236284 / 0.018006 (0.218278) | 0.584075 / 0.000490 (0.583585) | 0.004634 / 0.000200 (0.004434) | 0.000125 / 0.000054 (0.000070) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.034723 / 0.037411 (-0.002688) | 0.100989 / 0.014526 (0.086464) | 0.113722 / 0.176557 (-0.062834) | 0.187659 / 0.737135 (-0.549477) | 0.113937 / 0.296338 (-0.182401) |\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.587500 / 0.215209 (0.372291) | 5.847371 / 2.077655 (3.769716) | 2.599691 / 1.504120 (1.095571) | 2.246187 / 1.541195 (0.704992) | 2.419126 / 1.468490 (0.950636) | 0.847327 / 4.584777 (-3.737450) | 5.230438 / 3.745712 (1.484726) | 7.539021 / 5.269862 (2.269160) | 4.617473 / 4.565676 (0.051797) | 0.103620 / 0.424275 (-0.320655) | 0.009195 / 0.007607 (0.001588) | 0.714247 / 0.226044 (0.488203) | 7.331621 / 2.268929 (5.062693) | 3.416575 / 55.444624 (-52.028049) | 2.649467 / 6.876477 (-4.227009) | 2.928091 / 2.142072 (0.786018) | 1.002155 / 4.805227 (-3.803072) | 0.210790 / 6.500664 (-6.289874) | 0.081303 / 0.075469 (0.005834) |\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.655431 / 1.841788 (-0.186357) | 24.069595 / 8.074308 (15.995287) | 20.923766 / 10.191392 (10.732374) | 0.232021 / 0.680424 (-0.448403) | 0.026355 / 0.534201 (-0.507846) | 0.496830 / 0.579283 (-0.082453) | 0.582620 / 0.434364 (0.148257) | 0.551227 / 0.540337 (0.010890) | 0.756389 / 1.386936 (-0.630547) |\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.009329 / 0.011353 (-0.002024) | 0.005045 / 0.011008 (-0.005964) | 0.082116 / 0.038508 (0.043608) | 0.082420 / 0.023109 (0.059311) | 0.502513 / 0.275898 (0.226615) | 0.526098 / 0.323480 (0.202618) | 0.007468 / 0.007986 (-0.000517) | 0.005477 / 0.004328 (0.001148) | 0.082617 / 0.004250 (0.078367) | 0.070292 / 0.037052 (0.033239) | 0.503290 / 0.258489 (0.244801) | 0.541631 / 0.293841 (0.247790) | 0.050826 / 0.128546 (-0.077721) | 0.014699 / 0.075646 (-0.060948) | 0.094441 / 0.419271 (-0.324830) | 0.065034 / 0.043533 (0.021501) | 0.486778 / 0.255139 (0.231639) | 0.516907 / 0.283200 (0.233707) | 0.045140 / 0.141683 (-0.096543) | 1.831676 / 1.452155 (0.379521) | 1.910865 / 1.492716 (0.418149) |\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.286818 / 0.018006 (0.268812) | 0.558621 / 0.000490 (0.558131) | 0.002830 / 0.000200 (0.002630) | 0.000148 / 0.000054 (0.000094) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.036716 / 0.037411 (-0.000696) | 0.107830 / 0.014526 (0.093305) | 0.116368 / 0.176557 (-0.060188) | 0.178401 / 0.737135 (-0.558734) | 0.124729 / 0.296338 (-0.171609) |\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.633557 / 0.215209 (0.418348) | 6.423135 / 2.077655 (4.345480) | 2.981883 / 1.504120 (1.477763) | 2.755592 / 1.541195 (1.214398) | 2.769337 / 1.468490 (1.300847) | 0.836219 / 4.584777 (-3.748558) | 5.302030 / 3.745712 (1.556318) | 7.463960 / 5.269862 (2.194098) | 4.427254 / 4.565676 (-0.138422) | 0.095990 / 0.424275 (-0.328285) | 0.009264 / 0.007607 (0.001657) | 0.770642 / 0.226044 (0.544597) | 7.779667 / 2.268929 (5.510739) | 3.799115 / 55.444624 (-51.645509) | 3.212560 / 6.876477 (-3.663917) | 3.281657 / 2.142072 (1.139584) | 1.044981 / 4.805227 (-3.760246) | 0.210693 / 6.500664 (-6.289971) | 0.079466 / 0.075469 (0.003997) |\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.793155 / 1.841788 (-0.048632) | 24.691127 / 8.074308 (16.616819) | 22.083150 / 10.191392 (11.891758) | 0.242246 / 0.680424 (-0.438178) | 0.028001 / 0.534201 (-0.506200) | 0.494061 / 0.579283 (-0.085222) | 0.599288 / 0.434364 (0.164924) | 0.552101 / 0.540337 (0.011764) | 0.784093 / 1.386936 (-0.602843) |\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.006658 / 0.011353 (-0.004695) | 0.004044 / 0.011008 (-0.006965) | 0.085844 / 0.038508 (0.047336) | 0.077147 / 0.023109 (0.054038) | 0.344387 / 0.275898 (0.068489) | 0.376718 / 0.323480 (0.053238) | 0.005537 / 0.007986 (-0.002448) | 0.003452 / 0.004328 (-0.000876) | 0.065326 / 0.004250 (0.061076) | 0.057639 / 0.037052 (0.020587) | 0.352363 / 0.258489 (0.093873) | 0.378939 / 0.293841 (0.085098) | 0.031259 / 0.128546 (-0.097287) | 0.008464 / 0.075646 (-0.067183) | 0.289076 / 0.419271 (-0.130195) | 0.052991 / 0.043533 (0.009459) | 0.346053 / 0.255139 (0.090914) | 0.362761 / 0.283200 (0.079561) | 0.023501 / 0.141683 (-0.118182) | 1.478312 / 1.452155 (0.026157) | 1.545437 / 1.492716 (0.052721) |\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.202964 / 0.018006 (0.184957) | 0.534793 / 0.000490 (0.534303) | 0.006025 / 0.000200 (0.005825) | 0.000225 / 0.000054 (0.000171) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.029418 / 0.037411 (-0.007993) | 0.084297 / 0.014526 (0.069771) | 0.096702 / 0.176557 (-0.079855) | 0.157355 / 0.737135 (-0.579781) | 0.097858 / 0.296338 (-0.198480) |\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.380728 / 0.215209 (0.165519) | 3.787712 / 2.077655 (1.710057) | 1.836393 / 1.504120 (0.332273) | 1.678415 / 1.541195 (0.137220) | 1.781800 / 1.468490 (0.313310) | 0.478677 / 4.584777 (-4.106100) | 3.614080 / 3.745712 (-0.131632) | 3.255637 / 5.269862 (-2.014225) | 2.063642 / 4.565676 (-2.502035) | 0.056470 / 0.424275 (-0.367805) | 0.007408 / 0.007607 (-0.000199) | 0.459155 / 0.226044 (0.233111) | 4.586679 / 2.268929 (2.317750) | 2.305737 / 55.444624 (-53.138888) | 1.954755 / 6.876477 (-4.921721) | 2.190809 / 2.142072 (0.048737) | 0.572426 / 4.805227 (-4.232802) | 0.130349 / 6.500664 (-6.370315) | 0.059346 / 0.075469 (-0.016124) |\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.253671 / 1.841788 (-0.588117) | 19.509015 / 8.074308 (11.434706) | 13.951349 / 10.191392 (3.759957) | 0.171038 / 0.680424 (-0.509386) | 0.018826 / 0.534201 (-0.515375) | 0.394642 / 0.579283 (-0.184642) | 0.419614 / 0.434364 (-0.014750) | 0.470931 / 0.540337 (-0.069406) | 0.643858 / 1.386936 (-0.743078) |\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.006765 / 0.011353 (-0.004587) | 0.003955 / 0.011008 (-0.007053) | 0.064377 / 0.038508 (0.025869) | 0.076980 / 0.023109 (0.053871) | 0.368675 / 0.275898 (0.092777) | 0.403746 / 0.323480 (0.080267) | 0.005303 / 0.007986 (-0.002683) | 0.003257 / 0.004328 (-0.001072) | 0.064154 / 0.004250 (0.059903) | 0.056975 / 0.037052 (0.019923) | 0.376718 / 0.258489 (0.118229) | 0.416291 / 0.293841 (0.122450) | 0.031444 / 0.128546 (-0.097102) | 0.008532 / 0.075646 (-0.067115) | 0.070455 / 0.419271 (-0.348816) | 0.049032 / 0.043533 (0.005499) | 0.361413 / 0.255139 (0.106274) | 0.384648 / 0.283200 (0.101448) | 0.024050 / 0.141683 (-0.117633) | 1.514330 / 1.452155 (0.062176) | 1.585424 / 1.492716 (0.092708) |\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.214701 / 0.018006 (0.196695) | 0.447706 / 0.000490 (0.447216) | 0.000373 / 0.000200 (0.000173) | 0.000058 / 0.000054 (0.000003) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.031007 / 0.037411 (-0.006404) | 0.090545 / 0.014526 (0.076019) | 0.100611 / 0.176557 (-0.075945) | 0.154847 / 0.737135 (-0.582289) | 0.102864 / 0.296338 (-0.193475) |\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.427740 / 0.215209 (0.212531) | 4.273143 / 2.077655 (2.195488) | 2.294906 / 1.504120 (0.790786) | 2.138460 / 1.541195 (0.597265) | 2.274126 / 1.468490 (0.805636) | 0.486559 / 4.584777 (-4.098218) | 3.565554 / 3.745712 (-0.180158) | 3.377659 / 5.269862 (-1.892202) | 2.029883 / 4.565676 (-2.535793) | 0.057303 / 0.424275 (-0.366972) | 0.007314 / 0.007607 (-0.000293) | 0.504263 / 0.226044 (0.278219) | 5.041196 / 2.268929 (2.772268) | 2.819273 / 55.444624 (-52.625351) | 2.421479 / 6.876477 (-4.454998) | 2.503063 / 2.142072 (0.360991) | 0.581467 / 4.805227 (-4.223760) | 0.133532 / 6.500664 (-6.367132) | 0.062504 / 0.075469 (-0.012965) |\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.328765 / 1.841788 (-0.513022) | 20.131672 / 8.074308 (12.057363) | 14.312895 / 10.191392 (4.121503) | 0.191199 / 0.680424 (-0.489225) | 0.018522 / 0.534201 (-0.515679) | 0.393121 / 0.579283 (-0.186162) | 0.413122 / 0.434364 (-0.021242) | 0.469312 / 0.540337 (-0.071026) | 0.633140 / 1.386936 (-0.753796) |\n\n</details>\n</details>\n\n\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/1166 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1166/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1166/comments | https://api.github.com/repos/huggingface/datasets/issues/1166/events | https://github.com/huggingface/datasets/pull/1166 | 757,721,208 | MDExOlB1bGxSZXF1ZXN0NTMzMDQ1NDUy | 1,166 | Opus montenegrinsubs | [] | closed | false | null | 1 | 2020-12-05T17:00:44Z | 2020-12-07T11:02:49Z | 2020-12-07T11:02:49Z | null | Opus montenegrinsubs - language pair en-me
more info : http://opus.nlpl.eu/MontenegrinSubs.php | {
"+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/1166/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1166/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1166.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1166",
"merged_at": "2020-12-07T11:02:49Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1166.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1166"
} | true | [
"merging since the CI is fixed on master"
] |
https://api.github.com/repos/huggingface/datasets/issues/3146 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3146/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3146/comments | https://api.github.com/repos/huggingface/datasets/issues/3146/events | https://github.com/huggingface/datasets/issues/3146 | 1,033,605,947 | I_kwDODunzps49m5M7 | 3,146 | CLI test command throws NonMatchingSplitsSizesError when saving infos | [
{
"color": "d73a4a",
"default": true,
"description": "Something isn't working",
"id": 1935892857,
"name": "bug",
"node_id": "MDU6TGFiZWwxOTM1ODkyODU3",
"url": "https://api.github.com/repos/huggingface/datasets/labels/bug"
}
] | closed | false | null | 0 | 2021-10-22T13:50:53Z | 2021-10-27T08:01:49Z | 2021-10-27T08:01:49Z | null | When trying to generate a datset JSON metadata, a `NonMatchingSplitsSizesError` is thrown:
```
$ datasets-cli test datasets/arabic_billion_words --save_infos --all_configs
Testing builder 'Alittihad' (1/10)
Downloading and preparing dataset arabic_billion_words/Alittihad (download: 332.13 MiB, generated: Unknown size, post-processed: Unknown size, total: 332.13 MiB) to .cache\arabic_billion_words\Alittihad\1.1.0\8175ff1c9714c6d5d15b1141b6042e5edf048276bb81a9c14e35e149a7a62ae4...
Traceback (most recent call last):
File "path\huggingface\datasets\.venv\Scripts\datasets-cli-script.py", line 33, in <module>
sys.exit(load_entry_point('datasets', 'console_scripts', 'datasets-cli')())
File "path\huggingface\datasets\src\datasets\commands\datasets_cli.py", line 33, in main
service.run()
File "path\huggingface\datasets\src\datasets\commands\test.py", line 144, in run
builder.download_and_prepare(
File "path\huggingface\datasets\src\datasets\builder.py", line 607, in download_and_prepare
self._download_and_prepare(
File "path\huggingface\datasets\src\datasets\builder.py", line 709, in _download_and_prepare
verify_splits(self.info.splits, split_dict)
File "path\huggingface\datasets\src\datasets\utils\info_utils.py", line 74, in verify_splits
raise NonMatchingSplitsSizesError(str(bad_splits))
datasets.utils.info_utils.NonMatchingSplitsSizesError: [{'expected': SplitInfo(name='train', num_bytes=0, num_examples=0, dataset_name='arabic_billion_words'), 'recorded': SplitInfo(name='train', num_bytes=1601790302, num_examples=349342, dataset_name='arabic_billion_words')}]
```
This is due because a previous run generated a wrong `dataset_info.json`.
This error can be avoided by passing `--ignore_verifications`, but I think this should be assumed when passing `--save_infos`. | {
"+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/3146/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3146/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/huggingface/datasets/issues/2479 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2479/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2479/comments | https://api.github.com/repos/huggingface/datasets/issues/2479/events | https://github.com/huggingface/datasets/pull/2479 | 918,672,431 | MDExOlB1bGxSZXF1ZXN0NjY4MDc3NTI4 | 2,479 | โ load_datasets โ | [] | closed | false | null | 0 | 2021-06-11T12:14:36Z | 2021-06-11T14:46:25Z | 2021-06-11T14:46:25Z | 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/2479/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2479/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2479.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2479",
"merged_at": "2021-06-11T14:46:24Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2479.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2479"
} | true | [] |
|
https://api.github.com/repos/huggingface/datasets/issues/1445 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1445/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1445/comments | https://api.github.com/repos/huggingface/datasets/issues/1445/events | https://github.com/huggingface/datasets/pull/1445 | 761,057,851 | MDExOlB1bGxSZXF1ZXN0NTM1NzgzMzY2 | 1,445 | Added dataset clickbait_news_bg | [] | closed | false | null | 2 | 2020-12-10T09:17:28Z | 2020-12-15T07:45:19Z | 2020-12-15T07:45:19Z | 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/1445/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1445/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1445.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1445",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/1445.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1445"
} | true | [
"Looks like this PR includes changes about many other files than the ones for clickbait_news_bg\r\n\r\nCan you create another branch and another PR please ?",
"I created a new branch with the dataset code and submitted a new PR for it: https://github.com/huggingface/datasets/pull/1568"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/1131 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1131/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1131/comments | https://api.github.com/repos/huggingface/datasets/issues/1131/events | https://github.com/huggingface/datasets/pull/1131 | 757,278,341 | MDExOlB1bGxSZXF1ZXN0NTMyNjgxMTI0 | 1,131 | Adding XQUAD-R Dataset | [] | closed | false | null | 0 | 2020-12-04T17:35:43Z | 2020-12-04T18:27:22Z | 2020-12-04T18:27:22Z | 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/1131/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1131/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1131.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1131",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/1131.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1131"
} | true | [] |
|
https://api.github.com/repos/huggingface/datasets/issues/5249 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5249/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5249/comments | https://api.github.com/repos/huggingface/datasets/issues/5249/events | https://github.com/huggingface/datasets/issues/5249 | 1,451,692,247 | I_kwDODunzps5WhxDX | 5,249 | Protect the main branch from inadvertent direct pushes | [
{
"color": "d4c5f9",
"default": false,
"description": "Maintenance tasks",
"id": 4296013012,
"name": "maintenance",
"node_id": "LA_kwDODunzps8AAAABAA_01A",
"url": "https://api.github.com/repos/huggingface/datasets/labels/maintenance"
}
] | open | false | null | 1 | 2022-11-16T14:19:03Z | 2023-07-21T14:34:44Z | null | null | We have decided to implement a protection mechanism in this repository, so that nobody (not even administrators) can inadvertently push accidentally directly to the main branch.
See context here:
- d7c942228b8dcf4de64b00a3053dce59b335f618
To do:
- [x] Protect main branch
- Settings > Branches > Branch protection rules > main > Edit
- [x] Check: Do not allow bypassing the above settings
- The above settings will apply to administrators and custom roles with the "bypass branch protections" permission.
- [x] Additionally, uncheck: Require approvals [under "Require a pull request before merging", which was already checked]
- Before, we could exceptionally merge a non-approved PR, using Administrator bypass
- Now that Administrator bypass is no longer possible, we would always need an approval to be able to merge; and pull request authors cannot approve their own pull requests. This could be an inconvenient in some exceptional circumstances when an urgent fix is needed
- Nevertheless, although it is no longer enforced, it is strongly recommended to merge PRs only if they have at least one approval
- [ ] #5250
- So that direct pushes to main branch are no longer necessary | {
"+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/5249/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5249/timeline | null | null | null | null | false | [
"It seems all the tasks have been addressed, meaning this issue can be closed, no?"
] |
https://api.github.com/repos/huggingface/datasets/issues/4162 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4162/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4162/comments | https://api.github.com/repos/huggingface/datasets/issues/4162/events | https://github.com/huggingface/datasets/pull/4162 | 1,203,421,909 | PR_kwDODunzps42LtGO | 4,162 | Add Conceptual 12M | [] | closed | false | null | 2 | 2022-04-13T14:57:23Z | 2022-04-15T08:13:01Z | 2022-04-15T08:06:25Z | 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/4162/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4162/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/4162.diff",
"html_url": "https://github.com/huggingface/datasets/pull/4162",
"merged_at": "2022-04-15T08:06:25Z",
"patch_url": "https://github.com/huggingface/datasets/pull/4162.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/4162"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._",
"Looks like your dummy_data.zip file is not in the right location ;)\r\ndatasets/datasets/conceptual_12m/dummy/default/0.0.0/dummy_data.zip\r\n->\r\ndatasets/conceptual_12m/dummy/default/0.0.0/dummy_data.zip"
] |
https://api.github.com/repos/huggingface/datasets/issues/4384 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4384/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4384/comments | https://api.github.com/repos/huggingface/datasets/issues/4384/events | https://github.com/huggingface/datasets/pull/4384 | 1,243,919,748 | PR_kwDODunzps44OwFr | 4,384 | Refactor download | [] | closed | false | null | 4 | 2022-05-21T08:49:24Z | 2022-05-25T10:52:02Z | 2022-05-25T10:43:43Z | null | This PR performs a refactoring of the download functionalities, by proposing a modular solution and moving them to their own package "download". Some motivating arguments:
- understandability: from a logical partitioning of the library, it makes sense to have all download functionalities grouped together instead of scattered in a much larger directory containing many more different functionalities
- abstraction: the level of abstraction of "download" (higher) is not the same as "utils" (lower); putting different levels of abstraction together, makes dependencies more intricate (potential circular dependencies) and the system more tightly coupled; when the levels of abstraction are clearly separated, the dependencies flow in a neat direction from higher to lower
- architectural: "download" is a domain-specific functionality of our library/application (a dataset builder performs several actions: download, generate dataset and cache it); these functionalities are at the core of our library; on the other hand, "utils" are always a low-level set of functionalities, not directly related to our domain/business core logic (all libraries have "utils"), thus at the periphery of our lib architecture
Also note that when a library is not architecturally designed following simple, neat, clean principles, this has a negative impact on extensibility, making more and more difficult to make enhancements.
As a concrete example in this case, please see: https://app.circleci.com/pipelines/github/huggingface/datasets/12185/workflows/ff25a790-8e3f-45a1-aadd-9d79dfb73c4d/jobs/72860
- After an extension, a circular import is found
- Diving into the cause of this circular import, see the dependency flow, which should be from higher to lower levels of abstraction:
```
ImportError while loading conftest '/home/circleci/datasets/tests/conftest.py'.
tests/conftest.py:12: in <module>
import datasets
../.pyenv/versions/3.6.15/lib/python3.6/site-packages/datasets/__init__.py:37: in <module>
from .arrow_dataset import Dataset, concatenate_datasets
../.pyenv/versions/3.6.15/lib/python3.6/site-packages/datasets/arrow_dataset.py:59: in <module>
from . import config
../.pyenv/versions/3.6.15/lib/python3.6/site-packages/datasets/config.py:8: in <module>
from .utils.logging import get_logger
../.pyenv/versions/3.6.15/lib/python3.6/site-packages/datasets/utils/__init__.py:30: in <module>
from .download_manager import DownloadConfig, DownloadManager, DownloadMode
../.pyenv/versions/3.6.15/lib/python3.6/site-packages/datasets/utils/download_manager.py:39: in <module>
from .py_utils import NestedDataStructure, map_nested, size_str
../.pyenv/versions/3.6.15/lib/python3.6/site-packages/datasets/utils/py_utils.py:608: in <module>
if config.DILL_VERSION < version.parse("0.3.5"):
E AttributeError: module 'datasets.config' has no attribute 'DILL_VERSION'
```
Imports:
- datasets
- Dataset: lower level than datasets
- config: lower level than Dataset
- logger: lower level than config
- DownloadManager: !!! HIGHER level of abstraction than logger!!
Why when importing logger we require importing DownloadManager?!?
- Logically, it does not make sense
- This is due to an error in the design/architecture of our library:
- To import the logger, we need to import it from `.utils.logging`
- To import `.utils.logging` we need to import `.utils`
- The import of `.utils` require the import of all its submodules defined in `utils.__init__.py`, among them: `.utils.download_manager`!
When putting `logging` and `download_manager` both inside `utils`, in order to import `logging` we need to import `download_manager` first: this is a strong coupling between modules and moreover between modules at different levels of abstraction (to import a lower level module, we require to import a higher level module). Additionally, it is clear that is makes no sense that in order to import `logging` we require to import `download_manager` first. | {
"+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/4384/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4384/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/4384.diff",
"html_url": "https://github.com/huggingface/datasets/pull/4384",
"merged_at": "2022-05-25T10:43:43Z",
"patch_url": "https://github.com/huggingface/datasets/pull/4384.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/4384"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._",
"This looks like a breaking change no ?\r\nAlso could you explain why it would be better this way ?",
"The might be only there to help type checkers, but I am not too familiar with the code base to know for sure. I think this might be useful:\n\nhttps://docs.python.org/3/library/typing.html#typing.TYPE_CHECKING",
"> This looks like a breaking change no ?\r\n> Also could you explain why it would be better this way ?\r\n\r\nSorry, @lhoestq, I naively thought it was obvious. I have tried to give some arguments in the motivation of this PR (see above). I can give additional arguments if needed. "
] |
https://api.github.com/repos/huggingface/datasets/issues/1456 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1456/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1456/comments | https://api.github.com/repos/huggingface/datasets/issues/1456/events | https://github.com/huggingface/datasets/pull/1456 | 761,231,296 | MDExOlB1bGxSZXF1ZXN0NTM1OTI4MTc2 | 1,456 | Add CC100 Dataset | [] | closed | false | null | 0 | 2020-12-10T13:14:37Z | 2020-12-14T10:20:09Z | 2020-12-14T10:20:08Z | null | Closes #773 | {
"+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/1456/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1456/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1456.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1456",
"merged_at": "2020-12-14T10:20:07Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1456.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1456"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/6060 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6060/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6060/comments | https://api.github.com/repos/huggingface/datasets/issues/6060/events | https://github.com/huggingface/datasets/issues/6060 | 1,816,614,120 | I_kwDODunzps5sR1To | 6,060 | Dataset.map() execute twice when in PyTorch DDP mode | [] | open | false | null | 3 | 2023-07-22T05:06:43Z | 2023-07-24T19:29:55Z | null | null | ### Describe the bug
I use `torchrun --standalone --nproc_per_node=2 train.py` to start training. And write the code following the [docs](https://huggingface.co/docs/datasets/process#distributed-usage). The trick about using `torch.distributed.barrier()` to only execute map at the main process doesn't always work. When I am training model, it will map twice. When I am running a test for dataset and dataloader (just print the batches), it can work. Their code about loading dataset are same.
And on another server with 30 CPU cores, I use 2 GPUs and it can't work neither.
I have tried to use `rank` and `local_rank` to check, they all didn't make sense.
### Steps to reproduce the bug
use `torchrun --standalone --nproc_per_node=2 train.py` or `torchrun --standalone train.py` to run
This is my code:
```python
if args.distributed and world_size > 1:
if args.local_rank > 0:
print(f"Rank {args.rank}: Gpu {args.gpu} waiting for main process to perform the mapping", force=True)
torch.distributed.barrier()
print("Mapping dataset")
dataset = dataset.map(lambda x: cut_reorder_keys(x, num_stations_list=args.num_stations_list, is_pad=True, is_train=True), num_proc=8, desc="cut_reorder_keys")
dataset = dataset.map(lambda x: random_shift(x, shift_range=(-160, 0), feature_scale=16), num_proc=8, desc="random_shift")
dataset_test = dataset_test.map(lambda x: cut_reorder_keys(x, num_stations_list=args.num_stations_list, is_pad=True, is_train=False), num_proc=8, desc="cut_reorder_keys")
if args.local_rank == 0:
print("Mapping finished, loading results from main process")
torch.distributed.barrier()
```
### Expected behavior
Only the main process will execute `map`, while the sub process will load cache from disk.
### Environment info
server with 64 CPU cores (AMD Ryzen Threadripper PRO 5995WX 64-Cores) and 2 RTX 4090
- `python==3.9.16`
- `datasets==2.13.1`
- `torch==2.0.1+cu117`
- `22.04.1-Ubuntu`
server with 30 CPU cores (Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz) and 2 RTX 4090
- `python==3.9.0`
- `datasets==2.13.1`
- `torch==2.0.1+cu117`
- `Ubuntu 20.04` | {
"+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/6060/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6060/timeline | null | null | null | null | false | [
"Sorry for asking a duplicate question about `num_proc`, I searched the forum and find the solution.\r\n\r\nBut I still can't make the trick with `torch.distributed.barrier()` to only map at the main process work. The [post on forum]( https://discuss.huggingface.co/t/slow-processing-with-map-when-using-deepspeed-or-fairscale/7229/7) didn't help.",
"If it does the `map` twice then it means the hash of your map function is not some same between your two processes.\r\n\r\nCan you make sure your map functions have the same hash in different processes ?\r\n\r\n```python\r\nfrom datasets.fingerprint import Hasher\r\n\r\nprint(Hasher.hash(lambda x: cut_reorder_keys(x, num_stations_list=args.num_stations_list, is_pad=True, is_train=True)))\r\nprint(Hasher.hash(lambda x: random_shift(x, shift_range=(-160, 0), feature_scale=16)))\r\n```\r\n\r\nYou can also set the fingerprint used to reload the resulting dataset by passing `new_finegrprint=` in `map`, see https://huggingface.co/docs/datasets/v2.13.1/en/about_cache#the-cache. This will force the different processes to use the same fingerprint used to locate the resulting dataset in the cache.",
"Thanks for help! I find the fingerprint between processes don't have same hash:\r\n```\r\nRank 0: Gpu 0 cut_reorder_keys fingerprint c7f47f40e9a67657\r\nRank 0: Gpu 0 random_shift fingerprint 240a0ce79831e7d4\r\n\r\nRank 1: Gpu 1 cut_reorder_keys fingerprint 20edd3d9cf284001\r\nRank 1: Gpu 1 random_shift fingerprint 819f7c1c18e7733f\r\n```\r\nBut my functions only process the example one by one and don't need rank or other arguments. After all it can work in the test for dataset and dataloader.\r\nI'll try to set `new_fingerprint` to see if it works and figure out the reason of different hash."
] |
https://api.github.com/repos/huggingface/datasets/issues/1929 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1929/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1929/comments | https://api.github.com/repos/huggingface/datasets/issues/1929/events | https://github.com/huggingface/datasets/pull/1929 | 813,929,669 | MDExOlB1bGxSZXF1ZXN0NTc3OTk1MTE4 | 1,929 | Improve typing and style and fix some inconsistencies | [] | closed | false | null | 2 | 2021-02-22T22:47:41Z | 2021-02-24T16:16:14Z | 2021-02-24T14:03:54Z | null | This PR:
* improves typing (mostly more consistent use of `typing.Optional`)
* `DatasetDict.cleanup_cache_files` now correctly returns a dict
* replaces `dict()` with the corresponding literal
* uses `dict_to_copy.copy()` instead of `dict(dict_to_copy)` for shallow copying | {
"+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/1929/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1929/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1929.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1929",
"merged_at": "2021-02-24T14:03:53Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1929.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1929"
} | true | [
"@lhoestq Thanks for the quick review.",
"I merged master to this branch to re-run the CI before merging :)"
] |
https://api.github.com/repos/huggingface/datasets/issues/3412 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3412/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3412/comments | https://api.github.com/repos/huggingface/datasets/issues/3412/events | https://github.com/huggingface/datasets/pull/3412 | 1,075,846,368 | PR_kwDODunzps4voLs4 | 3,412 | Fix flaky test again for s3 serialization | [] | closed | false | null | 0 | 2021-12-09T17:54:41Z | 2021-12-09T18:00:52Z | 2021-12-09T18:00:52Z | null | Following https://github.com/huggingface/datasets/pull/3388 that wasn't enough (see CI error [here](https://app.circleci.com/pipelines/github/huggingface/datasets/9080/workflows/b971fb27-ff20-4220-9416-c19acdfdf6f4/jobs/55985)) | {
"+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/3412/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3412/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3412.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3412",
"merged_at": "2021-12-09T18:00:52Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3412.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3412"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/2496 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2496/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2496/comments | https://api.github.com/repos/huggingface/datasets/issues/2496/events | https://github.com/huggingface/datasets/issues/2496 | 920,216,314 | MDU6SXNzdWU5MjAyMTYzMTQ= | 2,496 | Dataset fingerprint changes after moving the cache directory, which prevent cache reload when using `map` | [] | closed | false | null | 0 | 2021-06-14T09:20:26Z | 2021-06-21T15:05:03Z | 2021-06-21T15:05:03Z | null | `Dataset.map` uses the dataset fingerprint (a hash) for caching.
However the fingerprint seems to change when someone moves the cache directory of the dataset.
This is because it uses the default fingerprint generation:
1. the dataset path is used to get the fingerprint
2. the modification times of the arrow file is also used to get the fingerprint
To fix that we could set the fingerprint of the dataset to be a hash of (<dataset_name>, <config_name>, <version>, <script_hash>), i.e. a hash of the the cache path relative to the cache directory. | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 1,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/huggingface/datasets/issues/2496/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2496/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/huggingface/datasets/issues/3523 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3523/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3523/comments | https://api.github.com/repos/huggingface/datasets/issues/3523/events | https://github.com/huggingface/datasets/pull/3523 | 1,093,819,227 | PR_kwDODunzps4wiJc2 | 3,523 | Added links to licensing and PII message in vctk dataset | [] | closed | false | null | 0 | 2022-01-04T22:56:58Z | 2022-01-06T19:33:50Z | 2022-01-06T19:33:50Z | 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/3523/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3523/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3523.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3523",
"merged_at": "2022-01-06T19:33:50Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3523.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3523"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/686 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/686/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/686/comments | https://api.github.com/repos/huggingface/datasets/issues/686/events | https://github.com/huggingface/datasets/issues/686 | 711,385,739 | MDU6SXNzdWU3MTEzODU3Mzk= | 686 | Dataset browser url is still https://huggingface.co/nlp/viewer/ | [] | closed | false | null | 2 | 2020-09-29T19:21:52Z | 2021-01-08T18:29:26Z | 2021-01-08T18:29:26Z | null | Might be worth updating to https://huggingface.co/datasets/viewer/ | {
"+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/686/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/686/timeline | null | completed | null | null | false | [
"Yes! might do it with @srush one of these days. Hopefully it won't break too many links (we can always redirect from old url to new)",
"This was fixed but forgot to close the issue. cc @lhoestq @yjernite \r\n\r\nThanks @jarednielsen!"
] |
https://api.github.com/repos/huggingface/datasets/issues/2267 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2267/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2267/comments | https://api.github.com/repos/huggingface/datasets/issues/2267/events | https://github.com/huggingface/datasets/issues/2267 | 868,291,129 | MDU6SXNzdWU4NjgyOTExMjk= | 2,267 | DatasetDict save load Failing test in 1.6 not in 1.5 | [
{
"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 | 6 | 2021-04-27T00:03:25Z | 2021-05-28T15:27:34Z | null | null | ## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
| {
"+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/2267/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2267/timeline | null | null | null | null | false | [
"Thanks for reporting ! We're looking into it",
"I'm not able to reproduce this, do you think you can provide a code that creates a DatasetDict that has this issue when saving and reloading ?",
"Hi, I just ran into a similar error. Here is the minimal code to reproduce:\r\n```python\r\nfrom datasets import load_dataset, DatasetDict\r\nds = load_dataset('super_glue', 'multirc')\r\n\r\nds.save_to_disk('tempds')\r\n\r\nds = DatasetDict.load_from_disk('tempds')\r\n\r\n```\r\n\r\n```bash\r\nReusing dataset super_glue (/home/idahl/.cache/huggingface/datasets/super_glue/multirc/1.0.2/2fb163bca9085c1deb906aff20f00c242227ff704a4e8c9cfdfe820be3abfc83)\r\nTraceback (most recent call last):\r\n File \"/home/idahl/eval-util-expl/multirc/tmp.py\", line 7, in <module>\r\n ds = DatasetDict.load_from_disk('tempds')\r\n File \"/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/dataset_dict.py\", line 710, in load_from_disk\r\n dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory)\r\n File \"/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/arrow_dataset.py\", line 687, in load_from_disk\r\n return Dataset(\r\n File \"/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/arrow_dataset.py\", line 274, in __init__\r\n raise ValueError(\r\nValueError: External features info don't match the dataset:\r\nGot\r\n{'answer': Value(dtype='string', id=None), 'idx': {'answer': Value(dtype='int32', id=None), 'paragraph': Value(dtype='int32', id=None), 'question': Value(dtype='int32', id=None)}, 'label': ClassLabel(num_classes=2, names=['False', 'True'], names_file=None, id=None), 'paragraph': Value(dtype='string', id=None), 'question': Value(dtype='string', id=None)}\r\nwith type\r\nstruct<answer: string, idx: struct<answer: int32, paragraph: int32, question: int32>, label: int64, paragraph: string, question: string>\r\n\r\nbut expected something like\r\n{'answer': Value(dtype='string', id=None), 'idx': {'paragraph': Value(dtype='int32', id=None), 'question': Value(dtype='int32', id=None), 'answer': Value(dtype='int32', id=None)}, 'label': Value(dtype='int64', id=None), 'paragraph': Value(dtype='string', id=None), 'question': Value(dtype='string', id=None)}\r\nwith type\r\nstruct<answer: string, idx: struct<paragraph: int32, question: int32, answer: int32>, label: int64, paragraph: string, question: string>\r\n\r\n```\r\n\r\nThe non-matching part seems to be\r\n`'label': ClassLabel(num_classes=2, names=['False', 'True'], names_file=None, id=None),`\r\nvs \r\n`'label': Value(dtype='int64', id=None),`\r\n\r\nAnd the order in the `<struct...` being different, which might cause the [features.type != inferred_features.type](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_dataset.py#L274) condition to become true and raise this ValueError.\r\n\r\n\r\nI am using datasets version 1.6.2.\r\n\r\nEdit: can confirm, this works without error in version 1.5.0",
"My current workaround is to remove the idx feature:\r\n\r\n```\r\n\r\nfrom datasets import load_dataset, DatasetDict, Value\r\nds = load_dataset('super_glue', 'multirc')\r\nds = ds.remove_columns('idx')\r\n\r\nds.save_to_disk('tempds')\r\n\r\nds = DatasetDict.load_from_disk('tempds')\r\n\r\n```\r\n\r\nworks.",
"It looks like this issue comes from the order of the fields in the 'idx' struct that is different for some reason.\r\nI'm looking into it. Note that as a workaround you can also flatten the nested features with `ds = ds.flatten()`",
"I just pushed a fix on `master`. We'll do a new release soon !\r\n\r\nThanks for reporting"
] |
https://api.github.com/repos/huggingface/datasets/issues/1374 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1374/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1374/comments | https://api.github.com/repos/huggingface/datasets/issues/1374/events | https://github.com/huggingface/datasets/pull/1374 | 760,288,291 | MDExOlB1bGxSZXF1ZXN0NTM1MTQ1Mzgw | 1,374 | Add OPUS Tilde Model Dataset | [] | closed | false | null | 1 | 2020-12-09T12:29:23Z | 2020-12-10T16:11:29Z | 2020-12-10T16:11:28Z | 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/1374/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1374/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1374.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1374",
"merged_at": "2020-12-10T16:11:28Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1374.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1374"
} | true | [
"merging since the CI is fixed on master"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/4154 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4154/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4154/comments | https://api.github.com/repos/huggingface/datasets/issues/4154/events | https://github.com/huggingface/datasets/pull/4154 | 1,202,145,721 | PR_kwDODunzps42Hh14 | 4,154 | Generate tasks.json taxonomy from `huggingface_hub` | [] | closed | false | null | 7 | 2022-04-12T17:12:46Z | 2022-04-14T10:32:32Z | 2022-04-14T10:26:13Z | 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/4154/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4154/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/4154.diff",
"html_url": "https://github.com/huggingface/datasets/pull/4154",
"merged_at": "2022-04-14T10:26:13Z",
"patch_url": "https://github.com/huggingface/datasets/pull/4154.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/4154"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._",
"Ok recomputed the json file, this should be ready to review now! @lhoestq ",
"Note: the generated JSON from `hf/hub-docs` can be found in the output of a GitHub Action run on that repo, for instance in https://github.com/huggingface/hub-docs/runs/6006686983?check_suite_focus=true\r\n\r\n(click on \"Run export-tasks script\")",
"Should we not add the tasks with hideInDatasets?",
"yes, probably true โ i'll change that in a PR in `hub-docs`",
"Yes that's good :) feel free to merge",
"thanks to the both of you!"
] |
https://api.github.com/repos/huggingface/datasets/issues/5354 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5354/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5354/comments | https://api.github.com/repos/huggingface/datasets/issues/5354/events | https://github.com/huggingface/datasets/issues/5354 | 1,492,174,125 | I_kwDODunzps5Y8MUt | 5,354 | Consider using "Sequence" instead of "List" | [
{
"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"
}
] | open | false | null | 7 | 2022-12-12T15:39:45Z | 2023-07-26T16:25:51Z | null | null | ### Feature request
Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below.
**How to reproduce**
```py
list_of_filenames = ["foo.parquet", "bar.parquet"]
ds = Dataset.from_parquet(list_of_filenames)
```
**Expected mypy output:**
```
Success: no issues found
```
**Actual mypy output:**
```py
test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type]
test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
test.py:19: note: Consider using "Sequence" instead, which is covariant
```
**Env:** mypy 0.991, Python 3.10.0, datasets 2.7.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/5354/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5354/timeline | null | null | null | null | false | [
"Hi! Linking a comment to provide more info on the issue: https://stackoverflow.com/a/39458225. This means we should replace all (most of) the occurrences of `List` with `Sequence` in function signatures.\r\n\r\n@tranhd95 Would you be interested in submitting a PR?",
"Hi all! I tried to reproduce this issue and didn't work for me. Also in your example i noticed that the variables have different names: `list_of_filenames` and `list_of_files`, could this be related to that?\r\n```python\r\n#I found random data in parquet format:\r\n!wget \"https://github.com/Teradata/kylo/raw/master/samples/sample-data/parquet/userdata1.parquet\"\r\n!wget \"https://github.com/Teradata/kylo/raw/master/samples/sample-data/parquet/userdata2.parquet\"\r\n\r\n#Then i try reproduce\r\nlist_of_files = [\"userdata1.parquet\", \"userdata2.parquet\"]\r\nds = Dataset.from_parquet(list_of_files)\r\n```\r\n**My output:**\r\n```python\r\nWARNING:datasets.builder:Using custom data configuration default-e287d097dc54e046\r\nDownloading and preparing dataset parquet/default to /root/.cache/huggingface/datasets/parquet/default-e287d097dc54e046/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec...\r\nDownloading data files: 100%\r\n1/1 [00:00<00:00, 40.38it/s]\r\nExtracting data files: 100%\r\n1/1 [00:00<00:00, 23.43it/s]\r\nDataset parquet downloaded and prepared to /root/.cache/huggingface/datasets/parquet/default-e287d097dc54e046/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec. Subsequent calls will reuse this data.\r\n```\r\nP.S. This is my first experience with open source. So do not judge strictly if I do not understand something)",
"@dantema There is indeed a typo in variable names. Nevertheless, I'm sorry if I was not clear but the output is from `mypy` type checker. You can run the code snippet without issues. The problem is with the type checking.",
"However, I found out that the type annotation is actually misleading. The [`from_parquet`](https://github.com/huggingface/datasets/blob/5ef1ab1cc06c2b7a574bf2df454cd9fcb071ccb2/src/datasets/arrow_dataset.py#L1039) method should also accept list of [`PathLike`](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/typing.py#L8) objects which includes [`os.PathLike`](https://docs.python.org/3/library/os.html#os.PathLike). But if I would ran the code snippet below, an exception is thrown.\r\n\r\n**Code**\r\n```py\r\nfrom pathlib import Path\r\n\r\nlist_of_filenames = [Path(\"foo.parquet\"), Path(\"bar.parquet\")]\r\nds = Dataset.from_parquet(list_of_filenames)\r\n```\r\n**Output**\r\n```py\r\n[/usr/local/lib/python3.8/dist-packages/datasets/arrow_dataset.py](https://localhost:8080/#) in from_parquet(path_or_paths, split, features, cache_dir, keep_in_memory, columns, **kwargs)\r\n 1071 from .io.parquet import ParquetDatasetReader\r\n 1072 \r\n-> 1073 return ParquetDatasetReader(\r\n 1074 path_or_paths,\r\n 1075 split=split,\r\n\r\n[/usr/local/lib/python3.8/dist-packages/datasets/io/parquet.py](https://localhost:8080/#) in __init__(self, path_or_paths, split, features, cache_dir, keep_in_memory, streaming, **kwargs)\r\n 35 path_or_paths = path_or_paths if isinstance(path_or_paths, dict) else {self.split: path_or_paths}\r\n 36 hash = _PACKAGED_DATASETS_MODULES[\"parquet\"][1]\r\n---> 37 self.builder = Parquet(\r\n 38 cache_dir=cache_dir,\r\n 39 data_files=path_or_paths,\r\n\r\n[/usr/local/lib/python3.8/dist-packages/datasets/builder.py](https://localhost:8080/#) in __init__(self, cache_dir, config_name, hash, base_path, info, features, use_auth_token, repo_id, data_files, data_dir, name, **config_kwargs)\r\n 298 \r\n 299 if data_files is not None and not isinstance(data_files, DataFilesDict):\r\n--> 300 data_files = DataFilesDict.from_local_or_remote(\r\n 301 sanitize_patterns(data_files), base_path=base_path, use_auth_token=use_auth_token\r\n 302 )\r\n\r\n[/usr/local/lib/python3.8/dist-packages/datasets/data_files.py](https://localhost:8080/#) in from_local_or_remote(cls, patterns, base_path, allowed_extensions, use_auth_token)\r\n 794 for key, patterns_for_key in patterns.items():\r\n 795 out[key] = (\r\n--> 796 DataFilesList.from_local_or_remote(\r\n 797 patterns_for_key,\r\n 798 base_path=base_path,\r\n\r\n[/usr/local/lib/python3.8/dist-packages/datasets/data_files.py](https://localhost:8080/#) in from_local_or_remote(cls, patterns, base_path, allowed_extensions, use_auth_token)\r\n 762 ) -> \"DataFilesList\":\r\n 763 base_path = base_path if base_path is not None else str(Path().resolve())\r\n--> 764 data_files = resolve_patterns_locally_or_by_urls(base_path, patterns, allowed_extensions)\r\n 765 origin_metadata = _get_origin_metadata_locally_or_by_urls(data_files, use_auth_token=use_auth_token)\r\n 766 return cls(data_files, origin_metadata)\r\n\r\n[/usr/local/lib/python3.8/dist-packages/datasets/data_files.py](https://localhost:8080/#) in resolve_patterns_locally_or_by_urls(base_path, patterns, allowed_extensions)\r\n 357 data_files = []\r\n 358 for pattern in patterns:\r\n--> 359 if is_remote_url(pattern):\r\n 360 data_files.append(Url(pattern))\r\n 361 else:\r\n\r\n[/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py](https://localhost:8080/#) in is_remote_url(url_or_filename)\r\n 62 \r\n 63 def is_remote_url(url_or_filename: str) -> bool:\r\n---> 64 parsed = urlparse(url_or_filename)\r\n 65 return parsed.scheme in (\"http\", \"https\", \"s3\", \"gs\", \"hdfs\", \"ftp\")\r\n 66 \r\n\r\n[/usr/lib/python3.8/urllib/parse.py](https://localhost:8080/#) in urlparse(url, scheme, allow_fragments)\r\n 373 Note that we don't break the components up in smaller bits\r\n 374 (e.g. netloc is a single string) and we don't expand % escapes.\"\"\"\r\n--> 375 url, scheme, _coerce_result = _coerce_args(url, scheme)\r\n 376 splitresult = urlsplit(url, scheme, allow_fragments)\r\n 377 scheme, netloc, url, query, fragment = splitresult\r\n\r\n[/usr/lib/python3.8/urllib/parse.py](https://localhost:8080/#) in _coerce_args(*args)\r\n 125 if str_input:\r\n 126 return args + (_noop,)\r\n--> 127 return _decode_args(args) + (_encode_result,)\r\n 128 \r\n 129 # Result objects are more helpful than simple tuples\r\n\r\n[/usr/lib/python3.8/urllib/parse.py](https://localhost:8080/#) in _decode_args(args, encoding, errors)\r\n 109 def _decode_args(args, encoding=_implicit_encoding,\r\n 110 errors=_implicit_errors):\r\n--> 111 return tuple(x.decode(encoding, errors) if x else '' for x in args)\r\n 112 \r\n 113 def _coerce_args(*args):\r\n\r\n[/usr/lib/python3.8/urllib/parse.py](https://localhost:8080/#) in <genexpr>(.0)\r\n 109 def _decode_args(args, encoding=_implicit_encoding,\r\n 110 errors=_implicit_errors):\r\n--> 111 return tuple(x.decode(encoding, errors) if x else '' for x in args)\r\n 112 \r\n 113 def _coerce_args(*args):\r\n\r\nAttributeError: 'PosixPath' object has no attribute 'decode'\r\n```\r\n\r\n@mariosasko Should I create a new issue? ",
"@mariosasko I would like to take this issue up. ",
"@avinashsai Hi, I've assigned you the issue.\r\n\r\n@tranhd95 Yes, feel free to report this in a new issue.",
"@avinashsai Are you still working on this? If not I would like to give it a try."
] |
https://api.github.com/repos/huggingface/datasets/issues/581 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/581/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/581/comments | https://api.github.com/repos/huggingface/datasets/issues/581/events | https://github.com/huggingface/datasets/issues/581 | 695,120,517 | MDU6SXNzdWU2OTUxMjA1MTc= | 581 | Better error message when input file does not exist | [] | closed | false | null | 0 | 2020-09-07T13:47:59Z | 2020-09-09T09:00:07Z | 2020-09-09T09:00:07Z | null | In the following scenario, when `data_files` is an empty list, the stack trace and error message could be improved. This can probably be solved by checking for each file whether it actually exists and/or whether the argument is not false-y.
```python
dataset = load_dataset("text", data_files=[])
```
Example error trace.
```
Using custom data configuration default
Downloading and preparing dataset text/default-d18f9b6611eb8e16 (download: Unknown size, generated: Unknown size, post-processed: Unknown sizetotal: Unknown size) to C:\Users\bramv\.cache\huggingface\datasets\text\default-d18f9b6611eb8e16\0.0.0\3a79870d85f1982d6a2af884fde86a71c771747b4b161fd302d28ad22adf985b...
Traceback (most recent call last):
File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\builder.py", line 424, in incomplete_dir
yield tmp_dir
File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare
self._download_and_prepare(
File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\builder.py", line 537, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\builder.py", line 813, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\arrow_writer.py", line 217, in finalize
self.pa_writer.close()
AttributeError: 'NoneType' object has no attribute 'close'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/dev/python/dutch-simplification/main.py", line 7, in <module>
dataset = load_dataset("text", data_files=files)
File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\load.py", line 548, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\builder.py", line 470, in download_and_prepare
self._save_info()
File "c:\users\bramv\appdata\local\programs\python\python38\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\builder.py", line 430, in incomplete_dir
shutil.rmtree(tmp_dir)
File "c:\users\bramv\appdata\local\programs\python\python38\lib\shutil.py", line 737, in rmtree
return _rmtree_unsafe(path, onerror)
File "c:\users\bramv\appdata\local\programs\python\python38\lib\shutil.py", line 615, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "c:\users\bramv\appdata\local\programs\python\python38\lib\shutil.py", line 613, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\bramv\\.cache\\huggingface\\datasets\\text\\default-d18f9b6611eb8e16\\0.0.0\\3a79870d85f1982d6a2af884fde86a71c771747b4b161fd302d28ad22adf985b.incomplete\\text-train.arrow'
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/581/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/581/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/huggingface/datasets/issues/658 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/658/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/658/comments | https://api.github.com/repos/huggingface/datasets/issues/658/events | https://github.com/huggingface/datasets/pull/658 | 706,206,247 | MDExOlB1bGxSZXF1ZXN0NDkwNzk4MDc0 | 658 | Fix squad metric's Features | [] | closed | false | null | 1 | 2020-09-22T09:09:52Z | 2020-09-29T15:58:30Z | 2020-09-29T15:58:30Z | null | Resolves issue [657](https://github.com/huggingface/datasets/issues/657). | {
"+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/658/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/658/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/658.diff",
"html_url": "https://github.com/huggingface/datasets/pull/658",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/658.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/658"
} | true | [
"Closing this one in favor of #670 \r\n\r\nThanks again for reporting the issue and proposing this fix !\r\nLet me know if you have other remarks"
] |
https://api.github.com/repos/huggingface/datasets/issues/946 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/946/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/946/comments | https://api.github.com/repos/huggingface/datasets/issues/946/events | https://github.com/huggingface/datasets/pull/946 | 754,278,632 | MDExOlB1bGxSZXF1ZXN0NTMwMjA1Nzgw | 946 | add PEC dataset | [] | closed | false | null | 3 | 2020-12-01T10:41:41Z | 2020-12-03T02:47:14Z | 2020-12-03T02:47:14Z | null | A persona-based empathetic conversation dataset published at EMNLP 2020. | {
"+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/946/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/946/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/946.diff",
"html_url": "https://github.com/huggingface/datasets/pull/946",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/946.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/946"
} | true | [
"The checks failed again even if I didn't make any changes.",
"you just need to rebase from master to fix the CI :)",
"Sorry for the mess, I'm confused by the rebase and thus created a new branch."
] |
https://api.github.com/repos/huggingface/datasets/issues/3397 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3397/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3397/comments | https://api.github.com/repos/huggingface/datasets/issues/3397/events | https://github.com/huggingface/datasets/pull/3397 | 1,073,502,444 | PR_kwDODunzps4vgh1U | 3,397 | add BNL newspapers | [] | closed | false | null | 9 | 2021-12-07T15:43:21Z | 2022-01-17T18:35:34Z | 2022-01-17T18:35:34Z | null | This pull request adds the BNL's [processed newspaper collections](https://data.bnl.lu/data/historical-newspapers/) as a dataset. This is partly done to support BigScience see: https://github.com/bigscience-workshop/data_tooling/issues/192.
The Datacard is more sparse than I would like but I plan to make a separate pull request to try and make this more complete at a later date.
I had to manually add the `dummy_data` but I believe I've done this correctly (the tests pass locally).
| {
"+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/3397/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3397/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3397.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3397",
"merged_at": "2022-01-17T18:35:34Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3397.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3397"
} | true | [
"\r\n> Also, maybe calling the dataset as \"bnl_historical_newspapers\" and setting \"processed\" as one configuration name?\r\n\r\nThis sounds like a good idea but my only question around this is how easy it would be to use the same approach for processing the other newspaper collections [https://data.bnl.lu/data/historical-newspapers/](). \r\n\r\nFor example, the \"BIG DATA PACK\" is `257GB` of ALTO XML. This format is slightly more annoying to process because the metadata and text are contained in different files but the bigger issue might be that processing this XML using the Python XML libraries will probably be quite slow? I had thought for those larger datasets it might be more appropriate to use the Beam datasets? I don't have any experience using Beam so I'm not sure what that would involve and there is a reason to not include it in a dataset script alongside a non Beam dataset? \r\n\r\nIf there isn't an issue with potentially later adding other datasets (which may require Beam) into the same script I'll add one config for the processed version now which leaves open the option for later adding the other datasets. If this makes sense I'll also change the name as you suggest. \r\n\r\nThere is another dataset that could be a good candidate for inclusion here is the \"Monograph Text pack\" which is also processed into a simpler XML format however as the name suggests this isn't newspapers so might be confusing to include under a 'newspapers' script. One option would be to put everything under a `BNL` collection but it might be better to keep the monographs separate if they are added as a dataset so a single script doesn't end up including too much variety of content types? \r\n\r\n\r\n\r\n",
"> My initial idea was to contribute the script also as \"community\" datasets (instead of canonical), i.e. in this case, pushing the script to the repo [huggingface.co/datasets/bigscience-catalogue-data/bnl_historical_newspapers](https://huggingface.co/datasets/bigscience-catalogue-data/bnl_historical_newspapers)\r\n\r\nSorry to respond to this late - happy for this to go in the community datasets. I think it would be nice to include in the canonical datasets at some point but since there is less urgency with this I could try and first work on improving the Datacard before doing that (i.e. make this a draft PR) - let me know if you think that makes more sense? \r\n\r\n\r\n",
"> My initial idea was to contribute the script also as \"community\" datasets (instead of canonical), i.e. in this case, pushing the script to the repo https://huggingface.co/datasets/bigscience-catalogue-data/bnl_historical_newspapers\r\n> One of the advantages is that no dummy data is required, so the addition can be made faster\r\n> On the other hand, one disadvantage is that contributions cannot be made through PRs\r\n> Therefore, we should use the Issue page for discussions, reviews, decisions,...\r\n\r\nSure we can use the issues to discuss/review community datasets. Maybe let's have an issue template for that ?\r\nFor this dataset in particular I'll let @albertvillanova decide whether it's best as community dataset or not. IMO both are fine :)\r\n\r\n> I had thought for those larger datasets it might be more appropriate to use the Beam datasets? I don't have any experience using Beam so I'm not sure what that would involve and there is a reason to not include it in a dataset script alongside a non Beam dataset?\r\n\r\nBeam is nice to process a dataset once and for all and store the resulting processed data on the Hugging Face Hub or elsewhere. However for big datasets it must run on a distributed processing runtime like Google DataFlow, which is often inconvenient for many users. We've been using it though for datasets like Wikipedia and sharing the processed data in a GCS bucket.\r\n\r\nSo feel free to use the tools you like to process the datasets, but in the end I think we just need to host the processed data in a convenient format on the Hugging Face Hub to share it with the community. The processing script you used can also be shared with the community for reproducibility and documentation. But maybe @albertvillanova already has something in mind",
"> > My initial idea was to contribute the script also as \"community\" datasets (instead of canonical), i.e. in this case, pushing the script to the repo [huggingface.co/datasets/bigscience-catalogue-data/bnl_historical_newspapers](https://huggingface.co/datasets/bigscience-catalogue-data/bnl_historical_newspapers)\r\n> > One of the advantages is that no dummy data is required, so the addition can be made faster\r\n> > On the other hand, one disadvantage is that contributions cannot be made through PRs\r\n> > Therefore, we should use the Issue page for discussions, reviews, decisions,...\r\n> \r\n> Sure we can use the issues to discuss/review community datasets. Maybe let's have an issue template for that ? For this dataset in particular I'll let @albertvillanova decide whether it's best as community dataset or not. IMO both are fine :)\r\n\r\nThanks, I'll hold off and let @albertvillanova decide best place for this. \r\n\r\n> > I had thought for those larger datasets it might be more appropriate to use the Beam datasets? I don't have any experience using Beam so I'm not sure what that would involve and there is a reason to not include it in a dataset script alongside a non Beam dataset?\r\n> \r\n> Beam is nice to process a dataset once and for all and store the resulting processed data on the Hugging Face Hub or elsewhere. However for big datasets it must run on a distributed processing runtime like Google DataFlow, which is often inconvenient for many users. We've been using it though for datasets like Wikipedia and sharing the processed data in a GCS bucket.\r\n> \r\n> So feel free to use the tools you like to process the datasets, but in the end I think we just need to host the processed data in a convenient format on the Hugging Face Hub to share it with the community. The processing script you used can also be shared with the community for reproducibility and documentation. But maybe @albertvillanova already has something in mind\r\n\r\nThat's useful, my own 2 cents are that it would make sense to do as @albertvillanova suggested and:-\r\n\r\n- rename the dataset to 'bnl_newspapers' \r\n- make the 'processed dataset' a config \r\n\r\nI won't try and include all the other datasets now but this leaves open the option of adding those later. The actual ALTO processing should be okay to do but I think it makes sense to do this as a one-off process and make the plain text + some associated metadata available elsewere so the dataset script can be kept simple and the processing doesn't get done multiple times. \r\n\r\n@albertvillanova if that sounds okay I'll update pull request to include those changes. \r\n",
"@albertvillanova I've now created a config (currently with only one option) and renamed the dataset. This should keep the option to add other configs based on different bnl newspapers in the future. \r\n",
"@mariosasko thanks for those suggestions ",
"I just merged `master` into your branch to fix the CI :)",
"@albertvillanova do you have additional comments ? Otherwise I think this PR is ready to merge :)",
"> @davanstrien you did an awsome job!!! Thanks a lot!\r\n> \r\n> Just some very minor comments (mainly about the README documentation), and we merge this to master!\r\n\r\nThanks! Hopefully all addressed now. Thanks again for all the support with this pull request! "
] |
https://api.github.com/repos/huggingface/datasets/issues/458 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/458/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/458/comments | https://api.github.com/repos/huggingface/datasets/issues/458/events | https://github.com/huggingface/datasets/pull/458 | 668,972,666 | MDExOlB1bGxSZXF1ZXN0NDU5Mzk5ODg2 | 458 | Install CoVal metric from github | [] | closed | false | null | 0 | 2020-07-30T16:59:25Z | 2020-07-31T13:56:33Z | 2020-07-31T13:56:33Z | null | Changed the import statements in `coval.py` to direct the user to install the original package from github if it's not already installed (the warning will only display properly after merging [PR455](https://github.com/huggingface/nlp/pull/455))
Also changed the function call to use named rather than positional arguments. | {
"+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/458/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/458/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/458.diff",
"html_url": "https://github.com/huggingface/datasets/pull/458",
"merged_at": "2020-07-31T13:56:33Z",
"patch_url": "https://github.com/huggingface/datasets/pull/458.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/458"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/5929 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5929/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5929/comments | https://api.github.com/repos/huggingface/datasets/issues/5929/events | https://github.com/huggingface/datasets/issues/5929 | 1,744,478,456 | I_kwDODunzps5n-qD4 | 5,929 | Importing PyTorch reduces multiprocessing performance for map | [] | closed | false | null | 2 | 2023-06-06T19:42:25Z | 2023-06-16T13:09:12Z | 2023-06-16T13:09:12Z | null | ### Describe the bug
I noticed that the performance of my dataset preprocessing with `map(...,num_proc=32)` decreases when PyTorch is imported.
### Steps to reproduce the bug
I created two example scripts to reproduce this behavior:
```
import datasets
datasets.disable_caching()
from datasets import Dataset
import time
PROC=32
if __name__ == "__main__":
dataset = [True] * 10000000
dataset = Dataset.from_dict({'train': dataset})
start = time.time()
dataset.map(lambda x: x, num_proc=PROC)
end = time.time()
print(end - start)
```
Takes around 4 seconds on my machine.
While the same code, but with an `import torch`:
```
import datasets
datasets.disable_caching()
from datasets import Dataset
import time
import torch
PROC=32
if __name__ == "__main__":
dataset = [True] * 10000000
dataset = Dataset.from_dict({'train': dataset})
start = time.time()
dataset.map(lambda x: x, num_proc=PROC)
end = time.time()
print(end - start)
```
takes around 22 seconds.
### Expected behavior
I would expect that the import of torch to not have such a significant effect on the performance of map using multiprocessing.
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-5.15.0-56-generic-x86_64-with-glibc2.35
- Python version: 3.11.3
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.2
- torch: 2.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/5929/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5929/timeline | null | completed | null | null | false | [
"Hi! The times match when I run this code locally or on Colab.\r\n\r\nAlso, we use `multiprocess`, not `multiprocessing`, for parallelization, and torch's `__init__.py` (executed on `import torch` ) slightly modifies the latter.",
"Hey Mariosasko,\r\n\r\nThanks for looking into it. We further did some investigations after your comment and figured out it's only affecting some hardware/software configurations with the `pytorch` installation of `conda-forge`. Based on this we found the following issue in PyTorch: https://github.com/pytorch/pytorch/issues/102269 with a quick fix for now.\r\n\r\nSince it seems to be a deeper issue with forking processes, the difference between`multiprocess` and `multiprocessing` didn't make a difference.\r\n\r\nClosing this, since the issue comes from `pytorch` not `dataset`. \r\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/5109 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5109/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5109/comments | https://api.github.com/repos/huggingface/datasets/issues/5109/events | https://github.com/huggingface/datasets/issues/5109 | 1,407,434,706 | I_kwDODunzps5T47_S | 5,109 | Map caching not working for some class methods | [
{
"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-10-13T09:12:58Z | 2022-10-17T10:38:45Z | 2022-10-17T10:38:45Z | null | ## Describe the bug
The cache loading is not working as expected for some class methods with a model stored in an attribute.
The new fingerprint for `_map_single` is not the same at each run. The hasher generate a different hash for the class method.
This comes from `dumps` function in `datasets.utils.py_utils` which generates a different dump at each run.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from transformers import AutoConfig, AutoModel, AutoTokenizer
dataset = load_dataset("ethos", "binary")
BASE_MODELNAME = "sentence-transformers/all-MiniLM-L6-v2"
class Object:
def __init__(self):
config = AutoConfig.from_pretrained(BASE_MODELNAME)
self.bert = AutoModel.from_config(config=config, add_pooling_layer=False)
self.tok = AutoTokenizer.from_pretrained(BASE_MODELNAME)
def tokenize(self, examples):
tokenized_texts = self.tok(
examples["text"],
padding="max_length",
truncation=True,
max_length=256,
)
return tokenized_texts
instance = Object()
result = dict()
for phase in ["train"]:
result[phase] = dataset[phase].map(instance.tokenize, batched=True, load_from_cache_file=True, num_proc=2)
```
## Expected results
Load cache instead of recompute result.
## Actual results
Result recomputed from scratch at each run.
The cache works fine when deleting `bert` attribute.
## Environment info
- `datasets` version: 2.5.3.dev0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.9.13
- PyArrow version: 7.0.0
- Pandas version: 1.5.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/5109/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5109/timeline | null | completed | null | null | false | [
"The hash used for caching is computed by pickling recursively the function passed to `map`. Maybe some objects don't have the same hash across sessions. In particular you can check the hash of your model using\r\n```python\r\nfrom datasets.fingerprint import Hasher\r\nobj = AutoModel.from_config(config=config, add_pooling_layer=False)\r\nprint(Hasher.hash(obj))\r\n```\r\n\r\nYou can find mode info here: https://huggingface.co/docs/datasets/about_cache\r\n\r\nYou can also provide your own unique hash in `map` if you want, with the `new_fingerprint` argument",
"Indeed, the hash is changing. The `dumps` function serialize the model object in different ways because the model object is not deterministic\r\n```python\r\nfrom datasets.utils.py_utils import dumps\r\nobj1 = AutoModel.from_config(config=config, add_pooling_layer=False)\r\nobj2 = AutoModel.from_config(config=config, add_pooling_layer=False)\r\n\r\ndumps(bert) == dumps(bert2). # False\r\n```\r\n\r\n> You can find mode info here: https://huggingface.co/docs/datasets/about_cache\r\n> \r\n> You can also provide your own unique hash in map if you want, with the new_fingerprint argument\r\n\r\n\r\nThanks, the doc is so helpful. Indeed, we can fix the hash and get cache hit using `new_fingerprint`. Closing the issue."
] |
https://api.github.com/repos/huggingface/datasets/issues/3247 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3247/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3247/comments | https://api.github.com/repos/huggingface/datasets/issues/3247/events | https://github.com/huggingface/datasets/issues/3247 | 1,049,699,088 | I_kwDODunzps4-kSMQ | 3,247 | Loading big json dataset raises pyarrow.lib.ArrowNotImplementedError | [
{
"color": "d73a4a",
"default": true,
"description": "Something isn't working",
"id": 1935892857,
"name": "bug",
"node_id": "MDU6TGFiZWwxOTM1ODkyODU3",
"url": "https://api.github.com/repos/huggingface/datasets/labels/bug"
}
] | closed | false | null | 3 | 2021-11-10T11:17:59Z | 2022-04-10T14:05:57Z | 2022-04-10T14:05:57Z | null | ## Describe the bug
When trying to create a dataset from a json file with around 25MB, the following error is raised `pyarrow.lib.ArrowNotImplementedError: Unsupported cast from struct<b: int64, c: int64> to struct using function cast_struct`
Splitting the big file into smaller ones and then loading it with the `load_dataset` method did also not work.
Creating a pandas dataframe from it and then loading it with `Dataset.from_pandas` works
## Steps to reproduce the bug
```python
load_dataset("json", data_files="test.json")
```
test.json ~25MB
```json
{"a": {"c": 8, "b": 5}}
{"a": {"b": 7, "c": 6}}
{"a": {"c": 8, "b": 5}}
{"a": {"b": 7, "c": 6}}
{"a": {"c": 8, "b": 5}}
...
```
working.json ~160bytes
```json
{"a": {"c": 8, "b": 5}}
{"a": {"b": 7, "c": 6}}
{"a": {"c": 8, "b": 5}}
{"a": {"b": 7, "c": 6}}
{"a": {"c": 8, "b": 5}}
```
## Expected results
It should load the dataset from the json file without error.
## Actual results
It raises Exception `pyarrow.lib.ArrowNotImplementedError: Unsupported cast from struct<b: int64, c: int64> to struct using function cast_struct`
```
Traceback (most recent call last):
File "/Users/m/workspace/xxx/project/main.py", line 60, in <module>
dataset = load_dataset("json", data_files="result.json")
File "/opt/homebrew/Caskroom/miniforge/base/envs/xxx/lib/python3.9/site-packages/datasets/load.py", line 1627, in load_dataset
builder_instance.download_and_prepare(
File "/opt/homebrew/Caskroom/miniforge/base/envs/xxx/lib/python3.9/site-packages/datasets/builder.py", line 607, in download_and_prepare
self._download_and_prepare(
File "/opt/homebrew/Caskroom/miniforge/base/envs/xxx/lib/python3.9/site-packages/datasets/builder.py", line 697, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/opt/homebrew/Caskroom/miniforge/base/envs/xxx/lib/python3.9/site-packages/datasets/builder.py", line 1159, in _prepare_split
writer.write_table(table)
File "/opt/homebrew/Caskroom/miniforge/base/envs/xxx/lib/python3.9/site-packages/datasets/arrow_writer.py", line 428, in write_table
pa_table = pa.Table.from_arrays([pa_table[name] for name in self._schema.names], schema=self._schema)
File "pyarrow/table.pxi", line 1685, in pyarrow.lib.Table.from_arrays
File "pyarrow/table.pxi", line 630, in pyarrow.lib._sanitize_arrays
File "pyarrow/array.pxi", line 338, in pyarrow.lib.asarray
File "pyarrow/table.pxi", line 304, in pyarrow.lib.ChunkedArray.cast
File "/opt/homebrew/Caskroom/miniforge/base/envs/xxx/lib/python3.9/site-packages/pyarrow/compute.py", line 309, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 528, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 327, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 120, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unsupported cast from struct<b: int64, c: int64> to struct using function cast_struct
```
## Environment info
- `datasets` version: 1.14.0
- Platform: macOS-12.0.1-arm64-arm-64bit
- Python version: 3.9.7
- PyArrow version: 6.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/3247/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3247/timeline | null | completed | null | null | false | [
"Hi,\r\n\r\nthis issue is similar to https://github.com/huggingface/datasets/issues/3093, so you can either use the solution provided there or try to load the data in one chunk (you can control the chunk size by specifying the `chunksize` parameter (`int`) in `load_dataset`).\r\n\r\n@lhoestq Is this worth opening an issue on Jira? Basically, PyArrow doesn't allow casts that change the order of the struct fields because they treat `pa.struct` as an ordered sequence. Reordering fields manually in Python is probably too slow, so I think this needs to be fixed by them to be usable on our side.",
"I agree I would expect PyArrow to be able to handle this, do you want to open the issue @mariosasko ?\r\nAlthough maybe it's possible to fix struct casting on our side without hurting performance too much, if it's simply a matter of reordering the arrays in the StructArray",
"Fixed in #3575, so I'm closing this issue."
] |
https://api.github.com/repos/huggingface/datasets/issues/1533 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1533/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1533/comments | https://api.github.com/repos/huggingface/datasets/issues/1533/events | https://github.com/huggingface/datasets/pull/1533 | 764,835,913 | MDExOlB1bGxSZXF1ZXN0NTM4NzE4MDAz | 1,533 | add id_panl_bppt, a parallel corpus for en-id | [] | closed | false | null | 2 | 2020-12-13T03:11:27Z | 2020-12-21T10:40:36Z | 2020-12-21T10:40:36Z | null | Parallel Text Corpora for English - Indonesian | {
"+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/1533/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1533/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1533.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1533",
"merged_at": "2020-12-21T10:40:36Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1533.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1533"
} | true | [
"Hi @lhoestq, thanks for the review. I will have a look and update it accordingly.",
"Strange error message :-)\r\n\r\n```\r\n> tf_context = tf.python.context.context() # eager mode context\r\nE AttributeError: module 'tensorflow' has no attribute 'python'\r\n```\r\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/3868 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3868/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3868/comments | https://api.github.com/repos/huggingface/datasets/issues/3868/events | https://github.com/huggingface/datasets/pull/3868 | 1,162,914,114 | PR_kwDODunzps40HnWA | 3,868 | Ignore duplicate keys if `ignore_verifications=True` | [] | closed | false | null | 2 | 2022-03-08T17:14:56Z | 2022-03-09T13:50:45Z | 2022-03-09T13:50:44Z | null | Currently, it's impossible to generate a dataset if some keys from `_generate_examples` are duplicated. This PR allows skipping the check for duplicate keys if `ignore_verifications` is set to `True`. | {
"+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/3868/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3868/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3868.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3868",
"merged_at": "2022-03-09T13:50:44Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3868.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3868"
} | true | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_3868). All of your documentation changes will be reflected on that endpoint.",
"Cool thanks ! Could you add a test please ?"
] |
https://api.github.com/repos/huggingface/datasets/issues/1055 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1055/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1055/comments | https://api.github.com/repos/huggingface/datasets/issues/1055/events | https://github.com/huggingface/datasets/pull/1055 | 756,298,372 | MDExOlB1bGxSZXF1ZXN0NTMxODY1NjM4 | 1,055 | Add hebrew-sentiment | [] | closed | false | null | 4 | 2020-12-03T15:24:31Z | 2022-02-21T15:26:05Z | 2020-12-04T11:24:16Z | null | hebrew-sentiment dataset is ready! (including tests, tags etc) | {
"+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/1055/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1055/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1055.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1055",
"merged_at": "2020-12-04T11:24:16Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1055.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1055"
} | true | [
"@elronbandel it looks like something went wrong with the renaming, as the old files are still in the PR. Can you `git rm datasets/hebrew-sentiment` ?",
"merging since the CI is fixed on master",
"This is the old version of the data.\r\nHere is the fixed version.\r\nhttps://github.com/OnlpLab/Hebrew-Sentiment-Data\r\n\r\nI hope I would find time to open a PR. I think it supposed to be only to change the data path ",
"Cool ! Sure feel free to open a PR if you have some time :) and feel free to ping me for review or if you have questions"
] |
https://api.github.com/repos/huggingface/datasets/issues/5488 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5488/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5488/comments | https://api.github.com/repos/huggingface/datasets/issues/5488/events | https://github.com/huggingface/datasets/issues/5488 | 1,565,025,262 | I_kwDODunzps5dSGPu | 5,488 | Error loading MP3 files from CommonVoice | [] | closed | false | null | 4 | 2023-01-31T21:25:33Z | 2023-03-02T16:25:14Z | 2023-03-02T16:25:13Z | null | ### Describe the bug
When loading a CommonVoice dataset with `datasets==2.9.0` and `torchaudio>=0.12.0`, I get an error reading the audio arrays:
```python
---------------------------------------------------------------------------
LibsndfileError Traceback (most recent call last)
~/.local/lib/python3.8/site-packages/datasets/features/audio.py in _decode_mp3(self, path_or_file)
310 try: # try torchaudio anyway because sometimes it works (depending on the os and os packages installed)
--> 311 array, sampling_rate = self._decode_mp3_torchaudio(path_or_file)
312 except RuntimeError:
~/.local/lib/python3.8/site-packages/datasets/features/audio.py in _decode_mp3_torchaudio(self, path_or_file)
351
--> 352 array, sampling_rate = torchaudio.load(path_or_file, format="mp3")
353 if self.sampling_rate and self.sampling_rate != sampling_rate:
~/.local/lib/python3.8/site-packages/torchaudio/backend/soundfile_backend.py in load(filepath, frame_offset, num_frames, normalize, channels_first, format)
204 """
--> 205 with soundfile.SoundFile(filepath, "r") as file_:
206 if file_.format != "WAV" or normalize:
~/.local/lib/python3.8/site-packages/soundfile.py in __init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd)
654 format, subtype, endian)
--> 655 self._file = self._open(file, mode_int, closefd)
656 if set(mode).issuperset('r+') and self.seekable():
~/.local/lib/python3.8/site-packages/soundfile.py in _open(self, file, mode_int, closefd)
1212 err = _snd.sf_error(file_ptr)
-> 1213 raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
1214 if mode_int == _snd.SFM_WRITE:
LibsndfileError: Error opening <_io.BytesIO object at 0x7fa539462090>: File contains data in an unknown format.
```
I assume this is because there's some issue with the mp3 decoding process. I've verified that I have `ffmpeg>=4` (on a Linux distro), which appears to be the fallback backend for `torchaudio,` (at least according to #4889).
### Steps to reproduce the bug
```python
dataset = load_dataset("mozilla-foundation/common_voice_11_0", "be", split="train")
dataset[0]
```
### Expected behavior
Similar behavior to `torchaudio<0.12.0`, which doesn't result in a `LibsndfileError`
### Environment info
- `datasets` version: 2.9.0
- Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 10.0.1
- Pandas version: 1.5.1 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/5488/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5488/timeline | null | completed | null | null | false | [
"Hi @kradonneoh, thanks for reporting.\r\n\r\nPlease note that to work with audio datasets (and specifically with MP3 files) we have detailed installation instructions in our docs: https://huggingface.co/docs/datasets/installation#audio\r\n- one of the requirements is torchaudio<0.12.0\r\n\r\nLet us know if the problem persists after having followed them.",
"I saw that and have followed it (hence the Expected Behavior section of the bug report). \r\n\r\nIs there no intention of updating to the latest version? It does limit the version of `torch` I can use, which isnโt ideal.",
"@kradonneoh hey! actually with `ffmpeg4` loading of mp3 files should work, so this is a not expected behavior and we need to investigate it. It works on my side with `torchaudio==0.13` and `ffmpeg==4.2.7`. Which `torchaudio` version do you use?\r\n\r\n`datasets` should support decoding of mp3 files with `torchaudio` when its version is `>0.12` but as you noted it requires `ffmpeg>4`, we need to fix this in the documentation, thank you for pointing to this! \r\n\r\nBut according to your traceback it seems that it tries to use [`libsndfile`](https://github.com/libsndfile/libsndfile) backend for mp3 decoding. And `libsndfile` library supports mp3 decoding starting from version 1.1.0 which on Linux has to be compiled from source for now afaik. \r\n\r\nfyi - we are aiming at getting rid of `torchaudio` dependency at all by the next major library release in favor of `libsndfile` too.",
"We now decode MP3 with `soundfile`, so I'm closing this issue"
] |
https://api.github.com/repos/huggingface/datasets/issues/2368 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2368/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2368/comments | https://api.github.com/repos/huggingface/datasets/issues/2368/events | https://github.com/huggingface/datasets/pull/2368 | 893,411,076 | MDExOlB1bGxSZXF1ZXN0NjQ1OTI5NzM0 | 2,368 | Allow "other-X" in licenses | [] | closed | false | null | 0 | 2021-05-17T14:47:54Z | 2021-05-17T16:36:27Z | 2021-05-17T16:36:27Z | null | This PR allows "other-X" licenses during metadata validation.
@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/2368/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2368/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2368.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2368",
"merged_at": "2021-05-17T16:36:27Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2368.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2368"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/1433 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1433/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1433/comments | https://api.github.com/repos/huggingface/datasets/issues/1433/events | https://github.com/huggingface/datasets/pull/1433 | 760,813,539 | MDExOlB1bGxSZXF1ZXN0NTM1NTgxNzE3 | 1,433 | Adding the ASSIN 2 dataset | [] | closed | false | null | 0 | 2020-12-10T01:57:02Z | 2020-12-11T14:32:56Z | 2020-12-11T14:32:56Z | null | Adding the ASSIN 2 dataset, a Portuguese language dataset for Natural Language Inference and Semantic Similarity Scoring | {
"+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/1433/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1433/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1433.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1433",
"merged_at": "2020-12-11T14:32:56Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1433.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1433"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/2497 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2497/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2497/comments | https://api.github.com/repos/huggingface/datasets/issues/2497/events | https://github.com/huggingface/datasets/pull/2497 | 920,250,382 | MDExOlB1bGxSZXF1ZXN0NjY5NDI3OTU3 | 2,497 | Use default cast for sliced list arrays if pyarrow >= 4 | [] | closed | false | {
"closed_at": "2021-07-09T05:50:07Z",
"closed_issues": 12,
"created_at": "2021-05-31T16:13:06Z",
"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-07-08T07:00:00Z",
"html_url": "https://github.com/huggingface/datasets/milestone/5",
"id": 6808903,
"labels_url": "https://api.github.com/repos/huggingface/datasets/milestones/5/labels",
"node_id": "MDk6TWlsZXN0b25lNjgwODkwMw==",
"number": 5,
"open_issues": 0,
"state": "closed",
"title": "1.9",
"updated_at": "2021-07-12T14:12:00Z",
"url": "https://api.github.com/repos/huggingface/datasets/milestones/5"
} | 2 | 2021-06-14T10:02:47Z | 2021-06-15T18:06:18Z | 2021-06-14T14:24:37Z | null | From pyarrow version 4, it is supported to cast sliced lists.
This PR uses default pyarrow cast in Datasets to cast sliced list arrays if pyarrow version is >= 4.
In relation with PR #2461 and #2490.
cc: @lhoestq, @abhi1thakur, @SBrandeis | {
"+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/2497/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2497/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2497.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2497",
"merged_at": "2021-06-14T14:24:37Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2497.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2497"
} | true | [
"I believe we don't use PyArrow >= 4.0.0 because of some segfault issues:\r\nhttps://github.com/huggingface/datasets/blob/1206ffbcd42dda415f6bfb3d5040708f50413c93/setup.py#L78\r\nCan you confirm @lhoestq ?",
"@SBrandeis pyarrow version 4.0.1 has fixed that issue: #2489 ๐ "
] |
https://api.github.com/repos/huggingface/datasets/issues/2036 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2036/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2036/comments | https://api.github.com/repos/huggingface/datasets/issues/2036/events | https://github.com/huggingface/datasets/issues/2036 | 829,909,258 | MDU6SXNzdWU4Mjk5MDkyNTg= | 2,036 | Cannot load wikitext | [] | closed | false | null | 1 | 2021-03-12T09:09:39Z | 2021-03-15T08:45:02Z | 2021-03-15T08:44:44Z | null | when I execute these codes
```
>>> from datasets import load_dataset
>>> test_dataset = load_dataset("wikitext")
```
I got an error,any help?
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/xxx/anaconda3/envs/transformer/lib/python3.7/site-packages/datasets/load.py", line 589, in load_dataset
path, script_version=script_version, download_config=download_config, download_mode=download_mode, dataset=True
File "/home/xxx/anaconda3/envs/transformer/lib/python3.7/site-packages/datasets/load.py", line 267, in prepare_module
local_path = cached_path(file_path, download_config=download_config)
File "/home/xxx/anaconda3/envs/transformer/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 308, in cached_path
use_etag=download_config.use_etag,
File "/home/xxx/anaconda3/envs/transformer/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 487, in get_from_cache
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.1.3/datasets/wikitext/wikitext.py
``` | {
"+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/2036/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2036/timeline | null | completed | null | null | false | [
"Solved!"
] |
https://api.github.com/repos/huggingface/datasets/issues/4466 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4466/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4466/comments | https://api.github.com/repos/huggingface/datasets/issues/4466/events | https://github.com/huggingface/datasets/pull/4466 | 1,266,159,920 | PR_kwDODunzps45ZLsd | 4,466 | Optimize contiguous shard and select | [] | closed | false | null | 3 | 2022-06-09T13:45:39Z | 2022-06-14T16:04:30Z | 2022-06-14T15:54:45Z | null | Currently `.shard()` and `.select()` always create an indices mapping. However if the requested data are contiguous, it's much more optimized to simply slice the Arrow table instead of building an indices mapping. In particular:
- the shard/select operation will be much faster
- reading speed will be much faster in the resulting dataset, since it won't have to do a lookup step in the indices mapping
Since `.shard()` is also used for `.map()` with `num_proc>1`, it will also significantly improve the reading speed of multiprocessed `.map()` operations
Here is an example of speed-up:
```python
>>> import io
>>> import numpy as np
>>> from datasets import Dataset
>>> ds = Dataset.from_dict({"a": np.random.rand(10_000_000)})
>>> shard = ds.shard(num_shards=4, index=0, contiguous=True) # this calls `.select(range(2_500_000))`
>>> buf = io.BytesIO()
>>> %time dd.to_json(buf)
Creating json from Arrow format: 100%|โโโโโโโโโโโโโโโโโโ| 100/100 [00:00<00:00, 376.17ba/s]
CPU times: user 258 ms, sys: 9.06 ms, total: 267 ms
Wall time: 266 ms
```
while previously it was
```python
Creating json from Arrow format: 100%|โโโโโโโโโโโโโโโโโโโ| 100/100 [00:03<00:00, 29.41ba/s]
CPU times: user 3.33 s, sys: 69.1 ms, total: 3.39 s
Wall time: 3.4 s
```
In this simple case the speed-up is x10, but @sayakpaul experienced a x100 speed-up on its data when exporting to JSON.
## Implementation details
I mostly improved `.select()`: it now checks if the input corresponds to a contiguous chunk of data and then it slices the main Arrow table (or the indices mapping table if it exists). To check if the input indices are contiguous it checks two possibilities:
- if the indices is of type `range`, it checks that start >= 0 and step = 1
- otherwise in the general case, it iterates over the indices. If all the indices are contiguous then we're good, otherwise we have to build an indices mapping.
Having to iterate over the indices doesn't cause performance issues IMO because:
- either they are contiguous and in this case the cost of iterating over the indices is much less than the cost of creating an indices mapping
- or they are not contiguous, and then iterating generally stops quickly when it first encounters the first indice that is not contiguous. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 1,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/huggingface/datasets/issues/4466/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4466/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/4466.diff",
"html_url": "https://github.com/huggingface/datasets/pull/4466",
"merged_at": "2022-06-14T15:54:45Z",
"patch_url": "https://github.com/huggingface/datasets/pull/4466.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/4466"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._",
"I thought of just mentioning the benefits I got. Here's the code that @lhoestq provided:\r\n\r\n```py\r\nimport os\r\nfrom datasets import load_dataset\r\nfrom tqdm.auto import tqdm\r\n\r\nds = load_dataset(\"squad\", split=\"train\")\r\nos.makedirs(\"tmp\")\r\n\r\nnum_shards = 5\r\nfor index in tqdm(range(num_shards)):\r\n size = len(ds) // num_shards\r\n shard = Dataset(ds.data.slice(size * index, size), fingerprint=f\"{ds._fingerprint}_{index}\")\r\n shard.to_json(f\"tmp/data_{index}.jsonl\")\r\n```\r\n\r\nIt is 1.64s. Previously the code was:\r\n\r\n```py\r\nnum_shards = 5\r\nfor index in tqdm(range(num_shards)):\r\n shard = ds.shard(num_shards=num_shards, index=index, contiguous=True)\r\n shard.to_json(f\"tmp/data_{index}.jsonl\")\r\n # upload_to_gcs(f\"tmp/data_{index}.jsonl\")\r\n```\r\n\r\nIt was 2min31s. \r\n\r\nI ran it on my humble MacBook Pro:\r\n\r\n<img width=\"574\" alt=\"image\" src=\"https://user-images.githubusercontent.com/22957388/172864881-f1db489a-2305-47f2-a07f-7d3df610b1b8.png\">\r\n",
"I addressed your comments @albertvillanova , let me know what you think :)"
] |
https://api.github.com/repos/huggingface/datasets/issues/3997 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3997/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3997/comments | https://api.github.com/repos/huggingface/datasets/issues/3997/events | https://github.com/huggingface/datasets/pull/3997 | 1,178,566,568 | PR_kwDODunzps4058xr | 3,997 | Sync Features dictionaries | [] | closed | false | null | 1 | 2022-03-23T19:23:51Z | 2022-04-13T15:52:27Z | 2022-04-13T15:46:19Z | null | This PR adds a wrapper to the `Features` class to keep the secondary dict, `_column_requires_decoding`, aligned with the main dict (as discussed in https://github.com/huggingface/datasets/pull/3723#discussion_r806912731).
A more elegant approach would be to subclass `UserDict` and override `__setitem__` and `__delitem__`, but this PR doesn't implement it for the following reasons:
* it requires replacing all occurrences of `isinstance(obj, dict)` with `isinstance(obj, Mapping)`, which is five times slower than `isinstance(obj, dict)` on my machine, in `features.py`
* is a breaking change, i.e., `isinstance(Features(...), dict)` would return `False` after it
* IMO, it makes sense to be consistent in the user-facing API and subclass either `dict` or `UserDict`. The problem with the latter is that it can't be used for `DatasetDict` because `DatasetDict` exposes the `data` property, which is also used by `UserDict`, so this would result in a collision.
| {
"+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/3997/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3997/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3997.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3997",
"merged_at": "2022-04-13T15:46:19Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3997.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3997"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._"
] |
https://api.github.com/repos/huggingface/datasets/issues/2604 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2604/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2604/comments | https://api.github.com/repos/huggingface/datasets/issues/2604/events | https://github.com/huggingface/datasets/issues/2604 | 938,602,237 | MDU6SXNzdWU5Mzg2MDIyMzc= | 2,604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | [
{
"color": "a2eeef",
"default": true,
"description": "New feature or request",
"id": 1935892871,
"name": "enhancement",
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement"
}
] | closed | false | {
"closed_at": "2021-07-21T15:36:49Z",
"closed_issues": 29,
"created_at": "2021-06-08T18:48:33Z",
"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-05T07:00:00Z",
"html_url": "https://github.com/huggingface/datasets/milestone/6",
"id": 6836458,
"labels_url": "https://api.github.com/repos/huggingface/datasets/milestones/6/labels",
"node_id": "MDk6TWlsZXN0b25lNjgzNjQ1OA==",
"number": 6,
"open_issues": 0,
"state": "closed",
"title": "1.10",
"updated_at": "2021-07-21T15:36:49Z",
"url": "https://api.github.com/repos/huggingface/datasets/milestones/6"
} | 14 | 2021-07-07T07:56:16Z | 2021-07-19T09:08:18Z | 2021-07-19T09:08:18Z | null | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | {
"+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/2604/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2604/timeline | null | completed | null | null | false | [
"Hi !\r\nIf we want something more general, we could either\r\n1. delete the extracted files after the arrow data generation automatically, or \r\n2. delete each extracted file during the arrow generation right after it has been closed.\r\n\r\nSolution 2 is better to save disk space during the arrow generation. Is it what you had in mind ?\r\n\r\nThe API could look like\r\n```python\r\nload_dataset(..., delete_extracted_files_after_usage=True)\r\n```\r\n\r\nIn terms of implementation, here are some directions we could take for each solution:\r\n1. get the list of the extracted files from the DownloadManager and then delete them after the dataset is processed. This can be implemented in `download_and_prepare` I guess\r\n2. maybe wrap and mock `open` in the builder to make it delete the file when the file is closed.",
"Also, if I delete the extracted files they need to be re-extracted again instead of loading from the Arrow cache files",
"I think we already opened an issue about this topic (suggested by @stas00): duplicated of #2481?\r\n\r\nThis is in our TODO list... ๐
",
"I think the deletion of each extracted file could be implemented in our CacheManager and ExtractManager (once merged to master: #2295, #2277). ๐ ",
"Oh yes sorry, I didn't check if this was a duplicate",
"Nevermind @thomwolf, I just mentioned the other issue so that both appear linked in GitHub and we do not forget to close both once we make the corresponding Pull Request... That was the main reason! ๐ ",
"Ok yes. I think this is an important feature to be able to use large datasets which are pretty much always compressed files.\r\n\r\nIn particular now this requires to keep the extracted file on the drive if you want to avoid reprocessing the dataset so in my case, this require using always ~400GB of drive instead of just 200GB (which is already significant). \r\n\r\nTwo nice features would be to:\r\n- allow to delete the extracted files without loosing the ability to load the dataset from the cached arrow-file\r\n- streamlined decompression when only the currently read file is extracted - this might require to read the list of files from the extracted archives before processing them?",
"Here is a sample dataset with 2 such large compressed JSON files for debugging: https://huggingface.co/datasets/thomwolf/github-python",
"Note that I'm confirming that with the current master branch of dataset, deleting extracted files (without deleting the arrow cache file) lead to **re-extracting** these files when reloading the dataset instead of directly loading the arrow cache file.",
"Hi ! That's weird, it doesn't do that on my side (tested on master on my laptop by deleting the `extracted` folder in the download cache directory). You tested with one of the files at https://huggingface.co/datasets/thomwolf/github-python that you have locally ?",
"Yes itโs when I load local compressed JSON line files with load_dataset(โjsonโ, data_files=โฆ) ",
"@thomwolf I'm sorry but I can't reproduce this problem. I'm also using: \r\n```python\r\nds = load_dataset(\"json\", split=\"train\", data_files=data_files, cache_dir=cache_dir)\r\n```\r\nafter having removed the extracted files:\r\n```python\r\nassert sorted((cache_dir / \"downloads\" / \"extracted\").iterdir()) == []\r\n```\r\n\r\nI get the logging message:\r\n```shell\r\nWARNING datasets.builder:builder.py:531 Reusing dataset json ...\r\n```",
"Do you confirm the extracted folder stays empty after reloading?",
"> \r\n> \r\n> Do you confirm the extracted folder stays empty after reloading?\r\n\r\nYes, I have the above mentioned assertion on the emptiness of the extracted folder:\r\n```python\r\nassert sorted((cache_dir / \"downloads\" / \"extracted\").iterdir()) == []\r\n```\r\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/5002 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5002/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5002/comments | https://api.github.com/repos/huggingface/datasets/issues/5002/events | https://github.com/huggingface/datasets/issues/5002 | 1,380,589,402 | I_kwDODunzps5SSh9a | 5,002 | Dataset Viewer issue for loubnabnl/humaneval-x | [
{
"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 | 2 | 2022-09-21T09:06:17Z | 2022-09-21T11:49:49Z | 2022-09-21T11:49:49Z | null | ### Link
https://huggingface.co/datasets/loubnabnl/humaneval-x/viewer/
### Description
The dataset has subsets but the viewer gets stuck in the default subset even when I select another one (the data loading of the subsets works fine)
### Owner
Yes | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 1,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/huggingface/datasets/issues/5002/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5002/timeline | null | completed | null | null | false | [
"It's a bug! Thanks for reporting, I'm looking at it",
"Fixed."
] |
https://api.github.com/repos/huggingface/datasets/issues/5513 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5513/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5513/comments | https://api.github.com/repos/huggingface/datasets/issues/5513/events | https://github.com/huggingface/datasets/issues/5513 | 1,576,300,803 | I_kwDODunzps5d9HED | 5,513 | Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name? | [] | closed | false | null | 4 | 2023-02-08T15:13:46Z | 2023-07-24T16:02:18Z | 2023-07-24T14:27:59Z | null | Hi @mariosasko, @lhoestq, or whoever reads this! :)
After going through `ArrowDataset.set_format` I found out that the `type` param is actually named `type` which is a Python reserved name as you may already know, shouldn't that be renamed to `format_type` before the 3.0.0 is released?
Just wanted to get your input, and if applicable, tackle this issue myself! 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/5513/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5513/timeline | null | completed | null | null | false | [
"Hi! Let's not do this - renaming it would be a breaking change, and going through the deprecation cycle is only worth it if it improves user experience.",
"Hi @mariosasko, ok it makes sense. Anyway, don't you think it's worth it at some point to start a deprecation cycle e.g. `fs` in `load_from_disk`? It doesn't affect user experience but it's for sure a bad practice IMO, but's up to you ๐ Feel free to close this issue otherwise!",
"I don't think deprecating a param name in this particular instance is worth the hassle, so I'm closing the issue ๐.",
"Sure, makes sense @mariosasko thanks!"
] |
https://api.github.com/repos/huggingface/datasets/issues/6046 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6046/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6046/comments | https://api.github.com/repos/huggingface/datasets/issues/6046/events | https://github.com/huggingface/datasets/issues/6046 | 1,808,154,414 | I_kwDODunzps5rxj8u | 6,046 | Support proxy and user-agent in fsspec calls | [
{
"color": "a2eeef",
"default": true,
"description": "New feature or request",
"id": 1935892871,
"name": "enhancement",
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement"
},
{
"color": "BDE59C",
"default": false,
"description": "Issues a bit more difficult than \"Good First\" issues",
"id": 3761482852,
"name": "good second issue",
"node_id": "LA_kwDODunzps7gM6xk",
"url": "https://api.github.com/repos/huggingface/datasets/labels/good%20second%20issue"
}
] | open | false | null | 0 | 2023-07-17T16:39:26Z | 2023-07-17T16:40:37Z | null | null | Since we switched to the new HfFileSystem we no longer apply user's proxy and user-agent.
Using the HTTP_PROXY and HTTPS_PROXY environment variables works though since we use aiohttp to call the HF Hub.
This can be implemented in `_prepare_single_hop_path_and_storage_options`.
Though ideally the `HfFileSystem` could support passing at least the proxies | {
"+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/6046/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6046/timeline | null | null | null | null | false | [] |
https://api.github.com/repos/huggingface/datasets/issues/1495 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1495/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1495/comments | https://api.github.com/repos/huggingface/datasets/issues/1495/events | https://github.com/huggingface/datasets/pull/1495 | 763,025,562 | MDExOlB1bGxSZXF1ZXN0NTM3NTE2ODE4 | 1,495 | Opus DGT added | [] | closed | false | null | 1 | 2020-12-11T23:05:09Z | 2020-12-17T14:38:41Z | 2020-12-17T14:38:41Z | null | Dataset : http://opus.nlpl.eu/DGT.php | {
"+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/1495/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1495/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1495.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1495",
"merged_at": "2020-12-17T14:38:41Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1495.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1495"
} | true | [
"merging since the CI is fixed on master"
] |
https://api.github.com/repos/huggingface/datasets/issues/3911 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3911/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3911/comments | https://api.github.com/repos/huggingface/datasets/issues/3911/events | https://github.com/huggingface/datasets/pull/3911 | 1,168,652,374 | PR_kwDODunzps40aQHz | 3,911 | Create README.md for CER metric | [] | closed | false | null | 1 | 2022-03-14T16:54:51Z | 2022-03-17T17:49:40Z | 2022-03-17T17:45:54Z | null | Initial proposal for a CER metric card
cc @patrickvonplaten - wdyt this time around? :smile: | {
"+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/3911/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3911/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3911.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3911",
"merged_at": "2022-03-17T17:45:54Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3911.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3911"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._"
] |
https://api.github.com/repos/huggingface/datasets/issues/210 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/210/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/210/comments | https://api.github.com/repos/huggingface/datasets/issues/210/events | https://github.com/huggingface/datasets/pull/210 | 626,504,243 | MDExOlB1bGxSZXF1ZXN0NDI0NDgyNDgz | 210 | fix xnli metric kwargs description | [] | closed | false | null | 0 | 2020-05-28T13:21:44Z | 2020-05-28T13:22:11Z | 2020-05-28T13:22:10Z | null | The text was wrong as noticed in #202 | {
"+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/210/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/210/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/210.diff",
"html_url": "https://github.com/huggingface/datasets/pull/210",
"merged_at": "2020-05-28T13:22:10Z",
"patch_url": "https://github.com/huggingface/datasets/pull/210.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/210"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/2213 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2213/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2213/comments | https://api.github.com/repos/huggingface/datasets/issues/2213/events | https://github.com/huggingface/datasets/pull/2213 | 856,025,320 | MDExOlB1bGxSZXF1ZXN0NjEzNjcwODk2 | 2,213 | Fix lc_quad download checksum | [] | closed | false | null | 0 | 2021-04-12T14:16:59Z | 2021-04-14T22:04:54Z | 2021-04-14T13:42:25Z | null | Fixes #2211 | {
"+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/2213/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2213/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2213.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2213",
"merged_at": "2021-04-14T13:42:25Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2213.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2213"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/5405 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5405/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5405/comments | https://api.github.com/repos/huggingface/datasets/issues/5405/events | https://github.com/huggingface/datasets/issues/5405 | 1,517,879,386 | I_kwDODunzps5aeQBa | 5,405 | size_in_bytes the same for all splits | [] | open | false | null | 1 | 2023-01-03T20:25:48Z | 2023-01-04T09:22:59Z | null | null | ### Describe the bug
Hi, it looks like whenever you pull a dataset and get size_in_bytes, it returns the same size for all splits (and that size is the combined size of all splits). It seems like this shouldn't be the intended behavior since it is misleading. Here's an example:
```
>>> from datasets import load_dataset
>>> x = load_dataset("glue", "wnli")
Found cached dataset glue (/Users/breakend/.cache/huggingface/datasets/glue/wnli/1.0.0/dacbe3125aa31d7f70367a07a8a9e72a5a0bfeb5fc42e75c9db75b96da6053ad)
100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 3/3 [00:00<00:00, 1097.70it/s]
>>> x["train"].size_in_bytes
186159
>>> x["validation"].size_in_bytes
186159
>>> x["test"].size_in_bytes
186159
>>>
```
### Steps to reproduce the bug
```
>>> from datasets import load_dataset
>>> x = load_dataset("glue", "wnli")
>>> x["train"].size_in_bytes
186159
>>> x["validation"].size_in_bytes
186159
>>> x["test"].size_in_bytes
186159
```
### Expected behavior
The expected behavior is that it should return the separate sizes for all splits.
### Environment info
- `datasets` version: 2.7.1
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.10.8
- PyArrow version: 10.0.1
- Pandas version: 1.5.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/5405/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5405/timeline | null | null | null | null | false | [
"Hi @Breakend,\r\n\r\nIndeed, the attribute `size_in_bytes` refers to the size of the entire dataset configuration, for all splits (size of downloaded files + Arrow files), not the specific split.\r\nThis is also the case for `download_size` (downloaded files) and `dataset_size` (Arrow files).\r\n\r\nThe size of the Arrow files for a specific split can be accessed: e.g. size of the \"test\" split only\r\n```python\r\nds[\"train\"].info.splits[\"test\"].num_bytes\r\n```\r\n\r\nI agree this is confusing and maybe we should improve it."
] |
https://api.github.com/repos/huggingface/datasets/issues/416 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/416/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/416/comments | https://api.github.com/repos/huggingface/datasets/issues/416/events | https://github.com/huggingface/datasets/pull/416 | 661,635,393 | MDExOlB1bGxSZXF1ZXN0NDUzMjg1NTM4 | 416 | Fix xtreme panx directory | [] | closed | false | null | 1 | 2020-07-20T10:09:17Z | 2020-07-21T08:15:46Z | 2020-07-21T08:15:44Z | null | Fix #412 | {
"+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/416/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/416/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/416.diff",
"html_url": "https://github.com/huggingface/datasets/pull/416",
"merged_at": "2020-07-21T08:15:44Z",
"patch_url": "https://github.com/huggingface/datasets/pull/416.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/416"
} | true | [
"great, I think I did not download the data the way you do, but yours is more reasonable."
] |
https://api.github.com/repos/huggingface/datasets/issues/2701 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2701/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2701/comments | https://api.github.com/repos/huggingface/datasets/issues/2701/events | https://github.com/huggingface/datasets/pull/2701 | 950,422,403 | MDExOlB1bGxSZXF1ZXN0Njk0OTcxMzM3 | 2,701 | Fix download_mode docstrings | [
{
"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 | 0 | 2021-07-22T08:30:25Z | 2021-07-22T09:33:31Z | 2021-07-22T09:33:31Z | null | Fix `download_mode` docstrings. | {
"+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/2701/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2701/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2701.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2701",
"merged_at": "2021-07-22T09:33:31Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2701.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2701"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/5397 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5397/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5397/comments | https://api.github.com/repos/huggingface/datasets/issues/5397/events | https://github.com/huggingface/datasets/pull/5397 | 1,514,412,246 | PR_kwDODunzps5GYirs | 5,397 | Unpin pydantic test dependency | [] | closed | false | null | 2 | 2022-12-30T10:22:09Z | 2022-12-30T10:53:11Z | 2022-12-30T10:43:40Z | null | Once pydantic-1.10.3 has been yanked, we can unpin it: https://pypi.org/project/pydantic/1.10.3/
See reply by pydantic team https://github.com/pydantic/pydantic/issues/4885#issuecomment-1367819807
```
v1.10.3 has been yanked.
```
in response to spacy request: https://github.com/pydantic/pydantic/issues/4885#issuecomment-1367810049
```
On behalf of spacy-related packages: would it be possible for you to temporarily yank v1.10.3?
To address this and be compatible with v1.10.4, we'd have to release new versions of a whole series of packages and nearly everyone (including me) is currently on vacation. Even if v1.10.4 is released with a fix, pip would still back off to v1.10.3 for spacy, etc. because of its current pins for typing_extensions. If it could instead back off to v1.10.2, we'd have a bit more breathing room to make the updates on our end.
```
Close #5398.
| {
"+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/5397/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5397/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/5397.diff",
"html_url": "https://github.com/huggingface/datasets/pull/5397",
"merged_at": "2022-12-30T10:43:40Z",
"patch_url": "https://github.com/huggingface/datasets/pull/5397.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/5397"
} | 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.012922 / 0.011353 (0.001569) | 0.006568 / 0.011008 (-0.004440) | 0.139567 / 0.038508 (0.101059) | 0.039362 / 0.023109 (0.016253) | 0.444238 / 0.275898 (0.168340) | 0.529102 / 0.323480 (0.205622) | 0.010275 / 0.007986 (0.002290) | 0.006134 / 0.004328 (0.001805) | 0.107506 / 0.004250 (0.103255) | 0.047948 / 0.037052 (0.010896) | 0.460469 / 0.258489 (0.201980) | 0.516817 / 0.293841 (0.222976) | 0.058637 / 0.128546 (-0.069909) | 0.019516 / 0.075646 (-0.056130) | 0.464111 / 0.419271 (0.044839) | 0.062140 / 0.043533 (0.018607) | 0.445004 / 0.255139 (0.189865) | 0.460117 / 0.283200 (0.176917) | 0.116591 / 0.141683 (-0.025092) | 1.936834 / 1.452155 (0.484680) | 1.941837 / 1.492716 (0.449120) |\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.284130 / 0.018006 (0.266124) | 0.588109 / 0.000490 (0.587619) | 0.004383 / 0.000200 (0.004183) | 0.000143 / 0.000054 (0.000089) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.032984 / 0.037411 (-0.004427) | 0.132811 / 0.014526 (0.118285) | 0.150932 / 0.176557 (-0.025625) | 0.203759 / 0.737135 (-0.533377) | 0.149612 / 0.296338 (-0.146726) |\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.677666 / 0.215209 (0.462457) | 6.627611 / 2.077655 (4.549956) | 2.679526 / 1.504120 (1.175406) | 2.272536 / 1.541195 (0.731342) | 2.371179 / 1.468490 (0.902689) | 1.205282 / 4.584777 (-3.379495) | 5.733537 / 3.745712 (1.987825) | 3.165279 / 5.269862 (-2.104583) | 2.287918 / 4.565676 (-2.277759) | 0.144581 / 0.424275 (-0.279695) | 0.016812 / 0.007607 (0.009205) | 0.841719 / 0.226044 (0.615675) | 8.379119 / 2.268929 (6.110191) | 3.507169 / 55.444624 (-51.937456) | 2.756666 / 6.876477 (-4.119811) | 2.814091 / 2.142072 (0.672018) | 1.495835 / 4.805227 (-3.309392) | 0.253651 / 6.500664 (-6.247013) | 0.081258 / 0.075469 (0.005789) |\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.651586 / 1.841788 (-0.190202) | 19.039628 / 8.074308 (10.965320) | 21.269814 / 10.191392 (11.078421) | 0.241024 / 0.680424 (-0.439400) | 0.047975 / 0.534201 (-0.486225) | 0.563727 / 0.579283 (-0.015556) | 0.666808 / 0.434364 (0.232445) | 0.661065 / 0.540337 (0.120728) | 0.762884 / 1.386936 (-0.624052) |\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.010141 / 0.011353 (-0.001212) | 0.006216 / 0.011008 (-0.004792) | 0.135491 / 0.038508 (0.096983) | 0.035439 / 0.023109 (0.012330) | 0.482789 / 0.275898 (0.206891) | 0.520673 / 0.323480 (0.197193) | 0.006358 / 0.007986 (-0.001627) | 0.005432 / 0.004328 (0.001104) | 0.094448 / 0.004250 (0.090197) | 0.048379 / 0.037052 (0.011326) | 0.509359 / 0.258489 (0.250870) | 0.539583 / 0.293841 (0.245742) | 0.054621 / 0.128546 (-0.073925) | 0.021382 / 0.075646 (-0.054265) | 0.435539 / 0.419271 (0.016267) | 0.060630 / 0.043533 (0.017097) | 0.469593 / 0.255139 (0.214454) | 0.507838 / 0.283200 (0.224639) | 0.112062 / 0.141683 (-0.029621) | 1.829694 / 1.452155 (0.377539) | 1.972266 / 1.492716 (0.479549) |\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.291669 / 0.018006 (0.273663) | 0.590104 / 0.000490 (0.589614) | 0.000661 / 0.000200 (0.000461) | 0.000082 / 0.000054 (0.000028) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.034933 / 0.037411 (-0.002479) | 0.134867 / 0.014526 (0.120341) | 0.138892 / 0.176557 (-0.037665) | 0.192619 / 0.737135 (-0.544516) | 0.153787 / 0.296338 (-0.142551) |\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.666762 / 0.215209 (0.451553) | 6.741736 / 2.077655 (4.664082) | 2.988712 / 1.504120 (1.484592) | 2.554823 / 1.541195 (1.013628) | 2.655651 / 1.468490 (1.187161) | 1.276603 / 4.584777 (-3.308174) | 5.827960 / 3.745712 (2.082247) | 5.046876 / 5.269862 (-0.222985) | 2.829775 / 4.565676 (-1.735902) | 0.151525 / 0.424275 (-0.272750) | 0.016504 / 0.007607 (0.008897) | 0.849749 / 0.226044 (0.623704) | 8.331675 / 2.268929 (6.062747) | 3.664529 / 55.444624 (-51.780096) | 2.976495 / 6.876477 (-3.899982) | 3.034737 / 2.142072 (0.892664) | 1.499036 / 4.805227 (-3.306191) | 0.261027 / 6.500664 (-6.239637) | 0.088306 / 0.075469 (0.012837) |\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.693506 / 1.841788 (-0.148282) | 18.939914 / 8.074308 (10.865605) | 20.685460 / 10.191392 (10.494068) | 0.218316 / 0.680424 (-0.462108) | 0.029010 / 0.534201 (-0.505191) | 0.565246 / 0.579283 (-0.014037) | 0.633573 / 0.434364 (0.199209) | 0.656895 / 0.540337 (0.116558) | 0.781975 / 1.386936 (-0.604961) |\n\n</details>\n</details>\n\n\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/3970 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3970/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3970/comments | https://api.github.com/repos/huggingface/datasets/issues/3970/events | https://github.com/huggingface/datasets/pull/3970 | 1,174,327,367 | PR_kwDODunzps40sSfx | 3,970 | Apply index-filters on scores in get_nearest_examples and get_nearestโฆ | [] | closed | false | null | 0 | 2022-03-19T18:32:31Z | 2022-03-19T18:38:12Z | 2022-03-19T18:38:12Z | null | Updated search.py to resolve the issue mentioned in https://github.com/huggingface/datasets/issues/3961.
Applied index-filters on scores in get_nearest_examples and get_nearest_examples_batch methods of search.py. | {
"+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/3970/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3970/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3970.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3970",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/3970.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3970"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/5206 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5206/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5206/comments | https://api.github.com/repos/huggingface/datasets/issues/5206/events | https://github.com/huggingface/datasets/issues/5206 | 1,437,223,894 | I_kwDODunzps5VqkvW | 5,206 | Use logging instead of printing to console | [] | closed | false | null | 1 | 2022-11-05T23:48:02Z | 2022-11-06T00:06:00Z | 2022-11-06T00:05:59Z | null | ### Describe the bug
Some logs ([here](https://github.com/huggingface/datasets/blob/4a6e1fe2735505efc7e3a3dbd3e1835da0702575/src/datasets/builder.py#L778), [here](https://github.com/huggingface/datasets/blob/4a6e1fe2735505efc7e3a3dbd3e1835da0702575/src/datasets/builder.py#L786), and [here](https://github.com/huggingface/datasets/blob/4a6e1fe2735505efc7e3a3dbd3e1835da0702575/src/datasets/builder.py#L830)) generated by the `DatasetBuilder` are printed to the console instead of passed to `datasets` logger.
### Steps to reproduce the bug
```python
>> import datasets
>> datasets.load_dataset("some-dataset")
Downloading and preparing dataset csv/data to <path>...
Downloading data files: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 3/3 [00:00<00:00, 7729.06it/s]
Extracting data files: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 3/3 [00:00<00:00, 527.23it/s]
Dataset csv downloaded and prepared to <path>. Subsequent calls will reuse this data.
```
### Expected behavior
The logs should not be printed to the console directly but passed to the logger so that the user can redirect them wherever he wants.
### Environment info
- `datasets` version: 2.6.1
- Platform: macOS-13.0-x86_64-i386-64bit
- Python version: 3.9.15
- 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/5206/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5206/timeline | null | completed | null | null | false | [
"Actually upon closer inspection, it is documented in the code that this behavior is intentional, so I'll close this."
] |
https://api.github.com/repos/huggingface/datasets/issues/3740 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3740/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3740/comments | https://api.github.com/repos/huggingface/datasets/issues/3740/events | https://github.com/huggingface/datasets/pull/3740 | 1,140,720,739 | PR_kwDODunzps4y9XAP | 3,740 | Support streaming for pubmed | [] | closed | false | null | 3 | 2022-02-17T00:18:22Z | 2022-02-18T14:42:13Z | 2022-02-18T14:42:13Z | null | This PR makes some minor changes to the `pubmed` dataset to allow for `streaming=True`. Fixes #3739.
Basically, I followed the C4 dataset which works in streaming mode as an example, and made the following changes:
* Change URL prefix from `ftp://` to `https://`
* Explicilty `open` the filename and pass the XML contents to `etree.fromstring(xml_str)`
The Github diff tool makes it look like the changes are larger than they are, sorry about that.
I tested locally and the `pubmed` dataset now works in both normal and streaming modes. There is some overhead at the start of each shard in streaming mode as building the XML tree online is quite slow (each pubmed .xml.gz file is ~20MB), but the overhead gets amortized over all the samples in the shard. On my laptop with a single CPU worker I am able to stream at about ~600 samples/s. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/3740/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3740/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3740.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3740",
"merged_at": "2022-02-18T14:42:13Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3740.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3740"
} | true | [
"@albertvillanova just FYI, since you were so helpful with the previous pubmed issue :) ",
"IIRC streaming from FTP is not fully tested yet, so I'm fine with switching to HTTPS for now, as long as the download speed/availability is great",
"@albertvillanova Thanks for pointing me to the `ET` module replacement. It should look a lot cleaner now.\r\n\r\nUnfortunately I tried keeping the `ftp://` protocol but was seeing timeout errors? in streaming mode (below). I think the `https://` performance is not an issue, when I was profiling the `open(..) -> f.read() -> etree.fromstring(xml_str)` codepath, most of the time was spent in the XML parsing rather than the data download.\r\n\r\n\r\nError when using `ftp://`:\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/Users/abhinav/Documents/mosaicml/hf_datasets/venv/lib/python3.8/site-packages/fsspec/implementations/ftp.py\", line 301, in _fetch_range\r\n self.fs.ftp.retrbinary(\r\n File \"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/ftplib.py\", line 430, in retrbinary\r\n callback(data)\r\n File \"/Users/abhinav/Documents/mosaicml/hf_datasets/venv/lib/python3.8/site-packages/fsspec/implementations/ftp.py\", line 293, in callback\r\n raise TransferDone\r\nfsspec.implementations.ftp.TransferDone\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"test_pubmed_streaming.py\", line 9, in <module>\r\n print (next(iter(pubmed_train_streaming)))\r\n File \"/Users/abhinav/Documents/mosaicml/hf_datasets/abhi-datasets/src/datasets/iterable_dataset.py\", line 365, in __iter__\r\n for key, example in self._iter():\r\n File \"/Users/abhinav/Documents/mosaicml/hf_datasets/abhi-datasets/src/datasets/iterable_dataset.py\", line 362, in _iter\r\n yield from ex_iterable\r\n File \"/Users/abhinav/Documents/mosaicml/hf_datasets/abhi-datasets/src/datasets/iterable_dataset.py\", line 79, in __iter__\r\n yield from self.generate_examples_fn(**self.kwargs)\r\n File \"/Users/abhinav/.cache/huggingface/modules/datasets_modules/datasets/pubmed/af552ed918e2841e8427203530e3cfed3a8bc3213041d7853bea1ca67eec683d/pubmed.py\", line 362, in _generate_examples\r\n tree = ET.parse(filename)\r\n File \"/Users/abhinav/Documents/mosaicml/hf_datasets/abhi-datasets/src/datasets/streaming.py\", line 65, in wrapper\r\n return function(*args, use_auth_token=use_auth_token, **kwargs)\r\n File \"/Users/abhinav/Documents/mosaicml/hf_datasets/abhi-datasets/src/datasets/utils/streaming_download_manager.py\", line 636, in xet_parse\r\n return ET.parse(f, parser=parser)\r\n File \"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/xml/etree/ElementTree.py\", line 1202, in parse\r\n tree.parse(source, parser)\r\n File \"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/xml/etree/ElementTree.py\", line 595, in parse\r\n self._root = parser._parse_whole(source)\r\n File \"/Users/abhinav/Documents/mosaicml/hf_datasets/abhi-datasets/src/datasets/utils/streaming_download_manager.py\", line 293, in read_with_retries\r\n out = read(*args, **kwargs)\r\n File \"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/gzip.py\", line 292, in read\r\n return self._buffer.read(size)\r\n File \"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/_compression.py\", line 68, in readinto\r\n data = self.read(len(byte_view))\r\n File \"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/gzip.py\", line 479, in read\r\n if not self._read_gzip_header():\r\n File \"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/gzip.py\", line 422, in _read_gzip_header\r\n magic = self._fp.read(2)\r\n File \"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/gzip.py\", line 96, in read\r\n self.file.read(size-self._length+read)\r\n File \"/Users/abhinav/Documents/mosaicml/hf_datasets/venv/lib/python3.8/site-packages/fsspec/spec.py\", line 1485, in read\r\n out = self.cache._fetch(self.loc, self.loc + length)\r\n File \"/Users/abhinav/Documents/mosaicml/hf_datasets/venv/lib/python3.8/site-packages/fsspec/caching.py\", line 153, in _fetch\r\n self.cache = self.fetcher(start, end) # new block replaces old\r\n File \"/Users/abhinav/Documents/mosaicml/hf_datasets/venv/lib/python3.8/site-packages/fsspec/implementations/ftp.py\", line 311, in _fetch_range\r\n self.fs.ftp.getmultiline()\r\n File \"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/ftplib.py\", line 224, in getmultiline\r\n line = self.getline()\r\n File \"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/ftplib.py\", line 206, in getline\r\n line = self.file.readline(self.maxline + 1)\r\n File \"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/socket.py\", line 669, in readinto\r\n return self._sock.recv_into(b)\r\nsocket.timeout: timed out\r\n```"
] |
https://api.github.com/repos/huggingface/datasets/issues/1217 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1217/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1217/comments | https://api.github.com/repos/huggingface/datasets/issues/1217/events | https://github.com/huggingface/datasets/pull/1217 | 758,008,321 | MDExOlB1bGxSZXF1ZXN0NTMzMjU2MjU4 | 1,217 | adding DataCommons fact checking | [] | closed | false | null | 0 | 2020-12-06T19:56:12Z | 2020-12-16T16:22:48Z | 2020-12-16T16:22:48Z | null | Adding the data from: https://datacommons.org/factcheck/
Had to cheat a bit with the dummy data as the test doesn't recognize `.txt.gz`: had to rename uncompressed files with the `.gz` extension manually without actually compressing | {
"+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/1217/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1217/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1217.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1217",
"merged_at": "2020-12-16T16:22:48Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1217.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1217"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/1181 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1181/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1181/comments | https://api.github.com/repos/huggingface/datasets/issues/1181/events | https://github.com/huggingface/datasets/pull/1181 | 757,791,992 | MDExOlB1bGxSZXF1ZXN0NTMzMTAwNjYz | 1,181 | added emotions detection in arabic dataset | [] | closed | false | null | 3 | 2020-12-05T22:08:46Z | 2020-12-21T09:53:51Z | 2020-12-21T09:53:51Z | null | Dataset for Emotions detection in Arabic text
more info: https://github.com/AmrMehasseb/Emotional-Tone | {
"+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/1181/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1181/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1181.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1181",
"merged_at": "2020-12-21T09:53:51Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1181.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1181"
} | true | [
"Hi @abdulelahsm did you manage to fix your issue ?\r\nFeel free to ping me if you have questions or if you're ready for a review",
"@lhoestq fixed it! ready to merge. I hope haha",
"merging since the CI is fixed on master"
] |
https://api.github.com/repos/huggingface/datasets/issues/804 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/804/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/804/comments | https://api.github.com/repos/huggingface/datasets/issues/804/events | https://github.com/huggingface/datasets/issues/804 | 736,858,507 | MDU6SXNzdWU3MzY4NTg1MDc= | 804 | Empty output/answer in TriviaQA test set (both in 'kilt_tasks' and 'trivia_qa') | [] | closed | false | null | 3 | 2020-11-05T11:38:01Z | 2020-11-09T14:14:59Z | 2020-11-09T14:14:58Z | null | # The issue
It's all in the title, it appears to be fine on the train and validation sets.
Is there some kind of mapping to do like for the questions (see https://github.com/huggingface/datasets/blob/master/datasets/kilt_tasks/README.md) ?
# How to reproduce
```py
from datasets import load_dataset
kilt_tasks = load_dataset("kilt_tasks")
trivia_qa = load_dataset('trivia_qa', 'unfiltered.nocontext')
# both in "kilt_tasks"
In [18]: any([output['answer'] for output in kilt_tasks['test_triviaqa']['output']])
Out[18]: False
# and "trivia_qa"
In [13]: all([answer['value'] == '<unk>' for answer in trivia_qa['test']['answer']])
Out[13]: True
# appears to be fine on the train and validation sets.
In [14]: all([answer['value'] == '<unk>' for answer in trivia_qa['train']['answer']])
Out[14]: False
In [15]: all([answer['value'] == '<unk>' for answer in trivia_qa['validation']['answer']])
Out[15]: False
In [16]: any([output['answer'] for output in kilt_tasks['train_triviaqa']['output']])
Out[16]: True
In [17]: any([output['answer'] for output in kilt_tasks['validation_triviaqa']['output']])
Out[17]: True
``` | {
"+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/804/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/804/timeline | null | completed | null | null | false | [
"cc @yjernite is this expected ?",
"Yes: TriviaQA has a private test set for the leaderboard [here](https://competitions.codalab.org/competitions/17208)\r\n\r\nFor the KILT training and validation portions, you need to link the examples from the TriviaQA dataset as detailed here:\r\nhttps://github.com/huggingface/datasets/blob/master/datasets/kilt_tasks/README.md",
"Oh ok, I guess I read the paper too fast ๐
, thank you for your answer!"
] |
https://api.github.com/repos/huggingface/datasets/issues/3080 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3080/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3080/comments | https://api.github.com/repos/huggingface/datasets/issues/3080/events | https://github.com/huggingface/datasets/issues/3080 | 1,026,380,626 | I_kwDODunzps49LVNS | 3,080 | Error related to timeout keyword argument | [
{
"color": "d73a4a",
"default": true,
"description": "Something isn't working",
"id": 1935892857,
"name": "bug",
"node_id": "MDU6TGFiZWwxOTM1ODkyODU3",
"url": "https://api.github.com/repos/huggingface/datasets/labels/bug"
}
] | closed | false | null | 0 | 2021-10-14T13:10:58Z | 2021-10-14T14:39:51Z | 2021-10-14T14:39:51Z | null | ## Describe the bug
As reported by @patrickvonplaten, a TypeError is raised when trying to load a dataset.
## Steps to reproduce the bug
```python
from datasets import load_dataset
ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean")
```
## Actual results
```
TypeError: dataset_info() got an unexpected keyword argument 'timeout'
```
| {
"+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/3080/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3080/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/huggingface/datasets/issues/5554 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5554/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5554/comments | https://api.github.com/repos/huggingface/datasets/issues/5554/events | https://github.com/huggingface/datasets/pull/5554 | 1,592,285,062 | PR_kwDODunzps5KXhZh | 5,554 | Add resampy dep | [] | closed | false | null | 5 | 2023-02-20T18:15:43Z | 2023-02-21T12:46:10Z | 2023-02-21T12:43:38Z | null | In librosa 0.10 they removed the `resmpy` dependency and set it to optional.
However it is necessary for resampling. I added it to the "audio" extra dependencies. | {
"+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/5554/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5554/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/5554.diff",
"html_url": "https://github.com/huggingface/datasets/pull/5554",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/5554.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/5554"
} | true | [
"<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.008735 / 0.011353 (-0.002618) | 0.004514 / 0.011008 (-0.006494) | 0.099348 / 0.038508 (0.060840) | 0.030060 / 0.023109 (0.006951) | 0.302189 / 0.275898 (0.026291) | 0.339535 / 0.323480 (0.016055) | 0.007053 / 0.007986 (-0.000933) | 0.003420 / 0.004328 (-0.000909) | 0.076967 / 0.004250 (0.072717) | 0.034484 / 0.037052 (-0.002568) | 0.304349 / 0.258489 (0.045860) | 0.354032 / 0.293841 (0.060191) | 0.033552 / 0.128546 (-0.094995) | 0.011405 / 0.075646 (-0.064241) | 0.324773 / 0.419271 (-0.094498) | 0.041103 / 0.043533 (-0.002429) | 0.313559 / 0.255139 (0.058420) | 0.333251 / 0.283200 (0.050052) | 0.087580 / 0.141683 (-0.054103) | 1.460324 / 1.452155 (0.008169) | 1.552239 / 1.492716 (0.059523) |\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.183759 / 0.018006 (0.165753) | 0.413274 / 0.000490 (0.412784) | 0.001684 / 0.000200 (0.001484) | 0.000076 / 0.000054 (0.000022) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.023341 / 0.037411 (-0.014071) | 0.098368 / 0.014526 (0.083842) | 0.105522 / 0.176557 (-0.071034) | 0.151581 / 0.737135 (-0.585554) | 0.108980 / 0.296338 (-0.187358) |\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.417856 / 0.215209 (0.202647) | 4.167570 / 2.077655 (2.089915) | 1.843669 / 1.504120 (0.339549) | 1.643130 / 1.541195 (0.101936) | 1.717587 / 1.468490 (0.249097) | 0.696392 / 4.584777 (-3.888384) | 3.427617 / 3.745712 (-0.318096) | 2.816486 / 5.269862 (-2.453376) | 1.539519 / 4.565676 (-3.026157) | 0.082112 / 0.424275 (-0.342163) | 0.012425 / 0.007607 (0.004818) | 0.525325 / 0.226044 (0.299281) | 5.251710 / 2.268929 (2.982781) | 2.273641 / 55.444624 (-53.170983) | 1.931002 / 6.876477 (-4.945474) | 1.977253 / 2.142072 (-0.164819) | 0.804794 / 4.805227 (-4.000434) | 0.147324 / 6.500664 (-6.353340) | 0.064966 / 0.075469 (-0.010503) |\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.193173 / 1.841788 (-0.648615) | 13.705127 / 8.074308 (5.630819) | 14.348408 / 10.191392 (4.157016) | 0.165374 / 0.680424 (-0.515050) | 0.028288 / 0.534201 (-0.505913) | 0.402546 / 0.579283 (-0.176737) | 0.413503 / 0.434364 (-0.020861) | 0.473298 / 0.540337 (-0.067039) | 0.567571 / 1.386936 (-0.819365) |\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.006735 / 0.011353 (-0.004618) | 0.004601 / 0.011008 (-0.006407) | 0.077414 / 0.038508 (0.038906) | 0.027402 / 0.023109 (0.004293) | 0.353469 / 0.275898 (0.077571) | 0.381697 / 0.323480 (0.058218) | 0.005076 / 0.007986 (-0.002910) | 0.004665 / 0.004328 (0.000336) | 0.076210 / 0.004250 (0.071960) | 0.039114 / 0.037052 (0.002061) | 0.354980 / 0.258489 (0.096491) | 0.389648 / 0.293841 (0.095807) | 0.031674 / 0.128546 (-0.096872) | 0.011752 / 0.075646 (-0.063894) | 0.086330 / 0.419271 (-0.332942) | 0.041530 / 0.043533 (-0.002003) | 0.343002 / 0.255139 (0.087863) | 0.365959 / 0.283200 (0.082760) | 0.091848 / 0.141683 (-0.049835) | 1.519427 / 1.452155 (0.067272) | 1.591529 / 1.492716 (0.098813) |\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.216458 / 0.018006 (0.198452) | 0.403326 / 0.000490 (0.402836) | 0.000432 / 0.000200 (0.000232) | 0.000059 / 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.025106 / 0.037411 (-0.012305) | 0.101113 / 0.014526 (0.086588) | 0.108104 / 0.176557 (-0.068453) | 0.142342 / 0.737135 (-0.594794) | 0.112012 / 0.296338 (-0.184326) |\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.443128 / 0.215209 (0.227919) | 4.434707 / 2.077655 (2.357052) | 2.115434 / 1.504120 (0.611315) | 1.902865 / 1.541195 (0.361670) | 1.996981 / 1.468490 (0.528491) | 0.702485 / 4.584777 (-3.882292) | 3.419151 / 3.745712 (-0.326561) | 1.911977 / 5.269862 (-3.357884) | 1.178195 / 4.565676 (-3.387481) | 0.082985 / 0.424275 (-0.341290) | 0.012415 / 0.007607 (0.004808) | 0.546188 / 0.226044 (0.320144) | 5.463592 / 2.268929 (3.194664) | 2.574911 / 55.444624 (-52.869713) | 2.232883 / 6.876477 (-4.643594) | 2.284391 / 2.142072 (0.142319) | 0.807389 / 4.805227 (-3.997839) | 0.151461 / 6.500664 (-6.349203) | 0.067831 / 0.075469 (-0.007638) |\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.286605 / 1.841788 (-0.555183) | 14.230328 / 8.074308 (6.156020) | 13.944645 / 10.191392 (3.753253) | 0.153725 / 0.680424 (-0.526699) | 0.016876 / 0.534201 (-0.517325) | 0.386109 / 0.579283 (-0.193174) | 0.401798 / 0.434364 (-0.032566) | 0.467883 / 0.540337 (-0.072454) | 0.557788 / 1.386936 (-0.829148) |\n\n</details>\n</details>\n\n\n",
"_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.009305 / 0.011353 (-0.002048) | 0.004978 / 0.011008 (-0.006031) | 0.101687 / 0.038508 (0.063179) | 0.035339 / 0.023109 (0.012230) | 0.294770 / 0.275898 (0.018872) | 0.355491 / 0.323480 (0.032011) | 0.008183 / 0.007986 (0.000197) | 0.004076 / 0.004328 (-0.000253) | 0.077552 / 0.004250 (0.073302) | 0.042891 / 0.037052 (0.005838) | 0.305727 / 0.258489 (0.047238) | 0.336508 / 0.293841 (0.042667) | 0.038525 / 0.128546 (-0.090022) | 0.011878 / 0.075646 (-0.063768) | 0.334136 / 0.419271 (-0.085136) | 0.047548 / 0.043533 (0.004015) | 0.301749 / 0.255139 (0.046610) | 0.318221 / 0.283200 (0.035022) | 0.099172 / 0.141683 (-0.042511) | 1.440638 / 1.452155 (-0.011516) | 1.503505 / 1.492716 (0.010789) |\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.202748 / 0.018006 (0.184742) | 0.433670 / 0.000490 (0.433181) | 0.003139 / 0.000200 (0.002939) | 0.000083 / 0.000054 (0.000028) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.025555 / 0.037411 (-0.011856) | 0.107156 / 0.014526 (0.092631) | 0.116706 / 0.176557 (-0.059851) | 0.153165 / 0.737135 (-0.583970) | 0.122614 / 0.296338 (-0.173724) |\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.398912 / 0.215209 (0.183703) | 3.965048 / 2.077655 (1.887394) | 1.894678 / 1.504120 (0.390558) | 1.706925 / 1.541195 (0.165730) | 1.745264 / 1.468490 (0.276774) | 0.691174 / 4.584777 (-3.893603) | 3.824583 / 3.745712 (0.078871) | 3.876806 / 5.269862 (-1.393055) | 1.898991 / 4.565676 (-2.666685) | 0.083687 / 0.424275 (-0.340588) | 0.012122 / 0.007607 (0.004514) | 0.510870 / 0.226044 (0.284825) | 5.094523 / 2.268929 (2.825594) | 2.265557 / 55.444624 (-53.179067) | 1.930882 / 6.876477 (-4.945594) | 2.016090 / 2.142072 (-0.125983) | 0.833108 / 4.805227 (-3.972119) | 0.164804 / 6.500664 (-6.335860) | 0.062864 / 0.075469 (-0.012605) |\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.192673 / 1.841788 (-0.649115) | 14.730393 / 8.074308 (6.656085) | 14.550736 / 10.191392 (4.359344) | 0.154451 / 0.680424 (-0.525973) | 0.029222 / 0.534201 (-0.504979) | 0.440939 / 0.579283 (-0.138345) | 0.442772 / 0.434364 (0.008409) | 0.543948 / 0.540337 (0.003610) | 0.638113 / 1.386936 (-0.748824) |\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.007589 / 0.011353 (-0.003764) | 0.005208 / 0.011008 (-0.005800) | 0.073797 / 0.038508 (0.035289) | 0.034021 / 0.023109 (0.010912) | 0.366120 / 0.275898 (0.090222) | 0.397105 / 0.323480 (0.073625) | 0.005837 / 0.007986 (-0.002148) | 0.004028 / 0.004328 (-0.000301) | 0.073502 / 0.004250 (0.069252) | 0.051233 / 0.037052 (0.014181) | 0.359849 / 0.258489 (0.101360) | 0.397476 / 0.293841 (0.103635) | 0.036727 / 0.128546 (-0.091819) | 0.012249 / 0.075646 (-0.063397) | 0.086600 / 0.419271 (-0.332671) | 0.051156 / 0.043533 (0.007623) | 0.343441 / 0.255139 (0.088302) | 0.389672 / 0.283200 (0.106472) | 0.105180 / 0.141683 (-0.036503) | 1.439719 / 1.452155 (-0.012435) | 1.537779 / 1.492716 (0.045062) |\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.199429 / 0.018006 (0.181422) | 0.440837 / 0.000490 (0.440347) | 0.005333 / 0.000200 (0.005133) | 0.000099 / 0.000054 (0.000044) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.029581 / 0.037411 (-0.007830) | 0.113789 / 0.014526 (0.099263) | 0.123799 / 0.176557 (-0.052758) | 0.163772 / 0.737135 (-0.573363) | 0.127156 / 0.296338 (-0.169183) |\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.422803 / 0.215209 (0.207594) | 4.192400 / 2.077655 (2.114745) | 1.994561 / 1.504120 (0.490441) | 1.807085 / 1.541195 (0.265890) | 1.927539 / 1.468490 (0.459049) | 0.708804 / 4.584777 (-3.875973) | 3.790662 / 3.745712 (0.044950) | 3.667207 / 5.269862 (-1.602655) | 1.985107 / 4.565676 (-2.580570) | 0.086609 / 0.424275 (-0.337666) | 0.012613 / 0.007607 (0.005006) | 0.520167 / 0.226044 (0.294122) | 5.208657 / 2.268929 (2.939729) | 2.500383 / 55.444624 (-52.944241) | 2.129817 / 6.876477 (-4.746660) | 2.181205 / 2.142072 (0.039133) | 0.847925 / 4.805227 (-3.957303) | 0.168293 / 6.500664 (-6.332372) | 0.065066 / 0.075469 (-0.010403) |\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.261053 / 1.841788 (-0.580735) | 15.091644 / 8.074308 (7.017336) | 14.126139 / 10.191392 (3.934747) | 0.184956 / 0.680424 (-0.495468) | 0.017909 / 0.534201 (-0.516292) | 0.428918 / 0.579283 (-0.150365) | 0.429637 / 0.434364 (-0.004727) | 0.530900 / 0.540337 (-0.009437) | 0.627966 / 1.386936 (-0.758970) |\n\n</details>\n</details>\n\n\n",
"I think we should also suggest installing `resampy` in the error message thrown by the Audio feature when `librosa` is not installed.",
"exploring a better solution at https://github.com/huggingface/datasets/pull/5556"
] |
https://api.github.com/repos/huggingface/datasets/issues/2531 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2531/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2531/comments | https://api.github.com/repos/huggingface/datasets/issues/2531/events | https://github.com/huggingface/datasets/pull/2531 | 927,017,924 | MDExOlB1bGxSZXF1ZXN0Njc1MjM2MDYz | 2,531 | Fix dev version | [] | closed | false | null | 0 | 2021-06-22T09:17:10Z | 2021-06-22T09:47:10Z | 2021-06-22T09:47:09Z | null | The dev version that ends in `.dev0` should be greater than the current version.
However it happens that `1.8.0 > 1.8.0.dev0` for example.
Therefore we need to use `1.8.1.dev0` for example in this case.
I updated the dev version to use `1.8.1.dev0`, and I also added a comment in the setup.py in the release steps about this. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/2531/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2531/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2531.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2531",
"merged_at": "2021-06-22T09:47:09Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2531.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2531"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/1625 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1625/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1625/comments | https://api.github.com/repos/huggingface/datasets/issues/1625/events | https://github.com/huggingface/datasets/pull/1625 | 773,771,596 | MDExOlB1bGxSZXF1ZXN0NTQ0Nzk4MDM1 | 1,625 | Fixed bug in the shape property | [] | closed | false | null | 0 | 2020-12-23T13:33:21Z | 2021-01-02T23:22:52Z | 2020-12-23T14:13:13Z | null | Fix to the bug reported in issue #1622. Just replaced `return tuple(self._indices.num_rows, self._data.num_columns)` by `return (self._indices.num_rows, self._data.num_columns)`. | {
"+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/1625/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1625/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1625.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1625",
"merged_at": "2020-12-23T14:13:13Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1625.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1625"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/4876 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4876/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4876/comments | https://api.github.com/repos/huggingface/datasets/issues/4876/events | https://github.com/huggingface/datasets/issues/4876 | 1,348,202,678 | I_kwDODunzps5QW_C2 | 4,876 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md` | [] | closed | false | null | 15 | 2022-08-23T16:16:41Z | 2022-10-03T09:11:13Z | 2022-10-03T09:11:13Z | null | Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :) | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 4,
"heart": 3,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 7,
"url": "https://api.github.com/repos/huggingface/datasets/issues/4876/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4876/timeline | null | completed | null | null | false | [
"also @osanseviero @Pierrci @SBrandeis potentially",
"Love this in principle ๐ \r\n\r\nLet's keep in mind users might rely on `dataset_infos.json` already.\r\n\r\nI'm not convinced by the two-syntax solution, wouldn't it be simpler to have only one syntax with a `default` config for datasets with only one config? ie, always having the `configs` field. This makes parsing the metadata easier IMO.\r\n\r\nMight also be good to wrap the tags under a `datasets_info` tag as follows:\r\n\r\n```yaml\r\ndescription: ...\r\ncitation: ...\r\ndataset_infos:\r\n download_size: 35142551\r\n dataset_size: 89789763\r\n version: 1.0.0\r\n configs:\r\n - ...\r\n[...]\r\n```\r\n\r\nLet's also keep in mind that extracting YAML metadata from a markdown readme is a bit more fastidious for users than just parsing a JSON file.",
"> Let's keep in mind users might rely on dataset_infos.json already.\r\n\r\nYea we'll full full backward compatibility\r\n\r\n> Let's also keep in mind that extracting YAML metadata from a markdown readme is a bit more fastidious for users than just parsing a JSON file.\r\n\r\nThe main things that may use or ingest these data IMO are:\r\n- users in the UI or IDE\r\n- `datasets` to populate `DatasetInfo` python object\r\n- moon landing which is already parsing YAML\r\n\r\nAm I missing something ? If not I think it's ok to use YAML\r\n\r\n> Might also be good to wrap the tags under a datasets_info tag as follows:\r\n\r\nMaybe one single syntax like this then ?\r\n```yaml\r\ndataset_infos:\r\n- config: unlabeled\r\n download_size: 35142551\r\n dataset_size: 89789763\r\n version: 1.0.0\r\n splits:\r\n - name: train\r\n num_examples: 10000\r\n features:\r\n - name: text\r\n dtype: string\r\n- config: labeled\r\n download_size: 35142551\r\n dataset_size: 89789763\r\n version: 1.0.0\r\n splits:\r\n - name: train\r\n num_examples: 100\r\n features:\r\n - name: text\r\n dtype: string\r\n - name: label\r\n dtype: ClassLabel\r\n names:\r\n - negative\r\n - positive\r\n```\r\nand when you have only one config\r\n```yaml\r\ndataset_infos:\r\n- config: default\r\n splits:\r\n - name: train\r\n num_examples: 10000\r\n features:\r\n - name: text\r\n dtype: string\r\n```",
"love the idea, and the trend in general to move more things (like tasks) to a single place (YAML).\r\n\r\nalso, if you browse files on a dataset's page (in \"Files and versions\"), raw `README.md` files looks nice and readable, while `.json` files are just one long line that users need to scroll. \r\n\r\n> Let's also keep in mind that extracting YAML metadata from a markdown readme is a bit more fastidious for users than just parsing a JSON file.\r\n\r\ndo users often parse `datasets_infos.json` file themselves? ",
"> do users often parse datasets_infos.json file themselves?\r\n\r\nNot AFAIK, but I'm sure there should be a few users.\r\nUsers that access these info via the `DatasetInfo` from `datasets` won't see the change though e.g.\r\n```python\r\n>> from datasets import get_datasets_infos\r\n>>> get_datasets_infos(\"squad\")\r\n{'plain_text': DatasetInfo(description='Stanford Question Answering Dataset...\r\n```",
"> Maybe one single syntax like this then ?\r\n\r\nLGTM!\r\n\r\n> The main things that may use or ingest these data IMO are:\r\n> - users in the UI or IDE\r\n> - datasets to populate DatasetInfo python object\r\n> - moon landing which is already parsing YAML\r\n\r\nFair point!\r\n\r\nHaving dataset info in the README's YAML is great for API / `huggingface_hub` consumers as well as it will be inserted in the `cardData` field out of the box ๐ฅ \r\n",
"Very supportive of this!\r\n\r\nNesting an array of configs inside `dataset_infos: ` sounds good to me. One small tweak is that `config: default` can be optional for the default config (which can be the first one by convention)\r\n\r\nWe'll be able to implement metadata validation on the Hub side so we ensure that those metadata are always in the right format (maybe for @coyotte508 ? cc @Pierrci). From a quick glance the `features` might be the harder part to validate here, any doc will be welcome.\r\n\r\n### Other high-level points:\r\n- as we move from mostly academic datasets to *all* datasets (which include the data inside the repos), my intuition is that more and more datasets (Hub-stored) are going to be **single-config**\r\n- similarly, less and less datasets will have a loading script, **just the data + some metadata**\r\n- to lower the barrier to entry to contribution, in the long term users shouldn't need to compute/update this data via a command line. It could be filled automatically on the Hub through a \"bot\" inside Discussions & Pull requests for instance.",
"re: `config: default`\r\n\r\nNote also that the default config is not named `default`, afaiu, but create from the repo name, eg: https://huggingface.co/datasets/nbtpj/bionlp2021SAS default config is `nbtpj--bionlp2021SAS` (which is awful)",
"> Note also that the default config is not named default, afaiu, but create from the repo name, eg: https://huggingface.co/datasets/nbtpj/bionlp2021SAS default config is nbtpj--bionlp2021SAS (which is awful)\r\n\r\nWe can change this to `default` I think or something else",
"> From a quick glance the features might be the harder part to validate here, any doc will be welcome.\r\n\r\nI dug into features validation, see:\r\n\r\n- the OpenAPI spec: https://github.com/huggingface/datasets-server/blob/main/chart/static-files/openapi.json#L460-L697\r\n- the node.js code: https://github.com/huggingface/moon-landing/blob/upgrade-datasets-server-client/server/lib/datasets/FeatureType.ts",
"> We can change this to default I think or something else\r\n\r\nI created https://github.com/huggingface/datasets/issues/4902 to discuss that",
"> Note also that the default config is not named `default`, afaiu, but create from the repo name\r\n\r\nin case of single-config you can even hide the config name from the UI IMO\r\n\r\n> I dug into features validation, see: the OpenAPI spec\r\n\r\nin moon-landing we use [Joi](https://joi.dev/api/) to validate metadata so we would need to generate from Joi code from the OpenAPI spec (or from somewhere else) but I guess that's doable โ or just rewrite it manually, as it won't change often",
"I remember there was an ongoing discussion on this topic:\r\n- #3507\r\n\r\nI recall some of the concerns raised on that discussion:\r\n- @lhoestq: Tensorflow Datasets catalog includes a community catalog where you can find and use HF datasets. They are using the exported dataset_infos.json files from github to get the metadata: [#3507 (comment)](https://github.com/huggingface/datasets/issues/3507#issuecomment-1056997627)\r\n- @severo: [#3507 (comment)](https://github.com/huggingface/datasets/issues/3507#issuecomment-1042779776)\r\n - the metadata header might be very long, before reaching the start of the README/dataset card. \r\n - It also somewhat prevents including large strings like the checksums\r\n - two concepts are mixed in the same file (metadata and documentation). This means that if you're interested only in one of them, you still have to know how to parse the whole file. \r\n- @severo: the future \"datasets server\" could be in charge of generating the dataset-info.json file: [#3507 (comment)](https://github.com/huggingface/datasets/issues/3507#issuecomment-1033752157)",
"Thanks for bringing these points up !\r\n\r\n> @lhoestq: Tensorflow Datasets catalog includes a community catalog where you can find and use HF datasets. They are using the exported dataset_infos.json files from github to get the metadata: https://github.com/huggingface/datasets/issues/3507#issuecomment-1056997627\r\n\r\nThe TFDS implementation is not super advanced, so it's ok IMO as long as we don't break all the dataset scripts. Note that users can still use `to_tf_dataset`.\r\n\r\nWe had a chance to discuss the two nexts points with @julien-c as well:\r\n\r\n> @severo: https://github.com/huggingface/datasets/issues/3507#issuecomment-1042779776\r\nthe metadata header might be very long, before reaching the start of the README/dataset card.\r\n\r\nIf we don't add the checksums we should be fine. We can also set a maximum number of supported configs in the README to keep it readable.\r\n\r\n> @severo: the future \"datasets server\" could be in charge of generating the dataset-info.json file: https://github.com/huggingface/datasets/issues/3507#issuecomment-1033752157\r\n\r\nI guess the \"HF Hub actions\" could open PRs to do the same in the YAML directly\r\n",
"Thanks for linking that similar discussion for context, @albertvillanova!"
] |
https://api.github.com/repos/huggingface/datasets/issues/5237 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5237/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5237/comments | https://api.github.com/repos/huggingface/datasets/issues/5237/events | https://github.com/huggingface/datasets/pull/5237 | 1,448,202,491 | PR_kwDODunzps5C2KGz | 5,237 | Encode path only for old versions of hfh | [] | closed | false | null | 1 | 2022-11-14T14:46:57Z | 2022-11-14T17:38:18Z | 2022-11-14T17:35:59Z | null | Next version of `huggingface-hub` 0.11 does encode the `path`, and we don't want to encode twice | {
"+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/5237/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5237/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/5237.diff",
"html_url": "https://github.com/huggingface/datasets/pull/5237",
"merged_at": "2022-11-14T17:35:59Z",
"patch_url": "https://github.com/huggingface/datasets/pull/5237.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/5237"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._"
] |
https://api.github.com/repos/huggingface/datasets/issues/4649 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4649/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4649/comments | https://api.github.com/repos/huggingface/datasets/issues/4649/events | https://github.com/huggingface/datasets/issues/4649 | 1,296,673,712 | I_kwDODunzps5NSauw | 4,649 | Add PAQ dataset | [
{
"color": "e99695",
"default": false,
"description": "Requesting to add a new dataset",
"id": 2067376369,
"name": "dataset request",
"node_id": "MDU6TGFiZWwyMDY3Mzc2MzY5",
"url": "https://api.github.com/repos/huggingface/datasets/labels/dataset%20request"
}
] | closed | false | null | 1 | 2022-07-07T01:29:42Z | 2022-07-14T02:06:27Z | 2022-07-14T02:06:27Z | null | ## Adding a Dataset
- **Name:** *PAQ*
- **Description:** *This repository contains code and models to support the research paperย PAQ: 65 Million Probably-Asked Questions and What You Can Do With Them*
- **Paper:** *https://arxiv.org/abs/2102.07033*
- **Data:** *https://huggingface.co/datasets/sentence-transformers/embedding-training-data/resolve/main/PAQ_pairs.jsonl.gz*
- **Motivation:** *Dataset for training and evaluating models of conversational response*
| {
"+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/4649/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4649/timeline | null | completed | null | null | false | [
"uploaded dataset [here](https://huggingface.co/datasets/embedding-data/PAQ_pairs)"
] |
https://api.github.com/repos/huggingface/datasets/issues/3466 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3466/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3466/comments | https://api.github.com/repos/huggingface/datasets/issues/3466/events | https://github.com/huggingface/datasets/pull/3466 | 1,085,722,837 | PR_kwDODunzps4wII3w | 3,466 | Add CRASS dataset | [
{
"color": "0e8a16",
"default": false,
"description": "Contribution to a dataset script",
"id": 4564477500,
"name": "dataset contribution",
"node_id": "LA_kwDODunzps8AAAABEBBmPA",
"url": "https://api.github.com/repos/huggingface/datasets/labels/dataset%20contribution"
}
] | closed | false | null | 2 | 2021-12-21T11:17:22Z | 2022-10-03T09:37:06Z | 2022-10-03T09:37:06Z | null | Added crass 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/3466/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3466/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3466.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3466",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/3466.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3466"
} | true | [
"Hi Albert,\r\nThank you for your comments.\r\nI hope I have uploaded my local git repo to include the dummy files and style reworkings.\r\nAdded YAML in Readme as well.\r\n\r\nPlease check again.\r\n\r\nHope it works now :)",
"Thanks for your contribution, @apergo-ai. \r\n\r\nWe are removing the dataset scripts from this GitHub repo and moving them to the Hugging Face Hub: https://huggingface.co/datasets\r\n\r\nWe would suggest you create this dataset there. It's OK for you? Please, feel free to tell us if you need some help."
] |
https://api.github.com/repos/huggingface/datasets/issues/152 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/152/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/152/comments | https://api.github.com/repos/huggingface/datasets/issues/152/events | https://github.com/huggingface/datasets/pull/152 | 619,971,900 | MDExOlB1bGxSZXF1ZXN0NDE5MzA4OTE2 | 152 | Add GLUE config name check | [] | closed | false | null | 5 | 2020-05-18T07:23:43Z | 2020-05-27T22:09:12Z | 2020-05-27T22:09:12Z | null | Fixes #130 by adding a name check to the Glue class | {
"+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/152/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/152/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/152.diff",
"html_url": "https://github.com/huggingface/datasets/pull/152",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/152.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/152"
} | true | [
"If tests are being added, any guidance on where to add tests would be helpful!\r\n\r\nTagging @thomwolf for review",
"Looks good to me. Is this compatible with the way we are doing tests right now @patrickvonplaten ?",
"If the tests pass it should be fine :-) \r\n\r\n@Bharat123rox could you check whether the tests pass locally via: \r\n`pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_dataset_glue`",
"The test fails with an `AssertionError` because the name is not being passed to kwargs, however I'm not sure how to do that, because only the config file is being passed to the tests of all datasets?\r\n\r\nI'm guessing this is the corresponding code:\r\nhttps://github.com/huggingface/nlp/blob/2b3621bb5c78caf02c5a969b8e67fa0c145da4e6/tests/test_dataset_common.py#L141-L143\r\n\r\nAnd these are the logs:\r\n```\r\n___________________ DatasetTest.test_load_dataset_local_glue ___________________\r\n\r\nself = <tests.test_dataset_common.DatasetTest testMethod=test_load_dataset_local_glue>\r\ndataset_name = 'glue'\r\n\r\n @local\r\n def test_load_dataset_local(self, dataset_name):\r\n # test only first config\r\n if \"/\" in dataset_name:\r\n logging.info(\"Skip {} because it is not a canonical dataset\")\r\n return\r\n\r\n configs = self.dataset_tester.load_all_configs(dataset_name, is_local=True)[:1]\r\n> self.dataset_tester.check_load_dataset(dataset_name, configs, is_local=True)\r\n\r\ntests/test_dataset_common.py:200:\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\ntests/test_dataset_common.py:74: in check_load_dataset\r\n dataset_builder = dataset_builder_cls(config=config, cache_dir=processed_temp_dir)\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\nself = <nlp.datasets.glue.fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597.glue.Glue object at 0x135c0ea90>\r\nargs = ()\r\nkwargs = {'cache_dir': '/var/folders/r6/mnw5ntvn5y72j7d4s1fm273m0000gn/T/tmpa9rpq3tl', 'config': GlueConfig(name='cola', versio...linguistic theory. Each example is a sequence of words annotated\\nwith whether it is a grammatical English sentence.')}\r\n\r\n def __init__(self, *args, **kwargs):\r\n> assert ('name' in kwargs and kwargs['name'] is not None), \"Glue has to be called with a configuration name\"\r\nE AssertionError: Glue has to be called with a configuration name\r\n\r\n/usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597/glue.py:139: AssertionError\r\n----------------------------- Captured stderr call -----------------------------\r\nINFO:nlp.load:Checking ./datasets/glue/glue.py for additional imports.\r\nINFO:filelock:Lock 5209998288 acquired on ./datasets/glue/glue.py.lock\r\nINFO:nlp.load:Found main folder for dataset ./datasets/glue/glue.py at /usr/local/lib/python3.7/site-packages/nlp/datasets/glue\r\nINFO:nlp.load:Found specific version folder for dataset ./datasets/glue/glue.py at /usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597\r\nINFO:nlp.load:Found script file from ./datasets/glue/glue.py to /usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597/glue.py\r\nINFO:nlp.load:Found dataset infos file from ./datasets/glue/dataset_infos.json to /usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597/dataset_infos.json\r\nINFO:nlp.load:Found metadata file for dataset ./datasets/glue/glue.py at /usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597/glue.json\r\nINFO:filelock:Lock 5209998288 released on ./datasets/glue/glue.py.lock\r\nINFO:nlp.load:Checking ./datasets/glue/glue.py for additional imports.\r\nINFO:filelock:Lock 5196802640 acquired on ./datasets/glue/glue.py.lock\r\nINFO:nlp.load:Found main folder for dataset ./datasets/glue/glue.py at /usr/local/lib/python3.7/site-packages/nlp/datasets/glue\r\nINFO:nlp.load:Found specific version folder for dataset ./datasets/glue/glue.py at /usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597\r\nINFO:nlp.load:Found script file from ./datasets/glue/glue.py to /usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597/glue.py\r\nINFO:nlp.load:Found dataset infos file from ./datasets/glue/dataset_infos.json to /usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597/dataset_infos.json\r\nINFO:nlp.load:Found metadata file for dataset ./datasets/glue/glue.py at /usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597/glue.json\r\nINFO:filelock:Lock 5196802640 released on ./datasets/glue/glue.py.lock\r\n------------------------------ Captured log call -------------------------------\r\nINFO nlp.load:load.py:157 Checking ./datasets/glue/glue.py for additional imports.\r\nINFO filelock:filelock.py:274 Lock 5209998288 acquired on ./datasets/glue/glue.py.lock\r\nINFO nlp.load:load.py:320 Found main folder for dataset ./datasets/glue/glue.py at /usr/local/lib/python3.7/site-packages/nlp/datasets/glue\r\nINFO nlp.load:load.py:333 Found specific version folder for dataset ./datasets/glue/glue.py at /usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597\r\nINFO nlp.load:load.py:346 Found script file from ./datasets/glue/glue.py to /usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597/glue.py\r\nINFO nlp.load:load.py:356 Found dataset infos file from ./datasets/glue/dataset_infos.json to /usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597/dataset_infos.json\r\nINFO nlp.load:load.py:367 Found metadata file for dataset ./datasets/glue/glue.py at /usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597/glue.json\r\nINFO filelock:filelock.py:318 Lock 5209998288 released on ./datasets/glue/glue.py.lock\r\nINFO nlp.load:load.py:157 Checking ./datasets/glue/glue.py for additional imports.\r\nINFO filelock:filelock.py:274 Lock 5196802640 acquired on ./datasets/glue/glue.py.lock\r\nINFO nlp.load:load.py:320 Found main folder for dataset ./datasets/glue/glue.py at /usr/local/lib/python3.7/site-packages/nlp/datasets/glue\r\nINFO nlp.load:load.py:333 Found specific version folder for dataset ./datasets/glue/glue.py at /usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597\r\nINFO nlp.load:load.py:346 Found script file from ./datasets/glue/glue.py to /usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597/glue.py\r\nINFO nlp.load:load.py:356 Found dataset infos file from ./datasets/glue/dataset_infos.json to /usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597/dataset_infos.json\r\nINFO nlp.load:load.py:367 Found metadata file for dataset ./datasets/glue/glue.py at /usr/local/lib/python3.7/site-packages/nlp/datasets/glue/fa7c9f982200144186b2831060b54199cf028e4bbdc5f40acd339ee343342597/glue.json\r\nINFO filelock:filelock.py:318 Lock 5196802640 released on ./datasets/glue/glue.py.lock\r\n```",
"Closing as #130 is fixed !"
] |
https://api.github.com/repos/huggingface/datasets/issues/2028 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2028/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2028/comments | https://api.github.com/repos/huggingface/datasets/issues/2028/events | https://github.com/huggingface/datasets/pull/2028 | 828,721,393 | MDExOlB1bGxSZXF1ZXN0NTkwNDk1NzEx | 2,028 | Adding PersiNLU reading-comprehension | [] | closed | false | null | 3 | 2021-03-11T04:41:13Z | 2021-03-15T09:39:57Z | 2021-03-15T09:39:57Z | 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/2028/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2028/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2028.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2028",
"merged_at": "2021-03-15T09:39:57Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2028.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2028"
} | true | [
"@lhoestq I think I have addressed all your comments. ",
"Thanks! @lhoestq Let me know if you want me to address anything to get this merged. ",
"It's all good thanks ;)\r\nmerging"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/3316 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3316/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3316/comments | https://api.github.com/repos/huggingface/datasets/issues/3316/events | https://github.com/huggingface/datasets/issues/3316 | 1,062,185,822 | I_kwDODunzps4_T6te | 3,316 | Add RedCaps 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"
}
] | closed | false | null | 0 | 2021-11-24T09:23:02Z | 2022-01-12T14:13:15Z | 2022-01-12T14:13:15Z | null | ## Adding a Dataset
- **Name:** RedCaps
- **Description:** Web-curated image-text data created by the people, for the people
- **Paper:** https://arxiv.org/abs/2111.11431
- **Data:** https://redcaps.xyz/
- **Motivation:** Multimodal image-text dataset: 12M+ Image-text pairs
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
Proposed by @patil-suraj | {
"+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/3316/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3316/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/huggingface/datasets/issues/3697 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3697/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3697/comments | https://api.github.com/repos/huggingface/datasets/issues/3697/events | https://github.com/huggingface/datasets/pull/3697 | 1,129,795,724 | PR_kwDODunzps4yXeXo | 3,697 | Add code-fill datasets for pretraining/finetuning/evaluating | [] | closed | false | null | 1 | 2022-02-10T10:31:48Z | 2022-07-06T15:19:58Z | 2022-07-06T15:19:58Z | 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/3697/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3697/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3697.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3697",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/3697.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3697"
} | true | [
"Hi ! Thanks for adding this dataset :)\r\n\r\nIt looks like your PR contains many changes in files that are unrelated to your changes, I think it might come from running `make style` with an outdated version of `black`. Could you try opening a new PR that only contains your additions ? (or force push to this PR)"
] |
https://api.github.com/repos/huggingface/datasets/issues/4251 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4251/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4251/comments | https://api.github.com/repos/huggingface/datasets/issues/4251/events | https://github.com/huggingface/datasets/pull/4251 | 1,219,116,354 | PR_kwDODunzps4293dB | 4,251 | Metric card for the XTREME-S dataset | [] | closed | false | null | 1 | 2022-04-28T18:32:19Z | 2022-04-29T16:46:11Z | 2022-04-29T16:38:46Z | null | Proposing a metric card for the XTREME-S dataset :hugs: | {
"+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/4251/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4251/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/4251.diff",
"html_url": "https://github.com/huggingface/datasets/pull/4251",
"merged_at": "2022-04-29T16:38:46Z",
"patch_url": "https://github.com/huggingface/datasets/pull/4251.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/4251"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._"
] |
https://api.github.com/repos/huggingface/datasets/issues/4678 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4678/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4678/comments | https://api.github.com/repos/huggingface/datasets/issues/4678/events | https://github.com/huggingface/datasets/issues/4678 | 1,303,741,432 | I_kwDODunzps5NtYP4 | 4,678 | Cant pass streaming dataset to dataloader after take() | [
{
"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 | 1 | 2022-07-13T17:34:18Z | 2022-07-14T13:07:21Z | null | null | ## Describe the bug
I am trying to pass a streaming version of c4 to a dataloader, but it can't be passed after I call `dataset.take(n)`. Some functions such as `shuffle()` can be applied without breaking the dataloader but not take.
## Steps to reproduce the bug
```python
import datasets
import torch
dset = datasets.load_dataset(path='c4', name='en', split="train", streaming=True)
dset = dset.take(50_000)
dset = dset.with_format("torch")
num_workers = 8
batch_size = 512
loader = torch.utils.data.DataLoader(dataset=dset,
batch_size=batch_size,
num_workers=num_workers)
for batch in loader:
...
```
## Expected results
No error thrown when iterating over the dataloader
## Actual results
Original Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/usr/local/lib/python3.9/dist-packages/torch/utils/data/_utils/fetch.py", line 32, in fetch
data.append(next(self.dataset_iter))
File "/root/.local/lib/python3.9/site-packages/datasets/formatting/dataset_wrappers/torch_iterable_dataset.py", line 48, in __iter__
for key, example in self._iter_shard(shard_idx):
File "/root/.local/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 586, in _iter_shard
yield from ex_iterable.shard_data_sources(shard_idx)
File "/root/.local/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 60, in shard_data_sources
raise NotImplementedError(f"{type(self)} doesn't implement shard_data_sources yet")
NotImplementedError: <class 'datasets.iterable_dataset.TakeExamplesIterable'> doesn't implement shard_data_sources yet
## Environment info
- `datasets` version: 2.3.2
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.31
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 1,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/huggingface/datasets/issues/4678/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4678/timeline | null | null | null | null | false | [
"Hi! Calling `take` on an iterable/streamable dataset makes it not possible to shard the dataset, which in turn disables multi-process loading (attempts to split the workload over the shards), so to go past this limitation, you can either use single-process loading in `DataLoader` (`num_workers=None`) or fetch the first `50_000/batch_size` batches in the loop."
] |
https://api.github.com/repos/huggingface/datasets/issues/4518 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4518/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4518/comments | https://api.github.com/repos/huggingface/datasets/issues/4518/events | https://github.com/huggingface/datasets/pull/4518 | 1,274,010,628 | PR_kwDODunzps45zMnB | 4,518 | Patch tests for hfh v0.8.0 | [] | closed | false | null | 1 | 2022-06-16T19:45:32Z | 2022-06-17T16:15:57Z | 2022-06-17T16:06:07Z | null | This PR patches testing utilities that would otherwise fail with hfh v0.8.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/4518/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4518/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/4518.diff",
"html_url": "https://github.com/huggingface/datasets/pull/4518",
"merged_at": "2022-06-17T16:06:07Z",
"patch_url": "https://github.com/huggingface/datasets/pull/4518.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/4518"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._"
] |
https://api.github.com/repos/huggingface/datasets/issues/5654 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/5654/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/5654/comments | https://api.github.com/repos/huggingface/datasets/issues/5654/events | https://github.com/huggingface/datasets/issues/5654 | 1,633,523,705 | I_kwDODunzps5hXZf5 | 5,654 | Offset overflow when executing Dataset.map | [] | open | false | null | 2 | 2023-03-21T09:33:27Z | 2023-03-21T10:32:07Z | null | null | ### Describe the bug
Hi, I'm trying to use `.map` method to cache multiple random crops from the image to speed up data processing during training, as the image size is too big.
The map function executes all iterations, and then returns the following error:
```bash
Traceback (most recent call last):
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3353, in _map_single
writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 582, in finalize
self.write_examples_on_file()
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 446, in write_examples_on_file
self.write_batch(batch_examples=batch_examples)
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 555, in write_batch
self.write_table(pa_table, writer_batch_size)
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 567, in write_table
pa_table = pa_table.combine_chunks()
File "pyarrow/table.pxi", line 3315, in pyarrow.lib.Table.combine_chunks
File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: offset overflow while concatenating arrays
```
Here is the minimal code (`/home/datasets/DIV2K_train_HR` is just a folder of images that can be replaced by any appropriate):
### Steps to reproduce the bug
```python
from glob import glob
import torch
from datasets import Dataset, Image
from torchvision.transforms import PILToTensor, RandomCrop
file_paths = glob("/home/datasets/DIV2K_train_HR/*")
to_tensor = PILToTensor()
crop_transf = RandomCrop(size=256)
def prepare_data(example):
tensor = to_tensor(example["image"].convert("RGB"))
return {"hr": torch.stack([crop_transf(tensor) for _ in range(25)])}
train_data = Dataset.from_dict({"image": file_paths}).cast_column("image", Image())
train_data = train_data.map(
prepare_data,
cache_file_name="/home/datasets/DIV2K_train_HR_crops.tmp",
desc="Caching multiple random crops of image",
remove_columns="image",
)
print(train_data[0].keys(), train_data[0]["hr"].shape)
```
### Expected behavior
Cached file is stored at `"/home/datasets/DIV2K_train_HR_crops.tmp"`, output is `dict_keys(['hr']) torch.Size([25, 3, 256, 256])`
### Environment info
- `datasets` version: 2.10.1
- Platform: Linux-5.15.0-67-generic-x86_64-with-glibc2.10
- Python version: 3.8.16
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Pytorch version: 2.0.0+cu117
- torchvision version: 0.15.1+cu117 | {
"+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/5654/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/5654/timeline | null | null | null | null | false | [
"Upd. the above code works if we replace `25` with `1`, but the result value at key \"hr\" is not a tensor but a list of lists of lists of uint8.\r\n\r\nAdding `train_data.set_format(\"torch\")` after map fixes this, but the original issue remains\r\n\r\n",
"As a workaround, one can replace\r\n`return {\"hr\": torch.stack([crop_transf(tensor) for _ in range(25)])}`\r\nwith\r\n`return {f\"hr_crop_{i}\": crop_transf(tensor) for i in range(25)}`\r\nand then choose appropriate crop randomly in further processing, but I still don't understand why the original approach doesn't work(\r\n"
] |
https://api.github.com/repos/huggingface/datasets/issues/1546 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1546/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1546/comments | https://api.github.com/repos/huggingface/datasets/issues/1546/events | https://github.com/huggingface/datasets/pull/1546 | 765,559,923 | MDExOlB1bGxSZXF1ZXN0NTM4OTkwMjgw | 1,546 | Add persian ner dataset | [] | closed | false | null | 3 | 2020-12-13T17:45:48Z | 2020-12-23T09:53:03Z | 2020-12-23T09:53:03Z | null | Adding the following dataset:
https://github.com/HaniehP/PersianNER
| {
"+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/1546/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1546/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1546.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1546",
"merged_at": "2020-12-23T09:53:03Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1546.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1546"
} | true | [
"HI @SBrandeis. Thanks for all the comments - very helpful. I realised that the tests had failed and had been trying to figure out what was causing them to do so. All the tests pass when I run the load_real_dataset test however when I run `RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_dataset_all_configs_persian_ner` I get the below error. One thing to note is that the automated dummy data file generation failed when I tried to run it so I manually created the dummy data and ensured that the last line in the file was an empty line as per your comments. Would appreciate your thoughts on what might be causing this:\r\n\r\n```\r\n__________________________________________________ LocalDatasetTest.test_load_dataset_all_configs_persian_ner __________________________________________________\r\n\r\nself = <tests.test_dataset_common.LocalDatasetTest testMethod=test_load_dataset_all_configs_persian_ner>, dataset_name = 'persian_ner'\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--------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------\r\nDownloading and preparing dataset persian_ner/fold1 (download: 1.00 MiB, generated: 1.00 MiB, post-processed: Unknown size, total: 2.00 MiB) to /var/folders/nk/yp5_m5c95cnc0cm_vbd7h7g80000gn/T/tmpzh495aac/persian_ner/fold1/1.1.0...\r\nDataset persian_ner downloaded and prepared to /var/folders/nk/yp5_m5c95cnc0cm_vbd7h7g80000gn/T/tmpzh495aac/persian_ner/fold1/1.1.0. Subsequent calls will reuse this data.\r\n--------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------\r\n \r\n======================================================================= warnings summary =======================================================================\r\nenv/lib/python3.7/site-packages/tensorflow/python/autograph/utils/testing.py:21\r\n /Users/karimfoda/Documents/STUDIES/PYTHON/DATASETS/env/lib/python3.7/site-packages/tensorflow/python/autograph/utils/testing.py:21: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses\r\n import imp\r\n\r\nenv/lib/python3.7/site-packages/apache_beam/typehints/typehints.py:693\r\n /Users/karimfoda/Documents/STUDIES/PYTHON/DATASETS/env/lib/python3.7/site-packages/apache_beam/typehints/typehints.py:693: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working\r\n if not isinstance(type_params, collections.Iterable):\r\n\r\nenv/lib/python3.7/site-packages/apache_beam/typehints/typehints.py:532\r\n /Users/karimfoda/Documents/STUDIES/PYTHON/DATASETS/env/lib/python3.7/site-packages/apache_beam/typehints/typehints.py:532: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working\r\n if not isinstance(type_params, (collections.Sequence, set)):\r\n\r\nenv/lib/python3.7/site-packages/elasticsearch/compat.py:38\r\n /Users/karimfoda/Documents/STUDIES/PYTHON/DATASETS/env/lib/python3.7/site-packages/elasticsearch/compat.py:38: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working\r\n from collections import Mapping\r\n\r\n-- Docs: https://docs.pytest.org/en/stable/warnings.html\r\n=================================================================== short test summary info ====================================================================\r\nFAILED tests/test_dataset_common.py::LocalDatasetTest::test_load_dataset_all_configs_persian_ner - AssertionError: False is not true\r\n```",
"Thanks @SBrandeis. It turns out the error was because I had to manually increase the n_lines variable to get the dummy data generation to cover at least one example. Should all be working okay now.",
"Great, thanks!\r\nIt looks good to me, I'll let @lhoestq take over"
] |
https://api.github.com/repos/huggingface/datasets/issues/1059 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1059/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1059/comments | https://api.github.com/repos/huggingface/datasets/issues/1059/events | https://github.com/huggingface/datasets/pull/1059 | 756,348,623 | MDExOlB1bGxSZXF1ZXN0NTMxOTA3ODYy | 1,059 | Add TLC | [] | closed | false | null | 3 | 2020-12-03T16:23:06Z | 2020-12-04T11:15:33Z | 2020-12-04T11:15:33Z | null | Added TLC 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/1059/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1059/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1059.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1059",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/1059.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1059"
} | true | [
"I have reduced the size of the dummy file and added README sections as you suggested. ",
"I have a little issue to run the test. It seems there is no failed case in my machine. ",
"Thanks !\r\nIt looks like the PR includes changes to many other files than the ones of `tlc`, can you create another branch and another PR ?"
] |
https://api.github.com/repos/huggingface/datasets/issues/2186 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2186/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2186/comments | https://api.github.com/repos/huggingface/datasets/issues/2186/events | https://github.com/huggingface/datasets/pull/2186 | 852,840,819 | MDExOlB1bGxSZXF1ZXN0NjExMDMxNzE0 | 2,186 | GEM: new challenge sets | [] | closed | false | null | 1 | 2021-04-07T21:39:07Z | 2021-04-07T21:56:35Z | 2021-04-07T21:56:35Z | null | This PR updates the GEM dataset to:
- remove extraneous fields in WikiAuto after https://github.com/huggingface/datasets/pull/2171 fixed the source
- add context and services to Schema Guided Dialog
- Add new or update challenge sets for MLSUM ES and DE, XSUM, and SGD | {
"+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/2186/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2186/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2186.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2186",
"merged_at": "2021-04-07T21:56:35Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2186.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2186"
} | true | [
"cc @sebastiangehrmann"
] |
https://api.github.com/repos/huggingface/datasets/issues/4904 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/4904/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/4904/comments | https://api.github.com/repos/huggingface/datasets/issues/4904/events | https://github.com/huggingface/datasets/pull/4904 | 1,353,002,837 | PR_kwDODunzps4959Ad | 4,904 | [LibriSpeech] Fix dev split local_extracted_archive for 'all' config | [] | closed | false | null | 2 | 2022-08-27T10:04:57Z | 2022-08-30T10:06:21Z | 2022-08-30T10:03:25Z | null | We define the keys for the `_DL_URLS` of the dev split as `dev.clean` and `dev.other`:
https://github.com/huggingface/datasets/blob/2e7142a3c6500b560da45e8d5128e320a09fcbd4/datasets/librispeech_asr/librispeech_asr.py#L60-L61
These keys get forwarded to the `dl_manager` and thus the `local_extracted_archive`.
However, when calling `SplitGenerator` for the dev sets, we query the `local_extracted_archive` keys `validation.clean` and `validation.other`:
https://github.com/huggingface/datasets/blob/2e7142a3c6500b560da45e8d5128e320a09fcbd4/datasets/librispeech_asr/librispeech_asr.py#L212
https://github.com/huggingface/datasets/blob/2e7142a3c6500b560da45e8d5128e320a09fcbd4/datasets/librispeech_asr/librispeech_asr.py#L219
The consequence of this is that the `local_extracted_archive` arg passed to `_generate_examples` is always `None`, as the keys `validation.clean` and `validation.other` do not exists in the `local_extracted_archive`.
When defining the `audio_file` in `_generate_examples`, since `local_extracted_archive` is always `None`, we always omit the `local_extracted_archive` path from the `audio_file` path, **even** if in non-streaming mode:
https://github.com/huggingface/datasets/blob/2e7142a3c6500b560da45e8d5128e320a09fcbd4/datasets/librispeech_asr/librispeech_asr.py#L259-L263
Thus, `audio_file` will only ever be the streaming path (`audio_file`, not `os.path.join(local_extracted_archive, audio_file)`).
This PR fixes the `.get()` keys for the `local_extracted_archive` for the dev splits.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/4904/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/4904/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/4904.diff",
"html_url": "https://github.com/huggingface/datasets/pull/4904",
"merged_at": "2022-08-30T10:03:25Z",
"patch_url": "https://github.com/huggingface/datasets/pull/4904.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/4904"
} | true | [
"_The documentation is not available anymore as the PR was closed or merged._",
"This PR fixes a bug introduced in:\r\n- #4184"
] |
https://api.github.com/repos/huggingface/datasets/issues/2471 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2471/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2471/comments | https://api.github.com/repos/huggingface/datasets/issues/2471/events | https://github.com/huggingface/datasets/issues/2471 | 917,067,165 | MDU6SXNzdWU5MTcwNjcxNjU= | 2,471 | Fix PermissionError on Windows when using tqdm >=4.50.0 | [
{
"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 | {
"closed_at": "2021-07-09T05:50:07Z",
"closed_issues": 12,
"created_at": "2021-05-31T16:13:06Z",
"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-07-08T07:00:00Z",
"html_url": "https://github.com/huggingface/datasets/milestone/5",
"id": 6808903,
"labels_url": "https://api.github.com/repos/huggingface/datasets/milestones/5/labels",
"node_id": "MDk6TWlsZXN0b25lNjgwODkwMw==",
"number": 5,
"open_issues": 0,
"state": "closed",
"title": "1.9",
"updated_at": "2021-07-12T14:12:00Z",
"url": "https://api.github.com/repos/huggingface/datasets/milestones/5"
} | 0 | 2021-06-10T08:31:49Z | 2021-06-11T15:11:50Z | 2021-06-11T15:11:50Z | null | See: https://app.circleci.com/pipelines/github/huggingface/datasets/235/workflows/cfb6a39f-68eb-4802-8b17-2cd5e8ea7369/jobs/1111
```
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process
``` | {
"+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/2471/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2471/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/huggingface/datasets/issues/3837 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3837/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3837/comments | https://api.github.com/repos/huggingface/datasets/issues/3837/events | https://github.com/huggingface/datasets/pull/3837 | 1,161,109,031 | PR_kwDODunzps40BwE1 | 3,837 | Release: 1.18.4 | [] | closed | false | null | 0 | 2022-03-07T09:13:29Z | 2022-03-07T11:07:35Z | 2022-03-07T11:07:02Z | null | null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/3837/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3837/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3837.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3837",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/3837.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3837"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/616 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/616/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/616/comments | https://api.github.com/repos/huggingface/datasets/issues/616/events | https://github.com/huggingface/datasets/issues/616 | 699,462,293 | MDU6SXNzdWU2OTk0NjIyOTM= | 616 | UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors | [] | open | false | null | 14 | 2020-09-11T15:39:16Z | 2021-07-22T21:12:21Z | null | null | I am trying out the library and want to load in pickled data with `from_dict`. In that dict, one column `text` should be tokenized and the other (an embedding vector) should be retained. All other columns should be removed. When I eventually try to set the format for the columns with `set_format` I am getting this strange Userwarning without a stack trace:
> Set __getitem__(key) output type to torch for ['input_ids', 'sembedding'] columns (when key is int or slice) and don't output other (un-formatted) columns.
> C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\datasets\arrow_dataset.py:835: UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors. This means you can write to the underlying (supposedly non-writeable) NumPy array using the tensor. You may want to copy the array to protect its data or make it writeable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at ..\torch\csrc\utils\tensor_numpy.cpp:141.)
> return torch.tensor(x, **format_kwargs)
The first one might not be related to the warning, but it is odd that it is shown, too. It is unclear whether that is something that I should do or something that that the program is doing at that moment.
Snippet:
```
dataset = Dataset.from_dict(torch.load("data/dummy.pt.pt"))
print(dataset)
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
keys_to_retain = {"input_ids", "sembedding"}
dataset = dataset.map(lambda example: tokenizer(example["text"], padding='max_length'), batched=True)
dataset.remove_columns_(set(dataset.column_names) - keys_to_retain)
dataset.set_format(type="torch", columns=["input_ids", "sembedding"])
dataloader = torch.utils.data.DataLoader(dataset, batch_size=2)
print(next(iter(dataloader)))
```
PS: the input type for `remove_columns_` should probably be an Iterable rather than just a List. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 4,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 4,
"url": "https://api.github.com/repos/huggingface/datasets/issues/616/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/616/timeline | null | null | null | null | false | [
"I have the same issue",
"Same issue here when Trying to load a dataset from disk.",
"I am also experiencing this issue, and don't know if it's affecting my training.",
"Same here. I hope the dataset is not being modified in-place.",
"I think the only way to avoid this warning would be to do a copy of the numpy array before providing it.\r\n\r\nThis would slow down a bit the iteration over the dataset but maybe it would be safer. We could disable the copy with a flag on the `set_format` command.\r\n\r\nIn most typical cases of training a NLP model, PyTorch shouldn't modify the input so it's ok to have a non-writable array but I can understand the warning is a bit scary so maybe we could choose the side of non-warning/slower by default and have an option to speedup.\r\n\r\nWhat do you think @lhoestq ? ",
"@thomwolf Would it be possible to have the array look writeable, but raise an error if it is actually written to?\r\n\r\nI would like to keep my code free of warning, but I also wouldn't like to slow down the program because of unnecessary copy operations. ",
"@AndreasMadsen probably not I would guess (no free lunch hahah)",
"@thomwolf Why not? Writable is checked with `arr.flags.writeable`, and writing is done via magic methods.",
"Well because I don't know the internal of numpy as well as you I guess hahahah, do you want to try to open a PR proposing a solution?",
"@thomwolf @AndreasMadsen I think this is a terrible idea, n/o, and I am very much against it. Modifying internals of an array in such a hacky way is bound to run into other (user) issues down the line. To users it would not be clear at all what is going on e.g. when they check for write access (which will return True) but then they get a warning that the array is not writeable. That's extremely confusing. \r\n\r\nIf your only goal is to get rid of warnings in your code, then you can just use a [simplefilter](https://docs.python.org/3.8/library/warnings.html#temporarily-suppressing-warnings) for UserWarnings in your own code. Changing the code-base in such an intuitive way does not seem like a good way to go and sets a bad precedent, imo. \r\n\r\n(Feel free to disagree, of course.)\r\n\r\nIMO a warning can stay (as they can be filtered by users anyway), but it can be clarified why the warning takes place.",
"> To users it would not be clear at all what is going on e.g. when they check for write access (which will return True) but then they get a warning that the array is not writeable. That's extremely confusing.\r\n\r\nConfusion can be resolved with a helpful error message. In this case, that error message can be controlled by huggingface/datasets. The right argument here is that if code depends on `.flags.writable` being truthful (not just for warnings), then it will cause unavoidable errors. Although, I can't imagine such a use-case.\r\n\r\n> If your only goal is to get rid of warnings in your code, then you can just use a simplefilter for UserWarnings in your own code. Changing the code-base in such an intuitive way does not seem like a good way to go and sets a bad precedent, imo.\r\n\r\nI don't want to ignore all `UserWarnings`, nor all warnings regarding non-writable arrays. Ignoring warnings leads to hard to debug issues.\r\n\r\n> IMO a warning can stay (as they can be filtered by users anyway), but it can be clarified why the warning takes place.\r\n\r\nPlain use cases should really not generate warnings. It teaches developers to ignore warnings which is a terrible practice.\r\n\r\n---\r\n\r\nThe best solution would be to allow non-writable arrays in `DataLoader`, but that is a PyTorch issue.",
"> The right argument here is that if code depends on `.flags.writable` being truthful (not just for warnings), then it will cause unavoidable errors. Although, I can't imagine such a use-case.\r\n\r\nThat's exactly the argument in my first sentence. Too often someone \"cannot think of a use-case\", but you can not foresee the use-cases of a whole research community.\r\n \r\n> I don't want to ignore all `UserWarnings`, nor all warnings regarding non-writable arrays. Ignoring warnings leads to hard to debug issues.\r\n\r\nThat's fair.\r\n\r\n> Plain use cases should really not generate warnings. It teaches developers to ignore warnings which is a terrible practice.\r\n\r\nBut this is not a plain use-case (because Pytorch does not support these read-only tensors). Manually setting the flag to writable will solve the issue on the surface but is basically just a hack to compensate for something that is not allowed in another library. \r\n\r\nWhat about an \"ignore_warnings\" flag in `set_format` that when True wraps the offending code in a block to ignore userwarnings at that specific step in [_convert_outputs](https://github.com/huggingface/datasets/blob/880c2c76a8223a00c303eab2909371e857113063/src/datasets/arrow_dataset.py#L821)? Something like:\r\n\r\n```python\r\ndef _convert_outputs(..., ignore_warnings=True):\r\n ...\r\n with warnings.catch_warnings():\r\n if ignore_warnings:\r\n warnings.simplefilter(\"ignore\", UserWarning)\r\n return torch.tensor(...)\r\n# continues without warning filter after context manager...\r\n```",
"> But this is not a plain use-case (because Pytorch does not support these read-only tensors).\r\n\r\nBy \"plain\", I mean the recommended way to use `datasets` with PyTorch according to the `datasets` documentation.",
"This error is what I see when I run the first lines of the Pytorch Quickstart. It should also say that it should be ignored and/or how to fix it. BTW, this is a Pytorch error message -- not a Huggingface error message. My code runs anyway."
] |
https://api.github.com/repos/huggingface/datasets/issues/2016 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/2016/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/2016/comments | https://api.github.com/repos/huggingface/datasets/issues/2016/events | https://github.com/huggingface/datasets/pull/2016 | 825,965,493 | MDExOlB1bGxSZXF1ZXN0NTg4MDA5NjEz | 2,016 | Not all languages have 2 digit codes. | [] | closed | false | null | 0 | 2021-03-09T13:53:39Z | 2021-03-11T18:01:03Z | 2021-03-11T18:01:03Z | 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/2016/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/2016/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/2016.diff",
"html_url": "https://github.com/huggingface/datasets/pull/2016",
"merged_at": "2021-03-11T18:01:03Z",
"patch_url": "https://github.com/huggingface/datasets/pull/2016.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/2016"
} | true | [] |
https://api.github.com/repos/huggingface/datasets/issues/3605 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/3605/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/3605/comments | https://api.github.com/repos/huggingface/datasets/issues/3605/events | https://github.com/huggingface/datasets/pull/3605 | 1,108,738,561 | PR_kwDODunzps4xS9rX | 3,605 | Adding Turkic X-WMT evaluation set for machine translation | [] | closed | false | null | 5 | 2022-01-20T01:40:29Z | 2022-01-31T09:50:57Z | 2022-01-31T09:50:57Z | null | This dataset is a human-translated evaluation set for MT crowdsourced and provided by the [Turkic Interlingua ](turkic-interlingua.org) community. It contains eval sets for 8 Turkic languages covering 88 language directions. Languages being covered are:
Azerbaijani (az)
Bashkir (ba)
English (en)
Karakalpak (kaa)
Kazakh (kk)
Kirghiz (ky)
Russian (ru)
Turkish (tr)
Sakha (sah)
Uzbek (uz)
More info about the corpus is here: [https://github.com/turkic-interlingua/til-mt/tree/master/xwmt](https://github.com/turkic-interlingua/til-mt/tree/master/xwmt)
A paper describing the test set is here: [https://arxiv.org/abs/2109.04593](https://arxiv.org/abs/2109.04593)
| {
"+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/3605/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/3605/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/3605.diff",
"html_url": "https://github.com/huggingface/datasets/pull/3605",
"merged_at": "2022-01-31T09:50:57Z",
"patch_url": "https://github.com/huggingface/datasets/pull/3605.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3605"
} | true | [
"hi! Thank you for all the comments! I believe I addressed them all. Let me know if there is anything else",
"Hi there! I was wondering if there is anything else to change before this can be merged",
"@lhoestq Hi! Just a gentle reminder about the steps to merge this one! ",
"Thanks for the heads up ! I think I fixed the last issue with the YAML tags",
"The CI failure is unrelated to this PR and fixed on master, let's merge :)\r\n\r\nThanks a lot !"
] |
https://api.github.com/repos/huggingface/datasets/issues/1499 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/1499/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/1499/comments | https://api.github.com/repos/huggingface/datasets/issues/1499/events | https://github.com/huggingface/datasets/pull/1499 | 763,464,693 | MDExOlB1bGxSZXF1ZXN0NTM3OTIyNjA3 | 1,499 | update the dataset id_newspapers_2018 | [] | closed | false | null | 0 | 2020-12-12T08:47:12Z | 2020-12-14T15:28:07Z | 2020-12-14T15:28:07Z | null | Hi, I need to update the link to the dataset. The link in the previous PR was to a small test dataset. 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/1499/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/1499/timeline | null | null | false | {
"diff_url": "https://github.com/huggingface/datasets/pull/1499.diff",
"html_url": "https://github.com/huggingface/datasets/pull/1499",
"merged_at": "2020-12-14T15:28:07Z",
"patch_url": "https://github.com/huggingface/datasets/pull/1499.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/1499"
} | true | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.