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.05B
node_id
stringlengths
18
32
number
int64
1
6.52k
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
int64
0
70
created_at
unknown
updated_at
unknown
closed_at
unknown
author_association
stringclasses
3 values
active_lock_reason
float64
body
stringlengths
0
228k
reactions
dict
timeline_url
stringlengths
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/6005
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6005/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6005/comments
https://api.github.com/repos/huggingface/datasets/issues/6005/events
https://github.com/huggingface/datasets/pull/6005
1,788,103,576
PR_kwDODunzps5UoJ91
6,005
Drop Python 3.7 support
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
7
"2023-07-04T15:02:37Z"
"2023-07-06T15:32:41Z"
"2023-07-06T15:22:43Z"
CONTRIBUTOR
null
`hfh` and `transformers` have dropped Python 3.7 support, so we should do the same :). (Based on the stats, it seems less than 10% of the users use `datasets` with Python 3.7)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6005/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6005/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6005.diff", "html_url": "https://github.com/huggingface/datasets/pull/6005", "merged_at": "2023-07-06T15:22:43Z", "patch_url": "https://github.com/huggingface/datasets/pull/6005.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6005" }
true
https://api.github.com/repos/huggingface/datasets/issues/6004
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6004/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6004/comments
https://api.github.com/repos/huggingface/datasets/issues/6004/events
https://github.com/huggingface/datasets/pull/6004
1,786,636,368
PR_kwDODunzps5UjN2h
6,004
Misc improvements
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
4
"2023-07-03T18:29:14Z"
"2023-07-06T17:04:11Z"
"2023-07-06T16:55:25Z"
CONTRIBUTOR
null
Contains the following improvements: * fixes a "share dataset" link in README and modifies the "hosting" part in the disclaimer section * updates `Makefile` to also run the style checks on `utils` and `setup.py` * deletes a test for GH-hosted datasets (no longer supported) * deletes `convert_dataset.sh` (outdated) * aligns `utils/release.py` with `transformers` (the current version is outdated)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6004/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6004/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6004.diff", "html_url": "https://github.com/huggingface/datasets/pull/6004", "merged_at": "2023-07-06T16:55:25Z", "patch_url": "https://github.com/huggingface/datasets/pull/6004.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6004" }
true
https://api.github.com/repos/huggingface/datasets/issues/6003
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6003/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6003/comments
https://api.github.com/repos/huggingface/datasets/issues/6003/events
https://github.com/huggingface/datasets/issues/6003
1,786,554,110
I_kwDODunzps5qfKb-
6,003
interleave_datasets & DataCollatorForLanguageModeling having a conflict ?
{ "avatar_url": "https://avatars.githubusercontent.com/u/1929830?v=4", "events_url": "https://api.github.com/users/PonteIneptique/events{/privacy}", "followers_url": "https://api.github.com/users/PonteIneptique/followers", "following_url": "https://api.github.com/users/PonteIneptique/following{/other_user}", "gists_url": "https://api.github.com/users/PonteIneptique/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/PonteIneptique", "id": 1929830, "login": "PonteIneptique", "node_id": "MDQ6VXNlcjE5Mjk4MzA=", "organizations_url": "https://api.github.com/users/PonteIneptique/orgs", "received_events_url": "https://api.github.com/users/PonteIneptique/received_events", "repos_url": "https://api.github.com/users/PonteIneptique/repos", "site_admin": false, "starred_url": "https://api.github.com/users/PonteIneptique/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/PonteIneptique/subscriptions", "type": "User", "url": "https://api.github.com/users/PonteIneptique" }
[]
open
false
null
[]
null
0
"2023-07-03T17:15:31Z"
"2023-07-03T17:15:31Z"
null
NONE
null
### Describe the bug Hi everyone :) I have two local & custom datasets (1 "sentence" per line) which I split along the 95/5 lines for pre-training a Bert model. I use a modified version of `run_mlm.py` in order to be able to make use of `interleave_dataset`: - `tokenize()` runs fine - `group_text()` runs fine Everytime, on step 19, I get ```pytb File "env/lib/python3.9/site-packages/transformers/data/data_collator.py", line 779, in torch_mask_tokens inputs[indices_random] = random_words[indices_random] RuntimeError: Index put requires the source and destination dtypes match, got Float for the destination and Long for the source. ``` I tried: - training without interleave on dataset 1, it runs - training without interleave on dataset 2, it runs - training without `.to_iterable_dataset()`, it hangs then crash - training without group_text() and padding to max_length seemed to fix the issue, but who knows if this was just because it was an issue that would come much later in terms of steps. I might have coded something wrong, but I don't get what ### Steps to reproduce the bug I have this function: ```py def build_dataset(path: str, percent: str): dataset = load_dataset( "text", data_files={"train": [path]}, split=f"train[{percent}]" ) dataset = dataset.map( lambda examples: tokenize(examples["text"]), batched=True, num_proc=num_proc, ) dataset = dataset.map( group_texts, batched=True, num_proc=num_proc, desc=f"Grouping texts in chunks of {tokenizer.max_seq_length}", remove_columns=["text"] ) print(len(dataset)) return dataset.to_iterable_dataset() ``` I hardcoded group_text: ```py def group_texts(examples): # Concatenate all texts. concatenated_examples = {k: list(chain(*examples[k])) for k in examples.keys()} total_length = len(concatenated_examples[list(examples.keys())[0]]) # We drop the small remainder, and if the total_length < max_seq_length we exclude this batch and return an empty dict. # We could add padding if the model supported it instead of this drop, you can customize this part to your needs. total_length = (total_length // 512) * 512 # Split by chunks of max_len. result = { k: [t[i: i + 512] for i in range(0, total_length, 512)] for k, t in concatenated_examples.items() } # result = {k: [el for el in elements if el] for k, elements in result.items()} return result ``` And then I build datasets using the following code: ```py train1 = build_dataset("d1.txt", ":95%") train2 = build_dataset("d2.txt", ":95%") dev1 = build_dataset("d1.txt", "95%:") dev2 = build_dataset("d2.txt", "95%:") ``` and finally I run ```py train_dataset = interleave_datasets( [train1, train2], probabilities=[0.8, 0.2], seed=42 ) eval_dataset = interleave_datasets( [dev1, dev2], probabilities=[0.8, 0.2], seed=42 ) ``` Then I run the training part which remains mostly untouched: > CUDA_VISIBLE_DEVICES=1 python custom_dataset.py --model_type bert --per_device_train_batch_size 32 --do_train --output_dir /var/mlm/training-bert/model --max_seq_length 512 --save_steps 10000 --save_total_limit 3 --auto_find_batch_size --logging_dir ./logs-bert --learning_rate 0.0001 --do_train --num_train_epochs 25 --warmup_steps 10000 --max_step 45000 --fp16 ### Expected behavior The model should then train normally, but fails every time at the same step (19). printing the variables at `inputs[indices_random] = random_words[indices_random]` shows a magnificient empty tensor (, 32) [if I remember well] ### Environment info transformers[torch] 4.30.2 Ubuntu A100 0 CUDA 12 Driver Version: 525.116.04
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6003/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6003/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/6002
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6002/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6002/comments
https://api.github.com/repos/huggingface/datasets/issues/6002/events
https://github.com/huggingface/datasets/pull/6002
1,786,053,060
PR_kwDODunzps5UhP-Z
6,002
Add KLUE-MRC metrics
{ "avatar_url": "https://avatars.githubusercontent.com/u/37537248?v=4", "events_url": "https://api.github.com/users/ingyuseong/events{/privacy}", "followers_url": "https://api.github.com/users/ingyuseong/followers", "following_url": "https://api.github.com/users/ingyuseong/following{/other_user}", "gists_url": "https://api.github.com/users/ingyuseong/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ingyuseong", "id": 37537248, "login": "ingyuseong", "node_id": "MDQ6VXNlcjM3NTM3MjQ4", "organizations_url": "https://api.github.com/users/ingyuseong/orgs", "received_events_url": "https://api.github.com/users/ingyuseong/received_events", "repos_url": "https://api.github.com/users/ingyuseong/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ingyuseong/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ingyuseong/subscriptions", "type": "User", "url": "https://api.github.com/users/ingyuseong" }
[]
closed
false
null
[]
null
1
"2023-07-03T12:11:10Z"
"2023-07-09T11:57:20Z"
"2023-07-09T11:57:20Z"
NONE
null
## Metrics for KLUE-MRC (Korean Language Understanding Evaluation — Machine Reading Comprehension) Adding metrics for [KLUE-MRC](https://huggingface.co/datasets/klue). KLUE-MRC is very similar to SQuAD 2.0 but has a slightly different format which is why I added metrics for KLUE-MRC. Specifically, in the case of [LM Eval Harness](https://github.com/EleutherAI/lm-evaluation-harness), it leverages the scoring script of SQuAD to evaluate SQuAD 2.0 and KorQuAD. But the script isn't suitable for KLUE-MRC because KLUE-MRC is a bit different from SQuAD 2.0. And this is why I added the scoring script for KLUE-MRC. - [x] All tests passed - [x] Added a metric card (referred the metric card of SQuAD 2.0) - [x] Compatibility test with [LM Eval Harness](https://github.com/EleutherAI/lm-evaluation-harness) passed ### References - [KLUE: Korean Language Understanding Evaluation](https://datasets-benchmarks-proceedings.neurips.cc/paper_files/paper/2021/file/98dce83da57b0395e163467c9dae521b-Paper-round2.pdf) - [KLUE on Hugging Face Datasets](https://huggingface.co/datasets/klue) - #2416
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6002/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6002/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6002.diff", "html_url": "https://github.com/huggingface/datasets/pull/6002", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/6002.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6002" }
true
https://api.github.com/repos/huggingface/datasets/issues/6001
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6001/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6001/comments
https://api.github.com/repos/huggingface/datasets/issues/6001/events
https://github.com/huggingface/datasets/pull/6001
1,782,516,627
PR_kwDODunzps5UVMMh
6,001
Align `column_names` type check with type hint in `sort`
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
3
"2023-06-30T13:15:50Z"
"2023-06-30T14:18:32Z"
"2023-06-30T14:11:24Z"
CONTRIBUTOR
null
Fix #5998
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6001/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6001/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6001.diff", "html_url": "https://github.com/huggingface/datasets/pull/6001", "merged_at": "2023-06-30T14:11:24Z", "patch_url": "https://github.com/huggingface/datasets/pull/6001.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6001" }
true
https://api.github.com/repos/huggingface/datasets/issues/6000
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6000/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6000/comments
https://api.github.com/repos/huggingface/datasets/issues/6000/events
https://github.com/huggingface/datasets/pull/6000
1,782,456,878
PR_kwDODunzps5UU_FB
6,000
Pin `joblib` to avoid `joblibspark` test failures
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
4
"2023-06-30T12:36:54Z"
"2023-06-30T13:17:05Z"
"2023-06-30T13:08:27Z"
CONTRIBUTOR
null
`joblibspark` doesn't support the latest `joblib` release. See https://github.com/huggingface/datasets/actions/runs/5401870932/jobs/9812337078 for the errors
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6000/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6000/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6000.diff", "html_url": "https://github.com/huggingface/datasets/pull/6000", "merged_at": "2023-06-30T13:08:27Z", "patch_url": "https://github.com/huggingface/datasets/pull/6000.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6000" }
true
https://api.github.com/repos/huggingface/datasets/issues/5999
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5999/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5999/comments
https://api.github.com/repos/huggingface/datasets/issues/5999/events
https://github.com/huggingface/datasets/issues/5999
1,781,851,513
I_kwDODunzps5qNOV5
5,999
Getting a 409 error while loading xglue dataset
{ "avatar_url": "https://avatars.githubusercontent.com/u/45713796?v=4", "events_url": "https://api.github.com/users/Praful932/events{/privacy}", "followers_url": "https://api.github.com/users/Praful932/followers", "following_url": "https://api.github.com/users/Praful932/following{/other_user}", "gists_url": "https://api.github.com/users/Praful932/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Praful932", "id": 45713796, "login": "Praful932", "node_id": "MDQ6VXNlcjQ1NzEzNzk2", "organizations_url": "https://api.github.com/users/Praful932/orgs", "received_events_url": "https://api.github.com/users/Praful932/received_events", "repos_url": "https://api.github.com/users/Praful932/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Praful932/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Praful932/subscriptions", "type": "User", "url": "https://api.github.com/users/Praful932" }
[]
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
1
"2023-06-30T04:13:54Z"
"2023-06-30T05:57:23Z"
"2023-06-30T05:57:22Z"
NONE
null
### Describe the bug Unable to load xglue dataset ### Steps to reproduce the bug ```python import datasets dataset = datasets.load_dataset("xglue", "ntg") ``` > ConnectionError: Couldn't reach https://xglue.blob.core.windows.net/xglue/xglue_full_dataset.tar.gz (error 409) ### Expected behavior Expected the dataset to load ### Environment info - `datasets` version: 2.13.1 - Platform: Linux-5.15.107+-x86_64-with-glibc2.31 - Python version: 3.10.12 - Huggingface_hub version: 0.15.1 - PyArrow version: 9.0.0 - Pandas version: 1.5.3
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5999/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5999/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5998
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5998/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5998/comments
https://api.github.com/repos/huggingface/datasets/issues/5998/events
https://github.com/huggingface/datasets/issues/5998
1,781,805,018
I_kwDODunzps5qNC_a
5,998
The current implementation has a potential bug in the sort method
{ "avatar_url": "https://avatars.githubusercontent.com/u/22192665?v=4", "events_url": "https://api.github.com/users/wangyuxinwhy/events{/privacy}", "followers_url": "https://api.github.com/users/wangyuxinwhy/followers", "following_url": "https://api.github.com/users/wangyuxinwhy/following{/other_user}", "gists_url": "https://api.github.com/users/wangyuxinwhy/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wangyuxinwhy", "id": 22192665, "login": "wangyuxinwhy", "node_id": "MDQ6VXNlcjIyMTkyNjY1", "organizations_url": "https://api.github.com/users/wangyuxinwhy/orgs", "received_events_url": "https://api.github.com/users/wangyuxinwhy/received_events", "repos_url": "https://api.github.com/users/wangyuxinwhy/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wangyuxinwhy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wangyuxinwhy/subscriptions", "type": "User", "url": "https://api.github.com/users/wangyuxinwhy" }
[]
closed
false
null
[]
null
1
"2023-06-30T03:16:57Z"
"2023-06-30T14:21:03Z"
"2023-06-30T14:11:25Z"
NONE
null
### Describe the bug In the sort method,here's a piece of code ```python # column_names: Union[str, Sequence_[str]] # Check proper format of and for duplicates in column_names if not isinstance(column_names, list): column_names = [column_names] ``` I get an error when I pass in a tuple based on the column_names type annotation, it will raise an errror.As in the example below, while the type annotation implies that a tuple can be passed. ```python from datasets import load_dataset dataset = load_dataset('glue', 'ax')['test'] dataset.sort(column_names=('premise', 'hypothesis')) # Raise ValueError: Column '('premise', 'hypothesis')' not found in the dataset. ``` Of course, after I modified the tuple into a list, everything worked fine Change the code to the following so there will be no problem ```python # Check proper format of and for duplicates in column_names if not isinstance(column_names, list): if isinstance(column_names, str): column_names = [column_names] else: column_names = list(column_names) ``` ### Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset('glue', 'ax')['test'] dataset.sort(column_names=('premise', 'hypothesis')) # Raise ValueError: Column '('premise', 'hypothesis')' not found in the dataset. ``` ### Expected behavior Passing tuple into column_names should be equivalent to passing list ### Environment info - `datasets` version: 2.13.0 - Platform: macOS-13.1-arm64-arm-64bit - Python version: 3.10.11 - Huggingface_hub version: 0.15.1 - PyArrow version: 12.0.1 - Pandas version: 2.0.2
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5998/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5998/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5997
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5997/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5997/comments
https://api.github.com/repos/huggingface/datasets/issues/5997/events
https://github.com/huggingface/datasets/issues/5997
1,781,582,818
I_kwDODunzps5qMMvi
5,997
extend the map function so it can wrap around long text that does not fit in the context window
{ "avatar_url": "https://avatars.githubusercontent.com/u/127623723?v=4", "events_url": "https://api.github.com/users/siddhsql/events{/privacy}", "followers_url": "https://api.github.com/users/siddhsql/followers", "following_url": "https://api.github.com/users/siddhsql/following{/other_user}", "gists_url": "https://api.github.com/users/siddhsql/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/siddhsql", "id": 127623723, "login": "siddhsql", "node_id": "U_kgDOB5tiKw", "organizations_url": "https://api.github.com/users/siddhsql/orgs", "received_events_url": "https://api.github.com/users/siddhsql/received_events", "repos_url": "https://api.github.com/users/siddhsql/repos", "site_admin": false, "starred_url": "https://api.github.com/users/siddhsql/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/siddhsql/subscriptions", "type": "User", "url": "https://api.github.com/users/siddhsql" }
[ { "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
2
"2023-06-29T22:15:21Z"
"2023-07-03T17:58:52Z"
null
NONE
null
### Feature request I understand `dataset` provides a [`map`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L2849) function. This function in turn takes in a callable that is used to tokenize the text on which a model is trained. Frequently this text will not fit within a models's context window. In this case it would be useful to wrap around the text into multiple rows with each row fitting the model's context window. I tried to do it using this code as example which in turn I have borrowed from [here](https://stackoverflow.com/a/76343993/147530): ``` data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True) ``` but running the code gives me this error: ``` File "/llm/fine-tune.py", line 117, in <module> data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True) File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 580, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 545, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3087, in map for rank, done, content in Dataset._map_single(**dataset_kwargs): File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3480, in _map_single writer.write_batch(batch) File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_writer.py", line 556, in write_batch pa_table = pa.Table.from_arrays(arrays, schema=schema) File "pyarrow/table.pxi", line 3798, in pyarrow.lib.Table.from_arrays File "pyarrow/table.pxi", line 2962, in pyarrow.lib.Table.validate File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Column 1 named input_ids expected length 394 but got length 447 ``` The lambda function I have provided is correctly chopping up long text so it wraps around (and because of this 394 samples become 447 after wrap around) but the dataset `map` function does not like it. ### Motivation please see above ### Your contribution I'm afraid I don't have much knowledge to help
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5997/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5997/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5996
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5996/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5996/comments
https://api.github.com/repos/huggingface/datasets/issues/5996/events
https://github.com/huggingface/datasets/pull/5996
1,779,294,374
PR_kwDODunzps5UKP0i
5,996
Deprecate `use_auth_token` in favor of `token`
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
9
"2023-06-28T16:26:38Z"
"2023-07-05T15:22:20Z"
"2023-07-03T16:03:33Z"
CONTRIBUTOR
null
... to be consistent with `transformers` and `huggingface_hub`.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5996/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5996/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5996.diff", "html_url": "https://github.com/huggingface/datasets/pull/5996", "merged_at": "2023-07-03T16:03:33Z", "patch_url": "https://github.com/huggingface/datasets/pull/5996.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5996" }
true
https://api.github.com/repos/huggingface/datasets/issues/5995
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5995/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5995/comments
https://api.github.com/repos/huggingface/datasets/issues/5995/events
https://github.com/huggingface/datasets/pull/5995
1,777,088,925
PR_kwDODunzps5UCvYJ
5,995
Support returning dataframe in map transform
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
4
"2023-06-27T14:15:08Z"
"2023-06-28T13:56:02Z"
"2023-06-28T13:46:33Z"
CONTRIBUTOR
null
Allow returning Pandas DataFrames in `map` transforms. (Plus, raise an error in the non-batched mode if a returned PyArrow table/Pandas DataFrame has more than one row)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5995/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5995/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5995.diff", "html_url": "https://github.com/huggingface/datasets/pull/5995", "merged_at": "2023-06-28T13:46:33Z", "patch_url": "https://github.com/huggingface/datasets/pull/5995.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5995" }
true
https://api.github.com/repos/huggingface/datasets/issues/5994
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5994/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5994/comments
https://api.github.com/repos/huggingface/datasets/issues/5994/events
https://github.com/huggingface/datasets/pull/5994
1,776,829,004
PR_kwDODunzps5UB1cA
5,994
Fix select_columns columns order
{ "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
4
"2023-06-27T12:32:46Z"
"2023-06-27T15:40:47Z"
"2023-06-27T15:32:43Z"
MEMBER
null
Fix the order of the columns in dataset.features when the order changes with `dataset.select_columns()`. I also fixed the same issue for `dataset.flatten()` Close https://github.com/huggingface/datasets/issues/5993
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5994/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5994/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5994.diff", "html_url": "https://github.com/huggingface/datasets/pull/5994", "merged_at": "2023-06-27T15:32:43Z", "patch_url": "https://github.com/huggingface/datasets/pull/5994.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5994" }
true
https://api.github.com/repos/huggingface/datasets/issues/5993
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5993/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5993/comments
https://api.github.com/repos/huggingface/datasets/issues/5993/events
https://github.com/huggingface/datasets/issues/5993
1,776,643,555
I_kwDODunzps5p5W3j
5,993
ValueError: Table schema does not match schema used to create file
{ "avatar_url": "https://avatars.githubusercontent.com/u/128361578?v=4", "events_url": "https://api.github.com/users/exs-avianello/events{/privacy}", "followers_url": "https://api.github.com/users/exs-avianello/followers", "following_url": "https://api.github.com/users/exs-avianello/following{/other_user}", "gists_url": "https://api.github.com/users/exs-avianello/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/exs-avianello", "id": 128361578, "login": "exs-avianello", "node_id": "U_kgDOB6akag", "organizations_url": "https://api.github.com/users/exs-avianello/orgs", "received_events_url": "https://api.github.com/users/exs-avianello/received_events", "repos_url": "https://api.github.com/users/exs-avianello/repos", "site_admin": false, "starred_url": "https://api.github.com/users/exs-avianello/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/exs-avianello/subscriptions", "type": "User", "url": "https://api.github.com/users/exs-avianello" }
[]
closed
false
{ "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" }
[ { "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" } ]
null
2
"2023-06-27T10:54:07Z"
"2023-06-27T15:36:42Z"
"2023-06-27T15:32:44Z"
NONE
null
### Describe the bug Saving a dataset as parquet fails with a `ValueError: Table schema does not match schema used to create file` if the dataset was obtained out of a `.select_columns()` call with columns selected out of order. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict( { "x1": [1, 2, 3], "x2": [10, 11, 12], } ) ds = dataset.select_columns(["x2", "x1"]) ds.to_parquet("demo.parquet") ``` ```shell >>> ValueError: Table schema does not match schema used to create file: table: x2: int64 x1: int64 -- schema metadata -- huggingface: '{"info": {"features": {"x2": {"dtype": "int64", "_type": "V' + 53 vs. file: x1: int64 x2: int64 -- schema metadata -- huggingface: '{"info": {"features": {"x1": {"dtype": "int64", "_type": "V' + 53 ``` --- I think this is because after the `.select_columns()` call with out of order columns, the output dataset features' schema ends up being out of sync with the schema of the arrow table backing it. ```python ds.features.arrow_schema >>> x1: int64 x2: int64 -- schema metadata -- huggingface: '{"info": {"features": {"x1": {"dtype": "int64", "_type": "V' + 53 ds.data.schema >>> x2: int64 x1: int64 -- schema metadata -- huggingface: '{"info": {"features": {"x2": {"dtype": "int64", "_type": "V' + 53 ``` So when we call `.to_parquet()`, the call behind the scenes to `datasets.io.parquet.ParquetDatasetWriter(...).write()` which initialises the backend `pyarrow.parquet.ParquetWriter` with `schema = self.dataset.features.arrow_schema` triggers `pyarrow` on write when [it checks](https://github.com/apache/arrow/blob/11b140a734a516e436adaddaeb35d23f30dcce44/python/pyarrow/parquet/core.py#L1086-L1090) that the `ParquetWriter` schema matches the schema of the table being written 🙌 https://github.com/huggingface/datasets/blob/6ed837325cb539a5deb99129e5ad181d0269e050/src/datasets/io/parquet.py#L139-L141 ### Expected behavior The dataset gets successfully saved as parquet. *In the same way as it does if saving it as csv: ```python import datasets dataset = datasets.Dataset.from_dict( { "x1": [1, 2, 3], "x2": [10, 11, 12], } ) ds = dataset.select_columns(["x2", "x1"]) ds.to_csv("demo.csv") ``` ### Environment info `python==3.11` `datasets==2.13.1`
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/5993/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5993/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5992
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5992/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5992/comments
https://api.github.com/repos/huggingface/datasets/issues/5992/events
https://github.com/huggingface/datasets/pull/5992
1,776,460,964
PR_kwDODunzps5UAk3C
5,992
speedup
{ "avatar_url": "https://avatars.githubusercontent.com/u/45557362?v=4", "events_url": "https://api.github.com/users/qgallouedec/events{/privacy}", "followers_url": "https://api.github.com/users/qgallouedec/followers", "following_url": "https://api.github.com/users/qgallouedec/following{/other_user}", "gists_url": "https://api.github.com/users/qgallouedec/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/qgallouedec", "id": 45557362, "login": "qgallouedec", "node_id": "MDQ6VXNlcjQ1NTU3MzYy", "organizations_url": "https://api.github.com/users/qgallouedec/orgs", "received_events_url": "https://api.github.com/users/qgallouedec/received_events", "repos_url": "https://api.github.com/users/qgallouedec/repos", "site_admin": false, "starred_url": "https://api.github.com/users/qgallouedec/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qgallouedec/subscriptions", "type": "User", "url": "https://api.github.com/users/qgallouedec" }
[]
closed
false
null
[]
null
1
"2023-06-27T09:17:58Z"
"2023-06-27T09:23:07Z"
"2023-06-27T09:18:04Z"
CONTRIBUTOR
null
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5992/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5992/timeline
null
null
1
{ "diff_url": "https://github.com/huggingface/datasets/pull/5992.diff", "html_url": "https://github.com/huggingface/datasets/pull/5992", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5992.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5992" }
true
https://api.github.com/repos/huggingface/datasets/issues/5991
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5991/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5991/comments
https://api.github.com/repos/huggingface/datasets/issues/5991/events
https://github.com/huggingface/datasets/issues/5991
1,774,456,518
I_kwDODunzps5pxA7G
5,991
`map` with any joblib backend
{ "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" }
[ { "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
0
"2023-06-26T10:33:42Z"
"2023-06-26T10:33:42Z"
null
MEMBER
null
We recently enabled the (experimental) parallel backend switch for data download and extraction but not for `map` yet. Right now we're using our `iflatmap_unordered` implementation for multiprocessing that uses a shared Queue to gather progress updates from the subprocesses and show a progress bar in the main process. If a Queue implementation that would work on any joblib backend by leveraging the filesystem that is shared among workers, we can have `iflatmap_unordered` for joblib and therefore a `map` with any joblib backend with a progress bar ! Note that the Queue doesn't need to be that optimized though since we can choose a small frequency for progress updates (like 1 update per second).
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5991/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5991/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5989
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5989/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5989/comments
https://api.github.com/repos/huggingface/datasets/issues/5989/events
https://github.com/huggingface/datasets/issues/5989
1,774,134,091
I_kwDODunzps5pvyNL
5,989
Set a rule on the config and split names
{ "avatar_url": "https://avatars.githubusercontent.com/u/1676121?v=4", "events_url": "https://api.github.com/users/severo/events{/privacy}", "followers_url": "https://api.github.com/users/severo/followers", "following_url": "https://api.github.com/users/severo/following{/other_user}", "gists_url": "https://api.github.com/users/severo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/severo", "id": 1676121, "login": "severo", "node_id": "MDQ6VXNlcjE2NzYxMjE=", "organizations_url": "https://api.github.com/users/severo/orgs", "received_events_url": "https://api.github.com/users/severo/received_events", "repos_url": "https://api.github.com/users/severo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/severo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/severo/subscriptions", "type": "User", "url": "https://api.github.com/users/severo" }
[]
open
false
null
[]
null
3
"2023-06-26T07:34:14Z"
"2023-07-19T14:22:54Z"
null
CONTRIBUTOR
null
> should we actually allow characters like spaces? maybe it's better to add validation for whitespace symbols and directly in datasets and raise https://github.com/huggingface/datasets-server/issues/853
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5989/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5989/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5988
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5988/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5988/comments
https://api.github.com/repos/huggingface/datasets/issues/5988/events
https://github.com/huggingface/datasets/issues/5988
1,773,257,828
I_kwDODunzps5pscRk
5,988
ConnectionError: Couldn't reach dataset_infos.json
{ "avatar_url": "https://avatars.githubusercontent.com/u/20674868?v=4", "events_url": "https://api.github.com/users/yulingao/events{/privacy}", "followers_url": "https://api.github.com/users/yulingao/followers", "following_url": "https://api.github.com/users/yulingao/following{/other_user}", "gists_url": "https://api.github.com/users/yulingao/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/yulingao", "id": 20674868, "login": "yulingao", "node_id": "MDQ6VXNlcjIwNjc0ODY4", "organizations_url": "https://api.github.com/users/yulingao/orgs", "received_events_url": "https://api.github.com/users/yulingao/received_events", "repos_url": "https://api.github.com/users/yulingao/repos", "site_admin": false, "starred_url": "https://api.github.com/users/yulingao/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yulingao/subscriptions", "type": "User", "url": "https://api.github.com/users/yulingao" }
[]
closed
false
null
[]
null
1
"2023-06-25T12:39:31Z"
"2023-07-07T13:20:57Z"
"2023-07-07T13:20:57Z"
NONE
null
### Describe the bug I'm trying to load codeparrot/codeparrot-clean-train, but get the following error: ConnectionError: Couldn't reach https://huggingface.co/datasets/codeparrot/codeparrot-clean-train/resolve/main/dataset_infos.json (ConnectionError(ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')))) ### Steps to reproduce the bug train_data = load_dataset('codeparrot/codeparrot-clean-train', split='train') ### Expected behavior download the dataset ### Environment info centos7
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5988/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5988/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5987
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5987/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5987/comments
https://api.github.com/repos/huggingface/datasets/issues/5987/events
https://github.com/huggingface/datasets/issues/5987
1,773,047,909
I_kwDODunzps5prpBl
5,987
Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
{ "avatar_url": "https://avatars.githubusercontent.com/u/11533479?v=4", "events_url": "https://api.github.com/users/npuichigo/events{/privacy}", "followers_url": "https://api.github.com/users/npuichigo/followers", "following_url": "https://api.github.com/users/npuichigo/following{/other_user}", "gists_url": "https://api.github.com/users/npuichigo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/npuichigo", "id": 11533479, "login": "npuichigo", "node_id": "MDQ6VXNlcjExNTMzNDc5", "organizations_url": "https://api.github.com/users/npuichigo/orgs", "received_events_url": "https://api.github.com/users/npuichigo/received_events", "repos_url": "https://api.github.com/users/npuichigo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/npuichigo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/npuichigo/subscriptions", "type": "User", "url": "https://api.github.com/users/npuichigo" }
[]
closed
false
null
[]
null
5
"2023-06-25T04:19:13Z"
"2023-06-29T16:06:08Z"
"2023-06-29T16:06:08Z"
CONTRIBUTOR
null
### Describe the bug https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809 What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead. ### Steps to reproduce the bug https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809 ### Expected behavior Users can define the max shard size. ### Environment info datasets==2.13.1
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5987/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5987/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5986
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5986/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5986/comments
https://api.github.com/repos/huggingface/datasets/issues/5986/events
https://github.com/huggingface/datasets/pull/5986
1,772,233,111
PR_kwDODunzps5TygOZ
5,986
Make IterableDataset.from_spark more efficient
{ "avatar_url": "https://avatars.githubusercontent.com/u/134338709?v=4", "events_url": "https://api.github.com/users/mathewjacob1002/events{/privacy}", "followers_url": "https://api.github.com/users/mathewjacob1002/followers", "following_url": "https://api.github.com/users/mathewjacob1002/following{/other_user}", "gists_url": "https://api.github.com/users/mathewjacob1002/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mathewjacob1002", "id": 134338709, "login": "mathewjacob1002", "node_id": "U_kgDOCAHYlQ", "organizations_url": "https://api.github.com/users/mathewjacob1002/orgs", "received_events_url": "https://api.github.com/users/mathewjacob1002/received_events", "repos_url": "https://api.github.com/users/mathewjacob1002/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mathewjacob1002/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mathewjacob1002/subscriptions", "type": "User", "url": "https://api.github.com/users/mathewjacob1002" }
[]
closed
false
null
[]
null
6
"2023-06-23T22:18:20Z"
"2023-07-07T10:05:58Z"
"2023-07-07T09:56:09Z"
CONTRIBUTOR
null
Moved the code from using collect() to using toLocalIterator, which allows for prefetching partitions that will be selected next, thus allowing for better performance when iterating.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5986/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5986/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5986.diff", "html_url": "https://github.com/huggingface/datasets/pull/5986", "merged_at": "2023-07-07T09:56:09Z", "patch_url": "https://github.com/huggingface/datasets/pull/5986.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5986" }
true
https://api.github.com/repos/huggingface/datasets/issues/5985
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5985/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5985/comments
https://api.github.com/repos/huggingface/datasets/issues/5985/events
https://github.com/huggingface/datasets/issues/5985
1,771,588,158
I_kwDODunzps5pmEo-
5,985
Cannot reuse tokenizer object for dataset map
{ "avatar_url": "https://avatars.githubusercontent.com/u/12724810?v=4", "events_url": "https://api.github.com/users/vikigenius/events{/privacy}", "followers_url": "https://api.github.com/users/vikigenius/followers", "following_url": "https://api.github.com/users/vikigenius/following{/other_user}", "gists_url": "https://api.github.com/users/vikigenius/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/vikigenius", "id": 12724810, "login": "vikigenius", "node_id": "MDQ6VXNlcjEyNzI0ODEw", "organizations_url": "https://api.github.com/users/vikigenius/orgs", "received_events_url": "https://api.github.com/users/vikigenius/received_events", "repos_url": "https://api.github.com/users/vikigenius/repos", "site_admin": false, "starred_url": "https://api.github.com/users/vikigenius/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vikigenius/subscriptions", "type": "User", "url": "https://api.github.com/users/vikigenius" }
[ { "color": "cfd3d7", "default": true, "description": "This issue or pull request already exists", "id": 1935892865, "name": "duplicate", "node_id": "MDU6TGFiZWwxOTM1ODkyODY1", "url": "https://api.github.com/repos/huggingface/datasets/labels/duplicate" } ]
closed
false
null
[]
null
2
"2023-06-23T14:45:31Z"
"2023-07-21T14:09:14Z"
"2023-07-21T14:09:14Z"
NONE
null
### Describe the bug Related to https://github.com/huggingface/transformers/issues/24441. Not sure if this is a tokenizer issue or caching issue, so filing in both. Passing the tokenizer to the dataset map function causes the tokenizer to be fingerprinted weirdly. After calling the tokenizer with arguments like padding and truncation the tokenizer object changes interanally, even though the hash remains the same. But dumps is able to detect that internal change which causes the tokenizer object's fingerprint to change. ### Steps to reproduce the bug ```python from transformers import AutoTokenizer from datasets.utils.py_utils import dumps # Huggingface datasets t = AutoTokenizer.from_pretrained('bert-base-uncased') t.save_pretrained("tok1") th1 = hash(dumps(t)) text = "This is an example text" ttext = t(text, max_length=512, padding="max_length", truncation=True) t.save_pretrained("tok2") th2 = hash(dumps(t)) assert th1 == th2 # Assertion Error ``` But if you use just the hash of the object without dumps, the hashes don't change ```python from transformers import AutoTokenizer from datasets.utils.py_utils import dumps # Huggingface datasets t = AutoTokenizer.from_pretrained('bert-base-uncased') th1 = hash(t) # Just hash no dumps text = "This is an example text" ttext = t(text, max_length=512, padding="max_length", truncation=True) th2 = hash(t) # Just hash no dumps assert th1 == th2 # This is OK ``` This causes situations such as the following 1. Create a text file like this `yes "This is an example text" | head -n 10000 > lines.txt` ```python from transformers import AutoTokenizer import datasets class TokenizeMapper(object): """Mapper for tokenizer. This is needed because the caching mechanism of HuggingFace does not work on lambdas. Each time a new lambda will be created by a new process which will lead to a different hash. This way we can have a universal mapper object in init and reuse it with the same hash for each process. """ def __init__(self, tokenizer): """Initialize the tokenizer.""" self.tokenizer = tokenizer def __call__(self, examples, **kwargs): """Run the mapper.""" texts = examples["text"] tt = self.tokenizer(texts, max_length=256, padding="max_length", truncation=True) batch_outputs = { "input_ids": tt.input_ids, "attention_mask": tt.attention_mask, } return batch_outputs t = AutoTokenizer.from_pretrained('bert-base-uncased') mapper = TokenizeMapper(t) ds = datasets.load_dataset("text", data_files="lines.txt") mds1 = ds.map( mapper, batched=False, remove_columns=["text"], ).with_format("torch") mds2 = ds.map( mapper, batched=False, remove_columns=["text"], ).with_format("torch") ``` The second call to map should reuse the cached processed dataset from mds1, but it instead it redoes the tokenization because of the behavior of dumps. ### Expected behavior We should be able to initialize a tokenizer. And reusing it should let us reuse the same map computation for the same dataset. The second call to map should reuse the cached processed dataset from mds1, but it instead it redoes the tokenization because of the behavior of dumps. ### Environment info - `datasets` version: 2.13.0 - Platform: Linux-6.1.31_1-x86_64-with-glibc2.36 - Python version: 3.9.16 - Huggingface_hub version: 0.15.1 - PyArrow version: 12.0.1 - Pandas version: 2.0.2
{ "+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/5985/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5985/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5984
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5984/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5984/comments
https://api.github.com/repos/huggingface/datasets/issues/5984/events
https://github.com/huggingface/datasets/issues/5984
1,771,571,458
I_kwDODunzps5pmAkC
5,984
AutoSharding IterableDataset's when num_workers > 1
{ "avatar_url": "https://avatars.githubusercontent.com/u/25594384?v=4", "events_url": "https://api.github.com/users/mathephysicist/events{/privacy}", "followers_url": "https://api.github.com/users/mathephysicist/followers", "following_url": "https://api.github.com/users/mathephysicist/following{/other_user}", "gists_url": "https://api.github.com/users/mathephysicist/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mathephysicist", "id": 25594384, "login": "mathephysicist", "node_id": "MDQ6VXNlcjI1NTk0Mzg0", "organizations_url": "https://api.github.com/users/mathephysicist/orgs", "received_events_url": "https://api.github.com/users/mathephysicist/received_events", "repos_url": "https://api.github.com/users/mathephysicist/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mathephysicist/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mathephysicist/subscriptions", "type": "User", "url": "https://api.github.com/users/mathephysicist" }
[ { "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
7
"2023-06-23T14:34:20Z"
"2023-12-08T09:04:04Z"
null
NONE
null
### Feature request Minimal Example ``` import torch from datasets import IterableDataset d = IterableDataset.from_file(<file_name>) dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3) for sample in dl: print(sample) ``` Warning: Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers. To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1. Expected Behavior: Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving) ### Motivation I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers. ### Your contribution If someone points me to what needs to change, I can create a PR.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5984/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5984/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5983
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5983/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5983/comments
https://api.github.com/repos/huggingface/datasets/issues/5983/events
https://github.com/huggingface/datasets/pull/5983
1,770,578,804
PR_kwDODunzps5TtDdy
5,983
replaced PathLike as a variable for save_to_disk for dataset_path wit…
{ "avatar_url": "https://avatars.githubusercontent.com/u/35114142?v=4", "events_url": "https://api.github.com/users/benjaminbrown038/events{/privacy}", "followers_url": "https://api.github.com/users/benjaminbrown038/followers", "following_url": "https://api.github.com/users/benjaminbrown038/following{/other_user}", "gists_url": "https://api.github.com/users/benjaminbrown038/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/benjaminbrown038", "id": 35114142, "login": "benjaminbrown038", "node_id": "MDQ6VXNlcjM1MTE0MTQy", "organizations_url": "https://api.github.com/users/benjaminbrown038/orgs", "received_events_url": "https://api.github.com/users/benjaminbrown038/received_events", "repos_url": "https://api.github.com/users/benjaminbrown038/repos", "site_admin": false, "starred_url": "https://api.github.com/users/benjaminbrown038/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/benjaminbrown038/subscriptions", "type": "User", "url": "https://api.github.com/users/benjaminbrown038" }
[]
closed
false
null
[]
null
0
"2023-06-23T00:57:05Z"
"2023-09-11T04:17:17Z"
"2023-09-11T04:17:17Z"
NONE
null
…h str like that of load_from_disk
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5983/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5983/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5983.diff", "html_url": "https://github.com/huggingface/datasets/pull/5983", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5983.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5983" }
true
https://api.github.com/repos/huggingface/datasets/issues/5982
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5982/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5982/comments
https://api.github.com/repos/huggingface/datasets/issues/5982/events
https://github.com/huggingface/datasets/issues/5982
1,770,333,296
I_kwDODunzps5phSRw
5,982
404 on Datasets Documentation Page
{ "avatar_url": "https://avatars.githubusercontent.com/u/118509387?v=4", "events_url": "https://api.github.com/users/kmulka-bloomberg/events{/privacy}", "followers_url": "https://api.github.com/users/kmulka-bloomberg/followers", "following_url": "https://api.github.com/users/kmulka-bloomberg/following{/other_user}", "gists_url": "https://api.github.com/users/kmulka-bloomberg/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kmulka-bloomberg", "id": 118509387, "login": "kmulka-bloomberg", "node_id": "U_kgDOBxBPSw", "organizations_url": "https://api.github.com/users/kmulka-bloomberg/orgs", "received_events_url": "https://api.github.com/users/kmulka-bloomberg/received_events", "repos_url": "https://api.github.com/users/kmulka-bloomberg/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kmulka-bloomberg/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kmulka-bloomberg/subscriptions", "type": "User", "url": "https://api.github.com/users/kmulka-bloomberg" }
[]
closed
false
null
[]
null
2
"2023-06-22T20:14:57Z"
"2023-06-26T15:45:03Z"
"2023-06-26T15:45:03Z"
NONE
null
### Describe the bug Getting a 404 from the Hugging Face Datasets docs page: https://huggingface.co/docs/datasets/index ### Steps to reproduce the bug 1. Go to URL https://huggingface.co/docs/datasets/index 2. Notice 404 not found ### Expected behavior URL should either show docs or redirect to new location ### Environment info hugginface.co
{ "+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/5982/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5982/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5981
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5981/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5981/comments
https://api.github.com/repos/huggingface/datasets/issues/5981/events
https://github.com/huggingface/datasets/issues/5981
1,770,310,087
I_kwDODunzps5phMnH
5,981
Only two cores are getting used in sagemaker with pytorch 3.10 kernel
{ "avatar_url": "https://avatars.githubusercontent.com/u/107141022?v=4", "events_url": "https://api.github.com/users/mmr-crexi/events{/privacy}", "followers_url": "https://api.github.com/users/mmr-crexi/followers", "following_url": "https://api.github.com/users/mmr-crexi/following{/other_user}", "gists_url": "https://api.github.com/users/mmr-crexi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mmr-crexi", "id": 107141022, "login": "mmr-crexi", "node_id": "U_kgDOBmLXng", "organizations_url": "https://api.github.com/users/mmr-crexi/orgs", "received_events_url": "https://api.github.com/users/mmr-crexi/received_events", "repos_url": "https://api.github.com/users/mmr-crexi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mmr-crexi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mmr-crexi/subscriptions", "type": "User", "url": "https://api.github.com/users/mmr-crexi" }
[]
closed
false
null
[]
null
4
"2023-06-22T19:57:31Z"
"2023-10-30T06:17:40Z"
"2023-07-24T11:54:52Z"
NONE
null
### Describe the bug When using the newer pytorch 3.10 kernel, only 2 cores are being used by huggingface filter and map functions. The Pytorch 3.9 kernel would use as many cores as specified in the num_proc field. We have solved this in our own code by placing the following snippet in the code that is called inside subprocesses: ```os.sched_setaffinity(0, {i for i in range(1000)})``` The problem, as near as we can tell, us that once upon a time, cpu affinity was set using a bitmask ("0xfffff" and the like), and affinity recently changed to a list of processors rather than to using the mask. As such, only processors 1 and 17 are shown to be working in htop. ![Selection_072](https://github.com/huggingface/datasets/assets/107141022/04c5a824-5321-4531-afca-7bc84dff36b4) When running functions via `map`, the above resetting of affinity works to spread across the cores. When using `filter`, however, only two cores are active. ### Steps to reproduce the bug Repro steps: 1. Create an aws sagemaker instance 2. use the pytorch 3_10 kernel 3. Load a dataset 4. run a filter operation 5. watch as only 2 cores are used when num_proc > 2 6. run a map operation 7. watch as only 2 cores are used when num_proc > 2 8. run a map operation with processor affinity reset inside the function called via map 9. Watch as all cores run ### Expected behavior All specified cores are used via the num_proc argument. ### Environment info AWS sagemaker with the following init script run in the terminal after instance creation: conda init bash bash conda activate pytorch_p310 pip install Wand PyPDF pytesseract datasets seqeval pdfplumber transformers pymupdf sentencepiece timm donut-python accelerate optimum xgboost python -m pip install 'git+https://github.com/facebookresearch/detectron2.git' sudo yum -y install htop sudo yum -y update sudo yum -y install wget libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5981/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5981/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5980
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5980/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5980/comments
https://api.github.com/repos/huggingface/datasets/issues/5980/events
https://github.com/huggingface/datasets/issues/5980
1,770,255,973
I_kwDODunzps5pg_Zl
5,980
Viewing dataset card returns “502 Bad Gateway”
{ "avatar_url": "https://avatars.githubusercontent.com/u/4241811?v=4", "events_url": "https://api.github.com/users/tbenthompson/events{/privacy}", "followers_url": "https://api.github.com/users/tbenthompson/followers", "following_url": "https://api.github.com/users/tbenthompson/following{/other_user}", "gists_url": "https://api.github.com/users/tbenthompson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tbenthompson", "id": 4241811, "login": "tbenthompson", "node_id": "MDQ6VXNlcjQyNDE4MTE=", "organizations_url": "https://api.github.com/users/tbenthompson/orgs", "received_events_url": "https://api.github.com/users/tbenthompson/received_events", "repos_url": "https://api.github.com/users/tbenthompson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tbenthompson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tbenthompson/subscriptions", "type": "User", "url": "https://api.github.com/users/tbenthompson" }
[]
closed
false
null
[]
null
3
"2023-06-22T19:14:48Z"
"2023-06-27T08:38:19Z"
"2023-06-26T14:42:45Z"
NONE
null
The url is: https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams I am able to successfully view the “Files and versions” tab: [Confirm-Labs/pile_ngrams_trigrams at main](https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams/tree/main) Any help would be appreciated! Thanks! I hope this is the right place to report an issue like this.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5980/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5980/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5979
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5979/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5979/comments
https://api.github.com/repos/huggingface/datasets/issues/5979/events
https://github.com/huggingface/datasets/pull/5979
1,770,198,250
PR_kwDODunzps5TrxS_
5,979
set dev version
{ "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
3
"2023-06-22T18:32:14Z"
"2023-06-22T18:42:22Z"
"2023-06-22T18:32:22Z"
MEMBER
null
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5979/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5979/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5979.diff", "html_url": "https://github.com/huggingface/datasets/pull/5979", "merged_at": "2023-06-22T18:32:22Z", "patch_url": "https://github.com/huggingface/datasets/pull/5979.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5979" }
true
https://api.github.com/repos/huggingface/datasets/issues/5978
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5978/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5978/comments
https://api.github.com/repos/huggingface/datasets/issues/5978/events
https://github.com/huggingface/datasets/pull/5978
1,770,187,053
PR_kwDODunzps5Tru2_
5,978
Release: 2.13.1
{ "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
4
"2023-06-22T18:23:11Z"
"2023-06-22T18:40:24Z"
"2023-06-22T18:30:16Z"
MEMBER
null
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5978/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5978/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5978.diff", "html_url": "https://github.com/huggingface/datasets/pull/5978", "merged_at": "2023-06-22T18:30:16Z", "patch_url": "https://github.com/huggingface/datasets/pull/5978.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5978" }
true
https://api.github.com/repos/huggingface/datasets/issues/5976
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5976/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5976/comments
https://api.github.com/repos/huggingface/datasets/issues/5976/events
https://github.com/huggingface/datasets/pull/5976
1,768,503,913
PR_kwDODunzps5TmAFp
5,976
Avoid stuck map operation when subprocesses crashes
{ "avatar_url": "https://avatars.githubusercontent.com/u/1213561?v=4", "events_url": "https://api.github.com/users/pappacena/events{/privacy}", "followers_url": "https://api.github.com/users/pappacena/followers", "following_url": "https://api.github.com/users/pappacena/following{/other_user}", "gists_url": "https://api.github.com/users/pappacena/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pappacena", "id": 1213561, "login": "pappacena", "node_id": "MDQ6VXNlcjEyMTM1NjE=", "organizations_url": "https://api.github.com/users/pappacena/orgs", "received_events_url": "https://api.github.com/users/pappacena/received_events", "repos_url": "https://api.github.com/users/pappacena/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pappacena/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pappacena/subscriptions", "type": "User", "url": "https://api.github.com/users/pappacena" }
[]
closed
false
null
[]
null
11
"2023-06-21T21:18:31Z"
"2023-07-10T09:58:39Z"
"2023-07-10T09:50:07Z"
CONTRIBUTOR
null
I've been using Dataset.map() with `num_proc=os.cpu_count()` to leverage multicore processing for my datasets, but from time to time I get stuck processes waiting forever. Apparently, when one of the subprocesses is abruptly killed (OOM killer, segfault, SIGKILL, etc), the main process keeps waiting for the async task sent to that child process to finish. It seems to be easy to reproduce the issue with the following script: ``` import os from datasets import Dataset, Features, Value def do_stuck(item): os.kill(os.getpid(), 9) data = { "col1": list(range(5)), "col2": list(range(5)), } ds = Dataset.from_dict( data, features=Features({ "col1": Value("int64"), "col2": Value("int64"), }), ) print(ds.map(do_stuck, num_proc=4)) ``` This is an old behavior in Python, which apparently was fixed a few years ago in `concurrent.futures.ProcessPoolExecutor` ([ref](https://bugs.python.org/issue9205)), but not in `multiprocessing.pool.Pool` / `multiprocess.pool.Pool`, which is used by `Dataset.map` ([ref](https://bugs.python.org/issue22393)). This PR is an idea to try to detect when a child process gets killed, and raises a `RuntimeError` warning the dataset.map() caller. EDIT: Related proposal for future improvement: https://github.com/huggingface/datasets/discussions/5977
{ "+1": 2, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/huggingface/datasets/issues/5976/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5976/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5976.diff", "html_url": "https://github.com/huggingface/datasets/pull/5976", "merged_at": "2023-07-10T09:50:07Z", "patch_url": "https://github.com/huggingface/datasets/pull/5976.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5976" }
true
https://api.github.com/repos/huggingface/datasets/issues/5975
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5975/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5975/comments
https://api.github.com/repos/huggingface/datasets/issues/5975/events
https://github.com/huggingface/datasets/issues/5975
1,768,271,343
I_kwDODunzps5pZa3v
5,975
Streaming Dataset behind Proxy - FileNotFoundError
{ "avatar_url": "https://avatars.githubusercontent.com/u/135350576?v=4", "events_url": "https://api.github.com/users/Veluchs/events{/privacy}", "followers_url": "https://api.github.com/users/Veluchs/followers", "following_url": "https://api.github.com/users/Veluchs/following{/other_user}", "gists_url": "https://api.github.com/users/Veluchs/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Veluchs", "id": 135350576, "login": "Veluchs", "node_id": "U_kgDOCBFJMA", "organizations_url": "https://api.github.com/users/Veluchs/orgs", "received_events_url": "https://api.github.com/users/Veluchs/received_events", "repos_url": "https://api.github.com/users/Veluchs/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Veluchs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Veluchs/subscriptions", "type": "User", "url": "https://api.github.com/users/Veluchs" }
[]
closed
false
null
[]
null
9
"2023-06-21T19:10:02Z"
"2023-06-30T05:55:39Z"
"2023-06-30T05:55:38Z"
NONE
null
### Describe the bug When trying to stream a dataset i get the following error after a few minutes of waiting. ``` FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json If the repo is private or gated, make sure to log in with `huggingface-cli login`. ``` I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected. Still i suspect that this is connected to being behind a proxy. Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec? ### Steps to reproduce the bug This is the code i use. ``` import os os.environ['http_proxy'] = "http://example.com:xxxx" os.environ['https_proxy'] = "http://example.com:xxxx" from datasets import load_dataset ds = load_dataset("facebook/voxpopuli", name="de", streaming=True) ``` ### Expected behavior I would expect the streaming functionality to use the set proxy settings. ### Environment info - `datasets` version: 2.13.0 - Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35 - Python version: 3.10.11 - Huggingface_hub version: 0.15.1 - PyArrow version: 11.0.0 - Pandas version: 2.0.2
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5975/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5975/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5974
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5974/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5974/comments
https://api.github.com/repos/huggingface/datasets/issues/5974/events
https://github.com/huggingface/datasets/pull/5974
1,767,981,231
PR_kwDODunzps5TkXCb
5,974
Deprecate `errors` param in favor of `encoding_errors` in text builder
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
3
"2023-06-21T16:31:38Z"
"2023-06-26T10:34:43Z"
"2023-06-26T10:27:40Z"
CONTRIBUTOR
null
For consistency with the JSON builder and Pandas
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5974/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5974/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5974.diff", "html_url": "https://github.com/huggingface/datasets/pull/5974", "merged_at": "2023-06-26T10:27:40Z", "patch_url": "https://github.com/huggingface/datasets/pull/5974.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5974" }
true
https://api.github.com/repos/huggingface/datasets/issues/5972
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5972/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5972/comments
https://api.github.com/repos/huggingface/datasets/issues/5972/events
https://github.com/huggingface/datasets/pull/5972
1,767,897,485
PR_kwDODunzps5TkE7K
5,972
Filter unsupported extensions
{ "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
5
"2023-06-21T15:43:01Z"
"2023-06-22T14:23:29Z"
"2023-06-22T14:16:26Z"
MEMBER
null
I used a regex to filter the data files based on their extension for packaged builders. I tried and a regex is 10x faster that using `in` to check if the extension is in the list of supported extensions. Supersedes https://github.com/huggingface/datasets/pull/5850 Close https://github.com/huggingface/datasets/issues/5849 I also did a small change to favor the parquet module in case of a draw in the extension counter.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5972/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5972/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5972.diff", "html_url": "https://github.com/huggingface/datasets/pull/5972", "merged_at": "2023-06-22T14:16:26Z", "patch_url": "https://github.com/huggingface/datasets/pull/5972.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5972" }
true
https://api.github.com/repos/huggingface/datasets/issues/5971
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5971/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5971/comments
https://api.github.com/repos/huggingface/datasets/issues/5971/events
https://github.com/huggingface/datasets/issues/5971
1,767,053,635
I_kwDODunzps5pUxlD
5,971
Docs: make "repository structure" easier to find
{ "avatar_url": "https://avatars.githubusercontent.com/u/1676121?v=4", "events_url": "https://api.github.com/users/severo/events{/privacy}", "followers_url": "https://api.github.com/users/severo/followers", "following_url": "https://api.github.com/users/severo/following{/other_user}", "gists_url": "https://api.github.com/users/severo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/severo", "id": 1676121, "login": "severo", "node_id": "MDQ6VXNlcjE2NzYxMjE=", "organizations_url": "https://api.github.com/users/severo/orgs", "received_events_url": "https://api.github.com/users/severo/received_events", "repos_url": "https://api.github.com/users/severo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/severo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/severo/subscriptions", "type": "User", "url": "https://api.github.com/users/severo" }
[ { "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" } ]
open
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/35114142?v=4", "events_url": "https://api.github.com/users/benjaminbrown038/events{/privacy}", "followers_url": "https://api.github.com/users/benjaminbrown038/followers", "following_url": "https://api.github.com/users/benjaminbrown038/following{/other_user}", "gists_url": "https://api.github.com/users/benjaminbrown038/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/benjaminbrown038", "id": 35114142, "login": "benjaminbrown038", "node_id": "MDQ6VXNlcjM1MTE0MTQy", "organizations_url": "https://api.github.com/users/benjaminbrown038/orgs", "received_events_url": "https://api.github.com/users/benjaminbrown038/received_events", "repos_url": "https://api.github.com/users/benjaminbrown038/repos", "site_admin": false, "starred_url": "https://api.github.com/users/benjaminbrown038/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/benjaminbrown038/subscriptions", "type": "User", "url": "https://api.github.com/users/benjaminbrown038" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/35114142?v=4", "events_url": "https://api.github.com/users/benjaminbrown038/events{/privacy}", "followers_url": "https://api.github.com/users/benjaminbrown038/followers", "following_url": "https://api.github.com/users/benjaminbrown038/following{/other_user}", "gists_url": "https://api.github.com/users/benjaminbrown038/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/benjaminbrown038", "id": 35114142, "login": "benjaminbrown038", "node_id": "MDQ6VXNlcjM1MTE0MTQy", "organizations_url": "https://api.github.com/users/benjaminbrown038/orgs", "received_events_url": "https://api.github.com/users/benjaminbrown038/received_events", "repos_url": "https://api.github.com/users/benjaminbrown038/repos", "site_admin": false, "starred_url": "https://api.github.com/users/benjaminbrown038/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/benjaminbrown038/subscriptions", "type": "User", "url": "https://api.github.com/users/benjaminbrown038" } ]
null
5
"2023-06-21T08:26:44Z"
"2023-07-05T06:51:38Z"
null
CONTRIBUTOR
null
The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script. It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages.
{ "+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/5971/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5971/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5970
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5970/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5970/comments
https://api.github.com/repos/huggingface/datasets/issues/5970/events
https://github.com/huggingface/datasets/issues/5970
1,766,010,356
I_kwDODunzps5pQy30
5,970
description disappearing from Info when Uploading a Dataset Created with `from_dict`
{ "avatar_url": "https://avatars.githubusercontent.com/u/20377292?v=4", "events_url": "https://api.github.com/users/balisujohn/events{/privacy}", "followers_url": "https://api.github.com/users/balisujohn/followers", "following_url": "https://api.github.com/users/balisujohn/following{/other_user}", "gists_url": "https://api.github.com/users/balisujohn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/balisujohn", "id": 20377292, "login": "balisujohn", "node_id": "MDQ6VXNlcjIwMzc3Mjky", "organizations_url": "https://api.github.com/users/balisujohn/orgs", "received_events_url": "https://api.github.com/users/balisujohn/received_events", "repos_url": "https://api.github.com/users/balisujohn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/balisujohn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/balisujohn/subscriptions", "type": "User", "url": "https://api.github.com/users/balisujohn" }
[]
open
false
null
[]
null
2
"2023-06-20T19:18:26Z"
"2023-06-22T14:23:56Z"
null
NONE
null
### Describe the bug When uploading a dataset created locally using `from_dict` with a specified `description` field. It appears before upload, but is missing after upload and re-download. ### Steps to reproduce the bug I think the most relevant pattern in the code might be the following lines: ``` description_json_str = json.dumps( { "dataset_id": dataset.spec.dataset_id, "env_name": dataset.spec.env_spec.id, "action_space": serialize_space(dataset.spec.action_space), "observation_space": serialize_space(dataset.spec.observation_space), } ) hugging_face_dataset = Dataset.from_dict( episodes_dict, info=DatasetInfo(description=description_json_str) ) ``` Which comes from this function https://github.com/balisujohn/minarai/blob/8e023727f0a8488c4451651d9f7a79b981412c40/minari/integrations/hugging_face.py#L39 To replicate, clone this branch of my Minari fork https://github.com/balisujohn/minarai/tree/dev-huggingface then run ``` python3.8 -m venv env source env/bin/activate python3 -m pip install -e . python3 -m pip install pytest ``` The change the hugging face repo path in the test called `test_hugging_face_push_and_pull_dataset` in `tests/integrations/test_hugging_face.py` to one you have permissions to write to. Then run: ``` pytest tests/integrations/test_hugging_face.py::test_hugging_face_push_and_pull_dataset ``` ### Expected behavior DATASET INFO BEFORE UPLOADING DatasetInfo(description='{"dataset_id": "dummy-combo-test-v0", "env_name": "DummyComboEnv-v0", "action_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}]}", "observation_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"component_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [-1.0], \\"high\\": [1.0]}, \\"component_2\\": {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"subcomponent_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, \\"subcomponent_2\\": {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}, {\\"type\\": \\"Discrete\\", \\"dtype\\": \\"int64\\", \\"start\\": 0, \\"n\\": 10}]}}}}}]}]}"}', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None) ... DATASET INFO AFTER UPLOADING AND DOWNLOADING DatasetInfo(description='', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits={'train': SplitInfo(name='train', num_bytes=4846, num_examples=60, shard_lengths=None, dataset_name='parquet')}, download_checksums={'https://huggingface.co/datasets/balisujohn/minari_test/resolve/8217b614ff9ba5edc1a30c7df430e92a46f65363/data/train-00000-of-00001-7c5900b93b35745e.parquet': {'num_bytes': 9052, 'checksum': None}}, download_size=9052, post_processing_size=None, dataset_size=4846, size_in_bytes=13898) ... ### Environment info - `datasets` version: 2.13.0 - Platform: Linux-5.15.0-75-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.15.1 - PyArrow version: 12.0.1 - Pandas version: 2.0.2
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5970/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5970/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5969
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5969/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5969/comments
https://api.github.com/repos/huggingface/datasets/issues/5969/events
https://github.com/huggingface/datasets/pull/5969
1,765,529,905
PR_kwDODunzps5Tcgq4
5,969
Add `encoding` and `errors` params to JSON loader
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
4
"2023-06-20T14:28:35Z"
"2023-06-21T13:39:50Z"
"2023-06-21T13:32:22Z"
CONTRIBUTOR
null
"Requested" in https://discuss.huggingface.co/t/utf-16-for-datasets/43828/3. `pd.read_json` also has these parameters, so it makes sense to be consistent.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5969/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5969/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5969.diff", "html_url": "https://github.com/huggingface/datasets/pull/5969", "merged_at": "2023-06-21T13:32:22Z", "patch_url": "https://github.com/huggingface/datasets/pull/5969.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5969" }
true
https://api.github.com/repos/huggingface/datasets/issues/5968
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5968/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5968/comments
https://api.github.com/repos/huggingface/datasets/issues/5968/events
https://github.com/huggingface/datasets/issues/5968
1,765,252,561
I_kwDODunzps5pN53R
5,968
Common Voice datasets still need `use_auth_token=True`
{ "avatar_url": "https://avatars.githubusercontent.com/u/23423619?v=4", "events_url": "https://api.github.com/users/patrickvonplaten/events{/privacy}", "followers_url": "https://api.github.com/users/patrickvonplaten/followers", "following_url": "https://api.github.com/users/patrickvonplaten/following{/other_user}", "gists_url": "https://api.github.com/users/patrickvonplaten/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/patrickvonplaten", "id": 23423619, "login": "patrickvonplaten", "node_id": "MDQ6VXNlcjIzNDIzNjE5", "organizations_url": "https://api.github.com/users/patrickvonplaten/orgs", "received_events_url": "https://api.github.com/users/patrickvonplaten/received_events", "repos_url": "https://api.github.com/users/patrickvonplaten/repos", "site_admin": false, "starred_url": "https://api.github.com/users/patrickvonplaten/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/patrickvonplaten/subscriptions", "type": "User", "url": "https://api.github.com/users/patrickvonplaten" }
[]
closed
false
null
[]
null
4
"2023-06-20T11:58:37Z"
"2023-07-29T16:08:59Z"
"2023-07-29T16:08:58Z"
MEMBER
null
### Describe the bug We don't need to pass `use_auth_token=True` anymore to download gated datasets or models, so the following should work if correctly logged in. ```py from datasets import load_dataset load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation") ``` However it throws an error - probably because something weird is hardcoded into the dataset loading script. ### Steps to reproduce the bug 1.) ``` huggingface-cli login ``` 2.) Make sure that you have accepted the license here: https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1 3.) Run: ```py from datasets import load_dataset load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation") ``` 4.) You'll get: ``` File ~/hf/lib/python3.10/site-packages/datasets/builder.py:963, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs) 961 split_dict = SplitDict(dataset_name=self.name) 962 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) --> 963 split_generators = self._split_generators(dl_manager, **split_generators_kwargs) 965 # Checksums verification 966 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums: File ~/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_6_1/f4d7854c466f5bd4908988dbd39044ec4fc634d89e0515ab0c51715c0127ffe3/common_voice_6_1.py:150, in CommonVoice._split_generators(self, dl_manager) 148 hf_auth_token = dl_manager.download_config.use_auth_token 149 if hf_auth_token is None: --> 150 raise ConnectionError( 151 "Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset" 152 ) 154 bundle_url_template = STATS["bundleURLTemplate"] 155 bundle_version = bundle_url_template.split("/")[0] ConnectionError: Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset ``` ### Expected behavior One should not have to pass `use_auth_token=True`. Also see discussion here: https://github.com/huggingface/blog/pull/1243#discussion_r1235131150 ### Environment info ``` - `datasets` version: 2.13.0 - Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35 - Python version: 3.10.6 - Huggingface_hub version: 0.16.0.dev0 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5968/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5968/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5967
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5967/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5967/comments
https://api.github.com/repos/huggingface/datasets/issues/5967/events
https://github.com/huggingface/datasets/issues/5967
1,763,926,520
I_kwDODunzps5pI2H4
5,967
Config name / split name lost after map with multiproc
{ "avatar_url": "https://avatars.githubusercontent.com/u/93869735?v=4", "events_url": "https://api.github.com/users/sanchit-gandhi/events{/privacy}", "followers_url": "https://api.github.com/users/sanchit-gandhi/followers", "following_url": "https://api.github.com/users/sanchit-gandhi/following{/other_user}", "gists_url": "https://api.github.com/users/sanchit-gandhi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sanchit-gandhi", "id": 93869735, "login": "sanchit-gandhi", "node_id": "U_kgDOBZhWpw", "organizations_url": "https://api.github.com/users/sanchit-gandhi/orgs", "received_events_url": "https://api.github.com/users/sanchit-gandhi/received_events", "repos_url": "https://api.github.com/users/sanchit-gandhi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sanchit-gandhi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sanchit-gandhi/subscriptions", "type": "User", "url": "https://api.github.com/users/sanchit-gandhi" }
[]
open
false
null
[]
null
2
"2023-06-19T17:27:36Z"
"2023-06-28T08:55:25Z"
null
CONTRIBUTOR
null
### Describe the bug Performing a `.map` method on a dataset loses it's config name / split name only if run with multiproc ### Steps to reproduce the bug ```python from datasets import Audio, load_dataset from transformers import AutoFeatureExtractor import numpy as np # load dummy dataset libri = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean") # make train / test splits libri = libri["validation"].train_test_split(seed=42, shuffle=True, test_size=0.1) # example feature extractor model_id = "ntu-spml/distilhubert" feature_extractor = AutoFeatureExtractor.from_pretrained(model_id, do_normalize=True, return_attention_mask=True) sampling_rate = feature_extractor.sampling_rate libri = libri.cast_column("audio", Audio(sampling_rate=sampling_rate)) max_duration = 30.0 def preprocess_function(examples): audio_arrays = [x["array"] for x in examples["audio"]] inputs = feature_extractor( audio_arrays, sampling_rate=feature_extractor.sampling_rate, max_length=int(feature_extractor.sampling_rate * max_duration), truncation=True, return_attention_mask=True, ) return inputs # single proc map libri_encoded = libri.map( preprocess_function, remove_columns=["audio", "file"], batched=True, num_proc=1 ) print(10 * "=" ,"Single processing", 10 * "=") print("Config name before: ", libri["train"].config_name, " Split name before: ", libri["train"].split) print("Config name after: ", libri_encoded["train"].config_name, " Split name after: ", libri_encoded["train"].split) # multi proc map libri_encoded = libri.map( preprocess_function, remove_columns=["audio", "file"], batched=True, num_proc=2 ) print(10 * "=" ,"Multi processing", 10 * "=") print("Config name before: ", libri["train"].config_name, " Split name before: ", libri["train"].split) print("Config name after: ", libri_encoded["train"].config_name, " Split name after: ", libri_encoded["train"].split) ``` **Print Output:** ``` ========== Single processing ========== Config name before: clean Split name before: validation Config name after: clean Split name after: validation ========== Multi processing ========== Config name before: clean Split name before: validation Config name after: None Split name after: None ``` => we can see that the config/split names are lost in the multiprocessing setting ### Expected behavior Should retain both config / split names in the multiproc setting ### Environment info - `datasets` version: 2.13.1.dev0 - Platform: Linux-5.15.0-67-generic-x86_64-with-glibc2.35 - Python version: 3.10.6 - Huggingface_hub version: 0.15.1 - PyArrow version: 12.0.0 - Pandas version: 2.0.2
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5967/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5967/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5966
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5966/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5966/comments
https://api.github.com/repos/huggingface/datasets/issues/5966/events
https://github.com/huggingface/datasets/pull/5966
1,763,885,914
PR_kwDODunzps5TXBLP
5,966
Fix JSON generation in benchmarks CI
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
3
"2023-06-19T16:56:06Z"
"2023-06-19T17:29:11Z"
"2023-06-19T17:22:10Z"
CONTRIBUTOR
null
Related to changes made in https://github.com/iterative/dvc/pull/9475
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5966/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5966/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5966.diff", "html_url": "https://github.com/huggingface/datasets/pull/5966", "merged_at": "2023-06-19T17:22:10Z", "patch_url": "https://github.com/huggingface/datasets/pull/5966.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5966" }
true
https://api.github.com/repos/huggingface/datasets/issues/5965
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5965/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5965/comments
https://api.github.com/repos/huggingface/datasets/issues/5965/events
https://github.com/huggingface/datasets/issues/5965
1,763,648,540
I_kwDODunzps5pHyQc
5,965
"Couldn't cast array of type" in complex datasets
{ "avatar_url": "https://avatars.githubusercontent.com/u/1712066?v=4", "events_url": "https://api.github.com/users/piercefreeman/events{/privacy}", "followers_url": "https://api.github.com/users/piercefreeman/followers", "following_url": "https://api.github.com/users/piercefreeman/following{/other_user}", "gists_url": "https://api.github.com/users/piercefreeman/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/piercefreeman", "id": 1712066, "login": "piercefreeman", "node_id": "MDQ6VXNlcjE3MTIwNjY=", "organizations_url": "https://api.github.com/users/piercefreeman/orgs", "received_events_url": "https://api.github.com/users/piercefreeman/received_events", "repos_url": "https://api.github.com/users/piercefreeman/repos", "site_admin": false, "starred_url": "https://api.github.com/users/piercefreeman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/piercefreeman/subscriptions", "type": "User", "url": "https://api.github.com/users/piercefreeman" }
[]
closed
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" } ]
null
4
"2023-06-19T14:16:14Z"
"2023-07-26T15:13:53Z"
"2023-07-26T15:13:53Z"
NONE
null
### Describe the bug When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value. This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level. Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided. ### Steps to reproduce the bug A trivial reproduction case: ```python from typing import Iterator, Any import pandas as pd from datasets import Dataset def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]: for i in range(next(iter(lengths))): yield {feature: values[i] for feature, values in batch.items()} def examples_to_batch(examples) -> dict[str, list[Any]]: batch = {} for example in examples: for feature, value in example.items(): if feature not in batch: batch[feature] = [] batch[feature].append(value) return batch def batch_process(examples, explicit_schema: bool): new_examples = [] for example in batch_to_examples(examples): new_examples.append(dict(texts=example["raw_text"].split())) return examples_to_batch(new_examples) df = pd.DataFrame( [ {"raw_text": ""}, {"raw_text": "This is a test"}, {"raw_text": "This is another test"}, ] ) dataset = Dataset.from_pandas(df) # datasets won't be able to typehint a dataset that starts with an empty example. with pytest.raises(TypeError, match="Couldn't cast array of type"): dataset = dataset.map( batch_process, batched=True, batch_size=1, num_proc=1, remove_columns=dataset.column_names, ) ``` This results in crashes like: ```bash File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper return func(array, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature return array_cast(array, feature(), allow_number_to_str=allow_number_to_str) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper return func(array, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}") TypeError: Couldn't cast array of type string to null ``` ### Expected behavior The code should successfully map and create a new dataset without error. ### Environment info Mac OSX, Linux
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5965/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5965/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5964
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5964/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5964/comments
https://api.github.com/repos/huggingface/datasets/issues/5964/events
https://github.com/huggingface/datasets/pull/5964
1,763,513,574
PR_kwDODunzps5TVweZ
5,964
Always return list in `list_datasets`
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
2
"2023-06-19T13:07:08Z"
"2023-06-19T17:29:37Z"
"2023-06-19T17:22:41Z"
CONTRIBUTOR
null
Fix #5925 Plus, deprecate `list_datasets`/`inspect_dataset` in favor of `huggingface_hub.list_datasets`/"git clone workflow" (downloads data files)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5964/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5964/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5964.diff", "html_url": "https://github.com/huggingface/datasets/pull/5964", "merged_at": "2023-06-19T17:22:41Z", "patch_url": "https://github.com/huggingface/datasets/pull/5964.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5964" }
true
https://api.github.com/repos/huggingface/datasets/issues/5963
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5963/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5963/comments
https://api.github.com/repos/huggingface/datasets/issues/5963/events
https://github.com/huggingface/datasets/issues/5963
1,762,774,457
I_kwDODunzps5pEc25
5,963
Got an error _pickle.PicklingError use Dataset.from_spark.
{ "avatar_url": "https://avatars.githubusercontent.com/u/112800614?v=4", "events_url": "https://api.github.com/users/yanzia12138/events{/privacy}", "followers_url": "https://api.github.com/users/yanzia12138/followers", "following_url": "https://api.github.com/users/yanzia12138/following{/other_user}", "gists_url": "https://api.github.com/users/yanzia12138/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/yanzia12138", "id": 112800614, "login": "yanzia12138", "node_id": "U_kgDOBrkzZg", "organizations_url": "https://api.github.com/users/yanzia12138/orgs", "received_events_url": "https://api.github.com/users/yanzia12138/received_events", "repos_url": "https://api.github.com/users/yanzia12138/repos", "site_admin": false, "starred_url": "https://api.github.com/users/yanzia12138/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yanzia12138/subscriptions", "type": "User", "url": "https://api.github.com/users/yanzia12138" }
[]
closed
false
null
[]
null
5
"2023-06-19T05:30:35Z"
"2023-07-24T11:55:46Z"
"2023-07-24T11:55:46Z"
NONE
null
python 3.9.2 Got an error _pickle.PicklingError use Dataset.from_spark. Did the dataset import load data from spark dataframe using multi-node Spark cluster df = spark.read.parquet(args.input_data).repartition(50) ds = Dataset.from_spark(df, keep_in_memory=True, cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data") ds.save_to_disk(args.output_data) Error : _pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063. 23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.) _Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_ W Traceback (most recent call last): File "/home/work/main.py", line 100, in <module> run(args) File "/home/work/main.py", line 80, in run ds = Dataset.from_spark(df1, keep_in_memory=True, File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark return SparkDatasetReader( File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read self.builder.download_and_prepare( File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare self._download_and_prepare( File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split self._validate_cache_dir() File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect() File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd()) File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer, File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command) File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD pickled_command = ser.dumps(command) File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps raise pickle.PicklingError(msg) _pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063. 23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5963/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5963/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5962
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5962/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5962/comments
https://api.github.com/repos/huggingface/datasets/issues/5962/events
https://github.com/huggingface/datasets/issues/5962
1,761,589,882
I_kwDODunzps5o_7p6
5,962
Issue with train_test_split maintaining the same underlying PyArrow Table
{ "avatar_url": "https://avatars.githubusercontent.com/u/70730520?v=4", "events_url": "https://api.github.com/users/Oziel14/events{/privacy}", "followers_url": "https://api.github.com/users/Oziel14/followers", "following_url": "https://api.github.com/users/Oziel14/following{/other_user}", "gists_url": "https://api.github.com/users/Oziel14/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Oziel14", "id": 70730520, "login": "Oziel14", "node_id": "MDQ6VXNlcjcwNzMwNTIw", "organizations_url": "https://api.github.com/users/Oziel14/orgs", "received_events_url": "https://api.github.com/users/Oziel14/received_events", "repos_url": "https://api.github.com/users/Oziel14/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Oziel14/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Oziel14/subscriptions", "type": "User", "url": "https://api.github.com/users/Oziel14" }
[]
open
false
null
[]
null
0
"2023-06-17T02:19:58Z"
"2023-06-17T02:19:58Z"
null
NONE
null
### Describe the bug I've been using the train_test_split method in the datasets module to split my HuggingFace Dataset into separate training, validation, and testing subsets. However, I've noticed an issue where the split datasets appear to maintain the same underlying PyArrow Table. ### Steps to reproduce the bug 1. Load any dataset ```dataset = load_dataset("lhoestq/demo1")``` 2. Try the next code: ```python from datasets import Dataset, DatasetDict train_size = 0.6 split_train = dataset["train"].train_test_split( train_size=train_size, ) separate_dataset_dict = DatasetDict({ "train": split_train["train"], "test": split_train["test"], }) ``` 3. The next code ```print(separate_dataset_dict)``` when printing the dataset it gives the indication that they have 3 and 2 rows respectively. 4. But the next code: ```python print(len(separate_dataset_dict["train"].data['id'])) print(len(separate_dataset_dict["test"].data['id'])) ``` Indicates that both tables still have 5 rows. ### Expected behavior However, I've noticed that train_test_split["train"].data, test_val_split["train"].data, and test_val_split["test"].data are identical, suggesting that they all point to the same underlying PyArrow Table. This means that the split datasets are not independent, as I expected. I believe this is a bug in the train_test_split implementation, as I would expect this function to return datasets with separate underlying PyArrow Tables. Could you please help me understand if this is expected behavior, or if there's a workaround to create truly independent split datasets? I would appreciate any assistance with this issue. Thank you. ### Environment info I tried in Colab: - `datasets` version: 2.13.0 - Platform: Windows-10-10.0.22621-SP0 - Python version: 3.10.11 - Huggingface_hub version: 0.14.1 - PyArrow version: 12.0.0 - Pandas version: 2.0.1 and my PC: - `datasets` version: 2.13.0 - Platform: Linux-5.15.107+-x86_64-with-glibc2.31 - Python version: 3.10.12 - Huggingface_hub version: 0.15.1 - PyArrow version: 9.0.0 - Pandas version: 1.5.3
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5962/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5962/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5961
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5961/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5961/comments
https://api.github.com/repos/huggingface/datasets/issues/5961/events
https://github.com/huggingface/datasets/issues/5961
1,758,525,111
I_kwDODunzps5o0Pa3
5,961
IterableDataset: split by node and map may preprocess samples that will be skipped anyway
{ "avatar_url": "https://avatars.githubusercontent.com/u/27708347?v=4", "events_url": "https://api.github.com/users/johnchienbronci/events{/privacy}", "followers_url": "https://api.github.com/users/johnchienbronci/followers", "following_url": "https://api.github.com/users/johnchienbronci/following{/other_user}", "gists_url": "https://api.github.com/users/johnchienbronci/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/johnchienbronci", "id": 27708347, "login": "johnchienbronci", "node_id": "MDQ6VXNlcjI3NzA4MzQ3", "organizations_url": "https://api.github.com/users/johnchienbronci/orgs", "received_events_url": "https://api.github.com/users/johnchienbronci/received_events", "repos_url": "https://api.github.com/users/johnchienbronci/repos", "site_admin": false, "starred_url": "https://api.github.com/users/johnchienbronci/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/johnchienbronci/subscriptions", "type": "User", "url": "https://api.github.com/users/johnchienbronci" }
[]
open
false
null
[]
null
9
"2023-06-15T10:29:10Z"
"2023-09-01T10:35:11Z"
null
NONE
null
There are two ways an iterable dataset can be split by node: 1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU 2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others. In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU. This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end. Could you open a new issue so that we can discuss about this and find a solution ? _Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5961/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5961/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5959
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5959/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5959/comments
https://api.github.com/repos/huggingface/datasets/issues/5959/events
https://github.com/huggingface/datasets/issues/5959
1,757,397,507
I_kwDODunzps5ov8ID
5,959
read metric glue.py from local file
{ "avatar_url": "https://avatars.githubusercontent.com/u/31148397?v=4", "events_url": "https://api.github.com/users/JiazhaoLi/events{/privacy}", "followers_url": "https://api.github.com/users/JiazhaoLi/followers", "following_url": "https://api.github.com/users/JiazhaoLi/following{/other_user}", "gists_url": "https://api.github.com/users/JiazhaoLi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/JiazhaoLi", "id": 31148397, "login": "JiazhaoLi", "node_id": "MDQ6VXNlcjMxMTQ4Mzk3", "organizations_url": "https://api.github.com/users/JiazhaoLi/orgs", "received_events_url": "https://api.github.com/users/JiazhaoLi/received_events", "repos_url": "https://api.github.com/users/JiazhaoLi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/JiazhaoLi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JiazhaoLi/subscriptions", "type": "User", "url": "https://api.github.com/users/JiazhaoLi" }
[]
closed
false
null
[]
null
1
"2023-06-14T17:59:35Z"
"2023-06-14T18:04:16Z"
"2023-06-14T18:04:16Z"
NONE
null
### Describe the bug Currently, The server is off-line. I am using the glue metric from the local file downloaded from the hub. I download / cached datasets using `load_dataset('glue','sst2', cache_dir='/xxx')` to cache them and then in the off-line mode, I use `load_dataset('xxx/glue.py','sst2', cache_dir='/xxx')`. I can successfully reuse cached datasets. My problem is about the load_metric. When I run `load_dataset('xxx/glue_metric.py','sst2',cache_dir='/xxx')` , it returns ` File "xx/lib64/python3.9/site-packages/datasets/utils/deprecation_utils.py", line 46, in wrapper return deprecated_function(*args, **kwargs) File "xx//lib64/python3.9/site-packages/datasets/load.py", line 1392, in load_metric metric = metric_cls( TypeError: 'NoneType' object is not callable` Thanks in advance for help! ### Steps to reproduce the bug N/A ### Expected behavior N/A ### Environment info `datasets == 2.12.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/5959/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5959/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5958
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5958/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5958/comments
https://api.github.com/repos/huggingface/datasets/issues/5958/events
https://github.com/huggingface/datasets/pull/5958
1,757,265,971
PR_kwDODunzps5TA3__
5,958
set dev version
{ "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
3
"2023-06-14T16:26:34Z"
"2023-06-14T16:34:55Z"
"2023-06-14T16:26:51Z"
MEMBER
null
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5958/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5958/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5958.diff", "html_url": "https://github.com/huggingface/datasets/pull/5958", "merged_at": "2023-06-14T16:26:51Z", "patch_url": "https://github.com/huggingface/datasets/pull/5958.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5958" }
true
https://api.github.com/repos/huggingface/datasets/issues/5957
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5957/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5957/comments
https://api.github.com/repos/huggingface/datasets/issues/5957/events
https://github.com/huggingface/datasets/pull/5957
1,757,252,466
PR_kwDODunzps5TA1EB
5,957
Release: 2.13.0
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
closed
false
null
[]
null
4
"2023-06-14T16:17:26Z"
"2023-06-14T16:33:39Z"
"2023-06-14T16:24:39Z"
MEMBER
null
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5957/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5957/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5957.diff", "html_url": "https://github.com/huggingface/datasets/pull/5957", "merged_at": "2023-06-14T16:24:39Z", "patch_url": "https://github.com/huggingface/datasets/pull/5957.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5957" }
true
https://api.github.com/repos/huggingface/datasets/issues/5956
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5956/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5956/comments
https://api.github.com/repos/huggingface/datasets/issues/5956/events
https://github.com/huggingface/datasets/pull/5956
1,756,959,367
PR_kwDODunzps5S_1o2
5,956
Fix ArrowExamplesIterable.shard_data_sources
{ "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
4
"2023-06-14T13:50:38Z"
"2023-06-14T14:43:12Z"
"2023-06-14T14:33:45Z"
MEMBER
null
ArrowExamplesIterable.shard_data_sources was outdated I also fixed a warning message by not using format_type= in with_format()
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5956/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5956/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5956.diff", "html_url": "https://github.com/huggingface/datasets/pull/5956", "merged_at": "2023-06-14T14:33:45Z", "patch_url": "https://github.com/huggingface/datasets/pull/5956.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5956" }
true
https://api.github.com/repos/huggingface/datasets/issues/5955
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5955/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5955/comments
https://api.github.com/repos/huggingface/datasets/issues/5955/events
https://github.com/huggingface/datasets/issues/5955
1,756,827,133
I_kwDODunzps5otw39
5,955
Strange bug in loading local JSON files, using load_dataset
{ "avatar_url": "https://avatars.githubusercontent.com/u/73934131?v=4", "events_url": "https://api.github.com/users/Night-Quiet/events{/privacy}", "followers_url": "https://api.github.com/users/Night-Quiet/followers", "following_url": "https://api.github.com/users/Night-Quiet/following{/other_user}", "gists_url": "https://api.github.com/users/Night-Quiet/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Night-Quiet", "id": 73934131, "login": "Night-Quiet", "node_id": "MDQ6VXNlcjczOTM0MTMx", "organizations_url": "https://api.github.com/users/Night-Quiet/orgs", "received_events_url": "https://api.github.com/users/Night-Quiet/received_events", "repos_url": "https://api.github.com/users/Night-Quiet/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Night-Quiet/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Night-Quiet/subscriptions", "type": "User", "url": "https://api.github.com/users/Night-Quiet" }
[]
closed
false
null
[]
null
4
"2023-06-14T12:46:00Z"
"2023-06-21T14:42:15Z"
"2023-06-21T14:42:15Z"
NONE
null
### Describe the bug I am using 'load_dataset 'loads a JSON file, but I found a strange bug: an error will be reported when the length of the JSON file exceeds 160000 (uncertain exact number). I have checked the data through the following code and there are no issues. So I cannot determine the true reason for this error. The data is a list containing a dictionary. As follows: [ {'input': 'someting...', 'target': 'someting...', 'type': 'someting...', 'history': ['someting...', ...]}, ... ] ### Steps to reproduce the bug ``` import json from datasets import load_dataset path = "target.json" temp_path = "temp.json" with open(path, "r") as f: data = json.load(f) print(f"\n-------the JSON file length is: {len(data)}-------\n") with open(temp_path, "w") as f: json.dump(data[:160000], f) dataset = load_dataset("json", data_files=temp_path) print("\n-------This works when the JSON file length is 160000-------\n") with open(temp_path, "w") as f: json.dump(data[160000:], f) dataset = load_dataset("json", data_files=temp_path) print("\n-------This works and eliminates data issues-------\n") with open(temp_path, "w") as f: json.dump(data[:170000], f) dataset = load_dataset("json", data_files=temp_path) ``` ### Expected behavior ``` -------the JSON file length is: 173049------- Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4... Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3328.81it/s] Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 639.47it/s] Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data. 100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 265.85it/s] -------This works when the JSON file length is 160000------- Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4... Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 2038.05it/s] Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 794.83it/s] Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data. 100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 681.00it/s] -------This works and eliminates data issues------- Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-63f391c89599c7b0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4... Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3682.44it/s] Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 788.70it/s] Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values Traceback (most recent call last): File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1858, in _prepare_split_single for _, table in generator: File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables raise ValueError(f"Not able to read records in the JSON file at {file}.") from None ValueError: Not able to read records in the JSON file at /home/lakala/hjc/code/pycode/glm/temp.json. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/lakala/hjc/code/pycode/glm/test.py", line 22, in <module> dataset = load_dataset("json", data_files=temp_path) File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/load.py", line 1797, in load_dataset builder_instance.download_and_prepare( File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 890, in download_and_prepare self._download_and_prepare( File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 985, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1746, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1891, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.builder.DatasetGenerationError: An error occurred while generating the dataset ``` ### Environment info ``` Ubuntu==22.04 python==3.8 pytorch-transformers==1.2.0 transformers== 4.27.1 datasets==2.12.0 numpy==1.24.3 pandas==1.5.3 ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5955/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5955/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5954
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5954/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5954/comments
https://api.github.com/repos/huggingface/datasets/issues/5954/events
https://github.com/huggingface/datasets/pull/5954
1,756,572,994
PR_kwDODunzps5S-hSP
5,954
Better filenotfound for gated
{ "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
3
"2023-06-14T10:33:10Z"
"2023-06-14T12:33:27Z"
"2023-06-14T12:26:31Z"
MEMBER
null
close https://github.com/huggingface/datasets/issues/5953 <img width="1292" alt="image" src="https://github.com/huggingface/datasets/assets/42851186/270fe5bc-1739-4878-b7bc-ab6d35336d4d">
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5954/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5954/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5954.diff", "html_url": "https://github.com/huggingface/datasets/pull/5954", "merged_at": "2023-06-14T12:26:31Z", "patch_url": "https://github.com/huggingface/datasets/pull/5954.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5954" }
true
https://api.github.com/repos/huggingface/datasets/issues/5953
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5953/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5953/comments
https://api.github.com/repos/huggingface/datasets/issues/5953/events
https://github.com/huggingface/datasets/issues/5953
1,756,520,523
I_kwDODunzps5osmBL
5,953
Bad error message when trying to download gated dataset
{ "avatar_url": "https://avatars.githubusercontent.com/u/23423619?v=4", "events_url": "https://api.github.com/users/patrickvonplaten/events{/privacy}", "followers_url": "https://api.github.com/users/patrickvonplaten/followers", "following_url": "https://api.github.com/users/patrickvonplaten/following{/other_user}", "gists_url": "https://api.github.com/users/patrickvonplaten/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/patrickvonplaten", "id": 23423619, "login": "patrickvonplaten", "node_id": "MDQ6VXNlcjIzNDIzNjE5", "organizations_url": "https://api.github.com/users/patrickvonplaten/orgs", "received_events_url": "https://api.github.com/users/patrickvonplaten/received_events", "repos_url": "https://api.github.com/users/patrickvonplaten/repos", "site_admin": false, "starred_url": "https://api.github.com/users/patrickvonplaten/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/patrickvonplaten/subscriptions", "type": "User", "url": "https://api.github.com/users/patrickvonplaten" }
[]
closed
false
null
[]
null
8
"2023-06-14T10:03:39Z"
"2023-06-14T16:36:51Z"
"2023-06-14T12:26:32Z"
MEMBER
null
### Describe the bug When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.: E.g. ```sh Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0. Please make sure you specified the correct `repo_id` and `repo_type`. If you are trying to access a private or gated repo, make sure you are authenticated. Invalid username or password.. Will try to load from local cache. ``` If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO: ```sh File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs) 427 except Exception as exc: 428 if policy == "get": 429 # If get failed, then raise a FileNotFoundError --> 430 raise FileNotFoundError(url) from exc 431 logger.debug(str(exc)) 433 return {"name": url, "size": None, **info, "type": "file"} FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json ``` ### Steps to reproduce the bug ``` huggingface-cli logout ``` and then: ```py from datasets import load_dataset, Audio # English stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True) stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000)) en_sample = next(iter(stream_data))["audio"]["array"] # Swahili stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True) stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000)) sw_sample = next(iter(stream_data))["audio"]["array"] ``` ### Expected behavior Better error message ### Environment info Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.12.0 - Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35 - Python version: 3.10.6 - Huggingface_hub version: 0.16.0.dev0 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5953/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5953/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5952
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5952/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5952/comments
https://api.github.com/repos/huggingface/datasets/issues/5952/events
https://github.com/huggingface/datasets/pull/5952
1,756,481,591
PR_kwDODunzps5S-OIh
5,952
Add Arrow builder docs
{ "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
3
"2023-06-14T09:42:46Z"
"2023-06-14T14:42:31Z"
"2023-06-14T14:34:39Z"
MEMBER
null
following https://github.com/huggingface/datasets/pull/5944
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5952/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5952/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5952.diff", "html_url": "https://github.com/huggingface/datasets/pull/5952", "merged_at": "2023-06-14T14:34:39Z", "patch_url": "https://github.com/huggingface/datasets/pull/5952.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5952" }
true
https://api.github.com/repos/huggingface/datasets/issues/5951
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5951/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5951/comments
https://api.github.com/repos/huggingface/datasets/issues/5951/events
https://github.com/huggingface/datasets/issues/5951
1,756,363,546
I_kwDODunzps5or_sa
5,951
What is the Right way to use discofuse dataset??
{ "avatar_url": "https://avatars.githubusercontent.com/u/125154243?v=4", "events_url": "https://api.github.com/users/akesh1235/events{/privacy}", "followers_url": "https://api.github.com/users/akesh1235/followers", "following_url": "https://api.github.com/users/akesh1235/following{/other_user}", "gists_url": "https://api.github.com/users/akesh1235/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/akesh1235", "id": 125154243, "login": "akesh1235", "node_id": "U_kgDOB3Wzww", "organizations_url": "https://api.github.com/users/akesh1235/orgs", "received_events_url": "https://api.github.com/users/akesh1235/received_events", "repos_url": "https://api.github.com/users/akesh1235/repos", "site_admin": false, "starred_url": "https://api.github.com/users/akesh1235/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/akesh1235/subscriptions", "type": "User", "url": "https://api.github.com/users/akesh1235" }
[]
closed
false
null
[]
null
2
"2023-06-14T08:38:39Z"
"2023-06-14T13:25:06Z"
"2023-06-14T12:10:16Z"
NONE
null
[Click here for Dataset link](https://huggingface.co/datasets/discofuse/viewer/discofuse-wikipedia/train?row=6) **Below is the following way, as per my understanding , Is it correct :question: :question:** The **columns/features from `DiscoFuse dataset`** that will be the **input to the `encoder` and `decoder`** are: [Click here for Dataset link](https://huggingface.co/datasets/discofuse/viewer/discofuse-wikipedia/train?row=6) 1. **coherent_first_sentence** 2. **coherent_second_sentence** 3. **incoherent_first_sentence** 4. **incoherent_second_sentence** [Click here for Dataset link](https://huggingface.co/datasets/discofuse/viewer/discofuse-wikipedia/train?row=6) The **`encoder` will take these four columns as input and encode them into a sequence of hidden states. The `decoder` will then take these hidden states as input and decode them into a new sentence that fuses the two original sentences together.** The **discourse type, connective_string, has_coref_type_pronoun, and has_coref_type_nominal columns will not be used as input to the encoder or decoder.** These columns are used to provide additional information about the dataset, but they are not necessary for the task of sentence fusion. Please correct me if I am wrong; otherwise, if this understanding is right, how shall I implement this task practically?
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5951/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5951/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5950
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5950/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5950/comments
https://api.github.com/repos/huggingface/datasets/issues/5950/events
https://github.com/huggingface/datasets/issues/5950
1,755,197,946
I_kwDODunzps5onjH6
5,950
Support for data with instance-wise dictionary as features
{ "avatar_url": "https://avatars.githubusercontent.com/u/33274336?v=4", "events_url": "https://api.github.com/users/richardwth/events{/privacy}", "followers_url": "https://api.github.com/users/richardwth/followers", "following_url": "https://api.github.com/users/richardwth/following{/other_user}", "gists_url": "https://api.github.com/users/richardwth/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/richardwth", "id": 33274336, "login": "richardwth", "node_id": "MDQ6VXNlcjMzMjc0MzM2", "organizations_url": "https://api.github.com/users/richardwth/orgs", "received_events_url": "https://api.github.com/users/richardwth/received_events", "repos_url": "https://api.github.com/users/richardwth/repos", "site_admin": false, "starred_url": "https://api.github.com/users/richardwth/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/richardwth/subscriptions", "type": "User", "url": "https://api.github.com/users/richardwth" }
[ { "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
1
"2023-06-13T15:49:00Z"
"2023-06-14T12:13:38Z"
null
NONE
null
### Feature request I notice that when loading data instances with feature type of python dictionary, the dictionary keys would be broadcast so that every instance has the same set of keys. Please see an example in the Motivation section. It is possible to avoid this behavior, i.e., load dictionary features as it is and do not broadcast the keys among instances? Please note that these dictionaries would have to be processed dynamically at each training iteration into strings (and tokenized). ### Motivation I am trying to load a dataset from a json file. Each instance of the dataset has a feature that is a dictionary but its keys depend on the instance. Every two instances may have different keys. For example, imagine a dataset that contains a set of math expressions from a bunch of mutually redundant expressions: ``` { "index": 0, "feature": { "2 * x + y >= 3": ["2 * x + y >= 3", "4 * x + 2 * y >= 6"], ... } }, ... { "index": 9999, "feature": { "x >= 6": ["x >= 6", "x >= 0", "x >= -1"], ... } }, ... ``` When directly loading the dataset using `data = load_dataset("json", data_files=file_paths, split='train')`, each instance would have all the keys from other instances and None as values. That is, instance of index 0 becomes: ``` { "index": 0, "feature": { "2 * x + y >= 3": ["2 * x + y >= 3", "4 * x + 2 * y >= 6"], ... "x >= 6": None, # keys from other instances ... } }, ``` This is not desirable. Moreover, issue would be raised if I attempt to combine two such datasets using `data = concatenate_datasets(multi_datasets)`, perhaps because their dictionary features contain different keys. A solution I can think of is to store the dictionary features as a long string, and evaluate it later. Please kindly suggest any other solution using existing methods of datasets. ### Your contribution 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/5950/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5950/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5949
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5949/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5949/comments
https://api.github.com/repos/huggingface/datasets/issues/5949/events
https://github.com/huggingface/datasets/pull/5949
1,754,843,717
PR_kwDODunzps5S4oPC
5,949
Replace metadata utils with `huggingface_hub`'s RepoCard API
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
8
"2023-06-13T13:03:19Z"
"2023-06-27T16:47:51Z"
"2023-06-27T16:38:32Z"
CONTRIBUTOR
null
Use `huggingface_hub`'s RepoCard API instead of `DatasetMetadata` for modifying the card's YAML, and deprecate `datasets.utils.metadata` and `datasets.utils.readme`. After removing these modules, we can also delete `datasets.utils.resources` since the moon landing repo now stores its own version of these resources for the metadata UI. PS: this change requires bumping `huggingface_hub` to 0.13.0 (Transformers requires 0.14.0, so should be ok)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5949/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5949/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5949.diff", "html_url": "https://github.com/huggingface/datasets/pull/5949", "merged_at": "2023-06-27T16:38:32Z", "patch_url": "https://github.com/huggingface/datasets/pull/5949.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5949" }
true
https://api.github.com/repos/huggingface/datasets/issues/5948
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5948/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5948/comments
https://api.github.com/repos/huggingface/datasets/issues/5948/events
https://github.com/huggingface/datasets/pull/5948
1,754,794,611
PR_kwDODunzps5S4dUt
5,948
Fix sequence of array support for most dtype
{ "avatar_url": "https://avatars.githubusercontent.com/u/45557362?v=4", "events_url": "https://api.github.com/users/qgallouedec/events{/privacy}", "followers_url": "https://api.github.com/users/qgallouedec/followers", "following_url": "https://api.github.com/users/qgallouedec/following{/other_user}", "gists_url": "https://api.github.com/users/qgallouedec/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/qgallouedec", "id": 45557362, "login": "qgallouedec", "node_id": "MDQ6VXNlcjQ1NTU3MzYy", "organizations_url": "https://api.github.com/users/qgallouedec/orgs", "received_events_url": "https://api.github.com/users/qgallouedec/received_events", "repos_url": "https://api.github.com/users/qgallouedec/repos", "site_admin": false, "starred_url": "https://api.github.com/users/qgallouedec/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qgallouedec/subscriptions", "type": "User", "url": "https://api.github.com/users/qgallouedec" }
[]
closed
false
null
[]
null
2
"2023-06-13T12:38:59Z"
"2023-06-14T15:11:55Z"
"2023-06-14T15:03:33Z"
CONTRIBUTOR
null
Fixes #5936 Also, a related fix to #5927
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5948/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5948/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5948.diff", "html_url": "https://github.com/huggingface/datasets/pull/5948", "merged_at": "2023-06-14T15:03:33Z", "patch_url": "https://github.com/huggingface/datasets/pull/5948.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5948" }
true
https://api.github.com/repos/huggingface/datasets/issues/5947
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5947/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5947/comments
https://api.github.com/repos/huggingface/datasets/issues/5947/events
https://github.com/huggingface/datasets/issues/5947
1,754,359,316
I_kwDODunzps5okWYU
5,947
Return the audio filename when decoding fails due to corrupt files
{ "avatar_url": "https://avatars.githubusercontent.com/u/8949105?v=4", "events_url": "https://api.github.com/users/wetdog/events{/privacy}", "followers_url": "https://api.github.com/users/wetdog/followers", "following_url": "https://api.github.com/users/wetdog/following{/other_user}", "gists_url": "https://api.github.com/users/wetdog/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wetdog", "id": 8949105, "login": "wetdog", "node_id": "MDQ6VXNlcjg5NDkxMDU=", "organizations_url": "https://api.github.com/users/wetdog/orgs", "received_events_url": "https://api.github.com/users/wetdog/received_events", "repos_url": "https://api.github.com/users/wetdog/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wetdog/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wetdog/subscriptions", "type": "User", "url": "https://api.github.com/users/wetdog" }
[ { "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
2
"2023-06-13T08:44:09Z"
"2023-06-14T12:45:01Z"
null
NONE
null
### Feature request Return the audio filename when the audio decoding fails. Although currently there are some checks for mp3 and opus formats with the library version there are still cases when the audio decoding could fail, eg. Corrupt file. ### Motivation When you try to load an object file dataset and the decoding fails you can't know which file is corrupt ``` raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name)) soundfile.LibsndfileError: Error opening <_io.BytesIO object at 0x7f5ab7e38290>: Format not recognised. ``` ### Your contribution Make a PR to Add exceptions for LIbsndfileError to return the audio filename or path when soundfile decoding fails.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5947/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5947/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5946
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5946/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5946/comments
https://api.github.com/repos/huggingface/datasets/issues/5946/events
https://github.com/huggingface/datasets/issues/5946
1,754,234,469
I_kwDODunzps5oj35l
5,946
IndexError Not Solving -> IndexError: Invalid key: ?? is out of bounds for size 0 or ??
{ "avatar_url": "https://avatars.githubusercontent.com/u/70565543?v=4", "events_url": "https://api.github.com/users/syngokhan/events{/privacy}", "followers_url": "https://api.github.com/users/syngokhan/followers", "following_url": "https://api.github.com/users/syngokhan/following{/other_user}", "gists_url": "https://api.github.com/users/syngokhan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/syngokhan", "id": 70565543, "login": "syngokhan", "node_id": "MDQ6VXNlcjcwNTY1NTQz", "organizations_url": "https://api.github.com/users/syngokhan/orgs", "received_events_url": "https://api.github.com/users/syngokhan/received_events", "repos_url": "https://api.github.com/users/syngokhan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/syngokhan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/syngokhan/subscriptions", "type": "User", "url": "https://api.github.com/users/syngokhan" }
[]
open
false
null
[]
null
6
"2023-06-13T07:34:15Z"
"2023-07-14T12:04:48Z"
null
NONE
null
### Describe the bug in <cell line: 1>:1 │ │ │ │ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1537 in train │ │ │ │ 1534 │ │ inner_training_loop = find_executable_batch_size( │ │ 1535 │ │ │ self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size │ │ 1536 │ │ ) │ │ ❱ 1537 │ │ return inner_training_loop( │ │ 1538 │ │ │ args=args, │ │ 1539 │ │ │ resume_from_checkpoint=resume_from_checkpoint, │ │ 1540 │ │ │ trial=trial, │ │ │ │ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1789 in _inner_training_loop │ │ │ │ 1786 │ │ │ │ rng_to_sync = True │ │ 1787 │ │ │ │ │ 1788 │ │ │ step = -1 │ │ ❱ 1789 │ │ │ for step, inputs in enumerate(epoch_iterator): │ │ 1790 │ │ │ │ total_batched_samples += 1 │ │ 1791 │ │ │ │ if rng_to_sync: │ │ 1792 │ │ │ │ │ self._load_rng_state(resume_from_checkpoint) │ │ │ │ /usr/local/lib/python3.10/dist-packages/accelerate/data_loader.py:377 in __iter__ │ │ │ │ 374 │ │ dataloader_iter = super().__iter__() │ │ 375 │ │ # We iterate one batch ahead to check when we are at the end │ │ 376 │ │ try: │ │ ❱ 377 │ │ │ current_batch = next(dataloader_iter) │ │ 378 │ │ except StopIteration: │ │ 379 │ │ │ yield │ │ 380 │ │ │ │ /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:633 in __next__ │ │ │ │ 630 │ │ │ if self._sampler_iter is None: │ │ 631 │ │ │ │ # TODO(https://github.com/pytorch/pytorch/issues/76750) │ │ 632 │ │ │ │ self._reset() # type: ignore[call-arg] │ │ ❱ 633 │ │ │ data = self._next_data() │ │ 634 │ │ │ self._num_yielded += 1 │ │ 635 │ │ │ if self._dataset_kind == _DatasetKind.Iterable and \ │ │ 636 │ │ │ │ │ self._IterableDataset_len_called is not None and \ │ │ │ │ /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:677 in _next_data │ │ │ │ 674 │ │ │ 675 │ def _next_data(self): │ │ 676 │ │ index = self._next_index() # may raise StopIteration │ │ ❱ 677 │ │ data = self._dataset_fetcher.fetch(index) # may raise StopIteration │ │ 678 │ │ if self._pin_memory: │ │ 679 │ │ │ data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) │ │ 680 │ │ return data │ │ │ │ /usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py:49 in fetch │ │ │ │ 46 │ def fetch(self, possibly_batched_index): │ │ 47 │ │ if self.auto_collation: │ │ 48 │ │ │ if hasattr(self.dataset, "__getitems__") and self.dataset.__getitems__: │ │ ❱ 49 │ │ │ │ data = self.dataset.__getitems__(possibly_batched_index) │ │ 50 │ │ │ else: │ │ 51 │ │ │ │ data = [self.dataset[idx] for idx in possibly_batched_index] │ │ 52 │ │ else: │ │ │ │ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2782 in __getitems__ │ │ │ │ 2779 │ │ │ 2780 │ def __getitems__(self, keys: List) -> List: │ │ 2781 │ │ """Can be used to get a batch using a list of integers indices.""" │ │ ❱ 2782 │ │ batch = self.__getitem__(keys) │ │ 2783 │ │ n_examples = len(batch[next(iter(batch))]) │ │ 2784 │ │ return [{col: array[i] for col, array in batch.items()} for i in range(n_example │ │ 2785 │ │ │ │ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2778 in __getitem__ │ │ │ │ 2775 │ │ │ 2776 │ def __getitem__(self, key): # noqa: F811 │ │ 2777 │ │ """Can be used to index columns (by string names) or rows (by integer index or i │ │ ❱ 2778 │ │ return self._getitem(key) │ │ 2779 │ │ │ 2780 │ def __getitems__(self, keys: List) -> List: │ │ 2781 │ │ """Can be used to get a batch using a list of integers indices.""" │ │ │ │ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2762 in _getitem │ │ │ │ 2759 │ │ format_kwargs = kwargs["format_kwargs"] if "format_kwargs" in kwargs else self._ │ │ 2760 │ │ format_kwargs = format_kwargs if format_kwargs is not None else {} │ │ 2761 │ │ formatter = get_formatter(format_type, features=self._info.features, **format_kw │ │ ❱ 2762 │ │ pa_subtable = query_table(self._data, key, indices=self._indices if self._indice │ │ 2763 │ │ formatted_output = format_table( │ │ 2764 │ │ │ pa_subtable, key, formatter=formatter, format_columns=format_columns, output │ │ 2765 │ │ ) │ │ │ │ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:578 in query_table │ │ │ │ 575 │ │ _check_valid_column_key(key, table.column_names) │ │ 576 │ else: │ │ 577 │ │ size = indices.num_rows if indices is not None else table.num_rows │ │ ❱ 578 │ │ _check_valid_index_key(key, size) │ │ 579 │ # Query the main table │ │ 580 │ if indices is None: │ │ 581 │ │ pa_subtable = _query_table(table, key) │ │ │ │ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:531 in │ │ _check_valid_index_key │ │ │ │ 528 │ │ │ _check_valid_index_key(min(key), size=size) │ │ 529 │ elif isinstance(key, Iterable): │ │ 530 │ │ if len(key) > 0: │ │ ❱ 531 │ │ │ _check_valid_index_key(int(max(key)), size=size) │ │ 532 │ │ │ _check_valid_index_key(int(min(key)), size=size) │ │ 533 │ else: │ │ 534 │ │ _raise_bad_key_type(key) │ │ │ │ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:521 in │ │ _check_valid_index_key │ │ │ │ 518 def _check_valid_index_key(key: Union[int, slice, range, Iterable], size: int) -> None: │ │ 519 │ if isinstance(key, int): │ │ 520 │ │ if (key < 0 and key + size < 0) or (key >= size): │ │ ❱ 521 │ │ │ raise IndexError(f"Invalid key: {key} is out of bounds for size {size}") │ │ 522 │ │ return │ │ 523 │ elif isinstance(key, slice): │ │ 524 │ │ pass ### Steps to reproduce the bug `` import json import os from pprint import pprint import bitsandbytes as bnb import pandas as pd import torch import torch.nn as nn import transformers from datasets import Dataset,load_dataset from peft import ( LoraConfig, PeftConfig, PeftModel, get_peft_model, prepare_model_for_kbit_training ) from transformers import ( AutoConfig, AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, ) os.environ["CUDA_VISIBLE_DEVICES"] = "0" def print_trainable_parameters(model): """ Prints the number of trainable parameters in the model. """ trainable_params = 0 all_param = 0 for _, param in model.named_parameters(): all_param += param.numel() if param.requires_grad: trainable_params += param.numel() print( f"trainable params: {trainable_params} || all params: {all_param} || trainable%: {100 * trainable_params / all_param}" ) MODEL_NAME = "tiiuae/falcon-7b" bnb_config = BitsAndBytesConfig( load_in_4bit = True, bnb_4bit_use_double_quant=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.bfloat16, ) model = AutoModelForCausalLM.from_pretrained( MODEL_NAME, device_map = "auto", trust_remote_code = True, quantization_config = bnb_config ) tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME) tokenizer.pad_token = tokenizer.eos_token model.gradient_checkpointing_enable() model = prepare_model_for_kbit_training(model) config = LoraConfig( r = 16, lora_alpha = 32, target_modules = ["query_key_value"], lora_dropout = 0.05, bias = "none", task_type = "CASUAL_LM" ) model = get_peft_model(model,config) print_trainable_parameters(model) def generate_prompt(data_point): return f""" <human>: {data_point["question"]} <assistant>: {data_point["answer"]} """.strip() def generate_and_tokenize_prompt(data_point): full_prompt = generate_prompt(data_point) tokenized_full_prompt = tokenizer(full_prompt, padding = True, truncation = True,return_tensors = None) return dict({ "input_ids" : tokenized_full_prompt["input_ids"], "attention_mask" : tokenized_full_prompt["attention_mask"] }) data = data["train"].shuffle().map(generate_and_tokenize_prompt, batched = False) OUTPUT_DIR = "experiments" trainings_args = transformers.TrainingArguments( per_device_train_batch_size = 1, gradient_accumulation_steps = 4, num_train_epochs = 1, learning_rate = 2e-4, fp16 = True, save_total_limit = 3, logging_steps = 1, output_dir = OUTPUT_DIR, max_steps = 80, optim = "paged_adamw_8bit", lr_scheduler_type = "cosine", warmup_ratio = 0.05, #remove_unused_columns=True ) trainer = transformers.Trainer( model = model, train_dataset = data, args = trainings_args, data_collator = transformers.DataCollatorForLanguageModeling(tokenizer, mlm=False), ) model.config.use_cache = False trainer.train() IndexError: Invalid key: 32 is out of bounds for size 0 DataSet Format is like : [{"question": "How can I create an account?", "answer": "To create an account, click on the 'Sign Up' button on the top right corner of our website and follow the instructions to complete the registration process."}, .... ] ### Expected behavior - ### Environment info !pip install -q pip !pip install -q bitsandbytes==0.39.0 !pip install -q torch==2.0.1 !pip install -q git+https://github.com/huggingface/transformers.git !pip install -q git+https://github.com/huggingface/peft.git !pip install -q git+https://github.com/huggingface/accelerate.git !pip install -q datasets !pip install -q loralib==0.1.1 !pip install -q einops==0.6.1 import json import os from pprint import pprint import bitsandbytes as bnb import pandas as pd import torch import torch.nn as nn import transformers from datasets import Dataset,load_dataset from peft import ( LoraConfig, PeftConfig, PeftModel, get_peft_model, prepare_model_for_kbit_training ) from transformers import ( AutoConfig, AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, ) os.environ["CUDA_VISIBLE_DEVICES"] = "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/5946/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5946/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5945
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5945/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5945/comments
https://api.github.com/repos/huggingface/datasets/issues/5945/events
https://github.com/huggingface/datasets/issues/5945
1,754,084,577
I_kwDODunzps5ojTTh
5,945
Failing to upload dataset to the hub
{ "avatar_url": "https://avatars.githubusercontent.com/u/77382661?v=4", "events_url": "https://api.github.com/users/Ar770/events{/privacy}", "followers_url": "https://api.github.com/users/Ar770/followers", "following_url": "https://api.github.com/users/Ar770/following{/other_user}", "gists_url": "https://api.github.com/users/Ar770/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Ar770", "id": 77382661, "login": "Ar770", "node_id": "MDQ6VXNlcjc3MzgyNjYx", "organizations_url": "https://api.github.com/users/Ar770/orgs", "received_events_url": "https://api.github.com/users/Ar770/received_events", "repos_url": "https://api.github.com/users/Ar770/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Ar770/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Ar770/subscriptions", "type": "User", "url": "https://api.github.com/users/Ar770" }
[]
closed
false
null
[]
null
3
"2023-06-13T05:46:46Z"
"2023-07-24T11:56:40Z"
"2023-07-24T11:56:40Z"
NONE
null
### Describe the bug Trying to upload a dataset of hundreds of thousands of audio samples (the total volume is not very large, 60 gb) to the hub with push_to_hub, it doesn't work. From time to time one piece of the data (parquet) gets pushed and then I get RemoteDisconnected even though my internet is stable. Please help. I'm trying to upload the dataset for almost a week. Thanks ### Steps to reproduce the bug not relevant ### Expected behavior Be able to upload thedataset ### Environment info python: 3.9
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5945/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5945/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5944
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5944/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5944/comments
https://api.github.com/repos/huggingface/datasets/issues/5944/events
https://github.com/huggingface/datasets/pull/5944
1,752,882,200
PR_kwDODunzps5Sx7O4
5,944
Arrow dataset builder to be able to load and stream Arrow datasets
{ "avatar_url": "https://avatars.githubusercontent.com/u/10278877?v=4", "events_url": "https://api.github.com/users/mariusz-jachimowicz-83/events{/privacy}", "followers_url": "https://api.github.com/users/mariusz-jachimowicz-83/followers", "following_url": "https://api.github.com/users/mariusz-jachimowicz-83/following{/other_user}", "gists_url": "https://api.github.com/users/mariusz-jachimowicz-83/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariusz-jachimowicz-83", "id": 10278877, "login": "mariusz-jachimowicz-83", "node_id": "MDQ6VXNlcjEwMjc4ODc3", "organizations_url": "https://api.github.com/users/mariusz-jachimowicz-83/orgs", "received_events_url": "https://api.github.com/users/mariusz-jachimowicz-83/received_events", "repos_url": "https://api.github.com/users/mariusz-jachimowicz-83/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariusz-jachimowicz-83/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariusz-jachimowicz-83/subscriptions", "type": "User", "url": "https://api.github.com/users/mariusz-jachimowicz-83" }
[]
closed
false
null
[]
null
4
"2023-06-12T14:21:49Z"
"2023-06-13T17:36:02Z"
"2023-06-13T17:29:01Z"
CONTRIBUTOR
null
This adds a Arrow dataset builder to be able to load and stream from already preprocessed Arrow files. It's related to https://github.com/huggingface/datasets/issues/3035
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5944/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5944/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5944.diff", "html_url": "https://github.com/huggingface/datasets/pull/5944", "merged_at": "2023-06-13T17:29:01Z", "patch_url": "https://github.com/huggingface/datasets/pull/5944.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5944" }
true
https://api.github.com/repos/huggingface/datasets/issues/5942
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5942/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5942/comments
https://api.github.com/repos/huggingface/datasets/issues/5942/events
https://github.com/huggingface/datasets/pull/5942
1,752,021,681
PR_kwDODunzps5Su-V4
5,942
Pass datasets-cli additional args as kwargs to DatasetBuilder in `run_beam.py`
{ "avatar_url": "https://avatars.githubusercontent.com/u/84066822?v=4", "events_url": "https://api.github.com/users/graelo/events{/privacy}", "followers_url": "https://api.github.com/users/graelo/followers", "following_url": "https://api.github.com/users/graelo/following{/other_user}", "gists_url": "https://api.github.com/users/graelo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/graelo", "id": 84066822, "login": "graelo", "node_id": "MDQ6VXNlcjg0MDY2ODIy", "organizations_url": "https://api.github.com/users/graelo/orgs", "received_events_url": "https://api.github.com/users/graelo/received_events", "repos_url": "https://api.github.com/users/graelo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/graelo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/graelo/subscriptions", "type": "User", "url": "https://api.github.com/users/graelo" }
[]
open
false
null
[]
null
0
"2023-06-12T06:50:50Z"
"2023-06-30T09:15:00Z"
null
NONE
null
Hi, Following this <https://discuss.huggingface.co/t/how-to-preprocess-a-wikipedia-dataset-using-dataflowrunner/41991/3>, here is a simple PR to pass any additional args to datasets-cli as kwargs in the DatasetBuilder in `run_beam.py`. I also took the liberty to add missing setup steps to the `beam.mdx` docs in order to help everyone. @lhoestq
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5942/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5942/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5942.diff", "html_url": "https://github.com/huggingface/datasets/pull/5942", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5942.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5942" }
true
https://api.github.com/repos/huggingface/datasets/issues/5941
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5941/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5941/comments
https://api.github.com/repos/huggingface/datasets/issues/5941/events
https://github.com/huggingface/datasets/issues/5941
1,751,838,897
I_kwDODunzps5oavCx
5,941
Load Data Sets Too Slow In Train Seq2seq Model
{ "avatar_url": "https://avatars.githubusercontent.com/u/19569322?v=4", "events_url": "https://api.github.com/users/xyx361100238/events{/privacy}", "followers_url": "https://api.github.com/users/xyx361100238/followers", "following_url": "https://api.github.com/users/xyx361100238/following{/other_user}", "gists_url": "https://api.github.com/users/xyx361100238/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/xyx361100238", "id": 19569322, "login": "xyx361100238", "node_id": "MDQ6VXNlcjE5NTY5MzIy", "organizations_url": "https://api.github.com/users/xyx361100238/orgs", "received_events_url": "https://api.github.com/users/xyx361100238/received_events", "repos_url": "https://api.github.com/users/xyx361100238/repos", "site_admin": false, "starred_url": "https://api.github.com/users/xyx361100238/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/xyx361100238/subscriptions", "type": "User", "url": "https://api.github.com/users/xyx361100238" }
[]
closed
false
null
[]
null
10
"2023-06-12T03:58:43Z"
"2023-08-15T02:52:22Z"
"2023-08-15T02:52:22Z"
NONE
null
### Describe the bug step 'Generating train split' in load_dataset is too slow: ![image](https://github.com/huggingface/datasets/assets/19569322/d9b08eee-95fe-4741-a346-b70416c948f8) ### Steps to reproduce the bug Data: own data,16K16B Mono wav Oficial Script:[ run_speech_recognition_seq2seq.py](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py) Add Code: if data_args.data_path is not None: print(data_args.data_path) raw_datasets = load_dataset("audiofolder", data_dir=data_args.data_path, cache_dir=model_args.cache_dir) raw_datasets = raw_datasets.cast_column("audio", Audio(sampling_rate=16000)) raw_datasets = raw_datasets["train"].train_test_split(test_size=0.005, shuffle=True) (change cache_dir to other path ,ex:/DATA/cache) ### Expected behavior load data fast,at least 1000+ `Generating train split: 387875 examples [32:24:45, 1154.83 examples/s]` ### Environment info - `transformers` version: 4.28.0.dev0 - Platform: Linux-5.4.0-149-generic-x86_64-with-debian-bullseye-sid - Python version: 3.7.16 - Huggingface_hub version: 0.13.2 - PyTorch version (GPU?): 1.13.1+cu116 (True) - Tensorflow version (GPU?): not installed (NA) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5941/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5941/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5990
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5990/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5990/comments
https://api.github.com/repos/huggingface/datasets/issues/5990/events
https://github.com/huggingface/datasets/issues/5990
1,774,389,854
I_kwDODunzps5pwwpe
5,990
Pushing a large dataset on the hub consistently hangs
{ "avatar_url": "https://avatars.githubusercontent.com/u/10792502?v=4", "events_url": "https://api.github.com/users/AntreasAntoniou/events{/privacy}", "followers_url": "https://api.github.com/users/AntreasAntoniou/followers", "following_url": "https://api.github.com/users/AntreasAntoniou/following{/other_user}", "gists_url": "https://api.github.com/users/AntreasAntoniou/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/AntreasAntoniou", "id": 10792502, "login": "AntreasAntoniou", "node_id": "MDQ6VXNlcjEwNzkyNTAy", "organizations_url": "https://api.github.com/users/AntreasAntoniou/orgs", "received_events_url": "https://api.github.com/users/AntreasAntoniou/received_events", "repos_url": "https://api.github.com/users/AntreasAntoniou/repos", "site_admin": false, "starred_url": "https://api.github.com/users/AntreasAntoniou/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/AntreasAntoniou/subscriptions", "type": "User", "url": "https://api.github.com/users/AntreasAntoniou" }
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
open
false
null
[]
null
44
"2023-06-10T14:46:47Z"
"2023-08-17T09:54:11Z"
null
NONE
null
### Describe the bug Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help. I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it. ### Reproduction ```python import multiprocessing as mp import pathlib from math import ceil import datasets import numpy as np from tqdm.auto import tqdm from tali.data.data import select_subtitles_between_timestamps from tali.utils import load_json tali_dataset_dir = "/data/" if __name__ == "__main__": full_dataset = datasets.load_dataset( "Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir ) def data_generator(set_name, percentage: float = 1.0): dataset = full_dataset[set_name] for item in tqdm(dataset): video_list = item["youtube_content_video"] video_list = np.random.choice( video_list, int(ceil(len(video_list) * percentage)) ) if len(video_list) == 0: continue captions = item["youtube_subtitle_text"] captions = select_subtitles_between_timestamps( subtitle_dict=load_json( captions.replace( "/data/", tali_dataset_dir, ) ), starting_timestamp=0, ending_timestamp=100000000, ) for video_path in video_list: temp_path = video_path.replace("/data/", tali_dataset_dir) video_path_actual: pathlib.Path = pathlib.Path(temp_path) if video_path_actual.exists(): item["youtube_content_video"] = open(video_path_actual, "rb").read() item["youtube_subtitle_text"] = captions yield item train_generator = lambda: data_generator("train", percentage=0.1) val_generator = lambda: data_generator("val") test_generator = lambda: data_generator("test") train_data = datasets.Dataset.from_generator( train_generator, num_proc=mp.cpu_count(), writer_batch_size=5000, cache_dir=tali_dataset_dir, ) val_data = datasets.Dataset.from_generator( val_generator, writer_batch_size=5000, num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir, ) test_data = datasets.Dataset.from_generator( test_generator, writer_batch_size=5000, num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir, ) dataset = datasets.DatasetDict( { "train": train_data, "val": val_data, "test": test_data, } ) succesful_competion = False while not succesful_competion: try: dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB") succesful_competion = True except Exception as e: print(e) ``` ### Logs ```shell Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it] Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub. Pushing split train to the Hub. Resuming upload of the dataset shards. Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it] Pushing split val to the Hub. Resuming upload of the dataset shards. Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s] Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it] Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s] Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it] Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s] Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it] Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s] Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it] Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s] Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^ Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s] Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it] That's where it got stuck ``` ### System info ```shell - huggingface_hub version: 0.15.1 - Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35 - Python version: 3.10.11 - Running in iPython ?: No - Running in notebook ?: No - Running in Google Colab ?: No - Token path ?: /root/.cache/huggingface/token - Has saved token ?: True - Who am I ?: Antreas - Configured git credential helpers: store - FastAI: N/A - Tensorflow: N/A - Torch: 2.1.0.dev20230606+cu121 - Jinja2: 3.1.2 - Graphviz: N/A - Pydot: N/A - Pillow: 9.5.0 - hf_transfer: N/A - gradio: N/A - numpy: 1.24.3 - ENDPOINT: https://huggingface.co - HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub - HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets - HF_TOKEN_PATH: /root/.cache/huggingface/token - HF_HUB_OFFLINE: False - HF_HUB_DISABLE_TELEMETRY: False - HF_HUB_DISABLE_PROGRESS_BARS: None - HF_HUB_DISABLE_SYMLINKS_WARNING: False - HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False - HF_HUB_DISABLE_IMPLICIT_TOKEN: False - HF_HUB_ENABLE_HF_TRANSFER: False ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5990/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5990/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5939
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5939/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5939/comments
https://api.github.com/repos/huggingface/datasets/issues/5939/events
https://github.com/huggingface/datasets/issues/5939
1,749,955,883
I_kwDODunzps5oTjUr
5,939
.
{ "avatar_url": "https://avatars.githubusercontent.com/u/103381497?v=4", "events_url": "https://api.github.com/users/flckv/events{/privacy}", "followers_url": "https://api.github.com/users/flckv/followers", "following_url": "https://api.github.com/users/flckv/following{/other_user}", "gists_url": "https://api.github.com/users/flckv/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/flckv", "id": 103381497, "login": "flckv", "node_id": "U_kgDOBil5-Q", "organizations_url": "https://api.github.com/users/flckv/orgs", "received_events_url": "https://api.github.com/users/flckv/received_events", "repos_url": "https://api.github.com/users/flckv/repos", "site_admin": false, "starred_url": "https://api.github.com/users/flckv/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/flckv/subscriptions", "type": "User", "url": "https://api.github.com/users/flckv" }
[]
closed
false
null
[]
null
0
"2023-06-09T14:01:34Z"
"2023-06-12T12:19:34Z"
"2023-06-12T12:19:19Z"
NONE
null
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5939/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5939/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5938
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5938/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5938/comments
https://api.github.com/repos/huggingface/datasets/issues/5938/events
https://github.com/huggingface/datasets/pull/5938
1,749,462,851
PR_kwDODunzps5SmbkI
5,938
Make get_from_cache use custom temp filename that is locked
{ "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
2
"2023-06-09T09:01:13Z"
"2023-06-14T13:35:38Z"
"2023-06-14T13:27:24Z"
MEMBER
null
This PR ensures that the temporary filename created is the same as the one that is locked, while writing to the cache. This PR stops using `tempfile` to generate the temporary filename. Additionally, the behavior now is aligned for both `resume_download` `True` and `False`. Refactor temp_file_manager so that it uses the filename that is locked: - Use: `cache_path + ".incomplete"`, when the locked one is `cache_path + ".lock"` Before it was using `tempfile` inside `cache_dir`, which was not locked: although very improbable name collision (8 random characters), this was not impossible when huge number of multiple processes. Maybe related to "Stale file handle" issues caused by `tempfile`: - [ ] https://huggingface.co/datasets/tapaco/discussions/4 - [ ] https://huggingface.co/datasets/xcsr/discussions/1 - [ ] https://huggingface.co/datasets/covost2/discussions/3 ``` Error code: ConfigNamesError Exception: OSError Message: [Errno 116] Stale file handle Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 61, in compute_config_names_response for config in sorted(get_dataset_config_names(path=dataset, use_auth_token=use_auth_token)) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 323, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1219, in dataset_module_factory raise e1 from None File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1188, in dataset_module_factory return HubDatasetModuleFactoryWithScript( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 907, in get_module dataset_readme_path = self.download_dataset_readme_file() File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 896, in download_dataset_readme_file return cached_path( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/utils/file_utils.py", line 183, in cached_path output_path = get_from_cache( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/utils/file_utils.py", line 611, in get_from_cache http_get( File "/usr/local/lib/python3.9/tempfile.py", line 496, in __exit__ result = self.file.__exit__(exc, value, tb) OSError: [Errno 116] Stale file handle ``` - the stale file handle error can be raised when `tempfile` tries to close (when exiting its context manager) a filename that has been already closed by other process - note that `tempfile` filenames are randomly generated but not locked in our code CC: @severo
{ "+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/5938/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5938/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5938.diff", "html_url": "https://github.com/huggingface/datasets/pull/5938", "merged_at": "2023-06-14T13:27:24Z", "patch_url": "https://github.com/huggingface/datasets/pull/5938.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5938" }
true
https://api.github.com/repos/huggingface/datasets/issues/5937
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5937/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5937/comments
https://api.github.com/repos/huggingface/datasets/issues/5937/events
https://github.com/huggingface/datasets/pull/5937
1,749,388,597
PR_kwDODunzps5SmLIs
5,937
Avoid parallel redownload in cache
{ "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
2
"2023-06-09T08:18:36Z"
"2023-06-14T12:30:59Z"
"2023-06-14T12:23:57Z"
MEMBER
null
Avoid parallel redownload in cache by retrying inside the lock if path exists.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5937/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5937/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5937.diff", "html_url": "https://github.com/huggingface/datasets/pull/5937", "merged_at": "2023-06-14T12:23:57Z", "patch_url": "https://github.com/huggingface/datasets/pull/5937.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5937" }
true
https://api.github.com/repos/huggingface/datasets/issues/5936
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5936/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5936/comments
https://api.github.com/repos/huggingface/datasets/issues/5936/events
https://github.com/huggingface/datasets/issues/5936
1,748,424,388
I_kwDODunzps5oNtbE
5,936
Sequence of array not supported for most dtype
{ "avatar_url": "https://avatars.githubusercontent.com/u/45557362?v=4", "events_url": "https://api.github.com/users/qgallouedec/events{/privacy}", "followers_url": "https://api.github.com/users/qgallouedec/followers", "following_url": "https://api.github.com/users/qgallouedec/following{/other_user}", "gists_url": "https://api.github.com/users/qgallouedec/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/qgallouedec", "id": 45557362, "login": "qgallouedec", "node_id": "MDQ6VXNlcjQ1NTU3MzYy", "organizations_url": "https://api.github.com/users/qgallouedec/orgs", "received_events_url": "https://api.github.com/users/qgallouedec/received_events", "repos_url": "https://api.github.com/users/qgallouedec/repos", "site_admin": false, "starred_url": "https://api.github.com/users/qgallouedec/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qgallouedec/subscriptions", "type": "User", "url": "https://api.github.com/users/qgallouedec" }
[]
closed
false
null
[]
null
4
"2023-06-08T18:18:07Z"
"2023-06-14T15:03:34Z"
"2023-06-14T15:03:34Z"
CONTRIBUTOR
null
### Describe the bug Create a dataset composed of sequence of array fails for most dtypes (see code below). ### Steps to reproduce the bug ```python from datasets import Sequence, Array2D, Features, Dataset import numpy as np for dtype in [ "bool", # ok "int8", # failed "int16", # failed "int32", # failed "int64", # ok "uint8", # failed "uint16", # failed "uint32", # failed "uint64", # failed "float16", # failed "float32", # failed "float64", # ok ]: features = Features({"foo": Sequence(Array2D(dtype=dtype, shape=(2, 2)))}) sequence = [ [[1.0, 2.0], [3.0, 4.0]], [[5.0, 6.0], [7.0, 8.0]], ] array = np.array(sequence, dtype=dtype) try: dataset = Dataset.from_dict({"foo": [array]}, features=features) except Exception as e: print(f"Failed for dtype={dtype}") ``` Traceback for `dtype="int8"`: ``` Traceback (most recent call last): File "/home/qgallouedec/datasets/a.py", line 29, in <module> raise e File "/home/qgallouedec/datasets/a.py", line 26, in <module> dataset = Dataset.from_dict({"foo": [array]}, features=features) File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 899, in from_dict pa_table = InMemoryTable.from_pydict(mapping=mapping) File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 799, in from_pydict return cls(pa.Table.from_pydict(*args, **kwargs)) File "pyarrow/table.pxi", line 3725, in pyarrow.lib.Table.from_pydict File "pyarrow/table.pxi", line 5254, in pyarrow.lib._from_pydict File "pyarrow/array.pxi", line 350, in pyarrow.lib.asarray File "pyarrow/array.pxi", line 236, in pyarrow.lib.array File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_writer.py", line 204, in __arrow_array__ out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type) File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper return func(array, *args, **kwargs) File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2091, in cast_array_to_feature casted_values = _c(array.values, feature.feature) File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper return func(array, *args, **kwargs) File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2139, in cast_array_to_feature return array_cast(array, feature(), allow_number_to_str=allow_number_to_str) File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper return func(array, *args, **kwargs) File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1967, in array_cast return pa_type.wrap_array(array) File "pyarrow/types.pxi", line 879, in pyarrow.lib.BaseExtensionType.wrap_array TypeError: Incompatible storage type for extension<arrow.py_extension_type<Array2DExtensionType>>: expected list<item: list<item: int8>>, got list<item: list<item: int64>> ``` ### Expected behavior Not to fail. ### Environment info - Python 3.10.6 - datasets: master branch - Numpy: 1.23.4
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5936/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5936/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5935
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5935/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5935/comments
https://api.github.com/repos/huggingface/datasets/issues/5935/events
https://github.com/huggingface/datasets/pull/5935
1,748,090,220
PR_kwDODunzps5Sh9Mg
5,935
Better row group size in push_to_hub
{ "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
10
"2023-06-08T15:01:15Z"
"2023-06-09T17:47:37Z"
"2023-06-09T17:40:09Z"
MEMBER
null
This is a very simple change that improves `to_parquet` to use a more reasonable row group size for image and audio datasets. This is especially useful for `push_to_hub` and will provide a better experience with the dataset viewer on HF
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5935/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5935/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5935.diff", "html_url": "https://github.com/huggingface/datasets/pull/5935", "merged_at": "2023-06-09T17:40:09Z", "patch_url": "https://github.com/huggingface/datasets/pull/5935.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5935" }
true
https://api.github.com/repos/huggingface/datasets/issues/5934
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5934/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5934/comments
https://api.github.com/repos/huggingface/datasets/issues/5934/events
https://github.com/huggingface/datasets/pull/5934
1,747,904,840
PR_kwDODunzps5ShUxQ
5,934
Modify levels of some logging messages
{ "avatar_url": "https://avatars.githubusercontent.com/u/21087104?v=4", "events_url": "https://api.github.com/users/Laurent2916/events{/privacy}", "followers_url": "https://api.github.com/users/Laurent2916/followers", "following_url": "https://api.github.com/users/Laurent2916/following{/other_user}", "gists_url": "https://api.github.com/users/Laurent2916/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Laurent2916", "id": 21087104, "login": "Laurent2916", "node_id": "MDQ6VXNlcjIxMDg3MTA0", "organizations_url": "https://api.github.com/users/Laurent2916/orgs", "received_events_url": "https://api.github.com/users/Laurent2916/received_events", "repos_url": "https://api.github.com/users/Laurent2916/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Laurent2916/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Laurent2916/subscriptions", "type": "User", "url": "https://api.github.com/users/Laurent2916" }
[]
closed
false
null
[]
null
2
"2023-06-08T13:31:44Z"
"2023-07-12T18:21:03Z"
"2023-07-12T18:21:02Z"
CONTRIBUTOR
null
Some warning messages didn't quite sound like warnings so I modified their logging levels to info.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5934/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5934/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5934.diff", "html_url": "https://github.com/huggingface/datasets/pull/5934", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5934.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5934" }
true
https://api.github.com/repos/huggingface/datasets/issues/5933
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5933/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5933/comments
https://api.github.com/repos/huggingface/datasets/issues/5933/events
https://github.com/huggingface/datasets/pull/5933
1,747,382,500
PR_kwDODunzps5Sfi5J
5,933
Fix `to_numpy` when None values in the sequence
{ "avatar_url": "https://avatars.githubusercontent.com/u/45557362?v=4", "events_url": "https://api.github.com/users/qgallouedec/events{/privacy}", "followers_url": "https://api.github.com/users/qgallouedec/followers", "following_url": "https://api.github.com/users/qgallouedec/following{/other_user}", "gists_url": "https://api.github.com/users/qgallouedec/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/qgallouedec", "id": 45557362, "login": "qgallouedec", "node_id": "MDQ6VXNlcjQ1NTU3MzYy", "organizations_url": "https://api.github.com/users/qgallouedec/orgs", "received_events_url": "https://api.github.com/users/qgallouedec/received_events", "repos_url": "https://api.github.com/users/qgallouedec/repos", "site_admin": false, "starred_url": "https://api.github.com/users/qgallouedec/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qgallouedec/subscriptions", "type": "User", "url": "https://api.github.com/users/qgallouedec" }
[]
closed
false
null
[]
null
4
"2023-06-08T08:38:56Z"
"2023-06-09T13:49:41Z"
"2023-06-09T13:23:48Z"
CONTRIBUTOR
null
Closes #5927 I've realized that the error was overlooked during testing due to the presence of only one None value in the sequence. Unfortunately, it was the only case where the function works as expected. When the sequence contained more than one None value, the function failed. Consequently, I've updated the tests to include sequences with multiple None values.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5933/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5933/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5933.diff", "html_url": "https://github.com/huggingface/datasets/pull/5933", "merged_at": "2023-06-09T13:23:48Z", "patch_url": "https://github.com/huggingface/datasets/pull/5933.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5933" }
true
https://api.github.com/repos/huggingface/datasets/issues/5932
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5932/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5932/comments
https://api.github.com/repos/huggingface/datasets/issues/5932/events
https://github.com/huggingface/datasets/pull/5932
1,746,249,161
PR_kwDODunzps5Sbrzo
5,932
[doc build] Use secrets
{ "avatar_url": "https://avatars.githubusercontent.com/u/11827707?v=4", "events_url": "https://api.github.com/users/mishig25/events{/privacy}", "followers_url": "https://api.github.com/users/mishig25/followers", "following_url": "https://api.github.com/users/mishig25/following{/other_user}", "gists_url": "https://api.github.com/users/mishig25/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mishig25", "id": 11827707, "login": "mishig25", "node_id": "MDQ6VXNlcjExODI3NzA3", "organizations_url": "https://api.github.com/users/mishig25/orgs", "received_events_url": "https://api.github.com/users/mishig25/received_events", "repos_url": "https://api.github.com/users/mishig25/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mishig25/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mishig25/subscriptions", "type": "User", "url": "https://api.github.com/users/mishig25" }
[]
closed
false
null
[]
null
4
"2023-06-07T16:09:39Z"
"2023-06-09T10:16:58Z"
"2023-06-09T09:53:16Z"
CONTRIBUTOR
null
Companion pr to https://github.com/huggingface/doc-builder/pull/379
{ "+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/5932/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5932/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5932.diff", "html_url": "https://github.com/huggingface/datasets/pull/5932", "merged_at": "2023-06-09T09:53:16Z", "patch_url": "https://github.com/huggingface/datasets/pull/5932.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5932" }
true
https://api.github.com/repos/huggingface/datasets/issues/5931
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5931/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5931/comments
https://api.github.com/repos/huggingface/datasets/issues/5931/events
https://github.com/huggingface/datasets/issues/5931
1,745,408,784
I_kwDODunzps5oCNMQ
5,931
`datasets.map` not reusing cached copy by default
{ "avatar_url": "https://avatars.githubusercontent.com/u/19718818?v=4", "events_url": "https://api.github.com/users/bhavitvyamalik/events{/privacy}", "followers_url": "https://api.github.com/users/bhavitvyamalik/followers", "following_url": "https://api.github.com/users/bhavitvyamalik/following{/other_user}", "gists_url": "https://api.github.com/users/bhavitvyamalik/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bhavitvyamalik", "id": 19718818, "login": "bhavitvyamalik", "node_id": "MDQ6VXNlcjE5NzE4ODE4", "organizations_url": "https://api.github.com/users/bhavitvyamalik/orgs", "received_events_url": "https://api.github.com/users/bhavitvyamalik/received_events", "repos_url": "https://api.github.com/users/bhavitvyamalik/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bhavitvyamalik/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bhavitvyamalik/subscriptions", "type": "User", "url": "https://api.github.com/users/bhavitvyamalik" }
[]
closed
false
null
[]
null
1
"2023-06-07T09:03:33Z"
"2023-06-21T16:15:40Z"
"2023-06-21T16:15:40Z"
CONTRIBUTOR
null
### Describe the bug When I load the dataset from local directory, it's cached copy is picked up after first time. However, for `map` operation, the operation is applied again and cached copy is not picked up. Is there any way to pick cached copy instead of processing it again? The only solution I could think of was to use `save_to_disk` after my last transform and then use that in my DataLoader pipeline. Are there any other solutions for the same? One more thing, my dataset is occupying 6GB storage memory after I use `map`, is there any way I can reduce that memory usage? ### Steps to reproduce the bug ``` # make sure that dataset decodes audio with correct sampling rate dataset_sampling_rate = next(iter(self.raw_datasets.values())).features["audio"].sampling_rate if dataset_sampling_rate != self.feature_extractor.sampling_rate: self.raw_datasets = self.raw_datasets.cast_column( "audio", datasets.features.Audio(sampling_rate=self.feature_extractor.sampling_rate) ) vectorized_datasets = self.raw_datasets.map( self.prepare_dataset, remove_columns=next(iter(self.raw_datasets.values())).column_names, num_proc=self.num_workers, desc="preprocess datasets", ) # filter data that is longer than max_input_length self.vectorized_datasets = vectorized_datasets.filter( self.is_audio_in_length_range, num_proc=self.num_workers, input_columns=["input_length"], ) def prepare_dataset(self, batch): # load audio sample = batch["audio"] inputs = self.feature_extractor(sample["array"], sampling_rate=sample["sampling_rate"]) batch["input_values"] = inputs.input_values[0] batch["input_length"] = len(batch["input_values"]) batch["labels"] = self.tokenizer(batch["target_text"]).input_ids return batch ``` ### Expected behavior `map` to use cached copy and if possible an alternative technique to reduce memory usage after using `map` ### Environment info - `datasets` version: 2.12.0 - Platform: Linux-3.10.0-1160.71.1.el7.x86_64-x86_64-with-glibc2.17 - Python version: 3.8.16 - Huggingface_hub version: 0.15.1 - PyArrow version: 12.0.0 - Pandas version: 2.0.2
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5931/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5931/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5930
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5930/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5930/comments
https://api.github.com/repos/huggingface/datasets/issues/5930/events
https://github.com/huggingface/datasets/issues/5930
1,745,184,395
I_kwDODunzps5oBWaL
5,930
loading private custom dataset script - authentication error
{ "avatar_url": "https://avatars.githubusercontent.com/u/103381497?v=4", "events_url": "https://api.github.com/users/flckv/events{/privacy}", "followers_url": "https://api.github.com/users/flckv/followers", "following_url": "https://api.github.com/users/flckv/following{/other_user}", "gists_url": "https://api.github.com/users/flckv/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/flckv", "id": 103381497, "login": "flckv", "node_id": "U_kgDOBil5-Q", "organizations_url": "https://api.github.com/users/flckv/orgs", "received_events_url": "https://api.github.com/users/flckv/received_events", "repos_url": "https://api.github.com/users/flckv/repos", "site_admin": false, "starred_url": "https://api.github.com/users/flckv/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/flckv/subscriptions", "type": "User", "url": "https://api.github.com/users/flckv" }
[]
closed
false
null
[]
null
1
"2023-06-07T06:58:23Z"
"2023-06-15T14:49:21Z"
"2023-06-15T14:49:20Z"
NONE
null
### Describe the bug Train model with my custom dataset stored in HuggingFace and loaded with the loading script requires authentication but I am not sure how ? I am logged in in the terminal, in the browser. I receive this error: /python3.8/site-packages/datasets/utils/file_utils.py", line 566, in get_from_cache raise ConnectionError(f"Couldn't reach {url} ({repr(head_error)})") ConnectionError: Couldn't reach https://huggingface.co/datasets/fkov/s/blob/main/data/s/train/labels `(ConnectionError('Unauthorized for URL `https://huggingface.co/datasets/fkov/s/blob/main/data/s/train/labels. Please use the parameter `**`use_auth_token=True`**` after logging in with `**`huggingface-cli login`**`')) when I added: `use_auth_token=True` and logged in via terminal then I received error: or the same error in different format: raise ConnectionError(f"`Couldn't reach {url} (error {response.status_code}`)") ConnectionError: Couldn't reach https://huggingface.co/datasets/fkov/s/blob/main/data/s/train/labels (`error 401`) ### Steps to reproduce the bug 1. cloned transformers library locally: https://huggingface.co/docs/transformers/v4.15.0/examples : > git clone https://github.com/huggingface/transformers > cd transformers > pip install . > cd /transformers/examples/pytorch/audio-classification > pip install -r requirements.txt 2. created **loading script** > https://huggingface.co/docs/datasets/dataset_script added next to dataset: 3. uploaded **private custom dataset** with loading script to HuggingFace > https://huggingface.co/docs/datasets/dataset_script 4. added dataset loading script to **local directory** in the above cloned transformers library: > cd /transformers/examples/pytorch/audio-classification 5. logged in to HuggingFace on local terminal with : > **huggingface-cli login** 6. run the model with the custom dataset stored on HuggingFace with code: https://github.com/huggingface/transformers/blob/main/examples/pytorch/audio-classification/README.md cd /transformers/examples/pytorch/audio-classification > python run_audio_classification.py \ > --model_name_or_path facebook/wav2vec2-base \ > --output_dir l/users/flck/outputs/wav2vec2-base-s \ > --overwrite_output_dir \ > --dataset_name s \ > --dataset_config_name s \ > --remove_unused_columns False \ > --do_train \ > --do_eval \ > --fp16 \ > --learning_rate 3e-5 \ > --max_length_seconds 1 \ > --attention_mask False \ > --warmup_ratio 0.1 \ > --num_train_epochs 5 \ > --per_device_train_batch_size 32 \ > --gradient_accumulation_steps 4 \ > --per_device_eval_batch_size 32 \ > --dataloader_num_workers 4 \ > --logging_strategy steps \ > --logging_steps 10 \ > --evaluation_strategy epoch \ > --save_strategy epoch \ > --load_best_model_at_end True \ > --metric_for_best_model accuracy \ > --save_total_limit 3 \ > --seed 0 \ > --push_to_hub \ > **--use_auth_token=True** ### Expected behavior Be able to train a model the https://github.com/huggingface/transformers/blob/main/examples/pytorch/audio-classification/ run_audio_classification.py with private custom dataset stored on HuggingFace. ### Environment info - datasets version: 2.12.0 - `transformers` version: 4.30.0.dev0 - Platform: Linux-5.4.204-ql-generic-12.0-19-x86_64-with-glibc2.17 - Python version: 3.8.12 - Huggingface_hub version: 0.15.1 - Safetensors version: 0.3.1 - PyTorch version (GPU?): 2.0.1+cu117 (True) Versions of relevant libraries: [pip3] numpy==1.24.3 [pip3] torch==2.0.1 [pip3] torchaudio==2.0.2 [conda] numpy 1.24.3 pypi_0 pypi [conda] torch 2.0.1 pypi_0 pypi [conda] torchaudio 2.0.2 pypi_0 pypi
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5930/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5930/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5929
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5929/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5929/comments
https://api.github.com/repos/huggingface/datasets/issues/5929/events
https://github.com/huggingface/datasets/issues/5929
1,744,478,456
I_kwDODunzps5n-qD4
5,929
Importing PyTorch reduces multiprocessing performance for map
{ "avatar_url": "https://avatars.githubusercontent.com/u/12814709?v=4", "events_url": "https://api.github.com/users/Maxscha/events{/privacy}", "followers_url": "https://api.github.com/users/Maxscha/followers", "following_url": "https://api.github.com/users/Maxscha/following{/other_user}", "gists_url": "https://api.github.com/users/Maxscha/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Maxscha", "id": 12814709, "login": "Maxscha", "node_id": "MDQ6VXNlcjEyODE0NzA5", "organizations_url": "https://api.github.com/users/Maxscha/orgs", "received_events_url": "https://api.github.com/users/Maxscha/received_events", "repos_url": "https://api.github.com/users/Maxscha/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Maxscha/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Maxscha/subscriptions", "type": "User", "url": "https://api.github.com/users/Maxscha" }
[]
closed
false
null
[]
null
2
"2023-06-06T19:42:25Z"
"2023-06-16T13:09:12Z"
"2023-06-16T13:09:12Z"
NONE
null
### Describe the bug I noticed that the performance of my dataset preprocessing with `map(...,num_proc=32)` decreases when PyTorch is imported. ### Steps to reproduce the bug I created two example scripts to reproduce this behavior: ``` import datasets datasets.disable_caching() from datasets import Dataset import time PROC=32 if __name__ == "__main__": dataset = [True] * 10000000 dataset = Dataset.from_dict({'train': dataset}) start = time.time() dataset.map(lambda x: x, num_proc=PROC) end = time.time() print(end - start) ``` Takes around 4 seconds on my machine. While the same code, but with an `import torch`: ``` import datasets datasets.disable_caching() from datasets import Dataset import time import torch PROC=32 if __name__ == "__main__": dataset = [True] * 10000000 dataset = Dataset.from_dict({'train': dataset}) start = time.time() dataset.map(lambda x: x, num_proc=PROC) end = time.time() print(end - start) ``` takes around 22 seconds. ### Expected behavior I would expect that the import of torch to not have such a significant effect on the performance of map using multiprocessing. ### Environment info - `datasets` version: 2.12.0 - Platform: Linux-5.15.0-56-generic-x86_64-with-glibc2.35 - Python version: 3.11.3 - Huggingface_hub version: 0.15.1 - PyArrow version: 12.0.0 - Pandas version: 2.0.2 - torch: 2.0.1
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5929/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5929/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5928
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5928/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5928/comments
https://api.github.com/repos/huggingface/datasets/issues/5928/events
https://github.com/huggingface/datasets/pull/5928
1,744,098,371
PR_kwDODunzps5SUXPC
5,928
Fix link to quickstart docs in README.md
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
3
"2023-06-06T15:23:01Z"
"2023-06-06T15:52:34Z"
"2023-06-06T15:43:53Z"
CONTRIBUTOR
null
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5928/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5928/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5928.diff", "html_url": "https://github.com/huggingface/datasets/pull/5928", "merged_at": "2023-06-06T15:43:53Z", "patch_url": "https://github.com/huggingface/datasets/pull/5928.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5928" }
true
https://api.github.com/repos/huggingface/datasets/issues/5927
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5927/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5927/comments
https://api.github.com/repos/huggingface/datasets/issues/5927/events
https://github.com/huggingface/datasets/issues/5927
1,744,009,032
I_kwDODunzps5n83dI
5,927
`IndexError` when indexing `Sequence` of `Array2D` with `None` values
{ "avatar_url": "https://avatars.githubusercontent.com/u/45557362?v=4", "events_url": "https://api.github.com/users/qgallouedec/events{/privacy}", "followers_url": "https://api.github.com/users/qgallouedec/followers", "following_url": "https://api.github.com/users/qgallouedec/following{/other_user}", "gists_url": "https://api.github.com/users/qgallouedec/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/qgallouedec", "id": 45557362, "login": "qgallouedec", "node_id": "MDQ6VXNlcjQ1NTU3MzYy", "organizations_url": "https://api.github.com/users/qgallouedec/orgs", "received_events_url": "https://api.github.com/users/qgallouedec/received_events", "repos_url": "https://api.github.com/users/qgallouedec/repos", "site_admin": false, "starred_url": "https://api.github.com/users/qgallouedec/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qgallouedec/subscriptions", "type": "User", "url": "https://api.github.com/users/qgallouedec" }
[]
closed
false
null
[]
null
2
"2023-06-06T14:36:22Z"
"2023-06-13T12:39:39Z"
"2023-06-09T13:23:50Z"
CONTRIBUTOR
null
### Describe the bug Having `None` values in a `Sequence` of `ArrayND` fails. ### Steps to reproduce the bug ```python from datasets import Array2D, Dataset, Features, Sequence data = [ [ [[0]], None, None, ] ] feature = Sequence(Array2D((1, 1), dtype="int64")) dataset = Dataset.from_dict({"a": data}, features=Features({"a": feature})) dataset[0] # error raised only when indexing ``` ``` Traceback (most recent call last): File "/Users/quentingallouedec/gia/c.py", line 13, in <module> dataset[0] # error raised only when indexing File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2658, in __getitem__ return self._getitem(key) File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2643, in _getitem formatted_output = format_table( File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 634, in format_table return formatter(pa_table, query_type=query_type) File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 406, in __call__ return self.format_row(pa_table) File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 441, in format_row row = self.python_arrow_extractor().extract_row(pa_table) File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 144, in extract_row return _unnest(pa_table.to_pydict()) File "pyarrow/table.pxi", line 4146, in pyarrow.lib.Table.to_pydict File "pyarrow/table.pxi", line 1312, in pyarrow.lib.ChunkedArray.to_pylist File "pyarrow/array.pxi", line 1521, in pyarrow.lib.Array.to_pylist File "pyarrow/scalar.pxi", line 675, in pyarrow.lib.ListScalar.as_py File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/features/features.py", line 760, in to_pylist return self.to_numpy(zero_copy_only=zero_copy_only).tolist() File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/features/features.py", line 725, in to_numpy numpy_arr = np.insert(numpy_arr.astype(np.float64), null_indices, np.nan, axis=0) File "<__array_function__ internals>", line 200, in insert File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/numpy/lib/function_base.py", line 5426, in insert old_mask[indices] = False IndexError: index 3 is out of bounds for axis 0 with size 3 ``` AFAIK, the problem only occurs when you use a `Sequence` of `ArrayND`. I strongly suspect that the problem comes from this line, or `np.insert` is misused: https://github.com/huggingface/datasets/blob/02ee418831aba68d0be93227bce8b3f42ef8980f/src/datasets/features/features.py#L729 To put t simply, you want something that do that: ```python import numpy as np numpy_arr = np.zeros((1, 1, 1)) null_indices = np.array([1, 2]) np.insert(numpy_arr, null_indices, np.nan, axis=0) # raise an error, instead of outputting # array([[[ 0.]], # [[nan]], # [[nan]]]) ``` ### Expected behavior The previous code should not raise an error. ### Environment info - Python 3.10.11 - datasets 2.10.0 - pyarrow 12.0.0
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5927/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5927/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5926
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5926/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5926/comments
https://api.github.com/repos/huggingface/datasets/issues/5926/events
https://github.com/huggingface/datasets/issues/5926
1,743,922,028
I_kwDODunzps5n8iNs
5,926
Uncaught exception when generating the splits from a dataset that miss data
{ "avatar_url": "https://avatars.githubusercontent.com/u/1676121?v=4", "events_url": "https://api.github.com/users/severo/events{/privacy}", "followers_url": "https://api.github.com/users/severo/followers", "following_url": "https://api.github.com/users/severo/following{/other_user}", "gists_url": "https://api.github.com/users/severo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/severo", "id": 1676121, "login": "severo", "node_id": "MDQ6VXNlcjE2NzYxMjE=", "organizations_url": "https://api.github.com/users/severo/orgs", "received_events_url": "https://api.github.com/users/severo/received_events", "repos_url": "https://api.github.com/users/severo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/severo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/severo/subscriptions", "type": "User", "url": "https://api.github.com/users/severo" }
[]
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
1
"2023-06-06T13:51:01Z"
"2023-06-07T07:53:16Z"
null
CONTRIBUTOR
null
### Describe the bug Dataset https://huggingface.co/datasets/blog_authorship_corpus has an issue with its hosting platform, since https://drive.google.com/u/0/uc?id=1cGy4RNDV87ZHEXbiozABr9gsSrZpPaPz&export=download returns 404 error. But when trying to generate the split names, we get an exception which is now correctly caught. Seen originally in https://github.com/huggingface/datasets-server/blob/adbdcd6710ffed4e2eb2e4cd905b5e0dff530a15/services/worker/src/worker/job_runners/config/parquet_and_info.py#L435 ### Steps to reproduce the bug ```python >>> from datasets import StreamingDownloadManager, load_dataset_builder >>> builder = load_dataset_builder(path="blog_authorship_corpus") Downloading builder script: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5.60k/5.60k [00:00<00:00, 23.1MB/s] Downloading metadata: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.81k/2.81k [00:00<00:00, 14.7MB/s] Downloading readme: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7.30k/7.30k [00:00<00:00, 30.8MB/s] >>> dl_manager = StreamingDownloadManager(base_path=builder.base_path) >>> builder._split_generators(dl_manager) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/slesage/.cache/huggingface/modules/datasets_modules/datasets/blog_authorship_corpus/6f5d78241afd8313111956f877a57db7a0e9fc6718255dc85df0928197feb683/blog_authorship_corpus.py", line 79, in _split_generators data = dl_manager.download_and_extract(_DATA_URL) File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 1087, in download_and_extract return self.extract(self.download(url_or_urls)) File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 1039, in extract urlpaths = map_nested(self._extract, url_or_urls, map_tuple=True) File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 435, in map_nested return function(data_struct) File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 1044, in _extract protocol = _get_extraction_protocol(urlpath, use_auth_token=self.download_config.use_auth_token) File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 433, in _get_extraction_protocol with fsspec.open(urlpath, **kwargs) as f: File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/fsspec/core.py", line 439, in open return open_files( File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/fsspec/core.py", line 194, in __getitem__ out = super().__getitem__(item) IndexError: list index out of range ``` ### Expected behavior We should have an Exception raised by the datasets library. ### Environment info - `datasets` version: 2.12.0 - Platform: Linux-5.19.0-1026-aws-x86_64-with-glibc2.35 - Python version: 3.9.15 - Huggingface_hub version: 0.15.1 - PyArrow version: 11.0.0 - Pandas version: 2.0.2
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5926/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5926/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5925
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5925/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5925/comments
https://api.github.com/repos/huggingface/datasets/issues/5925/events
https://github.com/huggingface/datasets/issues/5925
1,741,941,436
I_kwDODunzps5n0-q8
5,925
Breaking API change in datasets.list_datasets caused by change in HfApi.list_datasets
{ "avatar_url": "https://avatars.githubusercontent.com/u/78868366?v=4", "events_url": "https://api.github.com/users/mtkinit/events{/privacy}", "followers_url": "https://api.github.com/users/mtkinit/followers", "following_url": "https://api.github.com/users/mtkinit/following{/other_user}", "gists_url": "https://api.github.com/users/mtkinit/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mtkinit", "id": 78868366, "login": "mtkinit", "node_id": "MDQ6VXNlcjc4ODY4MzY2", "organizations_url": "https://api.github.com/users/mtkinit/orgs", "received_events_url": "https://api.github.com/users/mtkinit/received_events", "repos_url": "https://api.github.com/users/mtkinit/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mtkinit/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mtkinit/subscriptions", "type": "User", "url": "https://api.github.com/users/mtkinit" }
[]
closed
false
null
[]
null
0
"2023-06-05T14:46:04Z"
"2023-06-19T17:22:43Z"
"2023-06-19T17:22:43Z"
NONE
null
### Describe the bug Hi all, after an update of the `datasets` library, we observer crashes in our code. We relied on `datasets.list_datasets` returning a `list`. Now, after the API of the HfApi.list_datasets was changed and it returns a `list` instead of an `Iterable`, the `datasets.list_datasets` now sometimes returns a `list` and somesimes an `Iterable`. It would be helpful to indicate that by the return type of the `datasets.list_datasets` function. Thanks, Martin ### Steps to reproduce the bug Here, the code crashed after we updated the `datasets` library: ```python # list_datasets no longer returns a list, which leads to an error when one tries to slice it for datasets.list_datasets(with_details=True)[:limit]: ... ``` ### Expected behavior It would be helpful to indicate that by the return type of the `datasets.list_datasets` function. ### Environment info Ubuntu 22.04 datasets 2.12.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/5925/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5925/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5924
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5924/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5924/comments
https://api.github.com/repos/huggingface/datasets/issues/5924/events
https://github.com/huggingface/datasets/pull/5924
1,738,889,236
PR_kwDODunzps5SCiFv
5,924
Add parallel module using joblib for Spark
{ "avatar_url": "https://avatars.githubusercontent.com/u/12763339?v=4", "events_url": "https://api.github.com/users/es94129/events{/privacy}", "followers_url": "https://api.github.com/users/es94129/followers", "following_url": "https://api.github.com/users/es94129/following{/other_user}", "gists_url": "https://api.github.com/users/es94129/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/es94129", "id": 12763339, "login": "es94129", "node_id": "MDQ6VXNlcjEyNzYzMzM5", "organizations_url": "https://api.github.com/users/es94129/orgs", "received_events_url": "https://api.github.com/users/es94129/received_events", "repos_url": "https://api.github.com/users/es94129/repos", "site_admin": false, "starred_url": "https://api.github.com/users/es94129/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/es94129/subscriptions", "type": "User", "url": "https://api.github.com/users/es94129" }
[]
closed
false
null
[]
null
7
"2023-06-02T22:25:25Z"
"2023-06-14T10:25:10Z"
"2023-06-14T10:15:46Z"
CONTRIBUTOR
null
Discussion in https://github.com/huggingface/datasets/issues/5798
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5924/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5924/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5924.diff", "html_url": "https://github.com/huggingface/datasets/pull/5924", "merged_at": "2023-06-14T10:15:46Z", "patch_url": "https://github.com/huggingface/datasets/pull/5924.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5924" }
true
https://api.github.com/repos/huggingface/datasets/issues/5923
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5923/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5923/comments
https://api.github.com/repos/huggingface/datasets/issues/5923/events
https://github.com/huggingface/datasets/issues/5923
1,737,436,227
I_kwDODunzps5njyxD
5,923
Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility
{ "avatar_url": "https://avatars.githubusercontent.com/u/71412682?v=4", "events_url": "https://api.github.com/users/ehuangc/events{/privacy}", "followers_url": "https://api.github.com/users/ehuangc/followers", "following_url": "https://api.github.com/users/ehuangc/following{/other_user}", "gists_url": "https://api.github.com/users/ehuangc/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ehuangc", "id": 71412682, "login": "ehuangc", "node_id": "MDQ6VXNlcjcxNDEyNjgy", "organizations_url": "https://api.github.com/users/ehuangc/orgs", "received_events_url": "https://api.github.com/users/ehuangc/received_events", "repos_url": "https://api.github.com/users/ehuangc/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ehuangc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ehuangc/subscriptions", "type": "User", "url": "https://api.github.com/users/ehuangc" }
[]
open
false
null
[]
null
18
"2023-06-02T04:16:32Z"
"2023-12-13T15:53:52Z"
null
NONE
null
### Describe the bug When trying to import datasets, I get a pyarrow ValueError: Traceback (most recent call last): File "/Users/edward/test/test.py", line 1, in <module> import datasets File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module> from .arrow_dataset import Dataset File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module> from .arrow_reader import ArrowReader File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module> import pyarrow.parquet as pq File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module> from .core import * File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module> from pyarrow.fs import (LocalFileSystem, FileSystem, FileType, File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module> from pyarrow._gcsfs import GcsFileSystem # noqa File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject ### Steps to reproduce the bug `import datasets` ### Expected behavior Successful import ### Environment info Conda environment, MacOS python 3.9.12 datasets 2.12.0
{ "+1": 2, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/huggingface/datasets/issues/5923/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5923/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5922
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5922/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5922/comments
https://api.github.com/repos/huggingface/datasets/issues/5922/events
https://github.com/huggingface/datasets/issues/5922
1,736,898,953
I_kwDODunzps5nhvmJ
5,922
Length of table does not accurately reflect the split
{ "avatar_url": "https://avatars.githubusercontent.com/u/8068268?v=4", "events_url": "https://api.github.com/users/amogkam/events{/privacy}", "followers_url": "https://api.github.com/users/amogkam/followers", "following_url": "https://api.github.com/users/amogkam/following{/other_user}", "gists_url": "https://api.github.com/users/amogkam/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/amogkam", "id": 8068268, "login": "amogkam", "node_id": "MDQ6VXNlcjgwNjgyNjg=", "organizations_url": "https://api.github.com/users/amogkam/orgs", "received_events_url": "https://api.github.com/users/amogkam/received_events", "repos_url": "https://api.github.com/users/amogkam/repos", "site_admin": false, "starred_url": "https://api.github.com/users/amogkam/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/amogkam/subscriptions", "type": "User", "url": "https://api.github.com/users/amogkam" }
[ { "color": "ffffff", "default": true, "description": "This will not be worked on", "id": 1935892913, "name": "wontfix", "node_id": "MDU6TGFiZWwxOTM1ODkyOTEz", "url": "https://api.github.com/repos/huggingface/datasets/labels/wontfix" } ]
closed
false
null
[]
null
2
"2023-06-01T18:56:26Z"
"2023-06-02T16:13:31Z"
"2023-06-02T16:13:31Z"
NONE
null
### Describe the bug I load a Huggingface Dataset and do `train_test_split`. I'm expecting the underlying table for the dataset to also be split, but it's not. ### Steps to reproduce the bug ![image](https://github.com/huggingface/datasets/assets/8068268/83e5768f-8b4c-422a-945c-832a7585afff) ### Expected behavior The expected behavior is when `len(hf_dataset["train"].data)` should match the length of the train split, and not be the entire unsplit dataset. ### Environment info datasets 2.10.1 python 3.10.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/5922/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5922/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5921
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5921/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5921/comments
https://api.github.com/repos/huggingface/datasets/issues/5921/events
https://github.com/huggingface/datasets/pull/5921
1,736,563,023
PR_kwDODunzps5R6j-y
5,921
Fix streaming parquet with image feature in schema
{ "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
4
"2023-06-01T15:23:10Z"
"2023-06-02T10:02:54Z"
"2023-06-02T09:53:11Z"
MEMBER
null
It was not reading the feature type from the parquet arrow schema
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5921/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5921/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5921.diff", "html_url": "https://github.com/huggingface/datasets/pull/5921", "merged_at": "2023-06-02T09:53:11Z", "patch_url": "https://github.com/huggingface/datasets/pull/5921.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5921" }
true
https://api.github.com/repos/huggingface/datasets/issues/5920
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5920/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5920/comments
https://api.github.com/repos/huggingface/datasets/issues/5920/events
https://github.com/huggingface/datasets/pull/5920
1,736,196,991
PR_kwDODunzps5R5TRB
5,920
Optimize IterableDataset.from_file using ArrowExamplesIterable
{ "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
3
"2023-06-01T12:14:36Z"
"2023-06-01T12:42:10Z"
"2023-06-01T12:35:14Z"
MEMBER
null
following https://github.com/huggingface/datasets/pull/5893
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5920/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5920/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5920.diff", "html_url": "https://github.com/huggingface/datasets/pull/5920", "merged_at": "2023-06-01T12:35:14Z", "patch_url": "https://github.com/huggingface/datasets/pull/5920.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5920" }
true
https://api.github.com/repos/huggingface/datasets/issues/5919
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5919/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5919/comments
https://api.github.com/repos/huggingface/datasets/issues/5919/events
https://github.com/huggingface/datasets/pull/5919
1,735,519,227
PR_kwDODunzps5R2_EK
5,919
add support for storage_options for load_dataset API
{ "avatar_url": "https://avatars.githubusercontent.com/u/59083384?v=4", "events_url": "https://api.github.com/users/janineguo/events{/privacy}", "followers_url": "https://api.github.com/users/janineguo/followers", "following_url": "https://api.github.com/users/janineguo/following{/other_user}", "gists_url": "https://api.github.com/users/janineguo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/janineguo", "id": 59083384, "login": "janineguo", "node_id": "MDQ6VXNlcjU5MDgzMzg0", "organizations_url": "https://api.github.com/users/janineguo/orgs", "received_events_url": "https://api.github.com/users/janineguo/received_events", "repos_url": "https://api.github.com/users/janineguo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/janineguo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/janineguo/subscriptions", "type": "User", "url": "https://api.github.com/users/janineguo" }
[]
closed
false
null
[]
null
12
"2023-06-01T05:52:32Z"
"2023-07-18T06:14:32Z"
"2023-07-17T17:02:00Z"
CONTRIBUTOR
null
to solve the issue in #5880 1. add s3 support in the link check step, previous we only check `http` and `https`, 2. change the parameter of `use_auth_token` to `download_config` to support both `storage_options` and `use_auth_token` parameter when trying to handle(list, open, read, etc,.) the remote files. 3. integrate the check part's duplicate code to make adding or deleting other sources easier.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5919/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5919/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5919.diff", "html_url": "https://github.com/huggingface/datasets/pull/5919", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5919.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5919" }
true
https://api.github.com/repos/huggingface/datasets/issues/5918
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5918/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5918/comments
https://api.github.com/repos/huggingface/datasets/issues/5918/events
https://github.com/huggingface/datasets/issues/5918
1,735,313,549
I_kwDODunzps5nbsiN
5,918
File not found for audio dataset
{ "avatar_url": "https://avatars.githubusercontent.com/u/1783950?v=4", "events_url": "https://api.github.com/users/RobertBaruch/events{/privacy}", "followers_url": "https://api.github.com/users/RobertBaruch/followers", "following_url": "https://api.github.com/users/RobertBaruch/following{/other_user}", "gists_url": "https://api.github.com/users/RobertBaruch/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/RobertBaruch", "id": 1783950, "login": "RobertBaruch", "node_id": "MDQ6VXNlcjE3ODM5NTA=", "organizations_url": "https://api.github.com/users/RobertBaruch/orgs", "received_events_url": "https://api.github.com/users/RobertBaruch/received_events", "repos_url": "https://api.github.com/users/RobertBaruch/repos", "site_admin": false, "starred_url": "https://api.github.com/users/RobertBaruch/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/RobertBaruch/subscriptions", "type": "User", "url": "https://api.github.com/users/RobertBaruch" }
[]
open
false
null
[]
null
1
"2023-06-01T02:15:29Z"
"2023-06-11T06:02:25Z"
null
NONE
null
### Describe the bug After loading an audio dataset, and looking at a sample entry, the `path` element, which is supposed to be the path to the audio file, doesn't actually exist. ### Steps to reproduce the bug Run bug.py: ```py import os.path from datasets import load_dataset def run() -> None: cv13 = load_dataset( "mozilla-foundation/common_voice_13_0", "hi", split="train", ) print(cv13[0]) audio_file = cv13[0]["path"] if not os.path.exists(audio_file): raise ValueError(f'File {audio_file} does not exist.') if __name__ == "__main__": run() ``` The result (on my machine): ```json {'client_id': '0f018a99663f33afbb7d38aee281fb1afcfd07f9e7acd00383f604e1e17c38d6ed8adf1bd2ccbf927a52c5adefb8ac4b158ce27a7c2ed9581e71202eb302dfb3', 'path': 'C:\\Users\\rober\\.cache\\huggingface\\datasets\\downloads\\extracted\\8d1479bc09b4609bc2675bd02d6869a4d5e09f7e6616f540bd55eacef46c6e2b\\common_voice_hi_26008353.mp3', 'audio': {'path': 'C:\\Users\\rober\\.cache\\huggingface\\datasets\\downloads\\extracted\\8d1479bc09b4609bc2675bd02d6869a4d5e09f7e6616f540bd55eacef46c6e2b\\common_voice_hi_26008353.mp3', 'array': array([ 6.46234854e-26, -1.35709319e-25, -8.07793567e-26, ..., 1.06425944e-07, 4.46417090e-08, 2.61451660e-09]), 'sampling_rate': 48000}, 'sentence': 'हमने उसका जन्मदिन मनाया।', 'up_votes': 2, 'down_votes': 0, 'age': '', 'gender': '', 'accent': '', 'locale': 'hi', 'segment': '' ', 'variant': ''} ``` ```txt Traceback (most recent call last): File "F:\eo-reco\bug.py", line 18, in <module> run() File "F:\eo-reco\bug.py", line 15, in run raise ValueError(f'File {audio_file} does not exist.') ValueError: File C:\Users\rober\.cache\huggingface\datasets\downloads\extracted\8d1479bc09b4609bc2675bd02d6869a4d5e09f7e6616f540bd55eacef46c6e2b\common_voice_hi_26008353.mp3 does not exist. ``` ### Expected behavior The `path` element points to the correct file, which happens to be: ``` C:\Users\rober\.cache\huggingface\datasets\downloads\extracted\8d1479bc09b4609bc2675bd02d6869a4d5e09f7e6616f540bd55eacef46c6e2b\hi_train_0\common_voice_hi_26008353.mp3 ``` That is, there's an extra directory `hi_train_0` that is not in the `path` element. ### Environment info - `datasets` version: 2.12.0 - Platform: Windows-10-10.0.22621-SP0 - Python version: 3.11.3 - Huggingface_hub version: 0.14.1 - PyArrow version: 12.0.0 - Pandas version: 2.0.1 -
{ "+1": 3, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 3, "url": "https://api.github.com/repos/huggingface/datasets/issues/5918/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5918/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5917
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5917/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5917/comments
https://api.github.com/repos/huggingface/datasets/issues/5917/events
https://github.com/huggingface/datasets/pull/5917
1,733,661,588
PR_kwDODunzps5RwoRU
5,917
Refactor extensions
{ "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
2
"2023-05-31T08:33:02Z"
"2023-05-31T13:34:35Z"
"2023-05-31T13:25:57Z"
MEMBER
null
Related to: - #5850
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5917/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5917/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5917.diff", "html_url": "https://github.com/huggingface/datasets/pull/5917", "merged_at": "2023-05-31T13:25:57Z", "patch_url": "https://github.com/huggingface/datasets/pull/5917.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5917" }
true
https://api.github.com/repos/huggingface/datasets/issues/5916
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5916/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5916/comments
https://api.github.com/repos/huggingface/datasets/issues/5916/events
https://github.com/huggingface/datasets/pull/5916
1,732,456,392
PR_kwDODunzps5RskTb
5,916
Unpin responses
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
4
"2023-05-30T14:59:48Z"
"2023-05-30T18:03:10Z"
"2023-05-30T17:53:29Z"
CONTRIBUTOR
null
Fix #5906
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5916/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5916/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5916.diff", "html_url": "https://github.com/huggingface/datasets/pull/5916", "merged_at": "2023-05-30T17:53:29Z", "patch_url": "https://github.com/huggingface/datasets/pull/5916.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5916" }
true
https://api.github.com/repos/huggingface/datasets/issues/5915
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5915/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5915/comments
https://api.github.com/repos/huggingface/datasets/issues/5915/events
https://github.com/huggingface/datasets/pull/5915
1,732,389,984
PR_kwDODunzps5RsVzj
5,915
Raise error in `DatasetBuilder.as_dataset` when `file_format` is not `"arrow"`
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
4
"2023-05-30T14:27:55Z"
"2023-05-31T13:31:21Z"
"2023-05-31T13:23:54Z"
CONTRIBUTOR
null
Raise an error in `DatasetBuilder.as_dataset` when `file_format != "arrow"` (and fix the docstring) Fix #5874
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5915/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5915/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5915.diff", "html_url": "https://github.com/huggingface/datasets/pull/5915", "merged_at": "2023-05-31T13:23:54Z", "patch_url": "https://github.com/huggingface/datasets/pull/5915.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5915" }
true
https://api.github.com/repos/huggingface/datasets/issues/5914
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5914/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5914/comments
https://api.github.com/repos/huggingface/datasets/issues/5914/events
https://github.com/huggingface/datasets/issues/5914
1,731,483,996
I_kwDODunzps5nNFlc
5,914
array is too big; `arr.size * arr.dtype.itemsize` is larger than the maximum possible size in Datasets
{ "avatar_url": "https://avatars.githubusercontent.com/u/85110830?v=4", "events_url": "https://api.github.com/users/ravenouse/events{/privacy}", "followers_url": "https://api.github.com/users/ravenouse/followers", "following_url": "https://api.github.com/users/ravenouse/following{/other_user}", "gists_url": "https://api.github.com/users/ravenouse/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ravenouse", "id": 85110830, "login": "ravenouse", "node_id": "MDQ6VXNlcjg1MTEwODMw", "organizations_url": "https://api.github.com/users/ravenouse/orgs", "received_events_url": "https://api.github.com/users/ravenouse/received_events", "repos_url": "https://api.github.com/users/ravenouse/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ravenouse/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ravenouse/subscriptions", "type": "User", "url": "https://api.github.com/users/ravenouse" }
[]
open
false
null
[]
null
0
"2023-05-30T04:25:00Z"
"2023-05-30T04:25:00Z"
null
NONE
null
### Describe the bug When using the `filter` or `map` function to preprocess a dataset, a ValueError is encountered with the error message "array is too big; arr.size * arr.dtype.itemsize is larger than the maximum possible size." Detailed error message: Traceback (most recent call last): File "data_processing.py", line 26, in <module> processed_dataset[split] = samromur_children[split].map(prepare_dataset, cache_file_name=cache_dict[split],writer_batch_size = 50) File "/projects/zhwa3087/software/anaconda/envs/mycustomenv/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2405, in map desc=desc, File "/projects/zhwa3087/software/anaconda/envs/mycustomenv/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 557, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/projects/zhwa3087/software/anaconda/envs/mycustomenv/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 524, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/projects/zhwa3087/software/anaconda/envs/mycustomenv/lib/python3.7/site-packages/datasets/fingerprint.py", line 480, in wrapper out = func(self, *args, **kwargs) File "/projects/zhwa3087/software/anaconda/envs/mycustomenv/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2756, in _map_single example = apply_function_on_filtered_inputs(example, i, offset=offset) File "/projects/zhwa3087/software/anaconda/envs/mycustomenv/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2655, in apply_function_on_filtered_inputs processed_inputs = function(*fn_args, *additional_args, **fn_kwargs) File "/projects/zhwa3087/software/anaconda/envs/mycustomenv/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2347, in decorated result = f(decorated_item, *args, **kwargs) File "data_processing.py", line 11, in prepare_dataset audio = batch["audio"] File "/projects/zhwa3087/software/anaconda/envs/mycustomenv/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 123, in __getitem__ value = decode_nested_example(self.features[key], value) if value is not None else None File "/projects/zhwa3087/software/anaconda/envs/mycustomenv/lib/python3.7/site-packages/datasets/features/features.py", line 1260, in decode_nested_example return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) if obj is not None else None File "/projects/zhwa3087/software/anaconda/envs/mycustomenv/lib/python3.7/site-packages/datasets/features/audio.py", line 156, in decode_example array, sampling_rate = self._decode_non_mp3_path_like(path, token_per_repo_id=token_per_repo_id) File "/projects/zhwa3087/software/anaconda/envs/mycustomenv/lib/python3.7/site-packages/datasets/features/audio.py", line 257, in _decode_non_mp3_path_like array, sampling_rate = librosa.load(f, sr=self.sampling_rate, mono=self.mono) File "/projects/zhwa3087/software/anaconda/envs/mycustomenv/lib/python3.7/site-packages/librosa/core/audio.py", line 176, in load y, sr_native = __soundfile_load(path, offset, duration, dtype) File "/projects/zhwa3087/software/anaconda/envs/mycustomenv/lib/python3.7/site-packages/librosa/core/audio.py", line 222, in __soundfile_load y = sf_desc.read(frames=frame_duration, dtype=dtype, always_2d=False).T File "/projects/zhwa3087/software/anaconda/envs/mycustomenv/lib/python3.7/site-packages/soundfile.py", line 891, in read out = self._create_empty_array(frames, always_2d, dtype) File "/projects/zhwa3087/software/anaconda/envs/mycustomenv/lib/python3.7/site-packages/soundfile.py", line 1323, in _create_empty_array return np.empty(shape, dtype, order='C') ValueError: array is too big; `arr.size * arr.dtype.itemsize` is larger than the maximum possible size. ### Steps to reproduce the bug ```python from datasets import load_dataset, DatasetDict from transformers import WhisperFeatureExtractor from transformers import WhisperTokenizer samromur_children= load_dataset("language-and-voice-lab/samromur_children") feature_extractor = WhisperFeatureExtractor.from_pretrained("openai/whisper-small") tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small", language="icelandic", task="transcribe") def prepare_dataset(batch): # load and resample audio data from 48 to 16kHz audio = batch["audio"] # compute log-Mel input features from input audio array batch["input_features"] = feature_extractor(audio["array"], sampling_rate=16000).input_features[0] # encode target text to label ids batch["labels"] = tokenizer(batch["normalized_text"]).input_ids return batch cache_dict = {"train": "./cache/audio_train.cache", \ "validation": "./cache/audio_validation.cache", \ "test": "./cache/audio_test.cache"} filter_cache_dict = {"train": "./cache/filter_train.arrow", \ "validation": "./cache/filter_validation.arrow", \ "test": "./cache/filter_test.arrow"} print("before filtering") print(samromur_children) #filter the dataset to only include examples with more than 2 seconds of audio samromur_children = samromur_children.filter(lambda example: example["audio"]["array"].shape[0] > 16000*2, cache_file_names=filter_cache_dict) print("after filtering") print(samromur_children) processed_dataset = DatasetDict() # processed_dataset = samromur_children.map(prepare_dataset, cache_file_names=cache_dict, num_proc=10,) for split in ["train", "validation", "test"]: processed_dataset[split] = samromur_children[split].map(prepare_dataset, cache_file_name=cache_dict[split]) ``` ### Expected behavior The dataset is successfully processed and ready to train the model. ### Environment info Python version: 3.7.13 datasets package version: 2.4.0 librosa package version: 0.10.0.post2
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5914/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5914/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5913
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5913/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5913/comments
https://api.github.com/repos/huggingface/datasets/issues/5913/events
https://github.com/huggingface/datasets/issues/5913
1,731,427,484
I_kwDODunzps5nM3yc
5,913
I tried to load a custom dataset using the following statement: dataset = load_dataset('json', data_files=data_files). The dataset contains 50 million text-image pairs, but an error occurred.
{ "avatar_url": "https://avatars.githubusercontent.com/u/17508662?v=4", "events_url": "https://api.github.com/users/cjt222/events{/privacy}", "followers_url": "https://api.github.com/users/cjt222/followers", "following_url": "https://api.github.com/users/cjt222/following{/other_user}", "gists_url": "https://api.github.com/users/cjt222/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/cjt222", "id": 17508662, "login": "cjt222", "node_id": "MDQ6VXNlcjE3NTA4NjYy", "organizations_url": "https://api.github.com/users/cjt222/orgs", "received_events_url": "https://api.github.com/users/cjt222/received_events", "repos_url": "https://api.github.com/users/cjt222/repos", "site_admin": false, "starred_url": "https://api.github.com/users/cjt222/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cjt222/subscriptions", "type": "User", "url": "https://api.github.com/users/cjt222" }
[]
closed
false
null
[]
null
2
"2023-05-30T02:55:26Z"
"2023-07-24T12:00:38Z"
"2023-07-24T12:00:38Z"
NONE
null
### Describe the bug File "/home/kas/.conda/envs/diffusers/lib/python3.7/site-packages/datasets/builder.py", line 1858, in _prepare_split_single Downloading and preparing dataset json/default to /home/kas/diffusers/examples/dreambooth/cache_data/datasets/json/default-acf423d8c6ef99d0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4... Downloading data files: 0%| | 0/1 [00:00<?, ?it/s] Downloading data files: 100%|██████████| 1/1 [00:00<00:00, 84.35it/s] Extracting data files: 0%| | 0/1 [00:00<?, ?it/s] for _, table in generator: File "/home/kas/.conda/envs/diffusers/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 114, in _generate_tables io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size) File "pyarrow/_json.pyx", line 258, in pyarrow._json.read_json Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 27.72it/s] Generating train split: 0 examples [00:00, ? examples/s] File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 125, in pyarrow.lib.check_status pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2390448764 ### Steps to reproduce the bug 1、data_files = ["1.json", "2.json", "3.json"] 2、dataset = load_dataset('json', data_files=data_files) ### Expected behavior Read the dataset normally. ### Environment info - `datasets` version: 2.12.0 - Platform: Linux-4.15.0-29-generic-x86_64-with-debian-buster-sid - Python version: 3.7.16 - Huggingface_hub version: 0.14.1 - PyArrow version: 12.0.0 - Pandas version: 1.3.5
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5913/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5913/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5912
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5912/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5912/comments
https://api.github.com/repos/huggingface/datasets/issues/5912/events
https://github.com/huggingface/datasets/issues/5912
1,730,299,852
I_kwDODunzps5nIkfM
5,912
Missing elements in `map` a batched dataset
{ "avatar_url": "https://avatars.githubusercontent.com/u/1410927?v=4", "events_url": "https://api.github.com/users/sachinruk/events{/privacy}", "followers_url": "https://api.github.com/users/sachinruk/followers", "following_url": "https://api.github.com/users/sachinruk/following{/other_user}", "gists_url": "https://api.github.com/users/sachinruk/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sachinruk", "id": 1410927, "login": "sachinruk", "node_id": "MDQ6VXNlcjE0MTA5Mjc=", "organizations_url": "https://api.github.com/users/sachinruk/orgs", "received_events_url": "https://api.github.com/users/sachinruk/received_events", "repos_url": "https://api.github.com/users/sachinruk/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sachinruk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinruk/subscriptions", "type": "User", "url": "https://api.github.com/users/sachinruk" }
[]
closed
false
null
[]
null
1
"2023-05-29T08:09:19Z"
"2023-07-26T15:48:15Z"
"2023-07-26T15:48:15Z"
NONE
null
### Describe the bug As outlined [here](https://discuss.huggingface.co/t/length-error-using-map-with-datasets/40969/3?u=sachin), the following collate function drops 5 out of possible 6 elements in the batch (it is 6 because out of the eight, two are bad links in laion). A reproducible [kaggle kernel ](https://www.kaggle.com/sachin/laion-hf-dataset/edit) can be found here. The weirdest part is when inspecting the sizes of the tensors as shown below, both `tokenized_captions["input_ids"]` and `image_features` show the correct shapes. Simply the output only has one element (with the batch dimension squeezed out). ```python class CollateFn: def get_image(self, url): try: response = requests.get(url) return Image.open(io.BytesIO(response.content)).convert("RGB") except PIL.UnidentifiedImageError: logger.info(f"Reading error: Could not transform f{url}") return None except requests.exceptions.ConnectionError: logger.info(f"Connection error: Could not transform f{url}") return None def __call__(self, batch): images = [self.get_image(url) for url in batch["url"]] captions = [caption for caption, image in zip(batch["caption"], images) if image is not None] images = [image for image in images if image is not None] tokenized_captions = tokenizer( captions, padding="max_length", truncation=True, max_length=tokenizer.model_max_length, return_tensors="pt", ) image_features = torch.stack([torch.Tensor(feature_extractor(image)["pixel_values"][0]) for image in images]) # import pdb; pdb.set_trace() return {"input_ids": tokenized_captions["input_ids"], "images": image_features} collate_fn = CollateFn() laion_ds = datasets.load_dataset("laion/laion400m", split="train", streaming=True) laion_ds_batched = laion_ds.map(collate_fn, batched=True, batch_size=8, remove_columns=next(iter(laion_ds)).keys()) ``` ### Steps to reproduce the bug A reproducible [kaggle kernel ](https://www.kaggle.com/sachin/laion-hf-dataset/edit) can be found here. ### Expected behavior Would expect `next(iter(laion_ds_batched))` to produce two tensors of shape `(batch_size, 77)` and `batch_size, image_shape`. ### Environment info datasets==2.12.0 python==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/5912/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5912/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5910
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5910/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5910/comments
https://api.github.com/repos/huggingface/datasets/issues/5910/events
https://github.com/huggingface/datasets/issues/5910
1,728,909,790
I_kwDODunzps5nDRHe
5,910
Cannot use both set_format and set_transform
{ "avatar_url": "https://avatars.githubusercontent.com/u/14046002?v=4", "events_url": "https://api.github.com/users/ybouane/events{/privacy}", "followers_url": "https://api.github.com/users/ybouane/followers", "following_url": "https://api.github.com/users/ybouane/following{/other_user}", "gists_url": "https://api.github.com/users/ybouane/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ybouane", "id": 14046002, "login": "ybouane", "node_id": "MDQ6VXNlcjE0MDQ2MDAy", "organizations_url": "https://api.github.com/users/ybouane/orgs", "received_events_url": "https://api.github.com/users/ybouane/received_events", "repos_url": "https://api.github.com/users/ybouane/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ybouane/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ybouane/subscriptions", "type": "User", "url": "https://api.github.com/users/ybouane" }
[]
closed
false
null
[]
null
5
"2023-05-27T19:22:23Z"
"2023-07-09T21:40:54Z"
"2023-06-16T14:41:24Z"
NONE
null
### Describe the bug I need to process some data using the set_transform method but I also need the data to be formatted for pytorch before processing it. I don't see anywhere in the documentation something that says that both methods cannot be used at the same time. ### Steps to reproduce the bug ``` from datasets import load_dataset ds = load_dataset("mnist", split="train") ds.set_format(type="torch") def transform(entry): return entry["image"].double() ds.set_transform(transform) print(ds[0]) ``` ### Expected behavior It should print the pytorch tensor image as a double, but it errors because "entry" in the transform function doesn't receive a pytorch tensor to begin with, it receives a PIL Image -> entry.double() errors because entry isn't a pytorch tensor. ### Environment info Latest versions. ### Note: It would be at least handy to have access to a function that can do the dataset.set_format in the set_transform function. Something like: ``` from datasets import load_dataset, do_format ds = load_dataset("mnist", split="train") def transform(entry): entry = do_format(entry, type="torch") return entry["image"].double() ds.set_transform(transform) print(ds[0]) ```
{ "+1": 2, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/huggingface/datasets/issues/5910/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5910/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5909
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5909/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5909/comments
https://api.github.com/repos/huggingface/datasets/issues/5909/events
https://github.com/huggingface/datasets/pull/5909
1,728,900,068
PR_kwDODunzps5Rgga6
5,909
Use more efficient and idiomatic way to construct list.
{ "avatar_url": "https://avatars.githubusercontent.com/u/172294?v=4", "events_url": "https://api.github.com/users/ttsugriy/events{/privacy}", "followers_url": "https://api.github.com/users/ttsugriy/followers", "following_url": "https://api.github.com/users/ttsugriy/following{/other_user}", "gists_url": "https://api.github.com/users/ttsugriy/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ttsugriy", "id": 172294, "login": "ttsugriy", "node_id": "MDQ6VXNlcjE3MjI5NA==", "organizations_url": "https://api.github.com/users/ttsugriy/orgs", "received_events_url": "https://api.github.com/users/ttsugriy/received_events", "repos_url": "https://api.github.com/users/ttsugriy/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ttsugriy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ttsugriy/subscriptions", "type": "User", "url": "https://api.github.com/users/ttsugriy" }
[]
closed
false
null
[]
null
3
"2023-05-27T18:54:47Z"
"2023-05-31T15:37:11Z"
"2023-05-31T13:28:29Z"
CONTRIBUTOR
null
Using `*` is ~2X faster according to [benchmark](https://colab.research.google.com/gist/ttsugriy/c964a2604edf70c41911b10335729b6a/for-vs-mult.ipynb) with just 4 patterns. This doesn't matter much since this tiny difference is not going to be noticeable, but why not?
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5909/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5909/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5909.diff", "html_url": "https://github.com/huggingface/datasets/pull/5909", "merged_at": "2023-05-31T13:28:28Z", "patch_url": "https://github.com/huggingface/datasets/pull/5909.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5909" }
true
https://api.github.com/repos/huggingface/datasets/issues/5908
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5908/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5908/comments
https://api.github.com/repos/huggingface/datasets/issues/5908/events
https://github.com/huggingface/datasets/issues/5908
1,728,653,935
I_kwDODunzps5nCSpv
5,908
Unbearably slow sorting on big mapped datasets
{ "avatar_url": "https://avatars.githubusercontent.com/u/29152154?v=4", "events_url": "https://api.github.com/users/maximxlss/events{/privacy}", "followers_url": "https://api.github.com/users/maximxlss/followers", "following_url": "https://api.github.com/users/maximxlss/following{/other_user}", "gists_url": "https://api.github.com/users/maximxlss/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/maximxlss", "id": 29152154, "login": "maximxlss", "node_id": "MDQ6VXNlcjI5MTUyMTU0", "organizations_url": "https://api.github.com/users/maximxlss/orgs", "received_events_url": "https://api.github.com/users/maximxlss/received_events", "repos_url": "https://api.github.com/users/maximxlss/repos", "site_admin": false, "starred_url": "https://api.github.com/users/maximxlss/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/maximxlss/subscriptions", "type": "User", "url": "https://api.github.com/users/maximxlss" }
[]
open
false
null
[]
null
6
"2023-05-27T11:08:32Z"
"2023-06-13T17:45:10Z"
null
CONTRIBUTOR
null
### Describe the bug For me, with ~40k lines, sorting took 3.5 seconds on a flattened dataset (including the flatten operation) and 22.7 seconds on a mapped dataset (right after sharding), which is about x5 slowdown. Moreover, it seems like it slows down exponentially with bigger datasets (wasn't able to sort 700k lines at all, with flattening takes about a minute). ### Steps to reproduce the bug ```Python from datasets import load_dataset import time dataset = load_dataset("xnli", "en", split="train") dataset = dataset.shard(10, 0) print(len(dataset)) t = time.time() # dataset = dataset.flatten_indices() # uncomment this line and it's fast dataset = dataset.sort("label", reverse=True, load_from_cache_file=False) print(f"finished in {time.time() - t:.4f} seconds") ``` ### Expected behavior Expect sorting to take the same or less time than flattening and then sorting. ### Environment info - `datasets` version: 2.12.1.dev0 (same with 2.12.0 too) - Platform: Windows-10-10.0.22621-SP0 - Python version: 3.10.10 - Huggingface_hub version: 0.14.1 - PyArrow version: 12.0.0 - Pandas version: 2.0.1
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5908/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5908/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5907
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5907/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5907/comments
https://api.github.com/repos/huggingface/datasets/issues/5907/events
https://github.com/huggingface/datasets/pull/5907
1,728,648,560
PR_kwDODunzps5RfqUU
5,907
Add `flatten_indices` to `DatasetDict`
{ "avatar_url": "https://avatars.githubusercontent.com/u/29152154?v=4", "events_url": "https://api.github.com/users/maximxlss/events{/privacy}", "followers_url": "https://api.github.com/users/maximxlss/followers", "following_url": "https://api.github.com/users/maximxlss/following{/other_user}", "gists_url": "https://api.github.com/users/maximxlss/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/maximxlss", "id": 29152154, "login": "maximxlss", "node_id": "MDQ6VXNlcjI5MTUyMTU0", "organizations_url": "https://api.github.com/users/maximxlss/orgs", "received_events_url": "https://api.github.com/users/maximxlss/received_events", "repos_url": "https://api.github.com/users/maximxlss/repos", "site_admin": false, "starred_url": "https://api.github.com/users/maximxlss/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/maximxlss/subscriptions", "type": "User", "url": "https://api.github.com/users/maximxlss" }
[]
closed
false
null
[]
null
2
"2023-05-27T10:55:44Z"
"2023-06-01T11:46:35Z"
"2023-06-01T11:39:36Z"
CONTRIBUTOR
null
Add `flatten_indices` to `DatasetDict` for convinience
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5907/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5907/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5907.diff", "html_url": "https://github.com/huggingface/datasets/pull/5907", "merged_at": "2023-06-01T11:39:35Z", "patch_url": "https://github.com/huggingface/datasets/pull/5907.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5907" }
true
https://api.github.com/repos/huggingface/datasets/issues/5906
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5906/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5906/comments
https://api.github.com/repos/huggingface/datasets/issues/5906/events
https://github.com/huggingface/datasets/issues/5906
1,728,171,113
I_kwDODunzps5nAcxp
5,906
Could you unpin responses version?
{ "avatar_url": "https://avatars.githubusercontent.com/u/47789026?v=4", "events_url": "https://api.github.com/users/kenimou/events{/privacy}", "followers_url": "https://api.github.com/users/kenimou/followers", "following_url": "https://api.github.com/users/kenimou/following{/other_user}", "gists_url": "https://api.github.com/users/kenimou/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kenimou", "id": 47789026, "login": "kenimou", "node_id": "MDQ6VXNlcjQ3Nzg5MDI2", "organizations_url": "https://api.github.com/users/kenimou/orgs", "received_events_url": "https://api.github.com/users/kenimou/received_events", "repos_url": "https://api.github.com/users/kenimou/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kenimou/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kenimou/subscriptions", "type": "User", "url": "https://api.github.com/users/kenimou" }
[]
closed
false
null
[]
null
0
"2023-05-26T20:02:14Z"
"2023-05-30T17:53:31Z"
"2023-05-30T17:53:31Z"
NONE
null
### Describe the bug Could you unpin [this](https://github.com/huggingface/datasets/blob/main/setup.py#L139) or move it to test requirements? This is a testing library and we also use it for our tests as well. We do not want to use a very outdated version. ### Steps to reproduce the bug could not install this library due to dependency conflict. ### Expected behavior can install datasets ### Environment info linux 64
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5906/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5906/timeline
null
completed
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5905
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5905/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5905/comments
https://api.github.com/repos/huggingface/datasets/issues/5905/events
https://github.com/huggingface/datasets/issues/5905
1,727,541,392
I_kwDODunzps5m-DCQ
5,905
Offer an alternative to Iterable Dataset that allows lazy loading and processing while skipping batches efficiently
{ "avatar_url": "https://avatars.githubusercontent.com/u/48770768?v=4", "events_url": "https://api.github.com/users/Hubert-Bonisseur/events{/privacy}", "followers_url": "https://api.github.com/users/Hubert-Bonisseur/followers", "following_url": "https://api.github.com/users/Hubert-Bonisseur/following{/other_user}", "gists_url": "https://api.github.com/users/Hubert-Bonisseur/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Hubert-Bonisseur", "id": 48770768, "login": "Hubert-Bonisseur", "node_id": "MDQ6VXNlcjQ4NzcwNzY4", "organizations_url": "https://api.github.com/users/Hubert-Bonisseur/orgs", "received_events_url": "https://api.github.com/users/Hubert-Bonisseur/received_events", "repos_url": "https://api.github.com/users/Hubert-Bonisseur/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Hubert-Bonisseur/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Hubert-Bonisseur/subscriptions", "type": "User", "url": "https://api.github.com/users/Hubert-Bonisseur" }
[ { "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
1
"2023-05-26T12:33:02Z"
"2023-06-15T13:34:18Z"
null
CONTRIBUTOR
null
### Feature request I would like a way to resume training from a checkpoint without waiting for a very long time when using an iterable dataset. ### Motivation I am training models on the speech-recognition task. I have very large datasets that I can't comfortably store on a disk and also quite computationally intensive audio processing to do. As a result I want to load data from my remote when it is needed and perform all processing on the fly. I am currently using the iterable dataset feature of _datasets_. It does everything I need with one exception. My issue is that when resuming training at a step n, we have to download all the data and perform the processing of steps < n, just to get the iterable at the right step. In my case it takes almost as long as training for the same steps, which make resuming training from a checkpoint useless in practice. I understand that the nature of iterators make it probably nearly impossible to quickly resume training. I thought about a possible solution nonetheless : I could in fact index my large dataset and make it a mapped dataset. Then I could use set_transform to perform the processing on the fly. Finally, if I'm not mistaken, the _accelerate_ package allows to [skip steps efficiently](https://github.com/huggingface/accelerate/blob/a73898027a211c3f6dc4460351b0ec246aa824aa/src/accelerate/data_loader.py#L827) for a mapped dataset. Is it possible to lazily load samples of a mapped dataset ? I'm used to [dataset scripts](https://huggingface.co/docs/datasets/dataset_script), maybe something can be done there. If not, I could do it using a plain _Pytorch_ dataset. Then I would need to convert it to a _datasets_' dataset to get all the features of _datasets_. Is it something possible ? ### Your contribution I could provide a PR to allow lazy loading of mapped dataset or the conversion of a mapped _Pytorch_ dataset into a _Datasets_ dataset if you think it is an useful new feature.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5905/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5905/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5904
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5904/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5904/comments
https://api.github.com/repos/huggingface/datasets/issues/5904/events
https://github.com/huggingface/datasets/pull/5904
1,727,415,626
PR_kwDODunzps5Rbfks
5,904
Validate name parameter in make_file_instructions
{ "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
2
"2023-05-26T11:12:46Z"
"2023-05-31T07:43:32Z"
"2023-05-31T07:34:57Z"
MEMBER
null
Validate `name` parameter in `make_file_instructions`. This way users get more informative error messages, instead of: ```stacktrace .../huggingface/datasets/src/datasets/arrow_reader.py in make_file_instructions(name, split_infos, instruction, filetype_suffix, prefix_path) 110 name2len = {info.name: info.num_examples for info in split_infos} 111 name2shard_lengths = {info.name: info.shard_lengths for info in split_infos} --> 112 name2filenames = { 113 info.name: filenames_for_dataset_split( 114 path=prefix_path, .../huggingface/datasets/src/datasets/arrow_reader.py in <dictcomp>(.0) 111 name2shard_lengths = {info.name: info.shard_lengths for info in split_infos} 112 name2filenames = { --> 113 info.name: filenames_for_dataset_split( 114 path=prefix_path, 115 dataset_name=name, .../huggingface/datasets/src/datasets/naming.py in filenames_for_dataset_split(path, dataset_name, split, filetype_suffix, shard_lengths) 68 69 def filenames_for_dataset_split(path, dataset_name, split, filetype_suffix=None, shard_lengths=None): ---> 70 prefix = filename_prefix_for_split(dataset_name, split) 71 prefix = os.path.join(path, prefix) 72 .../huggingface/datasets/src/datasets/naming.py in filename_prefix_for_split(name, split) 52 53 def filename_prefix_for_split(name, split): ---> 54 if os.path.basename(name) != name: 55 raise ValueError(f"Should be a dataset name, not a path: {name}") 56 if not re.match(_split_re, split): .../lib/python3.9/posixpath.py in basename(p) 140 def basename(p): 141 """Returns the final component of a pathname""" --> 142 p = os.fspath(p) 143 sep = _get_sep(p) 144 i = p.rfind(sep) + 1 TypeError: expected str, bytes or os.PathLike object, not NoneType ``` Related to #5895.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5904/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5904/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5904.diff", "html_url": "https://github.com/huggingface/datasets/pull/5904", "merged_at": "2023-05-31T07:34:57Z", "patch_url": "https://github.com/huggingface/datasets/pull/5904.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5904" }
true
https://api.github.com/repos/huggingface/datasets/issues/5903
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5903/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5903/comments
https://api.github.com/repos/huggingface/datasets/issues/5903/events
https://github.com/huggingface/datasets/pull/5903
1,727,372,549
PR_kwDODunzps5RbV82
5,903
Relax `ci.yml` trigger for `pull_request` based on modified paths
{ "avatar_url": "https://avatars.githubusercontent.com/u/36760800?v=4", "events_url": "https://api.github.com/users/alvarobartt/events{/privacy}", "followers_url": "https://api.github.com/users/alvarobartt/followers", "following_url": "https://api.github.com/users/alvarobartt/following{/other_user}", "gists_url": "https://api.github.com/users/alvarobartt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/alvarobartt", "id": 36760800, "login": "alvarobartt", "node_id": "MDQ6VXNlcjM2NzYwODAw", "organizations_url": "https://api.github.com/users/alvarobartt/orgs", "received_events_url": "https://api.github.com/users/alvarobartt/received_events", "repos_url": "https://api.github.com/users/alvarobartt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/alvarobartt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/alvarobartt/subscriptions", "type": "User", "url": "https://api.github.com/users/alvarobartt" }
[]
open
false
null
[]
null
3
"2023-05-26T10:46:52Z"
"2023-09-07T15:52:36Z"
null
CONTRIBUTOR
null
## What's in this PR? As of a previous PR at #5902, I've seen that the CI was automatically trigger on any file, in that case when modifying a Jupyter Notebook (.ipynb), which IMO could be skipped, as the modification on the Jupyter Notebook has no effect/impact on the `ci.yml` outcome. So this PR controls the paths that trigger the `ci.yml` to avoid wasting resources when not needed. ## What's pending in this PR? I would like to confirm whether this should affect both `push` and `pull_request`, since just modifications in those files won't change the `ci.yml` outcome, so maybe it's worth skipping it too in the `push` trigger.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5903/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5903/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5903.diff", "html_url": "https://github.com/huggingface/datasets/pull/5903", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5903.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5903" }
true
https://api.github.com/repos/huggingface/datasets/issues/5902
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5902/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5902/comments
https://api.github.com/repos/huggingface/datasets/issues/5902/events
https://github.com/huggingface/datasets/pull/5902
1,727,342,194
PR_kwDODunzps5RbPS9
5,902
Fix `Overview.ipynb` & detach Jupyter Notebooks from `datasets` repository
{ "avatar_url": "https://avatars.githubusercontent.com/u/36760800?v=4", "events_url": "https://api.github.com/users/alvarobartt/events{/privacy}", "followers_url": "https://api.github.com/users/alvarobartt/followers", "following_url": "https://api.github.com/users/alvarobartt/following{/other_user}", "gists_url": "https://api.github.com/users/alvarobartt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/alvarobartt", "id": 36760800, "login": "alvarobartt", "node_id": "MDQ6VXNlcjM2NzYwODAw", "organizations_url": "https://api.github.com/users/alvarobartt/orgs", "received_events_url": "https://api.github.com/users/alvarobartt/received_events", "repos_url": "https://api.github.com/users/alvarobartt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/alvarobartt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/alvarobartt/subscriptions", "type": "User", "url": "https://api.github.com/users/alvarobartt" }
[]
closed
false
null
[]
null
13
"2023-05-26T10:25:01Z"
"2023-07-25T13:50:06Z"
"2023-07-25T13:38:33Z"
CONTRIBUTOR
null
## What's in this PR? This PR solves #5887 since there was a mismatch between the tokenizer and the model used, since the tokenizer was `bert-base-cased` while the model was `distilbert-base-case` both for the PyTorch and TensorFlow alternatives. Since DistilBERT doesn't use/need the `token_type_ids`, the `**batch` was failing, as the batch contained `input_ids`, `attention_mask`, `token_type_ids`, `start_positions` and `end_positions`, and `token_type_ids` was not required. Besides that, at the end `seqeval` was being used to evaluate the model predictions, and just `evaluate` was being installed, so I've also included the `seqeval` installation. Finally, I've re-run everything in Google Colab, and every cell was successfully executed! ## What was done on top of the original PR? Based on the comments from @mariosasko and @stevhliu, I've updated the contents of this PR to also review the `quickstart.mdx` and update what was needed, besides that, we may eventually move the `Overview.ipynb` dataset to `huggingface/notebooks` following @stevhliu suggestions.
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 1, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/huggingface/datasets/issues/5902/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5902/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5902.diff", "html_url": "https://github.com/huggingface/datasets/pull/5902", "merged_at": "2023-07-25T13:38:33Z", "patch_url": "https://github.com/huggingface/datasets/pull/5902.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5902" }
true
https://api.github.com/repos/huggingface/datasets/issues/5901
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5901/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5901/comments
https://api.github.com/repos/huggingface/datasets/issues/5901/events
https://github.com/huggingface/datasets/pull/5901
1,727,179,016
PR_kwDODunzps5Rarux
5,901
Make prepare_split more robust if errors in metadata dataset_info splits
{ "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
3
"2023-05-26T08:48:22Z"
"2023-06-02T06:06:38Z"
"2023-06-01T13:39:40Z"
MEMBER
null
This PR uses `split_generator.split_info` as default value for `split_info` if any exception is raised while trying to get `split_generator.name` from `self.info.splits` (this may happen if there is any error in the metadata dataset_info splits). Please note that `split_info` is only used by the logger. Fix #5895 if passed `verification_mode="no_checks"`: ```python ds = load_dataset( "ArmelR/stack-exchange-instruction", data_dir="data/finetune", split="train", verification_mode="no_checks", revision="c609f1caade5cfbf3b9fe9cfa17d7cb000b457bd", ) ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5901/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5901/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5901.diff", "html_url": "https://github.com/huggingface/datasets/pull/5901", "merged_at": "2023-06-01T13:39:39Z", "patch_url": "https://github.com/huggingface/datasets/pull/5901.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5901" }
true
https://api.github.com/repos/huggingface/datasets/issues/5900
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5900/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5900/comments
https://api.github.com/repos/huggingface/datasets/issues/5900/events
https://github.com/huggingface/datasets/pull/5900
1,727,129,617
PR_kwDODunzps5RahTR
5,900
Fix minor typo in docs loading.mdx
{ "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
3
"2023-05-26T08:10:54Z"
"2023-05-26T09:34:15Z"
"2023-05-26T09:25:12Z"
MEMBER
null
Minor fix.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5900/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5900/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5900.diff", "html_url": "https://github.com/huggingface/datasets/pull/5900", "merged_at": "2023-05-26T09:25:12Z", "patch_url": "https://github.com/huggingface/datasets/pull/5900.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5900" }
true