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
2.32B
| node_id
stringlengths 18
32
| number
int64 1
6.92k
| title
stringlengths 1
290
| user
dict | labels
listlengths 0
4
| state
stringclasses 2
values | locked
bool 1
class | assignee
dict | assignees
listlengths 0
4
| milestone
dict | comments
sequencelengths 0
28
| created_at
unknown | updated_at
unknown | closed_at
unknown | author_association
stringclasses 4
values | active_lock_reason
float64 | body
stringlengths 0
228k
⌀ | reactions
dict | timeline_url
stringlengths 67
70
| performed_via_github_app
float64 | state_reason
stringclasses 3
values | draft
float64 0
1
⌀ | pull_request
dict | is_pull_request
bool 2
classes |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://api.github.com/repos/huggingface/datasets/issues/6924 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6924/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6924/comments | https://api.github.com/repos/huggingface/datasets/issues/6924/events | https://github.com/huggingface/datasets/issues/6924 | 2,320,531,015 | I_kwDODunzps6KUH5H | 6,924 | Caching map result of DatasetDict. | {
"avatar_url": "https://avatars.githubusercontent.com/u/56939432?v=4",
"events_url": "https://api.github.com/users/MostHumble/events{/privacy}",
"followers_url": "https://api.github.com/users/MostHumble/followers",
"following_url": "https://api.github.com/users/MostHumble/following{/other_user}",
"gists_url": "https://api.github.com/users/MostHumble/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MostHumble",
"id": 56939432,
"login": "MostHumble",
"node_id": "MDQ6VXNlcjU2OTM5NDMy",
"organizations_url": "https://api.github.com/users/MostHumble/orgs",
"received_events_url": "https://api.github.com/users/MostHumble/received_events",
"repos_url": "https://api.github.com/users/MostHumble/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MostHumble/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MostHumble/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MostHumble"
} | [] | open | false | null | [] | null | [] | "2024-05-28T09:07:41" | "2024-05-28T09:07:41" | null | NONE | null | Hi!
I'm currenty using the map function to tokenize a somewhat large dataset, so I need to use the cache to save ~25 mins.
Changing num_proc incduces the recomputation of the map, I'm not sure why and if this is excepted behavior?
here it says, that cached files are loaded sequentially:
https://github.com/huggingface/datasets/blob/bb2664cf540d5ce4b066365e7c8b26e7f1ca4743/src/datasets/arrow_dataset.py#L3005-L3006
it seems like I can pass in a fingerprint, and load it directly:
https://github.com/huggingface/datasets/blob/bb2664cf540d5ce4b066365e7c8b26e7f1ca4743/src/datasets/arrow_dataset.py#L3108-L3125
**Environment Setup:**
- Python 3.11.9
- datasets 2.19.1 conda-forge
- Linux 6.1.83-1.el9.elrepo.x86_64
**MRE**
```python
fixed raw_datasets
fixed tokenize_function
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=9,
remove_columns=['text'],
load_from_cache_file= True,
desc="Running tokenizer on dataset line_by_line",
)
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=5,
remove_columns=['text'],
load_from_cache_file= True,
desc="Running tokenizer on dataset line_by_line",
)
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6924/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6924/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6923 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6923/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6923/comments | https://api.github.com/repos/huggingface/datasets/issues/6923/events | https://github.com/huggingface/datasets/issues/6923 | 2,319,292,872 | I_kwDODunzps6KPZnI | 6,923 | Export Parquet Tablet Audio-Set is null bytes in Arrow | {
"avatar_url": "https://avatars.githubusercontent.com/u/140120605?v=4",
"events_url": "https://api.github.com/users/anioji/events{/privacy}",
"followers_url": "https://api.github.com/users/anioji/followers",
"following_url": "https://api.github.com/users/anioji/following{/other_user}",
"gists_url": "https://api.github.com/users/anioji/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/anioji",
"id": 140120605,
"login": "anioji",
"node_id": "U_kgDOCFoSHQ",
"organizations_url": "https://api.github.com/users/anioji/orgs",
"received_events_url": "https://api.github.com/users/anioji/received_events",
"repos_url": "https://api.github.com/users/anioji/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/anioji/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/anioji/subscriptions",
"type": "User",
"url": "https://api.github.com/users/anioji"
} | [] | open | false | null | [] | null | [] | "2024-05-27T14:27:57" | "2024-05-27T14:27:57" | null | NONE | null | ### Describe the bug
Exporting the processed audio inside the table with the dataset.to_parquet function, the object pyarrow {bytes: null, path: "Some/Path"}
At the same time, the same dataset uploaded to the hub has bit arrays
![Screenshot from 2024-05-27 19-14-49](https://github.com/huggingface/datasets/assets/140120605/ddfba089-426f-4659-9df4-7a634c948b9e)
![Screenshot from 2024-05-27 19-12-51](https://github.com/huggingface/datasets/assets/140120605/4cf8c0a1-650e-491b-86c8-b475c284a021)
### Steps to reproduce the bug
1.Get dataset from audio and cast it
2.Export and push dataset
3.It’s scary to be indignant at the difference in the uploaded dataset and the fact that it was saved locally
```py
from datasets import Dataset, Audio
df = Dataset.from_csv("./datasets.csv")
df = df.cast_column("audio", Audio(16000))
df.to_parquet("./datasets.parquet")
df.push_to_hub(repo_id="************", token="**********************")
```
You can use "try replicate case" for this
[replicate_packet.zip](https://github.com/huggingface/datasets/files/15457114/replicate_packet.zip)
### Expected behavior
Two parquet tables identical in content. It is obvious?
### Environment info
Python 3.11+ (I try did it in 3.12 and got same result ) | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6923/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6923/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6922 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6922/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6922/comments | https://api.github.com/repos/huggingface/datasets/issues/6922/events | https://github.com/huggingface/datasets/pull/6922 | 2,318,602,059 | PR_kwDODunzps5wolTm | 6,922 | Remove torchaudio remnants from code | {
"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"
} | [] | closed | false | null | [] | null | [] | "2024-05-27T08:45:07" | "2024-05-27T09:08:19" | "2024-05-27T08:59:21" | MEMBER | null | Remove torchaudio remnants from code.
Follow-up on:
- #5573 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6922/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6922/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6922.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6922",
"merged_at": "2024-05-27T08:59:21Z",
"patch_url": "https://github.com/huggingface/datasets/pull/6922.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6922"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6921 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6921/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6921/comments | https://api.github.com/repos/huggingface/datasets/issues/6921/events | https://github.com/huggingface/datasets/pull/6921 | 2,318,394,398 | PR_kwDODunzps5wn4Dz | 6,921 | Support fsspec 2024.5.0 | {
"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"
} | [] | closed | false | null | [] | null | [] | "2024-05-27T07:00:59" | "2024-05-27T08:07:16" | "2024-05-27T08:01:08" | MEMBER | null | Support fsspec 2024.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/6921/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6921/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6921.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6921",
"merged_at": "2024-05-27T08:01:08Z",
"patch_url": "https://github.com/huggingface/datasets/pull/6921.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6921"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6920 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6920/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6920/comments | https://api.github.com/repos/huggingface/datasets/issues/6920/events | https://github.com/huggingface/datasets/pull/6920 | 2,317,648,021 | PR_kwDODunzps5wlchX | 6,920 | [WebDataset] Add `.pth` support for torch tensors | {
"avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4",
"events_url": "https://api.github.com/users/lhoestq/events{/privacy}",
"followers_url": "https://api.github.com/users/lhoestq/followers",
"following_url": "https://api.github.com/users/lhoestq/following{/other_user}",
"gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lhoestq",
"id": 42851186,
"login": "lhoestq",
"node_id": "MDQ6VXNlcjQyODUxMTg2",
"organizations_url": "https://api.github.com/users/lhoestq/orgs",
"received_events_url": "https://api.github.com/users/lhoestq/received_events",
"repos_url": "https://api.github.com/users/lhoestq/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lhoestq"
} | [] | closed | false | null | [] | null | [] | "2024-05-26T11:12:07" | "2024-05-27T09:11:17" | "2024-05-27T09:04:54" | MEMBER | null | In this PR I add support for `.pth` but with `weights_only=True` to disallow the use of pickle | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6920/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6920/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6920.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6920",
"merged_at": "2024-05-27T09:04:54Z",
"patch_url": "https://github.com/huggingface/datasets/pull/6920.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6920"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6919 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6919/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6919/comments | https://api.github.com/repos/huggingface/datasets/issues/6919/events | https://github.com/huggingface/datasets/issues/6919 | 2,315,618,993 | I_kwDODunzps6KBYqx | 6,919 | Invalid YAML in README.md: unknown tag !<tag:yaml.org,2002:python/tuple> | {
"avatar_url": "https://avatars.githubusercontent.com/u/67964?v=4",
"events_url": "https://api.github.com/users/juanqui/events{/privacy}",
"followers_url": "https://api.github.com/users/juanqui/followers",
"following_url": "https://api.github.com/users/juanqui/following{/other_user}",
"gists_url": "https://api.github.com/users/juanqui/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/juanqui",
"id": 67964,
"login": "juanqui",
"node_id": "MDQ6VXNlcjY3OTY0",
"organizations_url": "https://api.github.com/users/juanqui/orgs",
"received_events_url": "https://api.github.com/users/juanqui/received_events",
"repos_url": "https://api.github.com/users/juanqui/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/juanqui/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/juanqui/subscriptions",
"type": "User",
"url": "https://api.github.com/users/juanqui"
} | [] | open | false | null | [] | null | [] | "2024-05-24T14:59:45" | "2024-05-24T14:59:45" | null | NONE | null | ### Describe the bug
I wrote a notebook to load an existing dataset, process it, and upload as a private dataset using `dataset.push_to_hub(...)` at the end. The push to hub is failing with:
```
ValueError: Invalid metadata in README.md.
- Invalid YAML in README.md: unknown tag !<tag:yaml.org,2002:python[/tuple](http://192.168.1.128:8888/tuple)> (50:11)
47 | - 4
48 | - 4
49 | - 8
50 | - !!binary |
----------------^
51 | TwAAAA==
52 | '1': !!python[/object/apply](http://192.168.1.128:8888/object/apply):nump ...
```
My dataset has a `train` and `validation` dataset. These are the features:
```
{'c1': Value(dtype='string', id=None),
'c2': Value(dtype='string', id=None),
'c3': [{'value': Value(dtype='string', id=None),
'start': Value(dtype='int64', id=None),
'end': Value(dtype='int64', id=None),
'label': Value(dtype='string', id=None)}],
'c4': Value(dtype='string', id=None),
'c5': Value(dtype='string', id=None),
'c6': Value(dtype='string', id=None),
'c7': Value(dtype='string', id=None),
'c8': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None),
'c9': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None),
'c10': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None),
'labels': Sequence(feature=ClassLabel(names=['O', 'B-ABC', 'I-ABC', ...], id=None), length=-1, id=None),
'c12': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)}
```
This used to work until I decided to cast the `labels` feature to a `Sequence(ClassLabel(...))` type with:
```
ds['train'] = ds['train'].cast_column("labels", Sequence(ClassLabel(names=list(labels))))
ds['validation'] = ds['validation'].cast_column("labels", Sequence(ClassLabel(names=list(labels))))
```
### Steps to reproduce the bug
1. Start with any token classification dataset.
2. Add a `labels` column with data such as `[0,0,0,12,13,13,13,0,0]`.
3. Cast the label column from `Sequence` to `Sequence(ClassLabel))` with:
```
labels = ['O', 'B-TEST', 'I-TEST']
ds = ds.cast_column("labels", Sequence(ClassLabel(names=labels)))
```
4. Push to hub with `ds.push_to_hub("me/awesome-stuff-dataset")`
### Expected behavior
I expected `push_to_hub` to successfully push my dataset to the hub without error.
### Environment info
Python 3.11.9
datasets==2.19.1
transformers==4.41.1
PyYAML==6.0.1 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6919/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6919/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6918 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6918/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6918/comments | https://api.github.com/repos/huggingface/datasets/issues/6918/events | https://github.com/huggingface/datasets/issues/6918 | 2,315,322,738 | I_kwDODunzps6KAQVy | 6,918 | NonMatchingSplitsSizesError when using data_dir | {
"avatar_url": "https://avatars.githubusercontent.com/u/86664538?v=4",
"events_url": "https://api.github.com/users/srehaag/events{/privacy}",
"followers_url": "https://api.github.com/users/srehaag/followers",
"following_url": "https://api.github.com/users/srehaag/following{/other_user}",
"gists_url": "https://api.github.com/users/srehaag/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/srehaag",
"id": 86664538,
"login": "srehaag",
"node_id": "MDQ6VXNlcjg2NjY0NTM4",
"organizations_url": "https://api.github.com/users/srehaag/orgs",
"received_events_url": "https://api.github.com/users/srehaag/received_events",
"repos_url": "https://api.github.com/users/srehaag/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/srehaag/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/srehaag/subscriptions",
"type": "User",
"url": "https://api.github.com/users/srehaag"
} | [] | open | false | null | [] | null | [
"Thanks for reporting, @srehaag.\r\n\r\nWe are investigating this issue.",
"I confirm there is a bug for data-based Hub datasets when the user passes `data_dir`, which was introduced by PR:\r\n- #6714"
] | "2024-05-24T12:43:39" | "2024-05-24T12:43:39" | null | NONE | null | ### Describe the bug
Loading a dataset from with a data_dir argument generates a NonMatchingSplitsSizesError if there are multiple directories in the dataset.
This appears to happen because the expected split is calculated based on the data in all the directories whereas the recorded split is calculated based on the data in the directory specified using the data_dir argument.
This is recent behavior. Until the past few weeks loading using the data_dir argument worked without any issue.
### Steps to reproduce the bug
Simple test dataset available here: https://huggingface.co/datasets/srehaag/hf-bug-temp
The dataset contains two directories "data1" and "data2", each with a file called "train.parquet" with a 2 x 5 table.
from datasets import load_dataset
dataset = load_dataset("srehaag/hf-bug-temp", data_dir = "data1")
Generates:
---------------------------------------------------------------------------
NonMatchingSplitsSizesError Traceback (most recent call last)
Cell In[3], <a href='vscode-notebook-cell:?execution_count=3&line=2'>line 2</a>
<a href='vscode-notebook-cell:?execution_count=3&line=1'>1</a> from datasets import load_dataset
----> <a href='vscode-notebook-cell:?execution_count=3&line=2'>2</a> dataset = load_dataset("srehaag/hf-bug-temp", data_dir = "data1")
File ~/.python/current/lib/python3.10/site-packages/datasets/load.py:2609, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs)
<a href='~/.python/current/lib/python3.10/site-packages/datasets/load.py:2606'>2606</a> return builder_instance.as_streaming_dataset(split=split)
<a href='~/.python/current/lib/python3.10/site-packages/datasets/load.py:2608'>2608</a> # Download and prepare data
-> <a href='~/.python/current/lib/python3.10/site-packages/datasets/load.py:2609'>2609</a> builder_instance.download_and_prepare(
<a href='~/.python/current/lib/python3.10/site-packages/datasets/load.py:2610'>2610</a> download_config=download_config,
<a href='~/.python/current/lib/python3.10/site-packages/datasets/load.py:2611'>2611</a> download_mode=download_mode,
<a href='~/.python/current/lib/python3.10/site-packages/datasets/load.py:2612'>2612</a> verification_mode=verification_mode,
<a href='~/.python/current/lib/python3.10/site-packages/datasets/load.py:2613'>2613</a> num_proc=num_proc,
<a href='~/.python/current/lib/python3.10/site-packages/datasets/load.py:2614'>2614</a> storage_options=storage_options,
<a href='~/.python/current/lib/python3.10/site-packages/datasets/load.py:2615'>2615</a> )
<a href='~/.python/current/lib/python3.10/site-packages/datasets/load.py:2617'>2617</a> # Build dataset for splits
<a href='~/.python/current/lib/python3.10/site-packages/datasets/load.py:2618'>2618</a> keep_in_memory = (
<a href='~/.python/current/lib/python3.10/site-packages/datasets/load.py:2619'>2619</a> keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
<a href='~/.python/current/lib/python3.10/site-packages/datasets/load.py:2620'>2620</a> )
File ~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1027, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)
<a href='~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1025'>1025</a> if num_proc is not None:
<a href='~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1026'>1026</a> prepare_split_kwargs["num_proc"] = num_proc
-> <a href='~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1027'>1027</a> self._download_and_prepare(
<a href='~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1028'>1028</a> dl_manager=dl_manager,
<a href='~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1029'>1029</a> verification_mode=verification_mode,
<a href='~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1030'>1030</a> **prepare_split_kwargs,
<a href='~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1031'>1031</a> **download_and_prepare_kwargs,
<a href='~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1032'>1032</a> )
<a href='~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1033'>1033</a> # Sync info
<a href='~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1034'>1034</a> self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values())
File ~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1140, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
<a href='~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1137'>1137</a> dl_manager.manage_extracted_files()
<a href='~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1139'>1139</a> if verification_mode == VerificationMode.BASIC_CHECKS or verification_mode == VerificationMode.ALL_CHECKS:
-> <a href='~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1140'>1140</a> verify_splits(self.info.splits, split_dict)
<a href='~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1142'>1142</a> # Update the info object with the splits.
<a href='~/.python/current/lib/python3.10/site-packages/datasets/builder.py:1143'>1143</a> self.info.splits = split_dict
File ~/.python/current/lib/python3.10/site-packages/datasets/utils/info_utils.py:101, in verify_splits(expected_splits, recorded_splits)
<a href='~/.python/current/lib/python3.10/site-packages/datasets/utils/info_utils.py:95'>95</a> bad_splits = [
<a href='~/.python/current/lib/python3.10/site-packages/datasets/utils/info_utils.py:96'>96</a> {"expected": expected_splits[name], "recorded": recorded_splits[name]}
<a href='~/.python/current/lib/python3.10/site-packages/datasets/utils/info_utils.py:97'>97</a> for name in expected_splits
<a href='~/.python/current/lib/python3.10/site-packages/datasets/utils/info_utils.py:98'>98</a> if expected_splits[name].num_examples != recorded_splits[name].num_examples
<a href='~/.python/current/lib/python3.10/site-packages/datasets/utils/info_utils.py:99'>99</a> ]
<a href='~/.python/current/lib/python3.10/site-packages/datasets/utils/info_utils.py:100'>100</a> if len(bad_splits) > 0:
--> <a href='~/.python/current/lib/python3.10/site-packages/datasets/utils/info_utils.py:101'>101</a> raise NonMatchingSplitsSizesError(str(bad_splits))
<a href='~/.python/current/lib/python3.10/site-packages/datasets/utils/info_utils.py:102'>102</a> logger.info("All the splits matched successfully.")
NonMatchingSplitsSizesError: [{'expected': SplitInfo(name='train', num_bytes=212, num_examples=10, shard_lengths=None, dataset_name=None), 'recorded': SplitInfo(name='train', num_bytes=106, num_examples=5, shard_lengths=None, dataset_name='hf-bug-temp')}]
__________
By contrast, this loads the data from both data1/train.parquet and data2/train.parquet without any error message:
from datasets import load_dataset
dataset = load_dataset("srehaag/hf-bug-temp")
### Expected behavior
Should load the 5 x 2 table from data1/train.parquet without error message.
### Environment info
Used Codespaces to simplify environment (see details below), but bug is present across various configurations.
- `datasets` version: 2.19.1
- Platform: Linux-6.5.0-1021-azure-x86_64-with-glibc2.31
- Python version: 3.10.13
- `huggingface_hub` version: 0.23.1
- PyArrow version: 16.1.0
- Pandas version: 2.2.2
- `fsspec` version: 2024.3.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/6918/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6918/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6917 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6917/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6917/comments | https://api.github.com/repos/huggingface/datasets/issues/6917/events | https://github.com/huggingface/datasets/issues/6917 | 2,314,683,663 | I_kwDODunzps6J90UP | 6,917 | WinError 32 The process cannot access the file during load_dataset | {
"avatar_url": "https://avatars.githubusercontent.com/u/56682168?v=4",
"events_url": "https://api.github.com/users/elwe-2808/events{/privacy}",
"followers_url": "https://api.github.com/users/elwe-2808/followers",
"following_url": "https://api.github.com/users/elwe-2808/following{/other_user}",
"gists_url": "https://api.github.com/users/elwe-2808/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/elwe-2808",
"id": 56682168,
"login": "elwe-2808",
"node_id": "MDQ6VXNlcjU2NjgyMTY4",
"organizations_url": "https://api.github.com/users/elwe-2808/orgs",
"received_events_url": "https://api.github.com/users/elwe-2808/received_events",
"repos_url": "https://api.github.com/users/elwe-2808/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/elwe-2808/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/elwe-2808/subscriptions",
"type": "User",
"url": "https://api.github.com/users/elwe-2808"
} | [] | open | false | null | [] | null | [] | "2024-05-24T07:54:51" | "2024-05-24T07:54:51" | null | NONE | null | ### Describe the bug
When I try to load the opus_book from hugging face (following the [guide on the website](https://huggingface.co/docs/transformers/main/en/tasks/translation))
```python
from datasets import load_dataset, Dataset
dataset = load_dataset("Helsinki-NLP/opus_books", "en-fr", features=["id", "translation"])
```
I get an error:
`PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:/Users/Me/.cache/huggingface/datasets/Helsinki-NLP___parquet/ca-de-a39f1ef185b9b73b/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec.incomplete\\parquet-train-00000-00000-of-NNNNN.arrow'
`
<details><summary>Full stacktrace</summary>
<p>
```python
AttributeError Traceback (most recent call last)
File c:\Users\Me\.conda\envs\ia\lib\site-packages\datasets\builder.py:1858, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id)
[1857](file:///C:/Users/Me/.conda/envs/ia/lib/site-packages/datasets/builder.py:1857) _time = time.time()
-> [1858](file:///C:/Users/Me/.conda/envs/ia/lib/site-packages/datasets/builder.py:1858) for _, table in generator:
[1859](file:///C:/Users/Me/.conda/envs/ia/lib/site-packages/datasets/builder.py:1859) if max_shard_size is not None and writer._num_bytes > max_shard_size:
File c:\Users\Me\.conda\envs\ia\lib\site-packages\datasets\packaged_modules\parquet\parquet.py:59, in Parquet._generate_tables(self, files)
[58](file:///C:/Users/Me/.conda/envs/ia/lib/site-packages/datasets/packaged_modules/parquet/parquet.py:58) def _generate_tables(self, files):
---> [59](file:///C:/Users/Me/.conda/envs/ia/lib/site-packages/datasets/packaged_modules/parquet/parquet.py:59) schema = self.config.features.arrow_schema if self.config.features is not None else None
[60](file:///C:/Users/Me/.conda/envs/ia/lib/site-packages/datasets/packaged_modules/parquet/parquet.py:60) if self.config.features is not None and self.config.columns is not None:
AttributeError: 'list' object has no attribute 'arrow_schema'
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
File c:\Users\Me\.conda\envs\ia\lib\site-packages\datasets\builder.py:1882, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id)
[1881](file:///C:/Users/Me/.conda/envs/ia/lib/site-packages/datasets/builder.py:1881) num_shards = shard_id + 1
-> [1882](file:///C:/Users/Me/.conda/envs/ia/lib/site-packages/datasets/builder.py:1882) num_examples, num_bytes = writer.finalize()
[1883](file:///C:/Users/Me/.conda/envs/ia/lib/site-packages/datasets/builder.py:1883) writer.close()
File c:\Users\Me\.conda\envs\ia\lib\site-packages\datasets\arrow_writer.py:584, in ArrowWriter.finalize(self, close_stream)
[583](file:///C:/Users/Me/.conda/envs/ia/lib/site-packages/datasets/arrow_writer.py:583) # If schema is known, infer features even if no examples were written
--> [584](file:///C:/Users/Me/.conda/envs/ia/lib/site-packages/datasets/arrow_writer.py:584) if self.pa_writer is None and self.schema:
...
--> [627](file:///C:/Users/Me/.conda/envs/ia/lib/shutil.py:627) os.unlink(fullname)
[628](file:///C:/Users/Me/.conda/envs/ia/lib/shutil.py:628) except OSError:
[629](file:///C:/Users/Me/.conda/envs/ia/lib/shutil.py:629) onerror(os.unlink, fullname, sys.exc_info())
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:/Users/Me/.cache/huggingface/datasets/Helsinki-NLP___parquet/ca-de-a39f1ef185b9b73b/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec.incomplete\\parquet-train-00000-00000-of-NNNNN.arrow'
```
</p>
</details>
### Steps to reproduce the bug
Steps to reproduce:
Just execute these lines
```python
from datasets import load_dataset, Dataset
dataset = load_dataset("Helsinki-NLP/opus_books", "en-fr", features=["id", "translation"])
```
### Expected behavior
I expect the dataset to be loaded without any errors.
### Environment info
| Package| Version|
|--------|--------|
| transformers| 4.37.2|
| python| 3.9.19|
| pytorch| 2.3.0|
| datasets|2.12.0 |
| arrow | 1.2.3|
I am using Conda on Windows 11. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6917/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6917/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6916 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6916/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6916/comments | https://api.github.com/repos/huggingface/datasets/issues/6916/events | https://github.com/huggingface/datasets/issues/6916 | 2,311,675,564 | I_kwDODunzps6JyV6s | 6,916 | ```push_to_hub()``` - Prevent Automatic Generation of Splits | {
"avatar_url": "https://avatars.githubusercontent.com/u/29337128?v=4",
"events_url": "https://api.github.com/users/jetlime/events{/privacy}",
"followers_url": "https://api.github.com/users/jetlime/followers",
"following_url": "https://api.github.com/users/jetlime/following{/other_user}",
"gists_url": "https://api.github.com/users/jetlime/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jetlime",
"id": 29337128,
"login": "jetlime",
"node_id": "MDQ6VXNlcjI5MzM3MTI4",
"organizations_url": "https://api.github.com/users/jetlime/orgs",
"received_events_url": "https://api.github.com/users/jetlime/received_events",
"repos_url": "https://api.github.com/users/jetlime/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jetlime/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jetlime/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jetlime"
} | [] | closed | false | null | [] | null | [] | "2024-05-22T23:52:15" | "2024-05-23T00:07:53" | "2024-05-23T00:07:53" | NONE | null | ### Describe the bug
I currently have a dataset which has not been splited. When pushing the dataset to my hugging face dataset repository, it is split into a testing and training set. How can I prevent the split from happening?
### Steps to reproduce the bug
1. Have a unsplit dataset
```python
Dataset({ features: ['input', 'output', 'Attack', '__index_level_0__'], num_rows: 944685 })
```
2. Push it to huggingface
```python
dataset.push_to_hub(dataset_name)
```
3. On the hugging face dataset repo, the dataset then appears to be splited:
![image](https://github.com/huggingface/datasets/assets/29337128/b4fbc141-42b0-4f49-98df-dd479648fe09)
4. Indeed, when loading the dataset from this repo, the dataset is split in two testing and training set.
```python
from datasets import load_dataset, Dataset
dataset = load_dataset("Jetlime/NF-CSE-CIC-IDS2018-v2", streaming=True)
dataset
```
output:
```
IterableDatasetDict({
train: IterableDataset({
features: ['input', 'output', 'Attack', '__index_level_0__'],
n_shards: 2
})
test: IterableDataset({
features: ['input', 'output', 'Attack', '__index_level_0__'],
n_shards: 1
})
```
### Expected behavior
The dataset shall not be splited, as not requested.
### Environment info
- `datasets` version: 2.19.1
- Platform: Linux-6.2.0-35-generic-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.23.0
- PyArrow version: 15.0.2
- Pandas version: 2.2.2
- `fsspec` version: 2024.3.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/6916/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6916/timeline | null | completed | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6915 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6915/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6915/comments | https://api.github.com/repos/huggingface/datasets/issues/6915/events | https://github.com/huggingface/datasets/pull/6915 | 2,310,564,961 | PR_kwDODunzps5wNIUh | 6,915 | Validate config name and data_files in packaged modules | {
"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"
} | [] | open | false | null | [] | null | [] | "2024-05-22T13:36:33" | "2024-05-22T15:02:04" | null | MEMBER | null | Validate the config attributes `name` and `data_files` in packaged modules by making the derived classes call their parent `__post_init__` method.
Note that their parent `BuilderConfig` validates its attributes `name` and `data_files` in its `__post_init__` method: https://github.com/huggingface/datasets/blob/60d21efbc01e15d0b596ac1072750cbecd91548a/src/datasets/builder.py#L128-L137
This PR makes the derived config classes call their parent `__post_init__` method to validate their `name` and `data_files` attributes. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6915/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6915/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6915.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6915",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/6915.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6915"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6914 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6914/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6914/comments | https://api.github.com/repos/huggingface/datasets/issues/6914/events | https://github.com/huggingface/datasets/pull/6914 | 2,310,107,326 | PR_kwDODunzps5wLi3e | 6,914 | Preserve JSON column order and support list of strings field | {
"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"
} | [] | open | false | null | [] | null | [] | "2024-05-22T09:58:54" | "2024-05-22T12:50:31" | null | MEMBER | null | Preserve column order when loading from a JSON file with a list of dict (or with a field containing a list of dicts).
Additionally, support JSON file with a list of strings field.
Fix #6913. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6914/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6914/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6914.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6914",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/6914.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6914"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6913 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6913/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6913/comments | https://api.github.com/repos/huggingface/datasets/issues/6913/events | https://github.com/huggingface/datasets/issues/6913 | 2,309,605,889 | I_kwDODunzps6JqcoB | 6,913 | Column order is nondeterministic when loading from JSON | {
"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"
} | [
{
"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 | {
"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"
} | [
{
"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"
}
] | null | [] | "2024-05-22T05:30:14" | "2024-05-22T05:31:10" | null | MEMBER | null | As reported by @meg-huggingface, the order of the JSON object keys is not preserved while loading a dataset from a JSON file with a list of objects.
For example, when loading a JSON files with a list of objects, each with the following ordered keys:
- [ID, Language, Topic],
the resulting dataset may have columns:
- [ID, Topic, Language], or
- [Topic, Language, ID], or
- [Topic, ID, Language],...
This issue is caused by the use of a Python set (which does not preserve the order):
https://github.com/huggingface/datasets/blob/60d21efbc01e15d0b596ac1072750cbecd91548a/src/datasets/packaged_modules/json/json.py#L168
introduced in
- #5772 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6913/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6913/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6912 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6912/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6912/comments | https://api.github.com/repos/huggingface/datasets/issues/6912/events | https://github.com/huggingface/datasets/issues/6912 | 2,309,365,961 | I_kwDODunzps6JpiDJ | 6,912 | Add MedImg for streaming | {
"avatar_url": "https://avatars.githubusercontent.com/u/72926928?v=4",
"events_url": "https://api.github.com/users/lhallee/events{/privacy}",
"followers_url": "https://api.github.com/users/lhallee/followers",
"following_url": "https://api.github.com/users/lhallee/following{/other_user}",
"gists_url": "https://api.github.com/users/lhallee/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lhallee",
"id": 72926928,
"login": "lhallee",
"node_id": "MDQ6VXNlcjcyOTI2OTI4",
"organizations_url": "https://api.github.com/users/lhallee/orgs",
"received_events_url": "https://api.github.com/users/lhallee/received_events",
"repos_url": "https://api.github.com/users/lhallee/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lhallee/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lhallee/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lhallee"
} | [
{
"color": "a2eeef",
"default": true,
"description": "New feature or request",
"id": 1935892871,
"name": "enhancement",
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement"
}
] | open | false | null | [] | null | [] | "2024-05-22T00:55:30" | "2024-05-22T19:19:58" | null | NONE | null | ### Feature request
Host the MedImg dataset (similar to Imagenet but for biomedical images).
### Motivation
There is a clear need for biomedical image foundation models and large scale biomedical datasets that are easily streamable. This would be an excellent tool for the biomedical community.
### Your contribution
MedImg can be found [here](https://www.cuilab.cn/medimg/#). | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6912/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6912/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6911 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6911/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6911/comments | https://api.github.com/repos/huggingface/datasets/issues/6911/events | https://github.com/huggingface/datasets/pull/6911 | 2,308,152,711 | PR_kwDODunzps5wE2ah | 6,911 | Remove dead code for non-dict data_files from packaged modules | {
"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"
} | [] | closed | false | null | [] | null | [] | "2024-05-21T12:10:24" | "2024-05-23T08:05:58" | "2024-05-23T07:59:57" | MEMBER | null | Remove dead code for non-dict data_files from packaged modules.
Since the merge of this PR:
- #2986
the builders' variable self.config.data_files is always a dict, which makes the condition on (str, list, tuple) dead code. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6911/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6911/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6911.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6911",
"merged_at": "2024-05-23T07:59:57Z",
"patch_url": "https://github.com/huggingface/datasets/pull/6911.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6911"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6910 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6910/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6910/comments | https://api.github.com/repos/huggingface/datasets/issues/6910/events | https://github.com/huggingface/datasets/pull/6910 | 2,307,570,084 | PR_kwDODunzps5wC2An | 6,910 | Fix wrong type hints in data_files | {
"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"
} | [] | closed | false | null | [] | null | [] | "2024-05-21T07:41:09" | "2024-05-23T06:04:05" | "2024-05-23T05:58:05" | MEMBER | null | Fix wrong type hints in data_files introduced in:
- #6493 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6910/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6910/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6910.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6910",
"merged_at": "2024-05-23T05:58:05Z",
"patch_url": "https://github.com/huggingface/datasets/pull/6910.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6910"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6909 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6909/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6909/comments | https://api.github.com/repos/huggingface/datasets/issues/6909/events | https://github.com/huggingface/datasets/pull/6909 | 2,307,508,120 | PR_kwDODunzps5wCoiE | 6,909 | Update requests >=2.32.1 to fix vulnerability | {
"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"
} | [] | closed | false | null | [] | null | [] | "2024-05-21T07:11:20" | "2024-05-21T07:45:58" | "2024-05-21T07:38:25" | MEMBER | null | Update requests >=2.32.1 to fix vulnerability. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6909/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6909/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6909.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6909",
"merged_at": "2024-05-21T07:38:25Z",
"patch_url": "https://github.com/huggingface/datasets/pull/6909.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6909"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6908 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6908/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6908/comments | https://api.github.com/repos/huggingface/datasets/issues/6908/events | https://github.com/huggingface/datasets/issues/6908 | 2,304,958,116 | I_kwDODunzps6JYt6k | 6,908 | Fail to load "stas/c4-en-10k" dataset since 2.16 version | {
"avatar_url": "https://avatars.githubusercontent.com/u/38173059?v=4",
"events_url": "https://api.github.com/users/guch8017/events{/privacy}",
"followers_url": "https://api.github.com/users/guch8017/followers",
"following_url": "https://api.github.com/users/guch8017/following{/other_user}",
"gists_url": "https://api.github.com/users/guch8017/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/guch8017",
"id": 38173059,
"login": "guch8017",
"node_id": "MDQ6VXNlcjM4MTczMDU5",
"organizations_url": "https://api.github.com/users/guch8017/orgs",
"received_events_url": "https://api.github.com/users/guch8017/received_events",
"repos_url": "https://api.github.com/users/guch8017/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/guch8017/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/guch8017/subscriptions",
"type": "User",
"url": "https://api.github.com/users/guch8017"
} | [] | closed | false | {
"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"
} | [
{
"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"
}
] | null | [] | "2024-05-20T02:43:59" | "2024-05-24T10:58:09" | "2024-05-24T10:58:09" | NONE | null | ### Describe the bug
When update datasets library to version 2.16+ ( I test it on 2.16, 2.19.0 and 2.19.1), using the following code to load stas/c4-en-10k dataset
```python
from datasets import load_dataset, Dataset
dataset = load_dataset('stas/c4-en-10k')
```
and then it raise UnicodeDecodeError like
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/*/conda3/envs/watermark/lib/python3.10/site-packages/datasets/load.py", line 2523, in load_dataset
builder_instance = load_dataset_builder(
File "/home/*/conda3/envs/watermark/lib/python3.10/site-packages/datasets/load.py", line 2195, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/*/conda3/envs/watermark/lib/python3.10/site-packages/datasets/load.py", line 1846, in dataset_module_factory
raise e1 from None
File "/home/*/conda3/envs/watermark/lib/python3.10/site-packages/datasets/load.py", line 1798, in dataset_module_factory
can_load_config_from_parquet_export = "DEFAULT_CONFIG_NAME" not in f.read()
File "/home/*/conda3/envs/watermark/lib/python3.10/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
```
I found that fs.open loads a gzip file and parses it like plain text using utf-8 encoder.
```python
fs = HfFileSystem('https://huggingface.co')
fs.open("datasets/stas/c4-en-10k/c4-en-10k.py", "rb")
data = fs.read() # data is gzip bytes begin with b'\x1f\x8b\x08\x00\x00\tn\x88\x00...'
data2 = unzip_gzip_bytes(data) # data2 is what we want: '# coding=utf-8\n# Copyright 2020 The HuggingFace Datasets...'
```
### Steps to reproduce the bug
1. Install datasets between version 2.16 and 2.19
2. Use `datasets.load_dataset` method to load `stas/c4-en-10k` dataset.
### Expected behavior
Load dataset normally.
### Environment info
Platform = Linux-5.4.0-159-generic-x86_64-with-glibc2.35
Python = 3.10.14
Datasets = 2.19 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6908/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6908/timeline | null | completed | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6907 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6907/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6907/comments | https://api.github.com/repos/huggingface/datasets/issues/6907/events | https://github.com/huggingface/datasets/issues/6907 | 2,303,855,833 | I_kwDODunzps6JUgzZ | 6,907 | Support the deserialization of json lines files comprised of lists | {
"avatar_url": "https://avatars.githubusercontent.com/u/8473183?v=4",
"events_url": "https://api.github.com/users/umarbutler/events{/privacy}",
"followers_url": "https://api.github.com/users/umarbutler/followers",
"following_url": "https://api.github.com/users/umarbutler/following{/other_user}",
"gists_url": "https://api.github.com/users/umarbutler/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/umarbutler",
"id": 8473183,
"login": "umarbutler",
"node_id": "MDQ6VXNlcjg0NzMxODM=",
"organizations_url": "https://api.github.com/users/umarbutler/orgs",
"received_events_url": "https://api.github.com/users/umarbutler/received_events",
"repos_url": "https://api.github.com/users/umarbutler/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/umarbutler/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/umarbutler/subscriptions",
"type": "User",
"url": "https://api.github.com/users/umarbutler"
} | [
{
"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 | {
"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"
} | [
{
"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"
}
] | null | [
"Update: I ended up deciding to go back to use lines of dictionaries instead of arrays, not because of this issue as my users would be capable of downloading my corpus without `datasets`, but the speed and storage savings are not currently worth breaking my API and harming the backwards compatibility of each new revision.\r\n\r\nWith that said, for a static dataset that is not regularly updated like mine, and particularly for extremely large datasets with millions or billions of rows, using arrays could have a meaningful impact, and so there is probably still value in supporting this structure, provided the effort is not too much."
] | "2024-05-18T05:07:23" | "2024-05-18T08:53:28" | null | NONE | null | ### Feature request
I manage a somewhat large and popular Hugging Face dataset known as the [Open Australian Legal Corpus](https://huggingface.co/datasets/umarbutler/open-australian-legal-corpus). I recently updated my corpus to be stored in a json lines file where each line is an array and each element represents a value at a particular column. Previously, my corpus was stored as a json lines file where each line was a dictionary and the keys were the fields.
Essentially, a line in my json lines file used to look like this:
```json
{"version_id":"","type":"","jurisdiction":"","source":"","citation":"","url":"","when_scraped":"","text":""}
```
And now it looks like this:
```json
["","","","","","","",""]
```
This saves 65 bytes per document and allows me very quickly serialise and deserialise documents via `msgspec`.
After making this change, I found that `datasets` was incapable of deserialising my Corpus without a custom loading script, even if I ensured that the `dataset_info` field in my dataset card contained the desired names of my features.
I would like to request that functionality be added to support this format which is more memory-efficent and faster than using dictionaries.
### Motivation
The [documentation](https://huggingface.co/docs/datasets/en/dataset_script) for creating dataset loading scripts asserts that:
> In the next major release, the new safety features of 🤗 Datasets will disable running dataset loading scripts by default, and you will have to pass trust_remote_code=True to load datasets that require running a dataset script.
I would rather not require my users to pass `trust_remote_code=True` which means that I will need built-in support for this format.
### Your contribution
I would be happy to submit a PR for this if this is something you would incorporate into `datasets` and if I can be pointed to where the code would need to go. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6907/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6907/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6906 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6906/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6906/comments | https://api.github.com/repos/huggingface/datasets/issues/6906/events | https://github.com/huggingface/datasets/issues/6906 | 2,303,679,119 | I_kwDODunzps6JT1qP | 6,906 | irc_disentangle - Issue with splitting data | {
"avatar_url": "https://avatars.githubusercontent.com/u/114260604?v=4",
"events_url": "https://api.github.com/users/eor51355/events{/privacy}",
"followers_url": "https://api.github.com/users/eor51355/followers",
"following_url": "https://api.github.com/users/eor51355/following{/other_user}",
"gists_url": "https://api.github.com/users/eor51355/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/eor51355",
"id": 114260604,
"login": "eor51355",
"node_id": "U_kgDOBs96fA",
"organizations_url": "https://api.github.com/users/eor51355/orgs",
"received_events_url": "https://api.github.com/users/eor51355/received_events",
"repos_url": "https://api.github.com/users/eor51355/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/eor51355/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eor51355/subscriptions",
"type": "User",
"url": "https://api.github.com/users/eor51355"
} | [] | open | false | null | [] | null | [] | "2024-05-17T23:19:37" | "2024-05-17T23:19:37" | null | NONE | null | ### Describe the bug
I am trying to access your database through python using "datasets.load_dataset("irc_disentangle")" and I am getting this error message:
ValueError: Instruction "train" corresponds to no data!
### Steps to reproduce the bug
import datasets
ds = datasets.load_dataset('irc_disentangle')
ds
### Expected behavior
The data is supposed to load into ds and be accessable as such:
ds['train'][1050], ds['train'][1055]
### Environment info
I tired Python 3.12 and 3.10 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6906/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6906/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6905 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6905/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6905/comments | https://api.github.com/repos/huggingface/datasets/issues/6905/events | https://github.com/huggingface/datasets/issues/6905 | 2,303,098,587 | I_kwDODunzps6JRn7b | 6,905 | Extraction protocol for arrow files is not defined | {
"avatar_url": "https://avatars.githubusercontent.com/u/26553095?v=4",
"events_url": "https://api.github.com/users/radulescupetru/events{/privacy}",
"followers_url": "https://api.github.com/users/radulescupetru/followers",
"following_url": "https://api.github.com/users/radulescupetru/following{/other_user}",
"gists_url": "https://api.github.com/users/radulescupetru/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/radulescupetru",
"id": 26553095,
"login": "radulescupetru",
"node_id": "MDQ6VXNlcjI2NTUzMDk1",
"organizations_url": "https://api.github.com/users/radulescupetru/orgs",
"received_events_url": "https://api.github.com/users/radulescupetru/received_events",
"repos_url": "https://api.github.com/users/radulescupetru/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/radulescupetru/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/radulescupetru/subscriptions",
"type": "User",
"url": "https://api.github.com/users/radulescupetru"
} | [] | open | false | null | [] | null | [] | "2024-05-17T16:01:41" | "2024-05-17T16:01:41" | null | NONE | null | ### Describe the bug
Passing files with `.arrow` extension into data_files argument, at least when `streaming=True` is very slow.
### Steps to reproduce the bug
Basically it goes through the `_get_extraction_protocol` method located [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/file_utils.py#L820)
The method then looks at some base known extensions where `arrow` is not defined so it proceeds to determine the compression with the magic number method which is slow when dealing with a lot of files which are stored in s3 and by looking at this predefined list, I don't see `arrow` in there either so in the end it return None:
```
MAGIC_NUMBER_TO_COMPRESSION_PROTOCOL = {
bytes.fromhex("504B0304"): "zip",
bytes.fromhex("504B0506"): "zip", # empty archive
bytes.fromhex("504B0708"): "zip", # spanned archive
bytes.fromhex("425A68"): "bz2",
bytes.fromhex("1F8B"): "gzip",
bytes.fromhex("FD377A585A00"): "xz",
bytes.fromhex("04224D18"): "lz4",
bytes.fromhex("28B52FFD"): "zstd",
}
```
### Expected behavior
My expectation is that `arrow` would be in the known lists so it would return None without going through the magic number method.
### Environment info
datasets 2.19.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/6905/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6905/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6904 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6904/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6904/comments | https://api.github.com/repos/huggingface/datasets/issues/6904/events | https://github.com/huggingface/datasets/pull/6904 | 2,302,912,179 | PR_kwDODunzps5vzRlD | 6,904 | Fix decoding multi part extension | {
"avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4",
"events_url": "https://api.github.com/users/lhoestq/events{/privacy}",
"followers_url": "https://api.github.com/users/lhoestq/followers",
"following_url": "https://api.github.com/users/lhoestq/following{/other_user}",
"gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lhoestq",
"id": 42851186,
"login": "lhoestq",
"node_id": "MDQ6VXNlcjQyODUxMTg2",
"organizations_url": "https://api.github.com/users/lhoestq/orgs",
"received_events_url": "https://api.github.com/users/lhoestq/received_events",
"repos_url": "https://api.github.com/users/lhoestq/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lhoestq"
} | [] | closed | false | null | [] | null | [] | "2024-05-17T14:32:57" | "2024-05-17T14:52:56" | "2024-05-17T14:46:54" | MEMBER | null | e.g. a field named `url.txt` should be a treated as text
I also included a small fix to support .npz correctly | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6904/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6904/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6904.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6904",
"merged_at": "2024-05-17T14:46:54Z",
"patch_url": "https://github.com/huggingface/datasets/pull/6904.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6904"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6903 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6903/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6903/comments | https://api.github.com/repos/huggingface/datasets/issues/6903/events | https://github.com/huggingface/datasets/issues/6903 | 2,300,436,053 | I_kwDODunzps6JHd5V | 6,903 | Add the option of saving in parquet instead of arrow | {
"avatar_url": "https://avatars.githubusercontent.com/u/18707623?v=4",
"events_url": "https://api.github.com/users/arita37/events{/privacy}",
"followers_url": "https://api.github.com/users/arita37/followers",
"following_url": "https://api.github.com/users/arita37/following{/other_user}",
"gists_url": "https://api.github.com/users/arita37/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/arita37",
"id": 18707623,
"login": "arita37",
"node_id": "MDQ6VXNlcjE4NzA3NjIz",
"organizations_url": "https://api.github.com/users/arita37/orgs",
"received_events_url": "https://api.github.com/users/arita37/received_events",
"repos_url": "https://api.github.com/users/arita37/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/arita37/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arita37/subscriptions",
"type": "User",
"url": "https://api.github.com/users/arita37"
} | [
{
"color": "a2eeef",
"default": true,
"description": "New feature or request",
"id": 1935892871,
"name": "enhancement",
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement"
}
] | open | false | null | [] | null | [] | "2024-05-16T13:35:51" | "2024-05-17T03:40:04" | null | NONE | null | ### Feature request
In dataset.save_to_disk('/path/to/save/dataset'),
add the option to save in parquet format
dataset.save_to_disk('/path/to/save/dataset', format="parquet"),
because arrow is not used for Production Big data.... (only parquet)
### Motivation
because arrow is not used for Production Big data.... (only parquet)
### Your contribution
I can do the testing ! | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6903/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6903/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6902 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6902/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6902/comments | https://api.github.com/repos/huggingface/datasets/issues/6902/events | https://github.com/huggingface/datasets/pull/6902 | 2,300,256,241 | PR_kwDODunzps5vqLIv | 6,902 | Make CLI convert_to_parquet not raise error if no rights to create script branch | {
"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"
} | [] | closed | false | null | [] | null | [] | "2024-05-16T12:21:27" | "2024-05-16T12:57:02" | "2024-05-16T12:51:05" | MEMBER | null | Make CLI convert_to_parquet not raise error if no rights to create "script" branch.
Not that before this PR, the error was not critical because it was raised at the end of the script, once all the rest of the steps were already performed.
Fix #6901.
Related to:
- #6809 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6902/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6902/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6902.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6902",
"merged_at": "2024-05-16T12:51:04Z",
"patch_url": "https://github.com/huggingface/datasets/pull/6902.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6902"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6901 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6901/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6901/comments | https://api.github.com/repos/huggingface/datasets/issues/6901/events | https://github.com/huggingface/datasets/issues/6901 | 2,300,167,465 | I_kwDODunzps6JGcUp | 6,901 | HTTPError 403 raised by CLI convert_to_parquet when creating script branch on 3rd party repos | {
"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"
} | [
{
"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 | {
"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"
} | [
{
"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"
}
] | null | [] | "2024-05-16T11:40:22" | "2024-05-16T12:51:06" | "2024-05-16T12:51:06" | MEMBER | null | CLI convert_to_parquet cannot create "script" branch on 3rd party repos.
It can only create it on repos where the user executing the script has write access.
Otherwise, a 403 Forbidden HTTPError is raised:
```
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_errors.py", line 304, in hf_raise_for_status
response.raise_for_status()
File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://huggingface.co/api/datasets/ORG/DATASET/branch/script
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/datasets-cli", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/datasets/commands/datasets_cli.py", line 41, in main
service.run()
File "/usr/local/lib/python3.10/dist-packages/datasets/commands/convert_to_parquet.py", line 92, in run
create_branch(dataset_id, branch="script", repo_type="dataset", token=token, exist_ok=True)
File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/hf_api.py", line 5503, in create_branch
hf_raise_for_status(response)
File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_errors.py", line 367, in hf_raise_for_status
raise HfHubHTTPError(message, response=response) from e
huggingface_hub.utils._errors.HfHubHTTPError: (Request ID: Root=1-6645ee0d-4db1ed8a1fbe04956be15897;139a6e23-df7d-4f62-b5ba-adb6d8e6e696)
403 Forbidden: Forbidden: cannot write to script.
Cannot access content at: https://huggingface.co/api/datasets/ORG/DATASET/branch/script.
If you are trying to create or update content,make sure you have a token with the `write` role.
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6901/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6901/timeline | null | completed | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6900 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6900/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6900/comments | https://api.github.com/repos/huggingface/datasets/issues/6900/events | https://github.com/huggingface/datasets/issues/6900 | 2,298,489,733 | I_kwDODunzps6JACuF | 6,900 | [WebDataset] KeyError with user-defined `Features` when a field is missing in an example | {
"avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4",
"events_url": "https://api.github.com/users/lhoestq/events{/privacy}",
"followers_url": "https://api.github.com/users/lhoestq/followers",
"following_url": "https://api.github.com/users/lhoestq/following{/other_user}",
"gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lhoestq",
"id": 42851186,
"login": "lhoestq",
"node_id": "MDQ6VXNlcjQyODUxMTg2",
"organizations_url": "https://api.github.com/users/lhoestq/orgs",
"received_events_url": "https://api.github.com/users/lhoestq/received_events",
"repos_url": "https://api.github.com/users/lhoestq/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lhoestq"
} | [] | open | false | null | [] | null | [] | "2024-05-15T17:48:34" | "2024-05-15T17:48:49" | null | MEMBER | null | reported at https://huggingface.co/datasets/ProGamerGov/synthetic-dataset-1m-dalle3-high-quality-captions/discussions/1
```
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/webdataset/webdataset.py", line 109, in _generate_examples
example[field_name] = {"path": example["__key__"] + "." + field_name, "bytes": example[field_name]}
``` | {
"+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/6900/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6900/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6899 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6899/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6899/comments | https://api.github.com/repos/huggingface/datasets/issues/6899/events | https://github.com/huggingface/datasets/issues/6899 | 2,298,059,597 | I_kwDODunzps6I-ZtN | 6,899 | List of dictionary features get standardized | {
"avatar_url": "https://avatars.githubusercontent.com/u/11831521?v=4",
"events_url": "https://api.github.com/users/sohamparikh94/events{/privacy}",
"followers_url": "https://api.github.com/users/sohamparikh94/followers",
"following_url": "https://api.github.com/users/sohamparikh94/following{/other_user}",
"gists_url": "https://api.github.com/users/sohamparikh94/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sohamparikh94",
"id": 11831521,
"login": "sohamparikh94",
"node_id": "MDQ6VXNlcjExODMxNTIx",
"organizations_url": "https://api.github.com/users/sohamparikh94/orgs",
"received_events_url": "https://api.github.com/users/sohamparikh94/received_events",
"repos_url": "https://api.github.com/users/sohamparikh94/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sohamparikh94/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sohamparikh94/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sohamparikh94"
} | [] | open | false | null | [] | null | [] | "2024-05-15T14:11:35" | "2024-05-15T14:11:35" | null | NONE | null | ### Describe the bug
Hi, i’m trying to create a HF dataset from a list using Dataset.from_list.
Each sample in the list is a dict with the same keys (which will be my features). The values for each feature are a list of dictionaries, and each such dictionary has a different set of keys. However, the datasets library standardizes all dictionaries under a feature and adds all possible keys (with None value) from all the dictionaries under that feature.
How can I keep the same set of keys as in the original list for each dictionary under a feature?
### Steps to reproduce the bug
```
from datasets import Dataset
# Define a function to generate a sample with "tools" feature
def generate_sample():
# Generate random sample data
sample_data = {
"text": "Sample text",
"feature_1": []
}
# Add feature_1 with random keys for this sample
feature_1 = [{"key1": "value1"}, {"key2": "value2"}] # Example feature_1 with random keys
sample_data["feature_1"].extend(feature_1)
return sample_data
# Generate multiple samples
num_samples = 10
samples = [generate_sample() for _ in range(num_samples)]
# Create a Hugging Face Dataset
dataset = Dataset.from_list(samples)
dataset[0]
```
```{'text': 'Sample text', 'feature_1': [{'key1': 'value1', 'key2': None}, {'key1': None, 'key2': 'value2'}]}```
### Expected behavior
```{'text': 'Sample text', 'feature_1': [{'key1': 'value1'}, {'key2': 'value2'}]}```
### Environment info
- `datasets` version: 2.19.1
- Platform: Linux-5.15.0-1040-nvidia-x86_64-with-glibc2.35
- Python version: 3.10.13
- `huggingface_hub` version: 0.23.0
- PyArrow version: 15.0.0
- Pandas version: 2.2.0
- `fsspec` version: 2023.10.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/6899/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6899/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6898 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6898/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6898/comments | https://api.github.com/repos/huggingface/datasets/issues/6898/events | https://github.com/huggingface/datasets/pull/6898 | 2,294,432,108 | PR_kwDODunzps5vWJ9v | 6,898 | Fix YAML error in README files appearing on GitHub | {
"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"
} | [] | closed | false | null | [] | null | [] | "2024-05-14T05:21:57" | "2024-05-16T14:36:57" | "2024-05-16T14:28:16" | MEMBER | null | Fix YAML error in README files appearing on GitHub.
See error message:
![Screenshot from 2024-05-14 06-58-02](https://github.com/huggingface/datasets/assets/8515462/7984cc4e-96ee-4e83-99a4-4c0c5791fa05)
Fix #6897. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6898/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6898/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6898.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6898",
"merged_at": "2024-05-16T14:28:16Z",
"patch_url": "https://github.com/huggingface/datasets/pull/6898.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6898"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6897 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6897/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6897/comments | https://api.github.com/repos/huggingface/datasets/issues/6897/events | https://github.com/huggingface/datasets/issues/6897 | 2,293,428,243 | I_kwDODunzps6IsvAT | 6,897 | datasets template guide :: issue in documentation YAML | {
"avatar_url": "https://avatars.githubusercontent.com/u/59658056?v=4",
"events_url": "https://api.github.com/users/bghira/events{/privacy}",
"followers_url": "https://api.github.com/users/bghira/followers",
"following_url": "https://api.github.com/users/bghira/following{/other_user}",
"gists_url": "https://api.github.com/users/bghira/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bghira",
"id": 59658056,
"login": "bghira",
"node_id": "MDQ6VXNlcjU5NjU4MDU2",
"organizations_url": "https://api.github.com/users/bghira/orgs",
"received_events_url": "https://api.github.com/users/bghira/received_events",
"repos_url": "https://api.github.com/users/bghira/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bghira/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bghira/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bghira"
} | [] | closed | false | {
"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"
} | [
{
"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"
}
] | null | [] | "2024-05-13T17:33:59" | "2024-05-16T14:28:17" | "2024-05-16T14:28:17" | NONE | null | ### Describe the bug
There is a YAML error at the top of the page, and I don't think it's supposed to be there
### Steps to reproduce the bug
1. Browse to [this tutorial document](https://github.com/huggingface/datasets/blob/main/templates/README_guide.md)
2. Observe a big red error at the top
3. The rest of the document remains functional
### Expected behavior
I think the YAML block should be displayed or ignored.
### Environment info
N/A | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6897/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6897/timeline | null | completed | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6896 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6896/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6896/comments | https://api.github.com/repos/huggingface/datasets/issues/6896/events | https://github.com/huggingface/datasets/issues/6896 | 2,293,176,061 | I_kwDODunzps6Irxb9 | 6,896 | Regression bug: `NonMatchingSplitsSizesError` for (possibly) overwritten dataset | {
"avatar_url": "https://avatars.githubusercontent.com/u/167943?v=4",
"events_url": "https://api.github.com/users/finiteautomata/events{/privacy}",
"followers_url": "https://api.github.com/users/finiteautomata/followers",
"following_url": "https://api.github.com/users/finiteautomata/following{/other_user}",
"gists_url": "https://api.github.com/users/finiteautomata/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/finiteautomata",
"id": 167943,
"login": "finiteautomata",
"node_id": "MDQ6VXNlcjE2Nzk0Mw==",
"organizations_url": "https://api.github.com/users/finiteautomata/orgs",
"received_events_url": "https://api.github.com/users/finiteautomata/received_events",
"repos_url": "https://api.github.com/users/finiteautomata/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/finiteautomata/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/finiteautomata/subscriptions",
"type": "User",
"url": "https://api.github.com/users/finiteautomata"
} | [] | open | false | null | [] | null | [] | "2024-05-13T15:41:57" | "2024-05-13T15:44:48" | null | NONE | null | ### Describe the bug
While trying to load the dataset `https://huggingface.co/datasets/pysentimiento/spanish-tweets-small`, I get this error:
```python
---------------------------------------------------------------------------
NonMatchingSplitsSizesError Traceback (most recent call last)
[<ipython-input-1-d6a3c721d3b8>](https://localhost:8080/#) in <cell line: 3>()
1 from datasets import load_dataset
2
----> 3 ds = load_dataset("pysentimiento/spanish-tweets-small")
3 frames
[/usr/local/lib/python3.10/dist-packages/datasets/load.py](https://localhost:8080/#) in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
2150
2151 # Download and prepare data
-> 2152 builder_instance.download_and_prepare(
2153 download_config=download_config,
2154 download_mode=download_mode,
[/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)
946 if num_proc is not None:
947 prepare_split_kwargs["num_proc"] = num_proc
--> 948 self._download_and_prepare(
949 dl_manager=dl_manager,
950 verification_mode=verification_mode,
[/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
1059
1060 if verification_mode == VerificationMode.BASIC_CHECKS or verification_mode == VerificationMode.ALL_CHECKS:
-> 1061 verify_splits(self.info.splits, split_dict)
1062
1063 # Update the info object with the splits.
[/usr/local/lib/python3.10/dist-packages/datasets/utils/info_utils.py](https://localhost:8080/#) in verify_splits(expected_splits, recorded_splits)
98 ]
99 if len(bad_splits) > 0:
--> 100 raise NonMatchingSplitsSizesError(str(bad_splits))
101 logger.info("All the splits matched successfully.")
102
NonMatchingSplitsSizesError: [{'expected': SplitInfo(name='train', num_bytes=82649695458, num_examples=597433111, shard_lengths=None, dataset_name=None), 'recorded': SplitInfo(name='train', num_bytes=3358310095, num_examples=24898932, shard_lengths=[3626991, 3716991, 4036990, 3506990, 3676990, 3716990, 2616990], dataset_name='spanish-tweets-small')}]
```
I think I had this dataset updated, might be related to #6271
It is working fine as late in `2.10.0` , but not in `2.13.0` onwards.
### Steps to reproduce the bug
```python
from datasets import load_dataset
ds = load_dataset("pysentimiento/spanish-tweets-small")
```
You can run it in [this notebook](https://colab.research.google.com/drive/1FdhqLiVimHIlkn7B54DbhizeQ4U3vGVl#scrollTo=YgA50cBSibUg)
### Expected behavior
Load the dataset without any error
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-6.1.58+-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.20.3
- PyArrow version: 14.0.2
- Pandas version: 2.0.3 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6896/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6896/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6895 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6895/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6895/comments | https://api.github.com/repos/huggingface/datasets/issues/6895/events | https://github.com/huggingface/datasets/pull/6895 | 2,292,993,156 | PR_kwDODunzps5vRK8P | 6,895 | Document that to_json defaults to JSON Lines | {
"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"
} | [] | closed | false | null | [] | null | [] | "2024-05-13T14:22:34" | "2024-05-16T14:37:25" | "2024-05-16T14:31:26" | MEMBER | null | Document that `Dataset.to_json` defaults to JSON Lines, by adding explanation in the corresponding docstring.
Fix #6894. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6895/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6895/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6895.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6895",
"merged_at": "2024-05-16T14:31:26Z",
"patch_url": "https://github.com/huggingface/datasets/pull/6895.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6895"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6894 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6894/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6894/comments | https://api.github.com/repos/huggingface/datasets/issues/6894/events | https://github.com/huggingface/datasets/issues/6894 | 2,292,840,226 | I_kwDODunzps6Iqfci | 6,894 | Better document defaults of to_json | {
"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"
} | [
{
"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 | {
"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"
} | [
{
"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"
}
] | null | [] | "2024-05-13T13:30:54" | "2024-05-16T14:31:27" | "2024-05-16T14:31:27" | MEMBER | null | Better document defaults of `to_json`: the default format is [JSON-Lines](https://jsonlines.org/).
Related to:
- #6891 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6894/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6894/timeline | null | completed | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6893 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6893/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6893/comments | https://api.github.com/repos/huggingface/datasets/issues/6893/events | https://github.com/huggingface/datasets/pull/6893 | 2,292,677,439 | PR_kwDODunzps5vQFEv | 6,893 | Close gzipped files properly | {
"avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4",
"events_url": "https://api.github.com/users/lhoestq/events{/privacy}",
"followers_url": "https://api.github.com/users/lhoestq/followers",
"following_url": "https://api.github.com/users/lhoestq/following{/other_user}",
"gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lhoestq",
"id": 42851186,
"login": "lhoestq",
"node_id": "MDQ6VXNlcjQyODUxMTg2",
"organizations_url": "https://api.github.com/users/lhoestq/orgs",
"received_events_url": "https://api.github.com/users/lhoestq/received_events",
"repos_url": "https://api.github.com/users/lhoestq/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lhoestq"
} | [] | closed | false | null | [] | null | [] | "2024-05-13T12:24:39" | "2024-05-13T13:53:17" | "2024-05-13T13:01:54" | MEMBER | null | close https://github.com/huggingface/datasets/issues/6877 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 1,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6893/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6893/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6893.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6893",
"merged_at": "2024-05-13T13:01:54Z",
"patch_url": "https://github.com/huggingface/datasets/pull/6893.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6893"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6892 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6892/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6892/comments | https://api.github.com/repos/huggingface/datasets/issues/6892/events | https://github.com/huggingface/datasets/pull/6892 | 2,291,201,347 | PR_kwDODunzps5vLIlp | 6,892 | Add support for categorical/dictionary types | {
"avatar_url": "https://avatars.githubusercontent.com/u/342233?v=4",
"events_url": "https://api.github.com/users/EthanSteinberg/events{/privacy}",
"followers_url": "https://api.github.com/users/EthanSteinberg/followers",
"following_url": "https://api.github.com/users/EthanSteinberg/following{/other_user}",
"gists_url": "https://api.github.com/users/EthanSteinberg/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/EthanSteinberg",
"id": 342233,
"login": "EthanSteinberg",
"node_id": "MDQ6VXNlcjM0MjIzMw==",
"organizations_url": "https://api.github.com/users/EthanSteinberg/orgs",
"received_events_url": "https://api.github.com/users/EthanSteinberg/received_events",
"repos_url": "https://api.github.com/users/EthanSteinberg/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/EthanSteinberg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/EthanSteinberg/subscriptions",
"type": "User",
"url": "https://api.github.com/users/EthanSteinberg"
} | [] | open | false | null | [] | null | [] | "2024-05-12T07:15:08" | "2024-05-12T07:15:37" | null | NONE | null | Arrow has a very useful dictionary/categorical type (https://arrow.apache.org/docs/python/generated/pyarrow.dictionary.html). This data type has significant speed, memory and disk benefits over pa.string() when there are only a few unique text strings in a column.
Unfortunately, huggingface datasets currently does not support this type. So huggingface datasets cannot natively read many parquet files that use this datatype .This PR adds support for Huggingface Datasets to read categorical/dictionary data.
Note: This PR functions by simply converting those dictionary/categorical types to strings. This means that huggingface datasets cannot take advantage of the compute benefits of categoricals, but it significantly simplifies logic. At this time, I do not think it makes sense to optimize categorical support within huggingface datasets and that we should only try to optimize later, if necessary.
Closes #5706 | {
"+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/6892/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6892/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6892.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6892",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/6892.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6892"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6891 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6891/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6891/comments | https://api.github.com/repos/huggingface/datasets/issues/6891/events | https://github.com/huggingface/datasets/issues/6891 | 2,291,118,869 | I_kwDODunzps6Ij7MV | 6,891 | Unable to load JSON saved using `to_json` | {
"avatar_url": "https://avatars.githubusercontent.com/u/39432636?v=4",
"events_url": "https://api.github.com/users/DarshanDeshpande/events{/privacy}",
"followers_url": "https://api.github.com/users/DarshanDeshpande/followers",
"following_url": "https://api.github.com/users/DarshanDeshpande/following{/other_user}",
"gists_url": "https://api.github.com/users/DarshanDeshpande/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DarshanDeshpande",
"id": 39432636,
"login": "DarshanDeshpande",
"node_id": "MDQ6VXNlcjM5NDMyNjM2",
"organizations_url": "https://api.github.com/users/DarshanDeshpande/orgs",
"received_events_url": "https://api.github.com/users/DarshanDeshpande/received_events",
"repos_url": "https://api.github.com/users/DarshanDeshpande/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DarshanDeshpande/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DarshanDeshpande/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DarshanDeshpande"
} | [] | closed | false | {
"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"
} | [
{
"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"
}
] | null | [] | "2024-05-12T01:02:51" | "2024-05-16T14:32:55" | "2024-05-12T07:02:02" | NONE | null | ### Describe the bug
Datasets stored in the JSON format cannot be loaded using `json.load()`
### Steps to reproduce the bug
```
import json
from datasets import load_dataset
dataset = load_dataset("squad")
train_dataset, test_dataset = dataset["train"], dataset["validation"]
test_dataset.to_json("full_dataset.json")
# This works
loaded_test = load_dataset("json", data_files="full_dataset.json")
# This fails
loaded_test = json.load(open("full_dataset.json", "r"))
```
### Expected behavior
The JSON should be correctly formatted when writing so that it can be loaded using `json.load()`.
### Environment info
Colab: https://colab.research.google.com/drive/1st1iStFUVgu9ZPvnzSzL4vDeYWDwYpUm?usp=sharing | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6891/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6891/timeline | null | completed | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6890 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6890/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6890/comments | https://api.github.com/repos/huggingface/datasets/issues/6890/events | https://github.com/huggingface/datasets/issues/6890 | 2,288,699,041 | I_kwDODunzps6Iasah | 6,890 | add `with_transform` and/or `set_transform` to IterableDataset | {
"avatar_url": "https://avatars.githubusercontent.com/u/70411813?v=4",
"events_url": "https://api.github.com/users/not-lain/events{/privacy}",
"followers_url": "https://api.github.com/users/not-lain/followers",
"following_url": "https://api.github.com/users/not-lain/following{/other_user}",
"gists_url": "https://api.github.com/users/not-lain/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/not-lain",
"id": 70411813,
"login": "not-lain",
"node_id": "MDQ6VXNlcjcwNDExODEz",
"organizations_url": "https://api.github.com/users/not-lain/orgs",
"received_events_url": "https://api.github.com/users/not-lain/received_events",
"repos_url": "https://api.github.com/users/not-lain/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/not-lain/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/not-lain/subscriptions",
"type": "User",
"url": "https://api.github.com/users/not-lain"
} | [
{
"color": "a2eeef",
"default": true,
"description": "New feature or request",
"id": 1935892871,
"name": "enhancement",
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement"
}
] | open | false | null | [] | null | [] | "2024-05-10T01:00:12" | "2024-05-10T01:00:46" | null | NONE | null | ### Feature request
when working with a really large dataset it would save us a lot of time (and compute resources) to use either with_transform or the set_transform from the Dataset class instead of waiting for the entire dataset to map
### Motivation
don't want to wait for a really long dataset to map, this would give IterableDataset an extra advantage over the Dataset class.
reducing time and resources
### Your contribution
I am a little busy with my job search lately, but would post about this feature in my social media.
Apologies again (dad going to kick me out soon), if I ever have some free time I will contribute to making this a reality, but that's going to be hard
/ (┬┬﹏┬┬)\ | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6890/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6890/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6889 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6889/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6889/comments | https://api.github.com/repos/huggingface/datasets/issues/6889/events | https://github.com/huggingface/datasets/pull/6889 | 2,287,720,539 | PR_kwDODunzps5u_hW- | 6,889 | fix bug #6877 | {
"avatar_url": "https://avatars.githubusercontent.com/u/16257131?v=4",
"events_url": "https://api.github.com/users/arthasking123/events{/privacy}",
"followers_url": "https://api.github.com/users/arthasking123/followers",
"following_url": "https://api.github.com/users/arthasking123/following{/other_user}",
"gists_url": "https://api.github.com/users/arthasking123/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/arthasking123",
"id": 16257131,
"login": "arthasking123",
"node_id": "MDQ6VXNlcjE2MjU3MTMx",
"organizations_url": "https://api.github.com/users/arthasking123/orgs",
"received_events_url": "https://api.github.com/users/arthasking123/received_events",
"repos_url": "https://api.github.com/users/arthasking123/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/arthasking123/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arthasking123/subscriptions",
"type": "User",
"url": "https://api.github.com/users/arthasking123"
} | [] | closed | false | null | [] | null | [] | "2024-05-09T13:38:40" | "2024-05-13T13:35:32" | "2024-05-13T13:35:32" | NONE | null | fix bug #6877 due to maybe f becomes invaild after yield process
the results are below:
Resolving data files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 828/828 [00:01<00:00, 420.41it/s]
Resolving data files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 828/828 [00:00<00:00, 26148.48it/s]
Resolving data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 828/828 [00:00<00:00, 409731.44it/s]
Resolving data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 828/828 [00:00<00:00, 289720.84it/s]
Resolving data files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 828/828 [00:00<00:00, 26663.42it/s]
Resolving data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 828/828 [00:00<00:00, 434056.21it/s]
Downloading data: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 828/828 [00:00<00:00, 13222.33files/s]
Downloading data: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 828/828 [00:04<00:00, 180.67files/s]
Downloading data: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 828/828 [01:35<00:00, 8.70files/s]
Generating train split: 1571592 examples [00:08, 176736.09 examples/s]
Generating test split: 85533 examples [00:01, 48224.56 examples/s]
Generating validation split: 86246 examples [00:01, 50164.16 examples/s]
Fix https://github.com/huggingface/datasets/issues/6877.
CC: @natolambert
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6889/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6889/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6889.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6889",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/6889.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6889"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6888 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6888/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6888/comments | https://api.github.com/repos/huggingface/datasets/issues/6888/events | https://github.com/huggingface/datasets/pull/6888 | 2,287,169,676 | PR_kwDODunzps5u9omr | 6,888 | Support WebDataset containing file basenames with dots | {
"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"
} | [] | closed | false | null | [] | null | [] | "2024-05-09T08:25:30" | "2024-05-10T13:54:06" | "2024-05-10T13:54:06" | MEMBER | null | Support WebDataset containing file basenames with dots.
Fix #6880. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6888/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6888/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6888.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6888",
"merged_at": null,
"patch_url": "https://github.com/huggingface/datasets/pull/6888.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6888"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6887 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6887/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6887/comments | https://api.github.com/repos/huggingface/datasets/issues/6887/events | https://github.com/huggingface/datasets/issues/6887 | 2,286,786,396 | I_kwDODunzps6ITZdc | 6,887 | FAISS load to None | {
"avatar_url": "https://avatars.githubusercontent.com/u/40418544?v=4",
"events_url": "https://api.github.com/users/brainer3220/events{/privacy}",
"followers_url": "https://api.github.com/users/brainer3220/followers",
"following_url": "https://api.github.com/users/brainer3220/following{/other_user}",
"gists_url": "https://api.github.com/users/brainer3220/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/brainer3220",
"id": 40418544,
"login": "brainer3220",
"node_id": "MDQ6VXNlcjQwNDE4NTQ0",
"organizations_url": "https://api.github.com/users/brainer3220/orgs",
"received_events_url": "https://api.github.com/users/brainer3220/received_events",
"repos_url": "https://api.github.com/users/brainer3220/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/brainer3220/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/brainer3220/subscriptions",
"type": "User",
"url": "https://api.github.com/users/brainer3220"
} | [] | open | false | null | [] | null | [] | "2024-05-09T02:43:50" | "2024-05-16T20:44:23" | null | NONE | null | ### Describe the bug
I've use FAISS with Datasets and save to FAISS.
Then load to save FAISS then no error, then ds to None
```python
ds.load_faiss_index('embeddings', 'my_index.faiss')
```
### Steps to reproduce the bug
# 1.
```python
ds_with_embeddings = ds.map(lambda example: {'embeddings': model(transforms(example['image']).unsqueeze(0)).squeeze()}, batch_size=64)
ds_with_embeddings.add_faiss_index(column='embeddings')
ds_with_embeddings.save_faiss_index('embeddings', 'index.faiss')
```
# 2.
```python
ds.load_faiss_index('embeddings', 'my_index.faiss')
```
### Expected behavior
Add column in Datasets.
### Environment info
Google Colab, SageMaker Notebook | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6887/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6887/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6886 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6886/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6886/comments | https://api.github.com/repos/huggingface/datasets/issues/6886/events | https://github.com/huggingface/datasets/issues/6886 | 2,286,328,984 | I_kwDODunzps6IRpyY | 6,886 | load_dataset with data_dir and cache_dir set fail with not supported | {
"avatar_url": "https://avatars.githubusercontent.com/u/322496?v=4",
"events_url": "https://api.github.com/users/fah/events{/privacy}",
"followers_url": "https://api.github.com/users/fah/followers",
"following_url": "https://api.github.com/users/fah/following{/other_user}",
"gists_url": "https://api.github.com/users/fah/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fah",
"id": 322496,
"login": "fah",
"node_id": "MDQ6VXNlcjMyMjQ5Ng==",
"organizations_url": "https://api.github.com/users/fah/orgs",
"received_events_url": "https://api.github.com/users/fah/received_events",
"repos_url": "https://api.github.com/users/fah/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fah/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fah/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fah"
} | [] | open | false | null | [] | null | [] | "2024-05-08T19:52:35" | "2024-05-08T19:58:11" | null | NONE | null | ### Describe the bug
with python 3.11 I execute:
```py
from transformers import Wav2Vec2Processor, Data2VecAudioModel
import torch
from torch import nn
from datasets import load_dataset, concatenate_datasets
# load demo audio and set processor
dataset_clean = load_dataset("librispeech_asr", "clean", split="validation", data_dir="data", cache_dir="cache")
```
This fails in the last line with
```log
Found cached dataset librispeech_asr (file:///Users/as/Documents/Project/git/audio2vec/cache/librispeech_asr/clean-data_dir=data/2.1.0/cff5df6e7955c80a67f80e27e7e655de71c689e2d2364bece785b972acb37fe7)
Traceback (most recent call last):
File "/Users/as/Documents/Project/git/audio2vec/src/music2vec-v1.py", line 7, in <module>
dataset_clean = load_dataset("librispeech_asr", "clean", split="validation", data_dir="data", cache_dir="cache")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/as/anaconda3/lib/python3.11/site-packages/datasets/load.py", line 1810, in load_dataset
ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/as/anaconda3/lib/python3.11/site-packages/datasets/builder.py", line 1113, in as_dataset
raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
```
### Steps to reproduce the bug
I setup an venv with requirements.txt
```txt
transformers==4.40.2
torch==2.2.2
datasets==2.16.0
fsspec==2023.9.2
```
pip freeze is:
```
aiohttp==3.9.5
aiosignal==1.3.1
attrs==23.2.0
certifi==2024.2.2
charset-normalizer==3.3.2
datasets==2.16.0
dill==0.3.7
filelock==3.14.0
frozenlist==1.4.1
fsspec==2023.9.2
huggingface-hub==0.23.0
idna==3.7
Jinja2==3.1.4
MarkupSafe==2.1.5
mpmath==1.3.0
multidict==6.0.5
multiprocess==0.70.15
networkx==3.3
numpy==1.26.4
packaging==24.0
pandas==2.2.2
pyarrow==16.0.0
pyarrow-hotfix==0.6
python-dateutil==2.9.0.post0
pytz==2024.1
PyYAML==6.0.1
regex==2024.4.28
requests==2.31.0
safetensors==0.4.3
six==1.16.0
sympy==1.12
tokenizers==0.19.1
torch==2.2.2
tqdm==4.66.4
transformers==4.40.2
typing_extensions==4.11.0
tzdata==2024.1
urllib3==2.2.1
xxhash==3.4.1
yarl==1.9.4
```
I execute this on a M1 Mac.
### Expected behavior
I don't understand the error message. Why is "local" caching not supported. Would it possible to give some additional hint with the error message how to solve this issue?
### Environment info
source ....
python -u example.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/6886/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6886/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6885 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6885/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6885/comments | https://api.github.com/repos/huggingface/datasets/issues/6885/events | https://github.com/huggingface/datasets/pull/6885 | 2,285,115,400 | PR_kwDODunzps5u2urB | 6,885 | Support jax 0.4.27 in CI tests | {
"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"
} | [] | closed | false | null | [] | null | [] | "2024-05-08T09:19:37" | "2024-05-08T09:43:19" | "2024-05-08T09:35:16" | MEMBER | null | Support jax 0.4.27 in CI tests by using jax Array `devices` method instead of `device` (which no longer exists).
Fix #6884. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6885/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6885/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6885.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6885",
"merged_at": "2024-05-08T09:35:16Z",
"patch_url": "https://github.com/huggingface/datasets/pull/6885.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6885"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6884 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6884/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6884/comments | https://api.github.com/repos/huggingface/datasets/issues/6884/events | https://github.com/huggingface/datasets/issues/6884 | 2,284,839,687 | I_kwDODunzps6IL-MH | 6,884 | CI is broken after jax-0.4.27 release: AttributeError: 'jaxlib.xla_extension.DeviceList' object has no attribute 'device' | {
"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"
} | [
{
"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 | {
"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"
} | [
{
"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"
}
] | null | [] | "2024-05-08T07:01:47" | "2024-05-08T09:35:17" | "2024-05-08T09:35:17" | MEMBER | null | After jax-0.4.27 release (https://github.com/google/jax/releases/tag/jax-v0.4.27), our CI is broken with the error:
```Python traceback
AttributeError: 'jaxlib.xla_extension.DeviceList' object has no attribute 'device'. Did you mean: 'devices'?
```
See: https://github.com/huggingface/datasets/actions/runs/8997488610/job/24715736153
```Python traceback
___________________ FormatterTest.test_jax_formatter_device ____________________
[gw1] linux -- Python 3.10.14 /opt/hostedtoolcache/Python/3.10.14/x64/bin/python
self = <tests.test_formatting.FormatterTest testMethod=test_jax_formatter_device>
@require_jax
def test_jax_formatter_device(self):
import jax
from datasets.formatting import JaxFormatter
pa_table = self._create_dummy_table()
device = jax.devices()[0]
formatter = JaxFormatter(device=str(device))
row = formatter.format_row(pa_table)
> assert row["a"].device() == device
E AttributeError: 'jaxlib.xla_extension.DeviceList' object has no attribute 'device'. Did you mean: 'devices'?
tests/test_formatting.py:630: AttributeError
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6884/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6884/timeline | null | completed | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6883 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6883/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6883/comments | https://api.github.com/repos/huggingface/datasets/issues/6883/events | https://github.com/huggingface/datasets/pull/6883 | 2,284,808,399 | PR_kwDODunzps5u1sL1 | 6,883 | Require Pillow >= 9.4.0 to avoid AttributeError when loading image dataset | {
"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"
} | [] | closed | false | null | [] | null | [] | "2024-05-08T06:43:29" | "2024-05-21T18:37:55" | "2024-05-16T14:34:02" | MEMBER | null | Require Pillow >= 9.4.0 to avoid AttributeError when loading image dataset.
The `PIL.Image.ExifTags` that we use in our code was implemented in Pillow-9.4.0: https://github.com/python-pillow/Pillow/commit/24a5405a9f7ea22f28f9c98b3e407292ea5ee1d3
The bug #6881 was introduced in datasets-2.19.0 by this PR:
- #6739
Fix #6881. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/huggingface/datasets/issues/6883/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6883/timeline | null | null | 0 | {
"diff_url": "https://github.com/huggingface/datasets/pull/6883.diff",
"html_url": "https://github.com/huggingface/datasets/pull/6883",
"merged_at": "2024-05-16T14:34:02Z",
"patch_url": "https://github.com/huggingface/datasets/pull/6883.patch",
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6883"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6882 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6882/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6882/comments | https://api.github.com/repos/huggingface/datasets/issues/6882/events | https://github.com/huggingface/datasets/issues/6882 | 2,284,803,158 | I_kwDODunzps6IL1RW | 6,882 | Connection Error When Using By-pass Proxies | {
"avatar_url": "https://avatars.githubusercontent.com/u/78351684?v=4",
"events_url": "https://api.github.com/users/MRNOBODY-ZST/events{/privacy}",
"followers_url": "https://api.github.com/users/MRNOBODY-ZST/followers",
"following_url": "https://api.github.com/users/MRNOBODY-ZST/following{/other_user}",
"gists_url": "https://api.github.com/users/MRNOBODY-ZST/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MRNOBODY-ZST",
"id": 78351684,
"login": "MRNOBODY-ZST",
"node_id": "MDQ6VXNlcjc4MzUxNjg0",
"organizations_url": "https://api.github.com/users/MRNOBODY-ZST/orgs",
"received_events_url": "https://api.github.com/users/MRNOBODY-ZST/received_events",
"repos_url": "https://api.github.com/users/MRNOBODY-ZST/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MRNOBODY-ZST/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MRNOBODY-ZST/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MRNOBODY-ZST"
} | [] | open | false | null | [] | null | [] | "2024-05-08T06:40:14" | "2024-05-17T06:38:30" | null | NONE | null | ### Describe the bug
I'm currently using Clash for Windows as my proxy tunnel, after exporting HTTP_PROXY and HTTPS_PROXY to the port that clash provides🤔, it runs into a connection error saying "Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/2.19.1/metrics/seqeval/seqeval.py (ConnectionError(MaxRetryError("HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /huggingface/datasets/2.19.1/metrics/seqeval/seqeval.py (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f969d391870>: Failed to establish a new connection: [Errno 111] Connection refused'))")))"
I have already read the documentation provided on the hugginface, but I think I didn't see the detailed instruction on how to set up proxies for this library.
### Steps to reproduce the bug
1. Turn on any proxy software like Clash / ShadosocksR etc.
2. export system varibles to the port provided by your proxy software in wsl (It's ok for other applications to use proxy expect dataset-library)
3. load any dataset from hugginface online
### Expected behavior
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
Cell In[33], [line 3](vscode-notebook-cell:?execution_count=33&line=3)
[1](vscode-notebook-cell:?execution_count=33&line=1) from datasets import load_metric
----> [3](vscode-notebook-cell:?execution_count=33&line=3) metric = load_metric("seqeval")
File ~/.local/lib/python3.10/site-packages/datasets/utils/deprecation_utils.py:46, in deprecated.<locals>.decorator.<locals>.wrapper(*args, **kwargs)
[44](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/utils/deprecation_utils.py:44) warnings.warn(warning_msg, category=FutureWarning, stacklevel=2)
[45](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/utils/deprecation_utils.py:45) _emitted_deprecation_warnings.add(func_hash)
---> [46](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/utils/deprecation_utils.py:46) return deprecated_function(*args, **kwargs)
File ~/.local/lib/python3.10/site-packages/datasets/load.py:2104, in load_metric(path, config_name, process_id, num_process, cache_dir, experiment_id, keep_in_memory, download_config, download_mode, revision, trust_remote_code, **metric_init_kwargs)
[2101](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2101) warnings.filterwarnings("ignore", message=".*https://huggingface.co/docs/evaluate$", category=FutureWarning)
[2103](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2103) download_mode = DownloadMode(download_mode or DownloadMode.REUSE_DATASET_IF_EXISTS)
-> [2104](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2104) metric_module = metric_module_factory(
[2105](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2105) path,
[2106](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2106) revision=revision,
[2107](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2107) download_config=download_config,
[2108](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2108) download_mode=download_mode,
[2109](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2109) trust_remote_code=trust_remote_code,
[2110](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2110) ).module_path
[2111](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2111) metric_cls = import_main_class(metric_module, dataset=False)
[2112](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2112) metric = metric_cls(
[2113](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2113) config_name=config_name,
[2114](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/load.py:2114) process_id=process_id,
...
--> [633](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py:633) raise ConnectionError(f"Couldn't reach {url} ({repr(head_error)})")
[634](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py:634) elif response is not None:
[635](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/noodle/Transformers-Tutorials/LayoutLMv3/~/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py:635) raise ConnectionError(f"Couldn't reach {url} (error {response.status_code})")
ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/2.19.1/metrics/seqeval/seqeval.py (SSLError(MaxRetryError("HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /huggingface/datasets/2.19.1/metrics/seqeval/seqeval.py (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)')))")))
### Environment info
- `datasets` version: 2.19.1
- Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.23.0
- PyArrow version: 16.0.0
- Pandas version: 2.2.2
- `fsspec` version: 2024.2.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/6882/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6882/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6881 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6881/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6881/comments | https://api.github.com/repos/huggingface/datasets/issues/6881/events | https://github.com/huggingface/datasets/issues/6881 | 2,284,794,009 | I_kwDODunzps6ILzCZ | 6,881 | AttributeError: module 'PIL.Image' has no attribute 'ExifTags' | {
"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"
} | [
{
"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 | {
"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"
} | [
{
"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"
}
] | null | [] | "2024-05-08T06:33:57" | "2024-05-16T14:34:03" | "2024-05-16T14:34:03" | MEMBER | null | When trying to load an image dataset in an old Python environment (with Pillow-8.4.0), an error is raised:
```Python traceback
AttributeError: module 'PIL.Image' has no attribute 'ExifTags'
```
The error traceback:
```Python traceback
~/huggingface/datasets/src/datasets/iterable_dataset.py in __iter__(self)
1391 # `IterableDataset` automatically fills missing columns with None.
1392 # This is done with `_apply_feature_types_on_example`.
-> 1393 example = _apply_feature_types_on_example(
1394 example, self.features, token_per_repo_id=self._token_per_repo_id
1395 )
~/huggingface/datasets/src/datasets/iterable_dataset.py in _apply_feature_types_on_example(example, features, token_per_repo_id)
1080 encoded_example = features.encode_example(example)
1081 # Decode example for Audio feature, e.g.
-> 1082 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
1083 return decoded_example
1084
~/huggingface/datasets/src/datasets/features/features.py in decode_example(self, example, token_per_repo_id)
1974
-> 1975 return {
1976 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1977 if self._column_requires_decoding[column_name]
~/huggingface/datasets/src/datasets/features/features.py in <dictcomp>(.0)
1974
1975 return {
-> 1976 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1977 if self._column_requires_decoding[column_name]
1978 else value
~/huggingface/datasets/src/datasets/features/features.py in decode_nested_example(schema, obj, token_per_repo_id)
1339 # we pass the token to read and decode files from private repositories in streaming mode
1340 if obj is not None and schema.decode:
-> 1341 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1342 return obj
1343
~/huggingface/datasets/src/datasets/features/image.py in decode_example(self, value, token_per_repo_id)
187 image = PIL.Image.open(BytesIO(bytes_))
188 image.load() # to avoid "Too many open files" errors
--> 189 if image.getexif().get(PIL.Image.ExifTags.Base.Orientation) is not None:
190 image = PIL.ImageOps.exif_transpose(image)
191 if self.mode and self.mode != image.mode:
~/huggingface/datasets/venv/lib/python3.9/site-packages/PIL/Image.py in __getattr__(name)
75 )
76 return categories[name]
---> 77 raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
78
79
AttributeError: module 'PIL.Image' has no attribute 'ExifTags'
```
### Environment info
Since datasets 2.19.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/6881/reactions"
} | https://api.github.com/repos/huggingface/datasets/issues/6881/timeline | null | completed | null | null | false |
End of preview. Expand
in Dataset Viewer.
README.md exists but content is empty.
Use the Edit dataset card button to edit it.
- Downloads last month
- 2