url
stringlengths 61
61
| repository_url
stringclasses 1
value | labels_url
stringlengths 75
75
| comments_url
stringlengths 70
70
| events_url
stringlengths 68
68
| html_url
stringlengths 51
51
| id
int64 1.13B
3.52B
| node_id
stringlengths 18
18
| number
int64 3.7k
7.82k
| title
stringlengths 1
290
| labels
listlengths 0
4
| state
stringclasses 2
values | locked
bool 1
class | assignee
null | assignees
listlengths 0
3
| milestone
null | comments
int64 0
49
| created_at
int64 1.64k
1.76k
| updated_at
int64 1.64k
1.76k
| closed_at
int64 1.64k
1.76k
⌀ | author_association
stringclasses 4
values | type
null | active_lock_reason
null | body
stringlengths 1
58.6k
⌀ | closed_by
null | timeline_url
stringlengths 70
70
| performed_via_github_app
null | state_reason
stringclasses 4
values | user.login
stringlengths 3
26
| user.id
int64 3.5k
219M
| user.node_id
stringlengths 12
20
| user.avatar_url
stringlengths 48
53
| user.gravatar_id
stringclasses 1
value | user.url
stringlengths 32
55
| user.html_url
stringlengths 22
45
| user.followers_url
stringlengths 42
65
| user.following_url
stringlengths 55
78
| user.gists_url
stringlengths 48
71
| user.starred_url
stringlengths 55
78
| user.subscriptions_url
stringlengths 46
69
| user.organizations_url
stringlengths 37
60
| user.repos_url
stringlengths 38
61
| user.events_url
stringlengths 49
72
| user.received_events_url
stringlengths 48
71
| user.type
stringclasses 1
value | user.user_view_type
stringclasses 1
value | user.site_admin
bool 1
class | sub_issues_summary.total
float64 0
0
| sub_issues_summary.completed
float64 0
0
| sub_issues_summary.percent_completed
float64 0
0
| issue_dependencies_summary.blocked_by
float64 0
0
| issue_dependencies_summary.total_blocked_by
float64 0
0
| issue_dependencies_summary.blocking
float64 0
0
| issue_dependencies_summary.total_blocking
float64 0
0
| reactions.url
stringlengths 71
71
| reactions.total_count
int64 0
61
| reactions.+1
int64 0
39
| reactions.-1
int64 0
0
| reactions.laugh
int64 0
0
| reactions.hooray
int64 0
2
| reactions.confused
int64 0
3
| reactions.heart
int64 0
22
| reactions.rocket
int64 0
6
| reactions.eyes
int64 0
5
| draft
null | pull_request.url
null | pull_request.html_url
null | pull_request.diff_url
null | pull_request.patch_url
null | pull_request.merged_at
null | closed_by.login
stringclasses 346
values | closed_by.id
float64 45.3k
183M
⌀ | closed_by.node_id
stringclasses 346
values | closed_by.avatar_url
stringclasses 346
values | closed_by.gravatar_id
stringclasses 1
value | closed_by.url
stringclasses 346
values | closed_by.html_url
stringclasses 346
values | closed_by.followers_url
stringclasses 346
values | closed_by.following_url
stringclasses 346
values | closed_by.gists_url
stringclasses 346
values | closed_by.starred_url
stringclasses 346
values | closed_by.subscriptions_url
stringclasses 346
values | closed_by.organizations_url
stringclasses 346
values | closed_by.repos_url
stringclasses 346
values | closed_by.events_url
stringclasses 346
values | closed_by.received_events_url
stringclasses 346
values | closed_by.type
stringclasses 1
value | closed_by.user_view_type
stringclasses 1
value | closed_by.site_admin
bool 1
class | assignee.login
stringclasses 52
values | assignee.id
float64 192k
135M
⌀ | assignee.node_id
stringclasses 52
values | assignee.avatar_url
stringclasses 52
values | assignee.gravatar_id
stringclasses 1
value | assignee.url
stringclasses 52
values | assignee.html_url
stringclasses 52
values | assignee.followers_url
stringclasses 52
values | assignee.following_url
stringclasses 52
values | assignee.gists_url
stringclasses 52
values | assignee.starred_url
stringclasses 52
values | assignee.subscriptions_url
stringclasses 52
values | assignee.organizations_url
stringclasses 52
values | assignee.repos_url
stringclasses 52
values | assignee.events_url
stringclasses 52
values | assignee.received_events_url
stringclasses 52
values | assignee.type
stringclasses 1
value | assignee.user_view_type
stringclasses 1
value | assignee.site_admin
bool 1
class | milestone.url
stringclasses 1
value | milestone.html_url
stringclasses 1
value | milestone.labels_url
stringclasses 1
value | milestone.id
float64 9.04M
9.04M
⌀ | milestone.node_id
stringclasses 1
value | milestone.number
float64 10
10
⌀ | milestone.title
stringclasses 1
value | milestone.description
stringclasses 1
value | milestone.creator.login
stringclasses 1
value | milestone.creator.id
float64 47.5M
47.5M
⌀ | milestone.creator.node_id
stringclasses 1
value | milestone.creator.avatar_url
stringclasses 1
value | milestone.creator.gravatar_id
stringclasses 1
value | milestone.creator.url
stringclasses 1
value | milestone.creator.html_url
stringclasses 1
value | milestone.creator.followers_url
stringclasses 1
value | milestone.creator.following_url
stringclasses 1
value | milestone.creator.gists_url
stringclasses 1
value | milestone.creator.starred_url
stringclasses 1
value | milestone.creator.subscriptions_url
stringclasses 1
value | milestone.creator.organizations_url
stringclasses 1
value | milestone.creator.repos_url
stringclasses 1
value | milestone.creator.events_url
stringclasses 1
value | milestone.creator.received_events_url
stringclasses 1
value | milestone.creator.type
stringclasses 1
value | milestone.creator.user_view_type
stringclasses 1
value | milestone.creator.site_admin
bool 1
class | milestone.open_issues
float64 3
3
⌀ | milestone.closed_issues
float64 5
5
⌀ | milestone.state
stringclasses 1
value | milestone.created_at
int64 1.68k
1.68k
⌀ | milestone.updated_at
int64 1.72k
1.72k
⌀ | milestone.due_on
null | milestone.closed_at
null | is_pull_request
bool 1
class | comments_text
listlengths 0
30
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://api.github.com/repos/huggingface/datasets/issues/7390
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7390/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7390/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7390/events
|
https://github.com/huggingface/datasets/issues/7390
| 2,843,813,365 |
I_kwDODunzps6pgSX1
| 7,390 |
Re-add py.typed
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
open
| false | null |
[] | null | 1 | 1,739 | 1,754 | null |
CONTRIBUTOR
| null | null |
### Feature request
The motivation for removing py.typed no longer seems to apply. Would a solution like [this one](https://github.com/huggingface/huggingface_hub/pull/2752) work here?
### Motivation
MyPy support is broken. As more type checkers come out, such as RedKnot, these may also be broken. It would be good to be PEP 561 compliant as long as it's not too onerous.
### Your contribution
I can re-add py.typed, but I don't know how to make sur all of the `__all__` files are provided (although you may not need to with modern PyRight).
| null |
https://api.github.com/repos/huggingface/datasets/issues/7390/timeline
| null | null |
NeilGirdhar
| 730,137 |
MDQ6VXNlcjczMDEzNw==
|
https://avatars.githubusercontent.com/u/730137?v=4
|
https://api.github.com/users/NeilGirdhar
|
https://github.com/NeilGirdhar
|
https://api.github.com/users/NeilGirdhar/followers
|
https://api.github.com/users/NeilGirdhar/following{/other_user}
|
https://api.github.com/users/NeilGirdhar/gists{/gist_id}
|
https://api.github.com/users/NeilGirdhar/starred{/owner}{/repo}
|
https://api.github.com/users/NeilGirdhar/subscriptions
|
https://api.github.com/users/NeilGirdhar/orgs
|
https://api.github.com/users/NeilGirdhar/repos
|
https://api.github.com/users/NeilGirdhar/events{/privacy}
|
https://api.github.com/users/NeilGirdhar/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7390/reactions
| 11 | 11 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"A similar issue was fixed for the `transformers` package, too: https://github.com/huggingface/transformers/pull/37022"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7389
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7389/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7389/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7389/events
|
https://github.com/huggingface/datasets/issues/7389
| 2,843,592,606 |
I_kwDODunzps6pfcee
| 7,389 |
Getting statistics about filtered examples
|
[] |
closed
| false | null |
[] | null | 2 | 1,739 | 1,739 | 1,739 |
NONE
| null | null |
@lhoestq wondering if the team has thought about this and if there are any recommendations?
Currently when processing datasets some examples are bound to get filtered out, whether it's due to bad format, or length is too long, or any other custom filters that might be getting applied. Let's just focus on the filter by length for now, since that would be something that gets applied dynamically for each training run. Say we want to show a graph in W&B with the running total of the number of filtered examples so far.
What would be a good way to go about hooking this up? Because the map/filter operations happen before the DataLoader batches are created, at training time if we're just grabbing batches from the DataLoader then we won't know how many things have been filtered already. But there's not really a good way to include a 'num_filtered' key into the dataset itself either because dataset map/filter process examples independently and don't have a way to track a running sum.
The only approach I can kind of think of is having a 'is_filtered' key in the dataset, and then creating a custom batcher/collator that reads that and tracks the metric?
| null |
https://api.github.com/repos/huggingface/datasets/issues/7389/timeline
| null |
completed
|
jonathanasdf
| 511,073 |
MDQ6VXNlcjUxMTA3Mw==
|
https://avatars.githubusercontent.com/u/511073?v=4
|
https://api.github.com/users/jonathanasdf
|
https://github.com/jonathanasdf
|
https://api.github.com/users/jonathanasdf/followers
|
https://api.github.com/users/jonathanasdf/following{/other_user}
|
https://api.github.com/users/jonathanasdf/gists{/gist_id}
|
https://api.github.com/users/jonathanasdf/starred{/owner}{/repo}
|
https://api.github.com/users/jonathanasdf/subscriptions
|
https://api.github.com/users/jonathanasdf/orgs
|
https://api.github.com/users/jonathanasdf/repos
|
https://api.github.com/users/jonathanasdf/events{/privacy}
|
https://api.github.com/users/jonathanasdf/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7389/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
jonathanasdf
| 511,073 |
MDQ6VXNlcjUxMTA3Mw==
|
https://avatars.githubusercontent.com/u/511073?v=4
|
https://api.github.com/users/jonathanasdf
|
https://github.com/jonathanasdf
|
https://api.github.com/users/jonathanasdf/followers
|
https://api.github.com/users/jonathanasdf/following{/other_user}
|
https://api.github.com/users/jonathanasdf/gists{/gist_id}
|
https://api.github.com/users/jonathanasdf/starred{/owner}{/repo}
|
https://api.github.com/users/jonathanasdf/subscriptions
|
https://api.github.com/users/jonathanasdf/orgs
|
https://api.github.com/users/jonathanasdf/repos
|
https://api.github.com/users/jonathanasdf/events{/privacy}
|
https://api.github.com/users/jonathanasdf/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"You can actually track a running sum in map() or filter() :)\n\n```python\nnum_filtered = 0\n\ndef f(x):\n global num_filtered\n condition = len(x[\"text\"]) < 1000\n if not condition:\n num_filtered += 1\n return condition\n\nds = ds.filter(f)\nprint(num_filtered)\n```\n\nand if you want to use multiprocessing, make sure to use a variable that is shared across processes\n\n\n```python\nfrom multiprocess import Manager\n\nmanager = Manager()\nnum_filtered = manager.Value('i', 0)\n\ndef f(x):\n global num_filtered\n condition = len(x[\"text\"]) < 1000\n if not condition:\n num_filtered.value += 1\n return condition\n\nds = ds.filter(f, num_proc=4)\nprint(num_filtered.value)\n```\n\nPS: `datasets` uses `multiprocess` instead of the `multiprocessing` package to support lambda functions in map() and filter()",
"Oh that's great to know!\n\nI guess this value would not be exactly synced with the batch in cases of pre-fetch and shuffle buffers and so on, but that's probably fine. Thanks!"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7388
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7388/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7388/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7388/events
|
https://github.com/huggingface/datasets/issues/7388
| 2,843,188,499 |
I_kwDODunzps6pd50T
| 7,388 |
OSError: [Errno 22] Invalid argument forbidden character
|
[] |
closed
| false | null |
[] | null | 2 | 1,739 | 1,739 | 1,739 |
NONE
| null | null |
### Describe the bug
I'm on Windows and i'm trying to load a datasets but i'm having title error because files in the repository are named with charactere like < >which can't be in a name file. Could it be possible to load this datasets but removing those charactere ?
### Steps to reproduce the bug
load_dataset("CATMuS/medieval") on Windows
### Expected behavior
Making the function to erase the forbidden character to allow loading the datasets who have those characters.
### Environment info
- `datasets` version: 3.2.0
- Platform: Windows-10-10.0.19045-SP0
- Python version: 3.12.2
- `huggingface_hub` version: 0.28.1
- PyArrow version: 19.0.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.9.0
| null |
https://api.github.com/repos/huggingface/datasets/issues/7388/timeline
| null |
completed
|
langflogit
| 124,634,542 |
U_kgDOB23Frg
|
https://avatars.githubusercontent.com/u/124634542?v=4
|
https://api.github.com/users/langflogit
|
https://github.com/langflogit
|
https://api.github.com/users/langflogit/followers
|
https://api.github.com/users/langflogit/following{/other_user}
|
https://api.github.com/users/langflogit/gists{/gist_id}
|
https://api.github.com/users/langflogit/starred{/owner}{/repo}
|
https://api.github.com/users/langflogit/subscriptions
|
https://api.github.com/users/langflogit/orgs
|
https://api.github.com/users/langflogit/repos
|
https://api.github.com/users/langflogit/events{/privacy}
|
https://api.github.com/users/langflogit/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7388/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
langflogit
| 124,634,542 |
U_kgDOB23Frg
|
https://avatars.githubusercontent.com/u/124634542?v=4
|
https://api.github.com/users/langflogit
|
https://github.com/langflogit
|
https://api.github.com/users/langflogit/followers
|
https://api.github.com/users/langflogit/following{/other_user}
|
https://api.github.com/users/langflogit/gists{/gist_id}
|
https://api.github.com/users/langflogit/starred{/owner}{/repo}
|
https://api.github.com/users/langflogit/subscriptions
|
https://api.github.com/users/langflogit/orgs
|
https://api.github.com/users/langflogit/repos
|
https://api.github.com/users/langflogit/events{/privacy}
|
https://api.github.com/users/langflogit/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"You can probably copy the dataset in your HF account and rename the files (without having to download them to your disk). Or alternatively feel free to open a Pull Request to this dataset with the renamed file",
"Thank you, that will help me work around this problem"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7387
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7387/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7387/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7387/events
|
https://github.com/huggingface/datasets/issues/7387
| 2,841,228,048 |
I_kwDODunzps6pWbMQ
| 7,387 |
Dynamic adjusting dataloader sampling weight
|
[] |
open
| false | null |
[] | null | 3 | 1,739 | 1,741 | null |
NONE
| null | null |
Hi,
Thanks for your wonderful work! I'm wondering is there a way to dynamically adjust the sampling weight of each data in the dataset during training? Looking forward to your reply, thanks again.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7387/timeline
| null | null |
whc688
| 72,799,643 |
MDQ6VXNlcjcyNzk5NjQz
|
https://avatars.githubusercontent.com/u/72799643?v=4
|
https://api.github.com/users/whc688
|
https://github.com/whc688
|
https://api.github.com/users/whc688/followers
|
https://api.github.com/users/whc688/following{/other_user}
|
https://api.github.com/users/whc688/gists{/gist_id}
|
https://api.github.com/users/whc688/starred{/owner}{/repo}
|
https://api.github.com/users/whc688/subscriptions
|
https://api.github.com/users/whc688/orgs
|
https://api.github.com/users/whc688/repos
|
https://api.github.com/users/whc688/events{/privacy}
|
https://api.github.com/users/whc688/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7387/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"You mean based on a condition that has to be checked on-the-fly during training ? Otherwise if you know in advance after how many samples you need to change the sampling you can simply concatenate the two mixes",
"Yes, like during training, if one data sample's prediction is consistently wrong, its sampling weight gets higher and higher, and if one data sample's prediction is already correct, then we rarely sample it",
"it's not possible to use `interleave_datasets()` and modify the probabilities while iterating on the dataset at the moment, so you'd have to implement your own torch `Sampler` or your own`IterableDataset` to implement this logic"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7386
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7386/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7386/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7386/events
|
https://github.com/huggingface/datasets/issues/7386
| 2,840,032,524 |
I_kwDODunzps6pR3UM
| 7,386 |
Add bookfolder Dataset Builder for Digital Book Formats
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
closed
| false | null |
[] | null | 1 | 1,739 | 1,739 | 1,739 |
NONE
| null | null |
### Feature request
This feature proposes adding a new dataset builder called bookfolder to the datasets library. This builder would allow users to easily load datasets consisting of various digital book formats, including: AZW, AZW3, CB7, CBR, CBT, CBZ, EPUB, MOBI, and PDF.
### Motivation
Currently, loading datasets of these digital book files requires manual effort. This would also lower the barrier to entry for working with these formats, enabling more diverse and interesting datasets to be used within the Hugging Face ecosystem.
### Your contribution
This feature is rather simple as it will be based on the folder-based builder, similar to imagefolder. I'm willing to contribute to this feature by submitting a PR
| null |
https://api.github.com/repos/huggingface/datasets/issues/7386/timeline
| null |
completed
|
shikanime
| 22,115,108 |
MDQ6VXNlcjIyMTE1MTA4
|
https://avatars.githubusercontent.com/u/22115108?v=4
|
https://api.github.com/users/shikanime
|
https://github.com/shikanime
|
https://api.github.com/users/shikanime/followers
|
https://api.github.com/users/shikanime/following{/other_user}
|
https://api.github.com/users/shikanime/gists{/gist_id}
|
https://api.github.com/users/shikanime/starred{/owner}{/repo}
|
https://api.github.com/users/shikanime/subscriptions
|
https://api.github.com/users/shikanime/orgs
|
https://api.github.com/users/shikanime/repos
|
https://api.github.com/users/shikanime/events{/privacy}
|
https://api.github.com/users/shikanime/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7386/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
shikanime
| 22,115,108 |
MDQ6VXNlcjIyMTE1MTA4
|
https://avatars.githubusercontent.com/u/22115108?v=4
|
https://api.github.com/users/shikanime
|
https://github.com/shikanime
|
https://api.github.com/users/shikanime/followers
|
https://api.github.com/users/shikanime/following{/other_user}
|
https://api.github.com/users/shikanime/gists{/gist_id}
|
https://api.github.com/users/shikanime/starred{/owner}{/repo}
|
https://api.github.com/users/shikanime/subscriptions
|
https://api.github.com/users/shikanime/orgs
|
https://api.github.com/users/shikanime/repos
|
https://api.github.com/users/shikanime/events{/privacy}
|
https://api.github.com/users/shikanime/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"On second thought, probably not a good idea."
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7381
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7381/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7381/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7381/events
|
https://github.com/huggingface/datasets/issues/7381
| 2,815,649,092 |
I_kwDODunzps6n02VE
| 7,381 |
Iterating over values of a column in the IterableDataset
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
closed
| false | null |
[
{
"login": "TopCoder2K",
"id": 47208659,
"node_id": "MDQ6VXNlcjQ3MjA4NjU5",
"avatar_url": "https://avatars.githubusercontent.com/u/47208659?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/TopCoder2K",
"html_url": "https://github.com/TopCoder2K",
"followers_url": "https://api.github.com/users/TopCoder2K/followers",
"following_url": "https://api.github.com/users/TopCoder2K/following{/other_user}",
"gists_url": "https://api.github.com/users/TopCoder2K/gists{/gist_id}",
"starred_url": "https://api.github.com/users/TopCoder2K/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TopCoder2K/subscriptions",
"organizations_url": "https://api.github.com/users/TopCoder2K/orgs",
"repos_url": "https://api.github.com/users/TopCoder2K/repos",
"events_url": "https://api.github.com/users/TopCoder2K/events{/privacy}",
"received_events_url": "https://api.github.com/users/TopCoder2K/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
] | null | 11 | 1,738 | 1,747 | 1,747 |
CONTRIBUTOR
| null | null |
### Feature request
I would like to be able to iterate (and re-iterate if needed) over a column of an `IterableDataset` instance. The following example shows the supposed API:
```python
def gen():
yield {"text": "Good", "label": 0}
yield {"text": "Bad", "label": 1}
ds = IterableDataset.from_generator(gen)
texts = ds["text"]
for v in texts:
print(v) # Prints "Good" and "Bad"
for v in texts:
print(v) # Prints "Good" and "Bad" again
```
### Motivation
In the real world problems, huge NNs like Transformer are not always the best option, so there is a need to conduct experiments with different methods. While 🤗Datasets is perfectly adapted to 🤗Transformers, it may be inconvenient when being used with other libraries. The ability to retrieve a particular column is the case (e.g., gensim's FastText [requires](https://radimrehurek.com/gensim/models/fasttext.html#gensim.models.fasttext.FastText.train) only lists of strings, not dictionaries).
While there are ways to achieve the desired functionality, they are not good ([forum](https://discuss.huggingface.co/t/how-to-iterate-over-values-of-a-column-in-the-iterabledataset/135649)). It would be great if there was a built-in solution.
### Your contribution
Theoretically, I can submit a PR, but I have very little knowledge of the internal structure of 🤗Datasets, so some help may be needed.
Moreover, I can only work on weekends, since I have a full-time job. However, the feature does not seem to be popular, so there is no need to implement it as fast as possible.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7381/timeline
| null |
completed
|
TopCoder2K
| 47,208,659 |
MDQ6VXNlcjQ3MjA4NjU5
|
https://avatars.githubusercontent.com/u/47208659?v=4
|
https://api.github.com/users/TopCoder2K
|
https://github.com/TopCoder2K
|
https://api.github.com/users/TopCoder2K/followers
|
https://api.github.com/users/TopCoder2K/following{/other_user}
|
https://api.github.com/users/TopCoder2K/gists{/gist_id}
|
https://api.github.com/users/TopCoder2K/starred{/owner}{/repo}
|
https://api.github.com/users/TopCoder2K/subscriptions
|
https://api.github.com/users/TopCoder2K/orgs
|
https://api.github.com/users/TopCoder2K/repos
|
https://api.github.com/users/TopCoder2K/events{/privacy}
|
https://api.github.com/users/TopCoder2K/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7381/reactions
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
TopCoder2K
| 47,208,659 |
MDQ6VXNlcjQ3MjA4NjU5
|
https://avatars.githubusercontent.com/u/47208659?v=4
|
https://api.github.com/users/TopCoder2K
|
https://github.com/TopCoder2K
|
https://api.github.com/users/TopCoder2K/followers
|
https://api.github.com/users/TopCoder2K/following{/other_user}
|
https://api.github.com/users/TopCoder2K/gists{/gist_id}
|
https://api.github.com/users/TopCoder2K/starred{/owner}{/repo}
|
https://api.github.com/users/TopCoder2K/subscriptions
|
https://api.github.com/users/TopCoder2K/orgs
|
https://api.github.com/users/TopCoder2K/repos
|
https://api.github.com/users/TopCoder2K/events{/privacy}
|
https://api.github.com/users/TopCoder2K/received_events
|
User
|
public
| false |
TopCoder2K
| 47,208,659 |
MDQ6VXNlcjQ3MjA4NjU5
|
https://avatars.githubusercontent.com/u/47208659?v=4
|
https://api.github.com/users/TopCoder2K
|
https://github.com/TopCoder2K
|
https://api.github.com/users/TopCoder2K/followers
|
https://api.github.com/users/TopCoder2K/following{/other_user}
|
https://api.github.com/users/TopCoder2K/gists{/gist_id}
|
https://api.github.com/users/TopCoder2K/starred{/owner}{/repo}
|
https://api.github.com/users/TopCoder2K/subscriptions
|
https://api.github.com/users/TopCoder2K/orgs
|
https://api.github.com/users/TopCoder2K/repos
|
https://api.github.com/users/TopCoder2K/events{/privacy}
|
https://api.github.com/users/TopCoder2K/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"I'd be in favor of that ! I saw many people implementing their own iterables that wrap a dataset just to iterate on a single column, that would make things more practical.\n\nKinda related: https://github.com/huggingface/datasets/issues/5847",
"(For anyone's information, I'm going on vacation for the next 3 weeks, so the work is postponed. If anyone can implement this feature within the next 4 weeks, go ahead :) )\n\nUPD from 04/06/25:\nI'm planning to start work on the feature in early May.",
"#self-assign",
"# Preliminary discussion\n\nIdeally, I would like to be able to operate on a column with [map](https://huggingface.co/docs/datasets/package_reference/main_classes#datasets.IterableDataset.map), [filter](https://huggingface.co/docs/datasets/package_reference/main_classes#datasets.IterableDataset.filter), [batch](https://huggingface.co/docs/datasets/package_reference/main_classes#datasets.IterableDataset.batch) and probably some other `IterableDataset`'s methods, however, the same results can be achieved by using the methods on an `IterableDataset` object and utilizing `__getitem__()` afterwards. Thus, one may not support these methods at first and try to make the implementation as simple as possible.\n\n# Implementation\n\nBased on the preliminary discussion, one can do the following:\n```python\nclass IterableColumn:\n def __init__(self, dataset: \"IterableDataset\", column_name: str):\n self.dataset = dataset\n self.column_name = column_name\n\n def __iter__(self) -> Iterator[Any]:\n for example in self.dataset:\n yield example[self.column_name]\n\n\nclass IterableDataset(DatasetInfoMixin):\n ...\n def __getitem__(self, column_name: str) -> IterableColumn:\n return IterableColumn(self, column_name)\n ...\n```\n\n# Testing\n\nIt works as expected in our simple test:\n```python\ndef gen():\n yield {\"text\": \"Good\", \"label\": 0}\n yield {\"text\": \"Bad\", \"label\": 1}\n\nds = IterableDataset.from_generator(gen)\n\ntexts = ds[\"text\"] # `texts` is an IterableColumn object\nfor v in texts:\n print(v) # Prints \"Good\" and \"Bad\"\nfor v in texts:\n print(v) # Prints \"Good\" and \"Bad\" again\n```\n\n# Questions\n\n1. What do you think about the implementation, @lhoestq?\n2. How to properly test the implementation? I've found [test_iterable_dataset.py](https://github.com/huggingface/datasets/blob/main/tests/test_iterable_dataset.py) but 1) I haven't found any guidelines for testing, 2) the script tests a lot of things while I'd like to test only my feature.",
"Sounds great !\n\nRegarding testing, it's actually possible to have your test function in test_iterable_dataset.py, which you can run using\n\n```python\npytest tests/test_iterable_dataset.py::my_function\n```",
"> Regarding testing, it's actually possible to have your test function in test_iterable_dataset.py, which you can run using\n\nI hoped not to run `pip install -e \".[dev]\"`, but your answer implies that I should. The problem is that I was unable to install the dependencies with Python 3.13 due to `tensorflow` and with Python 3.11-3.12 due to \"there are no versions of pyav\" [¬º-°]¬ Therefore, I had to test in a separate script file to avoid importing optional dependencies. Anyway, I've opened a PR: https://github.com/huggingface/datasets/pull/7564. Please, take a look (there are questions about the documentation).\n\nMoreover, I want to note that `make style` and `pre-commit` give different results for `test_iterable_dataset.py` (and a couple of files). Example:\n```python\n assert skip_ex_iterable.shuffle_data_sources(np.random.default_rng(42)) is skip_ex_iterable, (\n \"skip examples makes the shards order fixed\"\n )\n```\nvs\n```python\n assert (\n skip_ex_iterable.shuffle_data_sources(np.random.default_rng(42)) is skip_ex_iterable\n ), \"skip examples makes the shards order fixed\"\n```\n ¯\\\\_(ツ)_/¯\n\n> Kinda related: https://github.com/huggingface/datasets/issues/5847\n\nI had forgotten about this, but I've looked at it by now. [This comment](https://github.com/huggingface/datasets/issues/5847#issuecomment-1549799951) implies that `IterableColumn` should support chained indexing, so thank you for pointing this out! Did you mean anything else by referencing the issue?",
"> I hoped not to run pip install -e \".[dev]\", but your answer implies that I should. The problem is that I was unable to install the dependencies with Python 3.13 due to tensorflow and with Python 3.11-3.12 due to \"there are no versions of pyav\" [¬º-°]¬ Therefore, I had to test in a separate script file to avoid importing optional dependencies. Anyway, I've opened a PR: https://github.com/huggingface/datasets/pull/7564. Please, take a look (there are questions about the documentation).\n\nwe try to not not require optional dependencies when running tests, so you can try running the tests only with `pytest`, `pytest-datadir` and `pytest-xdist`\n\n> I had forgotten about this, but I've looked at it by now. https://github.com/huggingface/datasets/issues/5847#issuecomment-1549799951 implies that IterableColumn should support chained indexing, so thank you for pointing this out! Did you mean anything else by referencing the issue?\n\nNo I simply referenced the issue because it will enable `pipe(ds[\"column_name\"])`, but no need to support nested fields access in a first step - we can see that later as it's uncommon and would add complexity to the contribution",
"> we try to not not require optional dependencies when running tests, so you can try running the tests only with `pytest`, `pytest-datadir` and `pytest-xdist`\n\nUnderstood. If it's necessary to run the tests again, I'll try to install only the mentioned libraries, thank you!\n\n> No I simply referenced the issue because it will enable pipe(ds[\"column_name\"]), but no need to support nested fields access in a first step - we can see that later as it's uncommon and would add complexity to the contribution\n\nAh, I see. Anyway, I've already implemented chained indexing (it was relatively easy).\n\n@lhoestq, could you please take a look at the PR and answer [questions](https://github.com/huggingface/datasets/pull/7564#issuecomment-2863391781) there?",
"> so you can try running the tests only with pytest, pytest-datadir and pytest-xdist\n\nYes, they are sufficient. There was one more problem with Python 3.12 and `distutils` that were removed, but I just downgraded to 3.11 and successfully ran `test_iterable_dataset.py`.",
"@lhoestq, could you write in the [discussion](https://discuss.huggingface.co/t/how-to-iterate-over-values-of-a-column-in-the-iterabledataset/135649) for people coming there from the Internet that the feature has been implemented? I could do it by myself but the topic is closed to me.",
"done, thanks you !"
] |
|||
https://api.github.com/repos/huggingface/datasets/issues/7378
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7378/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7378/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7378/events
|
https://github.com/huggingface/datasets/issues/7378
| 2,802,957,388 |
I_kwDODunzps6nEbxM
| 7,378 |
Allow pushing config version to hub
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
open
| false | null |
[] | null | 1 | 1,737 | 1,738 | null |
NONE
| null | null |
### Feature request
Currently, when datasets are created, they can be versioned by passing the `version` argument to `load_dataset(...)`. For example creating `outcomes.csv` on the command line
```
echo "id,value\n1,0\n2,0\n3,1\n4,1\n" > outcomes.csv
```
and creating it
```
import datasets
dataset = datasets.load_dataset(
"csv",
data_files ="outcomes.csv",
keep_in_memory = True,
version = '1.0.0')
```
The version info is stored in the `info` and can be accessed e.g. by `next(iter(dataset.values())).info.version`
This dataset can be uploaded to the hub with `dataset.push_to_hub(repo_id = "maomlab/example_dataset")`. This will create a dataset on the hub with the following in the `README.md`, but it doesn't upload the version information:
```
---
dataset_info:
features:
- name: id
dtype: int64
- name: value
dtype: int64
splits:
- name: train
num_bytes: 64
num_examples: 4
download_size: 1332
dataset_size: 64
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
---
```
However, when I download from the hub, the version information is missing:
```
dataset_from_hub_no_version = datasets.load_dataset("maomlab/example_dataset")
next(iter(dataset.values())).info.version
```
I can add the version information manually to the hub, by appending it to the end of config section:
```
...
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
version: 1.0.0
---
```
And then when I download it, the version information is correct.
### Motivation
### Why adding version information for each config makes sense
1. The version information is already recorded in the dataset config info data structure and is able to parse it correctly, so it makes sense to sync it with `push_to_hub`.
2. Keeping the version info in at the config level is different from version info at the branch level. As the former relates to the version of the specific dataset the config refers to rather than the version of the dataset curation itself.
## A explanation for the current behavior:
In [datasets/src/datasets/info.py:159](https://github.com/huggingface/datasets/blob/fb91fd3c9ea91a818681a777faf8d0c46f14c680/src/datasets/info.py#L159C1-L160C1
), the `_INCLUDED_INFO_IN_YAML` variable doesn't include `"version"`.
If my reading of the code is right, adding `"version"` to `_INCLUDED_INFO_IN_YAML`, would allow the version information to be uploaded to the hub.
### Your contribution
Request: add `"version"` to `_INCLUDE_INFO_IN_YAML` in [datasets/src/datasets/info.py:159](https://github.com/huggingface/datasets/blob/fb91fd3c9ea91a818681a777faf8d0c46f14c680/src/datasets/info.py#L159C1-L160C1
)
| null |
https://api.github.com/repos/huggingface/datasets/issues/7378/timeline
| null | null |
momeara
| 129,072 |
MDQ6VXNlcjEyOTA3Mg==
|
https://avatars.githubusercontent.com/u/129072?v=4
|
https://api.github.com/users/momeara
|
https://github.com/momeara
|
https://api.github.com/users/momeara/followers
|
https://api.github.com/users/momeara/following{/other_user}
|
https://api.github.com/users/momeara/gists{/gist_id}
|
https://api.github.com/users/momeara/starred{/owner}{/repo}
|
https://api.github.com/users/momeara/subscriptions
|
https://api.github.com/users/momeara/orgs
|
https://api.github.com/users/momeara/repos
|
https://api.github.com/users/momeara/events{/privacy}
|
https://api.github.com/users/momeara/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7378/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi ! This sounds reasonable to me, feel free to open a PR :)"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7377
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7377/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7377/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7377/events
|
https://github.com/huggingface/datasets/issues/7377
| 2,802,723,285 |
I_kwDODunzps6nDinV
| 7,377 |
Support for sparse arrays with the Arrow Sparse Tensor format?
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
open
| false | null |
[] | null | 1 | 1,737 | 1,738 | null |
NONE
| null | null |
### Feature request
AI in biology is becoming a big thing. One thing that would be a huge benefit to the field that Huggingface Datasets doesn't currently have is native support for **sparse arrays**.
Arrow has support for sparse tensors.
https://arrow.apache.org/docs/format/Other.html#sparse-tensor
It would be a big deal if Hugging Face Datasets supported sparse tensors as a feature type, natively.
### Motivation
This is important for example in the field of transcriptomics (modeling and understanding gene expression), because a large fraction of the genes are not expressed (zero). More generally, in science, sparse arrays are very common, so adding support for them would be very benefitial, it would make just using Hugging Face Dataset objects a lot more straightforward and clean.
### Your contribution
We can discuss this further once the team comments of what they think about the feature, and if there were previous attempts at making it work, and understanding their evaluation of how hard it would be. My intuition is that it should be fairly straightforward, as the Arrow backend already supports it.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7377/timeline
| null | null |
JulesGM
| 3,231,217 |
MDQ6VXNlcjMyMzEyMTc=
|
https://avatars.githubusercontent.com/u/3231217?v=4
|
https://api.github.com/users/JulesGM
|
https://github.com/JulesGM
|
https://api.github.com/users/JulesGM/followers
|
https://api.github.com/users/JulesGM/following{/other_user}
|
https://api.github.com/users/JulesGM/gists{/gist_id}
|
https://api.github.com/users/JulesGM/starred{/owner}{/repo}
|
https://api.github.com/users/JulesGM/subscriptions
|
https://api.github.com/users/JulesGM/orgs
|
https://api.github.com/users/JulesGM/repos
|
https://api.github.com/users/JulesGM/events{/privacy}
|
https://api.github.com/users/JulesGM/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7377/reactions
| 4 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi ! Unfortunately the Sparse Tensor structure in Arrow is not part of the Arrow format (yes it's confusing...), so it's not possible to use it in `datasets`. It's a separate structure that doesn't correspond to any type or extension type in Arrow.\n\nThe Arrow community recently added an extension type for fixed shape tensors at https://arrow.apache.org/docs/format/CanonicalExtensions.html#fixed-shape-tensor, it should be possible to contribute an extension type for sparse tensors as well."
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7375
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7375/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7375/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7375/events
|
https://github.com/huggingface/datasets/issues/7375
| 2,800,609,218 |
I_kwDODunzps6m7efC
| 7,375 |
vllm批量推理报错
|
[] |
open
| false | null |
[] | null | 1 | 1,737 | 1,738 | null |
NONE
| null | null |
### Describe the bug

### Steps to reproduce the bug

### Expected behavior

### Environment info

| null |
https://api.github.com/repos/huggingface/datasets/issues/7375/timeline
| null | null |
YuShengzuishuai
| 51,228,154 |
MDQ6VXNlcjUxMjI4MTU0
|
https://avatars.githubusercontent.com/u/51228154?v=4
|
https://api.github.com/users/YuShengzuishuai
|
https://github.com/YuShengzuishuai
|
https://api.github.com/users/YuShengzuishuai/followers
|
https://api.github.com/users/YuShengzuishuai/following{/other_user}
|
https://api.github.com/users/YuShengzuishuai/gists{/gist_id}
|
https://api.github.com/users/YuShengzuishuai/starred{/owner}{/repo}
|
https://api.github.com/users/YuShengzuishuai/subscriptions
|
https://api.github.com/users/YuShengzuishuai/orgs
|
https://api.github.com/users/YuShengzuishuai/repos
|
https://api.github.com/users/YuShengzuishuai/events{/privacy}
|
https://api.github.com/users/YuShengzuishuai/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7375/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Make sure you have installed a recent version of `soundfile`"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7373
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7373/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7373/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7373/events
|
https://github.com/huggingface/datasets/issues/7373
| 2,793,237,139 |
I_kwDODunzps6mfWqT
| 7,373 |
Excessive RAM Usage After Dataset Concatenation concatenate_datasets
|
[] |
open
| false | null |
[] | null | 3 | 1,737 | 1,743 | null |
NONE
| null | null |
### Describe the bug
When loading a dataset from disk, concatenating it, and starting the training process, the RAM usage progressively increases until the kernel terminates the process due to excessive memory consumption.
https://github.com/huggingface/datasets/issues/2276
### Steps to reproduce the bug
```python
from datasets import DatasetDict, concatenate_datasets
dataset = DatasetDict.load_from_disk("data")
...
...
combined_dataset = concatenate_datasets(
[dataset[split] for split in dataset]
)
#start SentenceTransformer training
```
### Expected behavior
I would not expect RAM utilization to increase after concatenation. Removing the concatenation step resolves the issue
### Environment info
sentence-transformers==3.1.1
datasets==3.2.0
python3.10
| null |
https://api.github.com/repos/huggingface/datasets/issues/7373/timeline
| null | null |
sam-hey
| 40,773,225 |
MDQ6VXNlcjQwNzczMjI1
|
https://avatars.githubusercontent.com/u/40773225?v=4
|
https://api.github.com/users/sam-hey
|
https://github.com/sam-hey
|
https://api.github.com/users/sam-hey/followers
|
https://api.github.com/users/sam-hey/following{/other_user}
|
https://api.github.com/users/sam-hey/gists{/gist_id}
|
https://api.github.com/users/sam-hey/starred{/owner}{/repo}
|
https://api.github.com/users/sam-hey/subscriptions
|
https://api.github.com/users/sam-hey/orgs
|
https://api.github.com/users/sam-hey/repos
|
https://api.github.com/users/sam-hey/events{/privacy}
|
https://api.github.com/users/sam-hey/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7373/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"\n\n\n\nAdding a img from memray\nhttps://gist.github.com/sam-hey/00c958f13fb0f7b54d17197fe353002f",
"I'm having the same issue where concatenation seems to use a huge amount of RAM.\n\n```python\n# Load all chunks and concatenate them into a final dataset.\n chunk_datasets = [\n Dataset.load_from_disk(file, keep_in_memory=False)\n for file in tqdm(chunk_files, desc=\"Loading chunk datasets\")\n ]\n logging.info(\"Concatenating chunk datasets...\")\n final_dataset = concatenate_datasets(chunk_datasets)\n```\n\nThis is a real issue for me as the final dataset is a few terabytes in size. I'm using datasets version `3.1.0`. Also tested with version `3.4.1`",
"I did have a short look, the error seems to be from `memory_map` and the stream not being closed. \n\nhttps://github.com/huggingface/datasets/blob/5f8d2ad9a1b0bccfd962d998987228addfd5be9f/src/datasets/table.py#L48-L50\n\n\nDid not have the time to test jet: https://github.com/sam-hey/datasets/tree/fix/concatenate_datasets\n\nI will probably have a better look in a couple of days. \n\n"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7372
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7372/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7372/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7372/events
|
https://github.com/huggingface/datasets/issues/7372
| 2,791,760,968 |
I_kwDODunzps6mZuRI
| 7,372 |
Inconsistent Behavior Between `load_dataset` and `load_from_disk` When Loading Sharded Datasets
|
[] |
open
| false | null |
[] | null | 0 | 1,737 | 1,737 | null |
NONE
| null | null |
### Description
I encountered an inconsistency in behavior between `load_dataset` and `load_from_disk` when loading sharded datasets. Here is a minimal example to reproduce the issue:
#### Code 1: Using `load_dataset`
```python
from datasets import Dataset, load_dataset
# First save with max_shard_size=10
Dataset.from_dict({"id": range(1000)}).train_test_split(test_size=0.1).save_to_disk("my_sharded_datasetdict", max_shard_size=10)
# Second save with max_shard_size=10
Dataset.from_dict({"id": range(500)}).train_test_split(test_size=0.1).save_to_disk("my_sharded_datasetdict", max_shard_size=10)
# Load the DatasetDict
loaded_datasetdict = load_dataset("my_sharded_datasetdict")
print(loaded_datasetdict)
```
**Output**:
- `train` has 1350 samples.
- `test` has 150 samples.
#### Code 2: Using `load_from_disk`
```python
from datasets import Dataset, load_from_disk
# First save with max_shard_size=10
Dataset.from_dict({"id": range(1000)}).train_test_split(test_size=0.1).save_to_disk("my_sharded_datasetdict", max_shard_size=10)
# Second save with max_shard_size=10
Dataset.from_dict({"id": range(500)}).train_test_split(test_size=0.1).save_to_disk("my_sharded_datasetdict", max_shard_size=10)
# Load the DatasetDict
loaded_datasetdict = load_from_disk("my_sharded_datasetdict")
print(loaded_datasetdict)
```
**Output**:
- `train` has 450 samples.
- `test` has 50 samples.
### Expected Behavior
I expected both `load_dataset` and `load_from_disk` to load the same dataset, as they are pointing to the same directory. However, the results differ significantly:
- `load_dataset` seems to merge all shards, resulting in a combined dataset.
- `load_from_disk` only loads the last saved dataset, ignoring previous shards.
### Questions
1. Is this behavior intentional? If so, could you clarify the difference between `load_dataset` and `load_from_disk` in the documentation?
2. If this is not intentional, could this be considered a bug?
3. What is the recommended way to handle cases where multiple datasets are saved to the same directory?
Thank you for your time and effort in maintaining this great library! I look forward to your feedback.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7372/timeline
| null | null |
gaohongkui
| 38,203,359 |
MDQ6VXNlcjM4MjAzMzU5
|
https://avatars.githubusercontent.com/u/38203359?v=4
|
https://api.github.com/users/gaohongkui
|
https://github.com/gaohongkui
|
https://api.github.com/users/gaohongkui/followers
|
https://api.github.com/users/gaohongkui/following{/other_user}
|
https://api.github.com/users/gaohongkui/gists{/gist_id}
|
https://api.github.com/users/gaohongkui/starred{/owner}{/repo}
|
https://api.github.com/users/gaohongkui/subscriptions
|
https://api.github.com/users/gaohongkui/orgs
|
https://api.github.com/users/gaohongkui/repos
|
https://api.github.com/users/gaohongkui/events{/privacy}
|
https://api.github.com/users/gaohongkui/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7372/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7371
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7371/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7371/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7371/events
|
https://github.com/huggingface/datasets/issues/7371
| 2,790,549,889 |
I_kwDODunzps6mVGmB
| 7,371 |
500 Server error with pushing a dataset
|
[] |
open
| false | null |
[] | null | 1 | 1,736 | 1,736 | null |
NONE
| null | null |
### Describe the bug
Suddenly, I started getting this error message saying it was an internal error.
`Error creating/pushing dataset: 500 Server Error: Internal Server Error for url: https://huggingface.co/api/datasets/ll4ma-lab/grasp-dataset/commit/main (Request ID: Root=1-6787f0b7-66d5bd45413e481c4c2fb22d;670d04ff-65f5-4741-a353-2eacc47a3928)
Internal Error - We're working hard to fix this as soon as possible!
Traceback (most recent call last):
File "/uufs/chpc.utah.edu/common/home/hermans-group1/martin/software/pkg/miniforge3/envs/myenv2/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 406, in hf_raise_for_status
response.raise_for_status()
File "/uufs/chpc.utah.edu/common/home/hermans-group1/martin/software/pkg/miniforge3/envs/myenv2/lib/python3.10/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://huggingface.co/api/datasets/ll4ma-lab/grasp-dataset/commit/main
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/uufs/chpc.utah.edu/common/home/u1295595/grasp_dataset_converter/src/grasp_dataset_converter/main.py", line 142, in main
subset_train.push_to_hub(dataset_name, split='train')
File "/uufs/chpc.utah.edu/common/home/hermans-group1/martin/software/pkg/miniforge3/envs/myenv2/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 5624, in push_to_hub
commit_info = api.create_commit(
File "/uufs/chpc.utah.edu/common/home/hermans-group1/martin/software/pkg/miniforge3/envs/myenv2/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/uufs/chpc.utah.edu/common/home/hermans-group1/martin/software/pkg/miniforge3/envs/myenv2/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 1518, in _inner
return fn(self, *args, **kwargs)
File "/uufs/chpc.utah.edu/common/home/hermans-group1/martin/software/pkg/miniforge3/envs/myenv2/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 4087, in create_commit
hf_raise_for_status(commit_resp, endpoint_name="commit")
File "/uufs/chpc.utah.edu/common/home/hermans-group1/martin/software/pkg/miniforge3/envs/myenv2/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 477, in hf_raise_for_status
raise _format(HfHubHTTPError, str(e), response) from e
huggingface_hub.errors.HfHubHTTPError: 500 Server Error: Internal Server Error for url: https://huggingface.co/api/datasets/ll4ma-lab/grasp-dataset/commit/main (Request ID: Root=1-6787f0b7-66d5bd45413e481c4c2fb22d;670d04ff-65f5-4741-a353-2eacc47a3928)
Internal Error - We're working hard to fix this as soon as possible!`
### Steps to reproduce the bug
I am pushing a Dataset in a loop via push_to_hub API
### Expected behavior
It worked fine until it stopped working suddenly.
Expected behavior: It should start working again
### Environment info
- `datasets` version: 3.2.0
- Platform: Linux-4.18.0-477.15.1.el8_8.x86_64-x86_64-with-glibc2.28
- Python version: 3.10.0
- `huggingface_hub` version: 0.27.1
- PyArrow version: 18.1.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.9.0
| null |
https://api.github.com/repos/huggingface/datasets/issues/7371/timeline
| null | null |
martinmatak
| 7,677,814 |
MDQ6VXNlcjc2Nzc4MTQ=
|
https://avatars.githubusercontent.com/u/7677814?v=4
|
https://api.github.com/users/martinmatak
|
https://github.com/martinmatak
|
https://api.github.com/users/martinmatak/followers
|
https://api.github.com/users/martinmatak/following{/other_user}
|
https://api.github.com/users/martinmatak/gists{/gist_id}
|
https://api.github.com/users/martinmatak/starred{/owner}{/repo}
|
https://api.github.com/users/martinmatak/subscriptions
|
https://api.github.com/users/martinmatak/orgs
|
https://api.github.com/users/martinmatak/repos
|
https://api.github.com/users/martinmatak/events{/privacy}
|
https://api.github.com/users/martinmatak/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7371/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"EDIT: seems to be all good now. I'll add a comment if the error happens again within the next 48 hours. If it doesn't, I'll just close the topic."
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7369
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7369/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7369/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7369/events
|
https://github.com/huggingface/datasets/issues/7369
| 2,787,193,238 |
I_kwDODunzps6mITGW
| 7,369 |
Importing dataset gives unhelpful error message when filenames in metadata.csv are not found in the directory
|
[] |
open
| false | null |
[] | null | 1 | 1,736 | 1,736 | null |
NONE
| null | null |
### Describe the bug
While importing an audiofolder dataset, where the names of the audiofiles don't correspond to the filenames in the metadata.csv, we get an unclear error message that is not helpful for the debugging, i.e.
```
ValueError: Instruction "train" corresponds to no data!
```
### Steps to reproduce the bug
Assume an audiofolder with audiofiles, filename1.mp3, filename2.mp3 etc and a file metadata.csv which contains the columns file_name and sentence. The file_names are formatted like filename1.mp3, filename2.mp3 etc.
Load the audio
```
from datasets import load_dataset
load_dataset("audiofolder", data_dir='/path/to/audiofolder')
```
When the file_names in the csv are not in sync with the filenames in the audiofolder, then we get an Error message:
```
File /opt/conda/lib/python3.12/site-packages/datasets/arrow_reader.py:251, in BaseReader.read(self, name, instructions, split_infos, in_memory)
249 if not files:
250 msg = f'Instruction "{instructions}" corresponds to no data!'
--> 251 raise ValueError(msg)
252 return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
ValueError: Instruction "train" corresponds to no data!
```
load_dataset has a default value for the argument split = 'train'.
### Expected behavior
It would be better to get an error report something like:
```
The metadata.csv file has different filenames than the files in the datadirectory.
```
It would have saved me 4 hours of debugging.
### Environment info
- `datasets` version: 3.2.0
- Platform: Linux-5.14.0-427.40.1.el9_4.x86_64-x86_64-with-glibc2.39
- Python version: 3.12.8
- `huggingface_hub` version: 0.27.0
- PyArrow version: 18.1.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.9.0
| null |
https://api.github.com/repos/huggingface/datasets/issues/7369/timeline
| null | null |
svencornetsdegroot
| 38,278,139 |
MDQ6VXNlcjM4Mjc4MTM5
|
https://avatars.githubusercontent.com/u/38278139?v=4
|
https://api.github.com/users/svencornetsdegroot
|
https://github.com/svencornetsdegroot
|
https://api.github.com/users/svencornetsdegroot/followers
|
https://api.github.com/users/svencornetsdegroot/following{/other_user}
|
https://api.github.com/users/svencornetsdegroot/gists{/gist_id}
|
https://api.github.com/users/svencornetsdegroot/starred{/owner}{/repo}
|
https://api.github.com/users/svencornetsdegroot/subscriptions
|
https://api.github.com/users/svencornetsdegroot/orgs
|
https://api.github.com/users/svencornetsdegroot/repos
|
https://api.github.com/users/svencornetsdegroot/events{/privacy}
|
https://api.github.com/users/svencornetsdegroot/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7369/reactions
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"I'd prefer even more verbose errors; like `\"file123.mp3\" is referenced in metadata.csv, but not found in the data directory '/path/to/audiofolder' ! (and 100+ more missing files)` Or something along those lines."
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7366
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7366/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7366/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7366/events
|
https://github.com/huggingface/datasets/issues/7366
| 2,781,522,894 |
I_kwDODunzps6lyqvO
| 7,366 |
Dataset.from_dict() can't handle large dict
|
[] |
open
| false | null |
[] | null | 0 | 1,736 | 1,736 | null |
NONE
| null | null |
### Describe the bug
I have 26,000,000 3-tuples. When I use Dataset.from_dict() to load, neither. py nor Jupiter notebook can run successfully. This is my code:
```
# len(example_data) is 26,000,000, 'diff' is a text
diff1_list = [example_data[i].texts[0] for i in range(len(example_data))]
diff2_list = [example_data[i].texts[1] for i in range(len(example_data))]
label_list = [example_data[i].label for i in range(len(example_data))]
embedding_dataset = Dataset.from_dict({
"diff1": diff1_list,
"diff2": diff2_list,
"label": label_list
})
```
### Steps to reproduce the bug
1. Initialize a large 3-tuple, e.g. 26,000,000
2. Use Dataset.from_dict() to load
### Expected behavior
Dataset.from_dict() run successfully
### Environment info
sentence-transformers 3.3.1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7366/timeline
| null | null |
CSU-OSS
| 164,967,134 |
U_kgDOCdUy3g
|
https://avatars.githubusercontent.com/u/164967134?v=4
|
https://api.github.com/users/CSU-OSS
|
https://github.com/CSU-OSS
|
https://api.github.com/users/CSU-OSS/followers
|
https://api.github.com/users/CSU-OSS/following{/other_user}
|
https://api.github.com/users/CSU-OSS/gists{/gist_id}
|
https://api.github.com/users/CSU-OSS/starred{/owner}{/repo}
|
https://api.github.com/users/CSU-OSS/subscriptions
|
https://api.github.com/users/CSU-OSS/orgs
|
https://api.github.com/users/CSU-OSS/repos
|
https://api.github.com/users/CSU-OSS/events{/privacy}
|
https://api.github.com/users/CSU-OSS/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7366/reactions
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7365
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7365/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7365/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7365/events
|
https://github.com/huggingface/datasets/issues/7365
| 2,780,216,199 |
I_kwDODunzps6ltruH
| 7,365 |
A parameter is specified but not used in datasets.arrow_dataset.Dataset.from_pandas()
|
[] |
open
| false | null |
[] | null | 0 | 1,736 | 1,736 | null |
NONE
| null | null |
### Describe the bug
I am interested in creating train, test and eval splits from a pandas Dataframe, therefore I was looking at the possibilities I can follow. I noticed the split parameter and was hopeful to use it in order to generate the 3 at once, however, while trying to understand the code, i noticed that it has no added value (correct me if I am wrong or misunderstood the code).
from_pandas function code :
```python
if info is not None and features is not None and info.features != features:
raise ValueError(
f"Features specified in `features` and `info.features` can't be different:\n{features}\n{info.features}"
)
features = features if features is not None else info.features if info is not None else None
if info is None:
info = DatasetInfo()
info.features = features
table = InMemoryTable.from_pandas(
df=df,
preserve_index=preserve_index,
)
if features is not None:
# more expensive cast than InMemoryTable.from_pandas(..., schema=features.arrow_schema)
# needed to support the str to Audio conversion for instance
table = table.cast(features.arrow_schema)
return cls(table, info=info, split=split)
```
### Steps to reproduce the bug
```python
from datasets import Dataset
# Filling the split parameter with whatever causes no harm at all
data = Dataset.from_pandas(self.raw_data, split='egiojegoierjgoiejgrefiergiuorenvuirgurthgi')
```
### Expected behavior
Would be great if there is no split parameter (if it isn't working), or to add a concrete example of how it can be used.
### Environment info
- `datasets` version: 3.2.0
- Platform: Linux-5.15.0-127-generic-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.27.1
- PyArrow version: 18.1.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.9.0
| null |
https://api.github.com/repos/huggingface/datasets/issues/7365/timeline
| null | null |
NourOM02
| 69,003,192 |
MDQ6VXNlcjY5MDAzMTky
|
https://avatars.githubusercontent.com/u/69003192?v=4
|
https://api.github.com/users/NourOM02
|
https://github.com/NourOM02
|
https://api.github.com/users/NourOM02/followers
|
https://api.github.com/users/NourOM02/following{/other_user}
|
https://api.github.com/users/NourOM02/gists{/gist_id}
|
https://api.github.com/users/NourOM02/starred{/owner}{/repo}
|
https://api.github.com/users/NourOM02/subscriptions
|
https://api.github.com/users/NourOM02/orgs
|
https://api.github.com/users/NourOM02/repos
|
https://api.github.com/users/NourOM02/events{/privacy}
|
https://api.github.com/users/NourOM02/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7365/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7364
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7364/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7364/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7364/events
|
https://github.com/huggingface/datasets/issues/7364
| 2,776,929,268 |
I_kwDODunzps6lhJP0
| 7,364 |
API endpoints for gated dataset access requests
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
closed
| false | null |
[] | null | 3 | 1,736 | 1,736 | 1,736 |
NONE
| null | null |
### Feature request
I would like a programatic way of requesting access to gated datasets. The current solution to gain access forces me to visit a website and physically click an "agreement" button (as per the [documentation](https://huggingface.co/docs/hub/en/datasets-gated#access-gated-datasets-as-a-user)).
An ideal approach would be HF API download methods that negotiate access on my behalf based on information from my CLI login and/or token. I realise that may be naive given the various types of access semantics available to dataset authors (automatic versus manual approval, for example) and complexities it might add to existing methods, but something along those lines would be nice.
Perhaps using the `*_access_request` methods available to dataset authors can be a precedent; see [`reject_access_request`](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.reject_access_request) for example.
### Motivation
When trying to download files from a gated dataset, I'm met with a `GatedRepoError` and instructed to visit the repository's website to gain access:
```
Cannot access gated repo for url https://huggingface.co/datasets/open-llm-leaderboard/meta-llama__Meta-Llama-3.1-70B-Instruct-details/resolve/main/meta-llama__Meta-Llama-3.1-70B-Instruct/samples_leaderboard_math_precalculus_hard_2024-07-19T18-47-29.522341.jsonl.
Access to dataset open-llm-leaderboard/meta-llama__Meta-Llama-3.1-70B-Instruct-details is restricted and you are not in the authorized list. Visit https://huggingface.co/datasets/open-llm-leaderboard/meta-llama__Meta-Llama-3.1-70B-Instruct-details to ask for access.
```
This makes task automation extremely difficult. For example, I'm interested in studying sample-level responses of models on the LLM leaderboard -- how they answered particular questions on a given evaluation framework. As I come across more and more participants that gate their data, it's becoming unwieldy to continue my work (there over 2,000 participants, so in the worst case that's the number of website visits I'd need to manually undertake).
One approach is use Selenium to react to the `GatedRepoError`, but that seems like overkill; and a potential violation HF terms of service (?).
As mentioned in the previous section, there seems to be an [API for gated dataset owners](https://huggingface.co/docs/hub/en/datasets-gated#via-the-api) to managed access requests, and thus some appetite for allowing automated management of gating. This feature request is to extend that to dataset users.
### Your contribution
Whether I can help depends on a few things; one being the complexity of the underlying gated access design. If this feature request is accepted I am open to being involved in discussions and testing, and even development under the right time-outcome tradeoff.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7364/timeline
| null |
not_planned
|
jerome-white
| 6,140,840 |
MDQ6VXNlcjYxNDA4NDA=
|
https://avatars.githubusercontent.com/u/6140840?v=4
|
https://api.github.com/users/jerome-white
|
https://github.com/jerome-white
|
https://api.github.com/users/jerome-white/followers
|
https://api.github.com/users/jerome-white/following{/other_user}
|
https://api.github.com/users/jerome-white/gists{/gist_id}
|
https://api.github.com/users/jerome-white/starred{/owner}{/repo}
|
https://api.github.com/users/jerome-white/subscriptions
|
https://api.github.com/users/jerome-white/orgs
|
https://api.github.com/users/jerome-white/repos
|
https://api.github.com/users/jerome-white/events{/privacy}
|
https://api.github.com/users/jerome-white/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7364/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
jerome-white
| 6,140,840 |
MDQ6VXNlcjYxNDA4NDA=
|
https://avatars.githubusercontent.com/u/6140840?v=4
|
https://api.github.com/users/jerome-white
|
https://github.com/jerome-white
|
https://api.github.com/users/jerome-white/followers
|
https://api.github.com/users/jerome-white/following{/other_user}
|
https://api.github.com/users/jerome-white/gists{/gist_id}
|
https://api.github.com/users/jerome-white/starred{/owner}{/repo}
|
https://api.github.com/users/jerome-white/subscriptions
|
https://api.github.com/users/jerome-white/orgs
|
https://api.github.com/users/jerome-white/repos
|
https://api.github.com/users/jerome-white/events{/privacy}
|
https://api.github.com/users/jerome-white/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Looks like a [similar feature request](https://github.com/huggingface/huggingface_hub/issues/1198) was made to the HF Hub team. Is handling this at the Hub level more appropriate?\r\n\r\n(As an aside, I've gotten the [HTTP-based solution](https://github.com/huggingface/huggingface_hub/issues/1198#issuecomment-1905774983) proposed in that forum to work for simple cases.)",
"yes it's more for https://github.com/huggingface/huggingface_hub cc @hanouticelina ",
"yes i think @Wauplin's comment on that thread is still what we recommend"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7363
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7363/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7363/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7363/events
|
https://github.com/huggingface/datasets/issues/7363
| 2,774,090,012 |
I_kwDODunzps6lWUEc
| 7,363 |
ImportError: To support decoding images, please install 'Pillow'.
|
[] |
open
| false | null |
[] | null | 4 | 1,736 | 1,748 | null |
NONE
| null | null |
### Describe the bug
Following this tutorial locally using a macboko and VSCode: https://huggingface.co/docs/diffusers/en/tutorials/basic_training
This line of code: for i, image in enumerate(dataset[:4]["image"]):
throws: ImportError: To support decoding images, please install 'Pillow'.
Pillow is installed.
### Steps to reproduce the bug
Run the tutorial
### Expected behavior
Images should be rendered
### Environment info
MacBook, VSCode
| null |
https://api.github.com/repos/huggingface/datasets/issues/7363/timeline
| null | null |
jamessdixon
| 1,394,644 |
MDQ6VXNlcjEzOTQ2NDQ=
|
https://avatars.githubusercontent.com/u/1394644?v=4
|
https://api.github.com/users/jamessdixon
|
https://github.com/jamessdixon
|
https://api.github.com/users/jamessdixon/followers
|
https://api.github.com/users/jamessdixon/following{/other_user}
|
https://api.github.com/users/jamessdixon/gists{/gist_id}
|
https://api.github.com/users/jamessdixon/starred{/owner}{/repo}
|
https://api.github.com/users/jamessdixon/subscriptions
|
https://api.github.com/users/jamessdixon/orgs
|
https://api.github.com/users/jamessdixon/repos
|
https://api.github.com/users/jamessdixon/events{/privacy}
|
https://api.github.com/users/jamessdixon/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7363/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"what's your `pip show Pillow` output",
"same issue.. my pip show Pillow output as below:\n\n```\nName: pillow\nVersion: 11.1.0\nSummary: Python Imaging Library (Fork)\nHome-page: https://python-pillow.github.io/\nAuthor: \nAuthor-email: \"Jeffrey A. Clark\" <[email protected]>\nLicense: MIT-CMU\nLocation: [/opt/homebrew/lib/python3.10/site-packages](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.10/site-packages)\nRequires: \nRequired-by:\n```",
"I encountered the same problem on Ubuntu system, my pip show Pillow output as below:\n\n```\nName: pillow\nVersion: 10.4.0\nSummary: Python Imaging Library (Fork)\nHome-page: https://python-pillow.org/\nAuthor: \nAuthor-email: \"Jeffrey A. Clark\" <[[email protected]](mailto:[email protected])>\nLicense: HPND\nLocation: /home/shunying/.local/lib/python3.8/site-packages\nRequires: \nRequired-by: \n```\n\nWell, solved this by specifying the pip version to my conda virtual environment :)",
"I have also encountered this. It's a strange thing that's happening.\n\nChecking the code `datasets` it uses `importlib.util.find_spec(\"PIL\")` to verify if `PIL` is installed. While both `pip show` and `importlib` work correctly, I still got the error.\n\nIn my case, restarting and redoing the `datasets` import helped. Seems weird to me."
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7362
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7362/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7362/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7362/events
|
https://github.com/huggingface/datasets/issues/7362
| 2,773,731,829 |
I_kwDODunzps6lU8n1
| 7,362 |
HuggingFace CLI dataset download raises error
|
[] |
closed
| false | null |
[] | null | 3 | 1,736 | 1,736 | 1,736 |
NONE
| null | null |
### Describe the bug
Trying to download Hugging Face datasets using Hugging Face CLI raises error. This error only started after December 27th, 2024. For example:
```
huggingface-cli download --repo-type dataset gboleda/wikicorpus
Traceback (most recent call last):
File "/home/ubuntu/test_venv/bin/huggingface-cli", line 8, in <module>
sys.exit(main())
File "/home/ubuntu/test_venv/lib/python3.10/site-packages/huggingface_hub/commands/huggingface_cli.py", line 51, in main
service.run()
File "/home/ubuntu/test_venv/lib/python3.10/site-packages/huggingface_hub/commands/download.py", line 146, in run
print(self._download()) # Print path to downloaded files
File "/home/ubuntu/test_venv/lib/python3.10/site-packages/huggingface_hub/commands/download.py", line 180, in _download
return snapshot_download(
File "/home/ubuntu/test_venv/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/home/ubuntu/test_venv/lib/python3.10/site-packages/huggingface_hub/_snapshot_download.py", line 164, in snapshot_download
repo_info = api.repo_info(repo_id=repo_id, repo_type=repo_type, revision=revision, token=token)
File "/home/ubuntu/test_venv/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/home/ubuntu/test_venv/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2491, in repo_info
return method(
File "/home/ubuntu/test_venv/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/home/ubuntu/test_venv/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2366, in dataset_info
return DatasetInfo(**data)
File "/home/ubuntu/test_venv/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 799, in __init__
self.tags = kwargs.pop("tags")
KeyError: 'tags'
```
### Steps to reproduce the bug
```
1. huggingface-cli download --repo-type dataset gboleda/wikicorpus
```
### Expected behavior
There should be no error.
### Environment info
- `datasets` version: 2.19.1
- Platform: Linux-6.8.0-1015-aws-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.23.5
- PyArrow version: 18.1.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.3.1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7362/timeline
| null |
completed
|
ajayvohra2005
| 3,870,355 |
MDQ6VXNlcjM4NzAzNTU=
|
https://avatars.githubusercontent.com/u/3870355?v=4
|
https://api.github.com/users/ajayvohra2005
|
https://github.com/ajayvohra2005
|
https://api.github.com/users/ajayvohra2005/followers
|
https://api.github.com/users/ajayvohra2005/following{/other_user}
|
https://api.github.com/users/ajayvohra2005/gists{/gist_id}
|
https://api.github.com/users/ajayvohra2005/starred{/owner}{/repo}
|
https://api.github.com/users/ajayvohra2005/subscriptions
|
https://api.github.com/users/ajayvohra2005/orgs
|
https://api.github.com/users/ajayvohra2005/repos
|
https://api.github.com/users/ajayvohra2005/events{/privacy}
|
https://api.github.com/users/ajayvohra2005/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7362/reactions
| 3 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
lhoestq
| 42,851,186 |
MDQ6VXNlcjQyODUxMTg2
|
https://avatars.githubusercontent.com/u/42851186?v=4
|
https://api.github.com/users/lhoestq
|
https://github.com/lhoestq
|
https://api.github.com/users/lhoestq/followers
|
https://api.github.com/users/lhoestq/following{/other_user}
|
https://api.github.com/users/lhoestq/gists{/gist_id}
|
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
|
https://api.github.com/users/lhoestq/subscriptions
|
https://api.github.com/users/lhoestq/orgs
|
https://api.github.com/users/lhoestq/repos
|
https://api.github.com/users/lhoestq/events{/privacy}
|
https://api.github.com/users/lhoestq/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"I got the same error and was able to resolve it by upgrading from 2.15.0 to 3.2.0.",
"> I got the same error and was able to resolve it by upgrading from 2.15.0 to 3.2.0.\r\n\r\nWhat is needed is upgrading `huggingface-hub==0.27.1`. `datasets` does not appear to have anything to do with the error. The upgrade is a workaround, if the workaround works for your use case. Otherwise, this issue breaks all existing Python clients not using some minimum version of `huggingface-hub`. ",
"Correct, this has to do with `huggingface_hub`, not `datasets`. Some old versions of `huggingface_hub` are unfortunately not robust to recent changes on HF. Updating `huggingface_hub` fixes the issue :)\r\n\r\nClosing this issue since it's not directly related to `datasets`"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7360
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7360/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7360/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7360/events
|
https://github.com/huggingface/datasets/issues/7360
| 2,771,751,406 |
I_kwDODunzps6lNZHu
| 7,360 |
error when loading dataset in Hugging Face: NoneType error is not callable
|
[] |
open
| false | null |
[] | null | 5 | 1,736 | 1,740 | null |
NONE
| null | null |
### Describe the bug
I met an error when running a notebook provide by Hugging Face, and met the error.
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[2], line 5
3 # Load the enhancers dataset from the InstaDeep Hugging Face ressources
4 dataset_name = "enhancers_types"
----> 5 train_dataset_enhancers = load_dataset(
6 "InstaDeepAI/nucleotide_transformer_downstream_tasks_revised",
7 dataset_name,
8 split="train",
9 streaming= False,
10 )
11 test_dataset_enhancers = load_dataset(
12 "InstaDeepAI/nucleotide_transformer_downstream_tasks_revised",
13 dataset_name,
14 split="test",
15 streaming= False,
16 )
File /public/home/hhl/miniconda3/envs/transformer/lib/python3.9/site-packages/datasets/load.py:2129, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, keep_in_memory, save_infos, revision, token, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs)
2124 verification_mode = VerificationMode(
2125 (verification_mode or VerificationMode.BASIC_CHECKS) if not save_infos else VerificationMode.ALL_CHECKS
2126 )
2128 # Create a dataset builder
-> 2129 builder_instance = load_dataset_builder(
2130 path=path,
2131 name=name,
2132 data_dir=data_dir,
2133 data_files=data_files,
2134 cache_dir=cache_dir,
2135 features=features,
2136 download_config=download_config,
2137 download_mode=download_mode,
2138 revision=revision,
2139 token=token,
2140 storage_options=storage_options,
2141 trust_remote_code=trust_remote_code,
2142 _require_default_config_name=name is None,
2143 **config_kwargs,
2144 )
2146 # Return iterable dataset in case of streaming
2147 if streaming:
File /public/home/hhl/miniconda3/envs/transformer/lib/python3.9/site-packages/datasets/load.py:1886, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, token, storage_options, trust_remote_code, _require_default_config_name, **config_kwargs)
1884 builder_cls = get_dataset_builder_class(dataset_module, dataset_name=dataset_name)
1885 # Instantiate the dataset builder
-> 1886 builder_instance: DatasetBuilder = builder_cls(
1887 cache_dir=cache_dir,
1888 dataset_name=dataset_name,
1889 config_name=config_name,
1890 data_dir=data_dir,
1891 data_files=data_files,
1892 hash=dataset_module.hash,
1893 info=info,
1894 features=features,
1895 token=token,
1896 storage_options=storage_options,
1897 **builder_kwargs,
1898 **config_kwargs,
1899 )
1900 builder_instance._use_legacy_cache_dir_if_possible(dataset_module)
1902 return builder_instance
TypeError: 'NoneType' object is not callable
```
I have checked my internet, it worked well. And the dataset name was just copied from the Hugging Face.
Totally no idea what is wrong!
### Steps to reproduce the bug
To reproduce the bug you may run
```
from datasets import load_dataset, Dataset
# Load the enhancers dataset from the InstaDeep Hugging Face ressources
dataset_name = "enhancers_types"
train_dataset_enhancers = load_dataset(
"InstaDeepAI/nucleotide_transformer_downstream_tasks_revised",
dataset_name,
split="train",
streaming= False,
)
test_dataset_enhancers = load_dataset(
"InstaDeepAI/nucleotide_transformer_downstream_tasks_revised",
dataset_name,
split="test",
streaming= False,
)
```
### Expected behavior
1. what may be the reasons of the error
2. how can I fine which reason lead to the error
3. how can I save the problem
### Environment info
```
- `datasets` version: 3.2.0
- Platform: Linux-5.15.0-117-generic-x86_64-with-glibc2.31
- Python version: 3.9.21
- `huggingface_hub` version: 0.27.0
- PyArrow version: 18.1.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.9.0
```
| null |
https://api.github.com/repos/huggingface/datasets/issues/7360/timeline
| null | null |
nanu23333
| 189,343,338 |
U_kgDOC0kmag
|
https://avatars.githubusercontent.com/u/189343338?v=4
|
https://api.github.com/users/nanu23333
|
https://github.com/nanu23333
|
https://api.github.com/users/nanu23333/followers
|
https://api.github.com/users/nanu23333/following{/other_user}
|
https://api.github.com/users/nanu23333/gists{/gist_id}
|
https://api.github.com/users/nanu23333/starred{/owner}{/repo}
|
https://api.github.com/users/nanu23333/subscriptions
|
https://api.github.com/users/nanu23333/orgs
|
https://api.github.com/users/nanu23333/repos
|
https://api.github.com/users/nanu23333/events{/privacy}
|
https://api.github.com/users/nanu23333/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7360/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi ! I couldn't reproduce on my side, can you try deleting your cache at `~/.cache/huggingface/modules/datasets_modules/datasets/InstaDeepAI--nucleotide_transformer_downstream_tasks_revised` and try again ? For some reason `datasets` wasn't able to find the DatasetBuilder class in the python script of this dataset",
"I've met the same problem when importing [LongBench-v1](https://github.com/THUDM/LongBench/blob/main/LongBench/README.md). the debugger reports `dataset_module.builder_configs_parameters.builder_configs` as `None` so that no `builder_cls` gets created:\n\n<img width=\"711\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b62bdea7-442b-47dc-b892-87f4d235e324\" />\n\ndoes this mean that I need to downgrade `datasets`?",
"I tried downgrading `datasets` to v2.20.0 and it works fine now...\n\nI think there might be some compatibility issues during code updates between `v2.20.0` and `v3.0.0` 🤔 \n\nalso I suggest @nanu23333 to see if downgrading works.",
"Found the same problem. When I tried to downgrade the datasets to version below v3.0.0, another problem was raised: `UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb5 in position 1: invalid start byte`",
"\nwhen I use the pip install datasets==3.3, I come across the error。Then I \n```\npip uninstall datasets\npip install datasets==2.21.0\n```\nIt is OK now"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7359
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7359/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7359/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7359/events
|
https://github.com/huggingface/datasets/issues/7359
| 2,771,137,842 |
I_kwDODunzps6lLDUy
| 7,359 |
There are multiple 'mteb/arguana' configurations in the cache: default, corpus, queries with HF_HUB_OFFLINE=1
|
[] |
open
| false | null |
[] | null | 1 | 1,736 | 1,736 | null |
NONE
| null | null |
### Describe the bug
Hey folks,
I am trying to run this code -
```python
from datasets import load_dataset, get_dataset_config_names
ds = load_dataset("mteb/arguana")
```
with HF_HUB_OFFLINE=1
But I get the following error -
```python
Using the latest cached version of the dataset since mteb/arguana couldn't be found on the Hugging Face Hub (offline mode is enabled).
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[2], line 1
----> 1 ds = load_dataset("mteb/arguana")
File ~/env/lib/python3.10/site-packages/datasets/load.py:2129, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, keep_in_memory, save_infos, revision, token, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs)
2124 verification_mode = VerificationMode(
2125 (verification_mode or VerificationMode.BASIC_CHECKS) if not save_infos else VerificationMode.ALL_CHECKS
2126 )
2128 # Create a dataset builder
-> 2129 builder_instance = load_dataset_builder(
2130 path=path,
2131 name=name,
2132 data_dir=data_dir,
2133 data_files=data_files,
2134 cache_dir=cache_dir,
2135 features=features,
2136 download_config=download_config,
2137 download_mode=download_mode,
2138 revision=revision,
2139 token=token,
2140 storage_options=storage_options,
2141 trust_remote_code=trust_remote_code,
2142 _require_default_config_name=name is None,
2143 **config_kwargs,
2144 )
2146 # Return iterable dataset in case of streaming
2147 if streaming:
File ~/env/lib/python3.10/site-packages/datasets/load.py:1886, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, token, storage_options, trust_remote_code, _require_default_config_name, **config_kwargs)
1884 builder_cls = get_dataset_builder_class(dataset_module, dataset_name=dataset_name)
1885 # Instantiate the dataset builder
-> 1886 builder_instance: DatasetBuilder = builder_cls(
1887 cache_dir=cache_dir,
1888 dataset_name=dataset_name,
1889 config_name=config_name,
1890 data_dir=data_dir,
1891 data_files=data_files,
1892 hash=dataset_module.hash,
1893 info=info,
1894 features=features,
1895 token=token,
1896 storage_options=storage_options,
1897 **builder_kwargs,
1898 **config_kwargs,
1899 )
1900 builder_instance._use_legacy_cache_dir_if_possible(dataset_module)
1902 return builder_instance
File ~/env/lib/python3.10/site-packages/datasets/packaged_modules/cache/cache.py:124, in Cache.__init__(self, cache_dir, dataset_name, config_name, version, hash, base_path, info, features, token, repo_id, data_files, data_dir, storage_options, writer_batch_size, **config_kwargs)
122 config_kwargs["data_dir"] = data_dir
123 if hash == "auto" and version == "auto":
--> 124 config_name, version, hash = _find_hash_in_cache(
125 dataset_name=repo_id or dataset_name,
126 config_name=config_name,
127 cache_dir=cache_dir,
128 config_kwargs=config_kwargs,
129 custom_features=features,
130 )
131 elif hash == "auto" or version == "auto":
132 raise NotImplementedError("Pass both hash='auto' and version='auto' instead")
File ~/env/lib/python3.10/site-packages/datasets/packaged_modules/cache/cache.py:84, in _find_hash_in_cache(dataset_name, config_name, cache_dir, config_kwargs, custom_features)
72 other_configs = [
73 Path(_cached_directory_path).parts[-3]
74 for _cached_directory_path in glob.glob(os.path.join(cached_datasets_directory_path_root, "*", version, hash))
(...)
81 )
82 ]
83 if not config_id and len(other_configs) > 1:
---> 84 raise ValueError(
85 f"There are multiple '{dataset_name}' configurations in the cache: {', '.join(other_configs)}"
86 f"\nPlease specify which configuration to reload from the cache, e.g."
87 f"\n\tload_dataset('{dataset_name}', '{other_configs[0]}')"
88 )
89 config_name = cached_directory_path.parts[-3]
90 warning_msg = (
91 f"Found the latest cached dataset configuration '{config_name}' at {cached_directory_path} "
92 f"(last modified on {time.ctime(_get_modification_time(cached_directory_path))})."
93 )
ValueError: There are multiple 'mteb/arguana' configurations in the cache: queries, corpus, default
Please specify which configuration to reload from the cache, e.g.
load_dataset('mteb/arguana', 'queries')
```
It works when I run the same code with HF_HUB_OFFLINE=0, but after the data is downloaded, I turn off the HF hub cache with HF_HUB_OFFLINE=1, and then this error appears.
Are there some files I am missing with hub disabled?
### Steps to reproduce the bug
from datasets import load_dataset, get_dataset_config_names
ds = load_dataset("mteb/arguana")
with HF_HUB_OFFLINE=1
(after already running it with HF_HUB_OFFLINE=0 and populating the datasets cache)
### Expected behavior
Dataset loaded successfully as it does with HF_HUB_OFFLINE=1
### Environment info
- `datasets` version: 3.2.0
- Platform: Linux-5.15.148.2-2.cm2-x86_64-with-glibc2.35
- Python version: 3.10.14
- `huggingface_hub` version: 0.27.0
- PyArrow version: 17.0.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.6.1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7359/timeline
| null | null |
Bhavya6187
| 723,146 |
MDQ6VXNlcjcyMzE0Ng==
|
https://avatars.githubusercontent.com/u/723146?v=4
|
https://api.github.com/users/Bhavya6187
|
https://github.com/Bhavya6187
|
https://api.github.com/users/Bhavya6187/followers
|
https://api.github.com/users/Bhavya6187/following{/other_user}
|
https://api.github.com/users/Bhavya6187/gists{/gist_id}
|
https://api.github.com/users/Bhavya6187/starred{/owner}{/repo}
|
https://api.github.com/users/Bhavya6187/subscriptions
|
https://api.github.com/users/Bhavya6187/orgs
|
https://api.github.com/users/Bhavya6187/repos
|
https://api.github.com/users/Bhavya6187/events{/privacy}
|
https://api.github.com/users/Bhavya6187/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7359/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Related to https://github.com/embeddings-benchmark/mteb/issues/1714"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7357
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7357/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7357/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7357/events
|
https://github.com/huggingface/datasets/issues/7357
| 2,770,456,127 |
I_kwDODunzps6lIc4_
| 7,357 |
Python process aborded with GIL issue when using image dataset
|
[] |
open
| false | null |
[] | null | 4 | 1,736 | 1,759 | null |
NONE
| null | null |
### Describe the bug
The issue is visible only with the latest `datasets==3.2.0`.
When using image dataset the Python process gets aborted right before the exit with the following error:
```
Fatal Python error: PyGILState_Release: thread state 0x7fa1f409ade0 must be current when releasing
Python runtime state: finalizing (tstate=0x0000000000ad2958)
Thread 0x00007fa33d157740 (most recent call first):
<no Python frame>
Extension modules: numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._boun
ded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, pyarrow.lib, pandas._libs.tslibs.ccalendar, pandas._libs.ts
libs.np_datetime, pandas._libs.tslibs.dtypes, pandas._libs.tslibs.base, pandas._libs.tslibs.nattype, pandas._libs.tslibs.timezones, pandas._libs.tslibs.fields, pandas._libs.tslibs.timedeltas, pandas._libs.t
slibs.tzconversion, pandas._libs.tslibs.timestamps, pandas._libs.properties, pandas._libs.tslibs.offsets, pandas._libs.tslibs.strptime, pandas._libs.tslibs.parsing, pandas._libs.tslibs.conversion, pandas._l
ibs.tslibs.period, pandas._libs.tslibs.vectorized, pandas._libs.ops_dispatch, pandas._libs.missing, pandas._libs.hashtable, pandas._libs.algos, pandas._libs.interval, pandas._libs.lib, pyarrow._compute, pan
das._libs.ops, pandas._libs.hashing, pandas._libs.arrays, pandas._libs.tslib, pandas._libs.sparse, pandas._libs.internals, pandas._libs.indexing, pandas._libs.index, pandas._libs.writers, pandas._libs.join,
pandas._libs.window.aggregations, pandas._libs.window.indexers, pandas._libs.reshape, pandas._libs.groupby, pandas._libs.json, pandas._libs.parsers, pandas._libs.testing, charset_normalizer.md, requests.pa
ckages.charset_normalizer.md, requests.packages.chardet.md, yaml._yaml, markupsafe._speedups, PIL._imaging, torch._C, torch._C._dynamo.autograd_compiler, torch._C._dynamo.eval_frame, torch._C._dynamo.guards
, torch._C._dynamo.utils, torch._C._fft, torch._C._linalg, torch._C._nested, torch._C._nn, torch._C._sparse, torch._C._special, sentencepiece._sentencepiece, sklearn.__check_build._check_build, psutil._psut
il_linux, psutil._psutil_posix, scipy._lib._ccallback_c, scipy.sparse._sparsetools, _csparsetools, scipy.sparse._csparsetools, scipy.linalg._fblas, scipy.linalg._flapack, scipy.linalg.cython_lapack, scipy.l
inalg._cythonized_array_utils, scipy.linalg._solve_toeplitz, scipy.linalg._decomp_lu_cython, scipy.linalg._matfuncs_sqrtm_triu, scipy.linalg.cython_blas, scipy.linalg._matfuncs_expm, scipy.linalg._decomp_up
date, scipy.sparse.linalg._dsolve._superlu, scipy.sparse.linalg._eigen.arpack._arpack, scipy.sparse.linalg._propack._spropack, scipy.sparse.linalg._propack._dpropack, scipy.sparse.linalg._propack._cpropack,
scipy.sparse.linalg._propack._zpropack, scipy.sparse.csgraph._tools, scipy.sparse.csgraph._shortest_path, scipy.sparse.csgraph._traversal, scipy.sparse.csgraph._min_spanning_tree, scipy.sparse.csgraph._flo
w, scipy.sparse.csgraph._matching, scipy.sparse.csgraph._reordering, scipy.special._ufuncs_cxx, scipy.special._ufuncs, scipy.special._specfun, scipy.special._comb, scipy.special._ellip_harm_2, scipy.spatial
._ckdtree, scipy._lib.messagestream, scipy.spatial._qhull, scipy.spatial._voronoi, scipy.spatial._distance_wrap, scipy.spatial._hausdorff, scipy.spatial.transform._rotation, scipy.optimize._group_columns, s
cipy.optimize._trlib._trlib, scipy.optimize._lbfgsb, _moduleTNC, scipy.optimize._moduleTNC, scipy.optimize._cobyla, scipy.optimize._slsqp, scipy.optimize._minpack, scipy.optimize._lsq.givens_elimination, sc
ipy.optimize._zeros, scipy.optimize._highs.cython.src._highs_wrapper, scipy.optimize._highs._highs_wrapper, scipy.optimize._highs.cython.src._highs_constants, scipy.optimize._highs._highs_constants, scipy.l
inalg._interpolative, scipy.optimize._bglu_dense, scipy.optimize._lsap, scipy.optimize._direct, scipy.integrate._odepack, scipy.integrate._quadpack, scipy.integrate._vode, scipy.integrate._dop, scipy.integr
ate._lsoda, scipy.interpolate._fitpack, scipy.interpolate._dfitpack, scipy.interpolate._bspl, scipy.interpolate._ppoly, scipy.interpolate.interpnd, scipy.interpolate._rbfinterp_pythran, scipy.interpolate._r
gi_cython, scipy.special.cython_special, scipy.stats._stats, scipy.stats._biasedurn, scipy.stats._levy_stable.levyst, scipy.stats._stats_pythran, scipy._lib._uarray._uarray, scipy.stats._ansari_swilk_statis
tics, scipy.stats._sobol, scipy.stats._qmc_cy, scipy.stats._mvn, scipy.stats._rcont.rcont, scipy.stats._unuran.unuran_wrapper, scipy.ndimage._nd_image, _ni_label, scipy.ndimage._ni_label, sklearn.utils._isf
inite, sklearn.utils.sparsefuncs_fast, sklearn.utils.murmurhash, sklearn.utils._openmp_helpers, sklearn.metrics.cluster._expected_mutual_info_fast, sklearn.preprocessing._csr_polynomial_expansion, sklearn.p
reprocessing._target_encoder_fast, sklearn.metrics._dist_metrics, sklearn.metrics._pairwise_distances_reduction._datasets_pair, sklearn.utils._cython_blas, sklearn.metrics._pairwise_distances_reduction._bas
e, sklearn.metrics._pairwise_distances_reduction._middle_term_computer, sklearn.utils._heap, sklearn.utils._sorting, sklearn.metrics._pairwise_distances_reduction._argkmin, sklearn.metrics._pairwise_distanc
es_reduction._argkmin_classmode, sklearn.utils._vector_sentinel, sklearn.metrics._pairwise_distances_reduction._radius_neighbors, sklearn.metrics._pairwise_distances_reduction._radius_neighbors_classmode, s
klearn.metrics._pairwise_fast, PIL._imagingft, google._upb._message, h5py._errors, h5py.defs, h5py._objects, h5py.h5, h5py.utils, h5py.h5t, h5py.h5s, h5py.h5ac, h5py.h5p, h5py.h5r, h5py._proxy, h5py._conv,
h5py.h5z, h5py.h5a, h5py.h5d, h5py.h5ds, h5py.h5g, h5py.h5i, h5py.h5o, h5py.h5f, h5py.h5fd, h5py.h5pl, h5py.h5l, h5py._selector, _cffi_backend, pyarrow._parquet, pyarrow._fs, pyarrow._azurefs, pyarrow._hdfs
, pyarrow._gcsfs, pyarrow._s3fs, multidict._multidict, propcache._helpers_c, yarl._quoting_c, aiohttp._helpers, aiohttp._http_writer, aiohttp._http_parser, aiohttp._websocket, frozenlist._frozenlist, xxhash
._xxhash, pyarrow._json, pyarrow._acero, pyarrow._csv, pyarrow._dataset, pyarrow._dataset_orc, pyarrow._parquet_encryption, pyarrow._dataset_parquet_encryption, pyarrow._dataset_parquet, regex._regex, scipy
.io.matlab._mio_utils, scipy.io.matlab._streams, scipy.io.matlab._mio5_utils, PIL._imagingmath, PIL._webp (total: 236)
Aborted (core dumped)
```an
### Steps to reproduce the bug
Install `datasets==3.2.0`
Run the following script:
```python
import datasets
DATASET_NAME = "phiyodr/InpaintCOCO"
NUM_SAMPLES = 10
def preprocess_fn(example):
return {
"prompts": example["inpaint_caption"],
"images": example["coco_image"],
"masks": example["mask"],
}
default_dataset = datasets.load_dataset(
DATASET_NAME, split="test", streaming=True
).filter(lambda example: example["inpaint_caption"] != "").take(NUM_SAMPLES)
test_data = default_dataset.map(
lambda x: preprocess_fn(x), remove_columns=default_dataset.column_names
)
for data in test_data:
print(data["prompts"])
``
### Expected behavior
The script should not hang or crash.
### Environment info
- `datasets` version: 3.2.0
- Platform: Linux-5.15.0-50-generic-x86_64-with-glibc2.31
- Python version: 3.11.0
- `huggingface_hub` version: 0.25.1
- PyArrow version: 17.0.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.2.0
| null |
https://api.github.com/repos/huggingface/datasets/issues/7357/timeline
| null | null |
AlexKoff88
| 25,342,812 |
MDQ6VXNlcjI1MzQyODEy
|
https://avatars.githubusercontent.com/u/25342812?v=4
|
https://api.github.com/users/AlexKoff88
|
https://github.com/AlexKoff88
|
https://api.github.com/users/AlexKoff88/followers
|
https://api.github.com/users/AlexKoff88/following{/other_user}
|
https://api.github.com/users/AlexKoff88/gists{/gist_id}
|
https://api.github.com/users/AlexKoff88/starred{/owner}{/repo}
|
https://api.github.com/users/AlexKoff88/subscriptions
|
https://api.github.com/users/AlexKoff88/orgs
|
https://api.github.com/users/AlexKoff88/repos
|
https://api.github.com/users/AlexKoff88/events{/privacy}
|
https://api.github.com/users/AlexKoff88/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7357/reactions
| 3 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"The issue seems to come from `pyarrow`, I opened an issue on their side at https://github.com/apache/arrow/issues/45214",
"I \"solved\" this by setting a low batch_size for load_datasets()",
"datasets==3.1.0 works\ndatasets==4.1.1 fails",
"If you want to use latest version over 3.1.0, a temporary fix is to modify datasets/packaged_modules/parquet/parquet.py\n\n```diff\n with open(file, \"rb\") as f:\n- parquet_fragment = ds.ParquetFileFormat().make_fragment(f)\n- if parquet_fragment.row_groups:\n- batch_size = self.config.batch_size or parquet_fragment.row_groups[0].num_rows\n+ parquet_file = pq.ParquetFile(f)\n+ if parquet_file.metadata.num_row_groups > 0:\n+ batch_size = self.config.batch_size or parquet_file.metadata.row_group(0).num_rows\n try:\n for batch_idx, record_batch in enumerate(\n- parquet_fragment.to_batches(\n- batch_size=batch_size,\n- columns=self.config.columns,\n- filter=filter_expr,\n- batch_readahead=0,\n- fragment_readahead=0,\n+ parquet_file.iter_batches(batch_size=batch_size, columns=self.config.columns) \n )\n```\n\n[See this commit for to_batches change](https://github.com/huggingface/datasets/commit/661d7bac29689e2d9eb74fba3d243939d6e9f25b)"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7356
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7356/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7356/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7356/events
|
https://github.com/huggingface/datasets/issues/7356
| 2,770,095,103 |
I_kwDODunzps6lHEv_
| 7,356 |
How about adding a feature to pass the key when performing map on DatasetDict?
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
closed
| false | null |
[] | null | 6 | 1,736 | 1,742 | 1,742 |
CONTRIBUTOR
| null | null |
### Feature request
Add a feature to pass the key of the DatasetDict when performing map
### Motivation
I often preprocess using map on DatasetDict.
Sometimes, I need to preprocess train and valid data differently depending on the task.
So, I thought it would be nice to pass the key (like train, valid) when performing map on DatasetDict.
What do you think?
### Your contribution
I can submit a pull request to add the feature to pass the key of the DatasetDict when performing map.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7356/timeline
| null |
completed
|
jp1924
| 93,233,241 |
U_kgDOBY6gWQ
|
https://avatars.githubusercontent.com/u/93233241?v=4
|
https://api.github.com/users/jp1924
|
https://github.com/jp1924
|
https://api.github.com/users/jp1924/followers
|
https://api.github.com/users/jp1924/following{/other_user}
|
https://api.github.com/users/jp1924/gists{/gist_id}
|
https://api.github.com/users/jp1924/starred{/owner}{/repo}
|
https://api.github.com/users/jp1924/subscriptions
|
https://api.github.com/users/jp1924/orgs
|
https://api.github.com/users/jp1924/repos
|
https://api.github.com/users/jp1924/events{/privacy}
|
https://api.github.com/users/jp1924/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7356/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
jp1924
| 93,233,241 |
U_kgDOBY6gWQ
|
https://avatars.githubusercontent.com/u/93233241?v=4
|
https://api.github.com/users/jp1924
|
https://github.com/jp1924
|
https://api.github.com/users/jp1924/followers
|
https://api.github.com/users/jp1924/following{/other_user}
|
https://api.github.com/users/jp1924/gists{/gist_id}
|
https://api.github.com/users/jp1924/starred{/owner}{/repo}
|
https://api.github.com/users/jp1924/subscriptions
|
https://api.github.com/users/jp1924/orgs
|
https://api.github.com/users/jp1924/repos
|
https://api.github.com/users/jp1924/events{/privacy}
|
https://api.github.com/users/jp1924/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"@lhoestq \r\nIf it's okay with you, can I work on this?",
"Hi ! Can you give an example of what it would look like to use this new feature ?\r\n\r\nNote that currently you can already do\r\n\r\n```python\r\nds[\"train\"] = ds[\"train\"].map(process_train)\r\nds[\"test\"] = ds[\"test\"].map(process_test)\r\n```",
"@lhoestq \nThanks for the response! \nLet me clarify what I'm looking for with an example:\n\nCurrently, we need to write separate processing functions or call .map() separately:\n```python\n# Current approach\ndef process_train(example):\n # Training-specific processing\n return example\n\ndef process_valid(example):\n # Validation-specific processing\n return example\n\nds[\"train\"] = ds[\"train\"].map(process_train)\nds[\"valid\"] = ds[\"valid\"].map(process_valid)\n```\n\nWhat I'm proposing is to have a single processing function that knows which split it's processing:\n\n```python\n# Proposed feature\ndef process(example, split_key):\n if split_key == \"train\":\n # Training-specific processing\n elif split_key == \"valid\":\n # Validation-specific processing\n return example\n\n# Using with_key=True to pass the split information\nds = ds.map(process, with_key=True)\n```\n\nThis becomes particularly useful when:\n1. The processing logic is heavily shared between splits but needs minor adjustments\n2. You want to maintain the processing logic in one place for better maintainability\n3. The processing function is complex and you want to avoid duplicating code\n\nSo I wanted to request this feature to achieve this kind of functionality. \nI've created a draft PR implementing this: https://github.com/huggingface/datasets/pull/7240/files\n",
"I see ! I think it makes sense, and it's more readable than doing something like this:\r\n```python\r\nfrom functools import partial\r\nds = DatasetDict({key: ds[key].map(partial(process, split_key=key)) for key in ds})\r\n```\r\n\r\nPS: you named the argument `with_key` in your example, but it might be even clearer with it's named `with_split` maybe no ?",
"@lhoestq I agree. \nIt seems better to use `with_split`.\nSo can I open a PR with this change?",
"Sure !"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7355
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7355/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7355/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7355/events
|
https://github.com/huggingface/datasets/issues/7355
| 2,768,958,211 |
I_kwDODunzps6lCvMD
| 7,355 |
Not available datasets[audio] on python 3.13
|
[] |
open
| false | null |
[] | null | 3 | 1,736 | 1,751 | null |
NONE
| null | null |
### Describe the bug
This is the error I got, it seems numba package does not support python 3.13
PS C:\Users\sergi\Documents> pip install datasets[audio]
Defaulting to user installation because normal site-packages is not writeable
Collecting datasets[audio]
Using cached datasets-3.2.0-py3-none-any.whl.metadata (20 kB)
... (OTHER PACKAGES)
Collecting numba>=0.51.0 (from librosa->datasets[audio])
Downloading numba-0.60.0.tar.gz (2.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.7/2.7 MB 44.1 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.496.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
~~~~^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.496.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.496.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\sergi\AppData\Local\Temp\pip-build-env-yauns_qh\overlay\Lib\site-packages\setuptools\build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sergi\AppData\Local\Temp\pip-build-env-yauns_qh\overlay\Lib\site-packages\setuptools\build_meta.py", line 304, in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
RuntimeError: Cannot install on Python version 3.13.1; only versions >=3.9,<3.13 are supported.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
### Steps to reproduce the bug
1. install python >=3.13
2. !pip install datasets[audio]
### Expected behavior
I needed datasets[audio] in the python 3.13
### Environment info
python 3.13.1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7355/timeline
| null | null |
sergiosinlimites
| 70,306,948 |
MDQ6VXNlcjcwMzA2OTQ4
|
https://avatars.githubusercontent.com/u/70306948?v=4
|
https://api.github.com/users/sergiosinlimites
|
https://github.com/sergiosinlimites
|
https://api.github.com/users/sergiosinlimites/followers
|
https://api.github.com/users/sergiosinlimites/following{/other_user}
|
https://api.github.com/users/sergiosinlimites/gists{/gist_id}
|
https://api.github.com/users/sergiosinlimites/starred{/owner}{/repo}
|
https://api.github.com/users/sergiosinlimites/subscriptions
|
https://api.github.com/users/sergiosinlimites/orgs
|
https://api.github.com/users/sergiosinlimites/repos
|
https://api.github.com/users/sergiosinlimites/events{/privacy}
|
https://api.github.com/users/sergiosinlimites/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7355/reactions
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"It looks like an issue with `numba` which can't be installed on 3.13 ? `numba` is a dependency of `librosa`, used to decode audio files",
"There seems that `uv` cannot resolve \n\n```bhas\nuv add -n datasets[audio] huggingface-hub[hf-transfer] transformers\n```\n\nThe problem is again `librosa` which depends on `numba` which has as a transitive dep `llvm-lite`\n\n```bash\nRuntimeError: Cannot install on Python version 3.13.3; only versions >=3.6,<3.10 are supported.\n# Python 3.9 works but is quite old and generates some problems with pytorch and numpy 2.0 ....\n```\n\nThe packaging seems problematic...",
"Seems to be solved on https://github.com/huggingface/datasets/commit/161f99d94a1daf8380eabdb826048a0652510ee6#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7L140"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7354
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7354/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7354/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7354/events
|
https://github.com/huggingface/datasets/issues/7354
| 2,768,955,917 |
I_kwDODunzps6lCuoN
| 7,354 |
A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.2 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
|
[] |
closed
| false | null |
[] | null | 1 | 1,736 | 1,736 | 1,736 |
NONE
| null | null |
### Describe the bug
Following this tutorial: https://huggingface.co/docs/diffusers/en/tutorials/basic_training and running it locally using VSCode on my MacBook. The first line in the tutorial fails: from datasets import load_dataset
dataset = load_dataset('huggan/smithsonian_butterflies_subset', split="train"). with this error:
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.2 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2. and ImportError: numpy.core.multiarray failed to import.
Does from datasets import load_dataset really use NumPy 1.x?
### Steps to reproduce the bug
Open VSCode. create a new venv. Create a new ipynb file. Import pip install diffusers[training] try to run this line of code: from datasets import load_dataset
### Expected behavior
data is loaded
### Environment info
ran this: datasets-cli env
and got A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.2 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7354/timeline
| null |
completed
|
jamessdixon
| 1,394,644 |
MDQ6VXNlcjEzOTQ2NDQ=
|
https://avatars.githubusercontent.com/u/1394644?v=4
|
https://api.github.com/users/jamessdixon
|
https://github.com/jamessdixon
|
https://api.github.com/users/jamessdixon/followers
|
https://api.github.com/users/jamessdixon/following{/other_user}
|
https://api.github.com/users/jamessdixon/gists{/gist_id}
|
https://api.github.com/users/jamessdixon/starred{/owner}{/repo}
|
https://api.github.com/users/jamessdixon/subscriptions
|
https://api.github.com/users/jamessdixon/orgs
|
https://api.github.com/users/jamessdixon/repos
|
https://api.github.com/users/jamessdixon/events{/privacy}
|
https://api.github.com/users/jamessdixon/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7354/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
jamessdixon
| 1,394,644 |
MDQ6VXNlcjEzOTQ2NDQ=
|
https://avatars.githubusercontent.com/u/1394644?v=4
|
https://api.github.com/users/jamessdixon
|
https://github.com/jamessdixon
|
https://api.github.com/users/jamessdixon/followers
|
https://api.github.com/users/jamessdixon/following{/other_user}
|
https://api.github.com/users/jamessdixon/gists{/gist_id}
|
https://api.github.com/users/jamessdixon/starred{/owner}{/repo}
|
https://api.github.com/users/jamessdixon/subscriptions
|
https://api.github.com/users/jamessdixon/orgs
|
https://api.github.com/users/jamessdixon/repos
|
https://api.github.com/users/jamessdixon/events{/privacy}
|
https://api.github.com/users/jamessdixon/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"recreated .venv and run this: pip install diffusers[training]==0.11.1"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7347
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7347/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7347/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7347/events
|
https://github.com/huggingface/datasets/issues/7347
| 2,760,282,339 |
I_kwDODunzps6khpDj
| 7,347 |
Converting Arrow to WebDataset TAR Format for Offline Use
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
closed
| false | null |
[] | null | 4 | 1,735 | 1,735 | 1,735 |
NONE
| null | null |
### Feature request
Hi,
I've downloaded an Arrow-formatted dataset offline using the hugggingface's datasets library by:
```
import json
from datasets import load_dataset
dataset = load_dataset("pixparse/cc3m-wds")
dataset.save_to_disk("./cc3m_1")
```
now I need to convert it to WebDataset's TAR format for offline data ingestion.
Is there a straightforward method to achieve this conversion without an internet connection? Can I simply convert it by
```
tar -cvf
```
btw, when I tried:
```
import webdataset as wds
from huggingface_hub import get_token
from torch.utils.data import DataLoader
hf_token = get_token()
url = "https://huggingface.co/datasets/timm/imagenet-12k-wds/resolve/main/imagenet12k-train-{{0000..1023}}.tar"
url = f"pipe:curl -s -L {url} -H 'Authorization:Bearer {hf_token}'"
dataset = wds.WebDataset(url).decode()
dataset.save_to_disk("./cc3m_webdataset")
```
error occured:
```
AttributeError: 'WebDataset' object has no attribute 'save_to_disk'
```
Thanks a lot!
### Motivation
Converting Arrow to WebDataset TAR Format
### Your contribution
No clue yet
| null |
https://api.github.com/repos/huggingface/datasets/issues/7347/timeline
| null |
completed
|
katie312
| 91,370,128 |
MDQ6VXNlcjkxMzcwMTI4
|
https://avatars.githubusercontent.com/u/91370128?v=4
|
https://api.github.com/users/katie312
|
https://github.com/katie312
|
https://api.github.com/users/katie312/followers
|
https://api.github.com/users/katie312/following{/other_user}
|
https://api.github.com/users/katie312/gists{/gist_id}
|
https://api.github.com/users/katie312/starred{/owner}{/repo}
|
https://api.github.com/users/katie312/subscriptions
|
https://api.github.com/users/katie312/orgs
|
https://api.github.com/users/katie312/repos
|
https://api.github.com/users/katie312/events{/privacy}
|
https://api.github.com/users/katie312/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7347/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
katie312
| 91,370,128 |
MDQ6VXNlcjkxMzcwMTI4
|
https://avatars.githubusercontent.com/u/91370128?v=4
|
https://api.github.com/users/katie312
|
https://github.com/katie312
|
https://api.github.com/users/katie312/followers
|
https://api.github.com/users/katie312/following{/other_user}
|
https://api.github.com/users/katie312/gists{/gist_id}
|
https://api.github.com/users/katie312/starred{/owner}{/repo}
|
https://api.github.com/users/katie312/subscriptions
|
https://api.github.com/users/katie312/orgs
|
https://api.github.com/users/katie312/repos
|
https://api.github.com/users/katie312/events{/privacy}
|
https://api.github.com/users/katie312/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi,\r\n\r\nI've downloaded an Arrow-formatted dataset offline using the hugggingface's datasets library by:\r\n\r\nimport json\r\nfrom datasets import load_dataset\r\n\r\ndataset = load_dataset(\"pixparse/cc3m-wds\")\r\ndataset.save_to_disk(\"./cc3m_1\")\r\n\r\n\r\nnow I need to convert it to WebDataset's TAR format for offline data ingestion.\r\nIs there a straightforward method to achieve this conversion without an internet connection? Can I simply convert it by\r\n\r\ntar -cvf\r\n\r\n\r\nbtw, when I tried:\r\n\r\nimport webdataset as wds\r\nfrom huggingface_hub import get_token\r\nfrom torch.utils.data import DataLoader\r\n\r\nhf_token = get_token()\r\nurl = \"https://huggingface.co/datasets/timm/imagenet-12k-wds/resolve/main/imagenet12k-train-{{0000..1023}}.tar\"\r\nurl = f\"pipe:curl -s -L {url} -H 'Authorization:Bearer {hf_token}'\"\r\ndataset = wds.WebDataset(url).decode()\r\ndataset.save_to_disk(\"./cc3m_webdataset\")\r\n\r\n\r\nerror occured:\r\n\r\nAttributeError: 'WebDataset' object has no attribute 'save_to_disk'\r\n\r\n\r\nThanks a lot!\r\n\r\nMotivation\r\n\r\nConverting Arrow to WebDataset TAR Format\r\n\r\nYour contribution\r\n\r\nNo clue yet\r\n\r\n\r\nاحصل على Outlook لـ iOS<https://aka.ms/o0ukef>\r\n________________________________\r\nمن: katie312 ***@***.***>\r\nتم الإرسال: Friday, December 27, 2024 4:41:21 AM\r\nإلى: huggingface/datasets ***@***.***>\r\nنسخة: Subscribed ***@***.***>\r\nالموضوع: [huggingface/datasets] Converting Arrow to WebDataset TAR Format for Offline Use (Issue #7347)\r\n\r\n\r\nFeature request\r\n\r\nHi,\r\n\r\nI've downloaded an Arrow-formatted dataset offline using the hugggingface's datasets library by:\r\n\r\nimport json\r\nfrom datasets import load_dataset\r\n\r\ndataset = load_dataset(\"pixparse/cc3m-wds\")\r\ndataset.save_to_disk(\"./cc3m_1\")\r\n\r\n\r\nnow I need to convert it to WebDataset's TAR format for offline data ingestion.\r\nIs there a straightforward method to achieve this conversion without an internet connection? Can I simply convert it by\r\n\r\ntar -cvf\r\n\r\n\r\nbtw, when I tried:\r\n\r\nimport webdataset as wds\r\nfrom huggingface_hub import get_token\r\nfrom torch.utils.data import DataLoader\r\n\r\nhf_token = get_token()\r\nurl = \"https://huggingface.co/datasets/timm/imagenet-12k-wds/resolve/main/imagenet12k-train-{{0000..1023}}.tar\"\r\nurl = f\"pipe:curl -s -L {url} -H 'Authorization:Bearer {hf_token}'\"\r\ndataset = wds.WebDataset(url).decode()\r\ndataset.save_to_disk(\"./cc3m_webdataset\")\r\n\r\n\r\nerror occured:\r\n\r\nAttributeError: 'WebDataset' object has no attribute 'save_to_disk'\r\n\r\n\r\nThanks a lot!\r\n\r\nMotivation\r\n\r\nConverting Arrow to WebDataset TAR Format\r\n\r\nYour contribution\r\n\r\nNo clue yet\r\n\r\n—\r\nReply to this email directly, view it on GitHub<https://github.com/huggingface/datasets/issues/7347>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AQJDZ2X2RUIIULBJEF5R2HL2HSV4DAVCNFSM6AAAAABUH5QSLCVHI2DSMVQWIX3LMV43ASLTON2WKOZSG43DAMRYGIZTGOI>.\r\nYou are receiving this because you are subscribed to this thread.Message ID: ***@***.***>\r\n",
"> now I need to convert it to WebDataset's TAR format for offline data ingestion.\r\n\r\nyou can directly download the .TAR files from HF using e.g. `huggingface-cli download` and load them in webdataset :)",
"الفله سنه والطبقه يوم\r\n\r\nاحصل على Outlook لـ iOS<https://aka.ms/o0ukef>\r\n________________________________\r\nمن: Quentin Lhoest ***@***.***>\r\nتم الإرسال: Friday, December 27, 2024 4:14:43 PM\r\nإلى: huggingface/datasets ***@***.***>\r\nنسخة: hamad350 ***@***.***>; Comment ***@***.***>\r\nالموضوع: Re: [huggingface/datasets] Converting Arrow to WebDataset TAR Format for Offline Use (Issue #7347)\r\n\r\n\r\nnow I need to convert it to WebDataset's TAR format for offline data ingestion.\r\n\r\nyou can directly download the .TAR files from HF using e.g. huggingface-cli download and load them in webdataset :)\r\n\r\n—\r\nReply to this email directly, view it on GitHub<https://github.com/huggingface/datasets/issues/7347#issuecomment-2563691570>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AQJDZ2R5M3Z7L2MZZYARYID2HVHEHAVCNFSM6AAAAABUH5QSLCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRTGY4TCNJXGA>.\r\nYou are receiving this because you commented.Message ID: ***@***.***>\r\n",
"> > now I need to convert it to WebDataset's TAR format for offline data ingestion.\r\n> \r\n> you can directly download the .TAR files from HF using e.g. `huggingface-cli download` and load them in webdataset :)\r\n\r\nThanks a lot! I completely forgot to use Hugging Face-CLI download. Thanks for the reminding!"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7346
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7346/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7346/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7346/events
|
https://github.com/huggingface/datasets/issues/7346
| 2,758,752,118 |
I_kwDODunzps6kbzd2
| 7,346 |
OSError: Invalid flatbuffers message.
|
[] |
closed
| false | null |
[] | null | 3 | 1,735 | 1,736 | 1,736 |
NONE
| null | null |
### Describe the bug
When loading a large 2D data (1000 × 1152) with a large number of (2,000 data in this case) in `load_dataset`, the error message `OSError: Invalid flatbuffers message` is reported.
When only 300 pieces of data of this size (1000 × 1152) are stored, they can be loaded correctly.
When 2,000 2D arrays are stored in each file, about 100 files are generated, each with a file size of about 5-6GB. But when 300 2D arrays are stored in each file, **about 600 files are generated, which is too many files**.
### Steps to reproduce the bug
error:
```python
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
Cell In[2], line 4
1 from datasets import Dataset
2 from datasets import load_dataset
----> 4 real_dataset = load_dataset("arrow", data_files='tensorData/real_ResidueTensor/*', split="train")#.with_format("torch") # , split="train"
5 # sim_dataset = load_dataset("arrow", data_files='tensorData/sim_ResidueTensor/*', split="train").with_format("torch")
6 real_dataset
File [~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/datasets/load.py:2151](http://localhost:8899/lab/tree/RTC%3Anew_world/esm3/~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/datasets/load.py#line=2150), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, keep_in_memory, save_infos, revision, token, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs)
2148 return builder_instance.as_streaming_dataset(split=split)
2150 # Download and prepare data
-> 2151 builder_instance.download_and_prepare(
2152 download_config=download_config,
2153 download_mode=download_mode,
2154 verification_mode=verification_mode,
2155 num_proc=num_proc,
2156 storage_options=storage_options,
2157 )
2159 # Build dataset for splits
2160 keep_in_memory = (
2161 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
2162 )
File [~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/datasets/builder.py:924](http://localhost:8899/lab/tree/RTC%3Anew_world/esm3/~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/datasets/builder.py#line=923), in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, dl_manager, base_path, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)
922 if num_proc is not None:
923 prepare_split_kwargs["num_proc"] = num_proc
--> 924 self._download_and_prepare(
925 dl_manager=dl_manager,
926 verification_mode=verification_mode,
927 **prepare_split_kwargs,
928 **download_and_prepare_kwargs,
929 )
930 # Sync info
931 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values())
File [~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/datasets/builder.py:978](http://localhost:8899/lab/tree/RTC%3Anew_world/esm3/~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/datasets/builder.py#line=977), in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
976 split_dict = SplitDict(dataset_name=self.dataset_name)
977 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 978 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
980 # Checksums verification
981 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums:
File [~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/datasets/packaged_modules/arrow/arrow.py:47](http://localhost:8899/lab/tree/RTC%3Anew_world/esm3/~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/datasets/packaged_modules/arrow/arrow.py#line=46), in Arrow._split_generators(self, dl_manager)
45 with open(file, "rb") as f:
46 try:
---> 47 reader = pa.ipc.open_stream(f)
48 except pa.lib.ArrowInvalid:
49 reader = pa.ipc.open_file(f)
File [~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/pyarrow/ipc.py:190](http://localhost:8899/lab/tree/RTC%3Anew_world/esm3/~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/pyarrow/ipc.py#line=189), in open_stream(source, options, memory_pool)
171 def open_stream(source, *, options=None, memory_pool=None):
172 """
173 Create reader for Arrow streaming format.
174
(...)
188 A reader for the given source
189 """
--> 190 return RecordBatchStreamReader(source, options=options,
191 memory_pool=memory_pool)
File [~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/pyarrow/ipc.py:52](http://localhost:8899/lab/tree/RTC%3Anew_world/esm3/~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/pyarrow/ipc.py#line=51), in RecordBatchStreamReader.__init__(self, source, options, memory_pool)
50 def __init__(self, source, *, options=None, memory_pool=None):
51 options = _ensure_default_ipc_read_options(options)
---> 52 self._open(source, options=options, memory_pool=memory_pool)
File [~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/pyarrow/ipc.pxi:1006](http://localhost:8899/lab/tree/RTC%3Anew_world/esm3/~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/pyarrow/ipc.pxi#line=1005), in pyarrow.lib._RecordBatchStreamReader._open()
File [~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/pyarrow/error.pxi:155](http://localhost:8899/lab/tree/RTC%3Anew_world/esm3/~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/pyarrow/error.pxi#line=154), in pyarrow.lib.pyarrow_internal_check_status()
File [~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/pyarrow/error.pxi:92](http://localhost:8899/lab/tree/RTC%3Anew_world/esm3/~/miniforge3/envs/esmIne3/lib/python3.12/site-packages/pyarrow/error.pxi#line=91), in pyarrow.lib.check_status()
OSError: Invalid flatbuffers message.
```
reproduce:Here is just an example result, the real 2D matrix is the output of the ESM large model, and the matrix size is approximate
```python
import numpy as np
import pyarrow as pa
random_arrays_list = [np.random.rand(1000, 1152) for _ in range(2000)]
table = pa.Table.from_pydict({
'tensor': [tensor.tolist() for tensor in random_arrays_list]
})
import pyarrow.feather as feather
feather.write_feather(table, 'test.arrow')
from datasets import load_dataset
dataset = load_dataset("arrow", data_files='test.arrow', split="train")
```
### Expected behavior
`load_dataset` load the dataset as normal as `feather.read_feather`
```python
import pyarrow.feather as feather
feather.read_feather('tensorData/real_ResidueTensor/real_tensor_1.arrow')
```
Plus `load_dataset("parquet", data_files='test.arrow', split="train")` works fine
### Environment info
- `datasets` version: 3.2.0
- Platform: Linux-6.8.0-49-generic-x86_64-with-glibc2.39
- Python version: 3.12.3
- `huggingface_hub` version: 0.26.5
- PyArrow version: 18.1.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.9.0
| null |
https://api.github.com/repos/huggingface/datasets/issues/7346/timeline
| null |
completed
|
antecede
| 46,232,487 |
MDQ6VXNlcjQ2MjMyNDg3
|
https://avatars.githubusercontent.com/u/46232487?v=4
|
https://api.github.com/users/antecede
|
https://github.com/antecede
|
https://api.github.com/users/antecede/followers
|
https://api.github.com/users/antecede/following{/other_user}
|
https://api.github.com/users/antecede/gists{/gist_id}
|
https://api.github.com/users/antecede/starred{/owner}{/repo}
|
https://api.github.com/users/antecede/subscriptions
|
https://api.github.com/users/antecede/orgs
|
https://api.github.com/users/antecede/repos
|
https://api.github.com/users/antecede/events{/privacy}
|
https://api.github.com/users/antecede/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7346/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
lhoestq
| 42,851,186 |
MDQ6VXNlcjQyODUxMTg2
|
https://avatars.githubusercontent.com/u/42851186?v=4
|
https://api.github.com/users/lhoestq
|
https://github.com/lhoestq
|
https://api.github.com/users/lhoestq/followers
|
https://api.github.com/users/lhoestq/following{/other_user}
|
https://api.github.com/users/lhoestq/gists{/gist_id}
|
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
|
https://api.github.com/users/lhoestq/subscriptions
|
https://api.github.com/users/lhoestq/orgs
|
https://api.github.com/users/lhoestq/repos
|
https://api.github.com/users/lhoestq/events{/privacy}
|
https://api.github.com/users/lhoestq/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Thanks for reporting, it looks like an issue with `pyarrow.ipc.open_stream`\r\n\r\nCan you try installing `datasets` from this pull request and see if it helps ? https://github.com/huggingface/datasets/pull/7348",
"> Thanks for reporting, it looks like an issue with `pyarrow.ipc.open_stream`\r\n> \r\n> Can you try installing `datasets` from this pull request and see if it helps ? #7348\r\n\r\nThank you very much. Here, it also needed to be changed to `except (OSError, pa.lib.ArrowInvalid):`. And then the bug was fixed.\r\nhttps://github.com/huggingface/datasets/blob/2826a040a05e19fca894253b78a932d4fcb4a584/src/datasets/packaged_modules/arrow/arrow.py#L48",
"Cool ! we will do a new release soon :) in the meantime you can use `datasets` from `main`"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7345
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7345/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7345/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7345/events
|
https://github.com/huggingface/datasets/issues/7345
| 2,758,585,709 |
I_kwDODunzps6kbK1t
| 7,345 |
Different behaviour of IterableDataset.map vs Dataset.map with remove_columns
|
[] |
closed
| false | null |
[] | null | 1 | 1,735 | 1,736 | 1,736 |
CONTRIBUTOR
| null | null |
### Describe the bug
The following code
```python
import datasets as hf
ds1 = hf.Dataset.from_list([{'i': i} for i in [0,1]])
#ds1 = ds1.to_iterable_dataset()
ds2 = ds1.map(
lambda i: {'i': i+1},
input_columns = ['i'],
remove_columns = ['i']
)
list(ds2)
```
produces
```python
[{'i': 1}, {'i': 2}]
```
as expected. If the line that converts `ds1` to iterable is uncommented so that the `ds2` is a map of an `IterableDataset`, the result is
```python
[{},{}]
```
I expected the output to be the same as before. It seems that in the second case the removed column is not added back into the output.
The issue seems to be [here](https://github.com/huggingface/datasets/blob/6c6a82a573f946c4a81069f56446caed15cee9c2/src/datasets/iterable_dataset.py#L1093): the columns are removed after the mapping which is not what we want (or what the [documentation says](https://github.com/huggingface/datasets/blob/6c6a82a573f946c4a81069f56446caed15cee9c2/src/datasets/iterable_dataset.py#L2370)) because we want the columns removed from the transformed example but then added if the map produced them.
This is `datasets==3.2.0` and `python==3.10`
### Steps to reproduce the bug
see above
### Expected behavior
see above
### Environment info
see above
| null |
https://api.github.com/repos/huggingface/datasets/issues/7345/timeline
| null |
completed
|
vttrifonov
| 12,157,034 |
MDQ6VXNlcjEyMTU3MDM0
|
https://avatars.githubusercontent.com/u/12157034?v=4
|
https://api.github.com/users/vttrifonov
|
https://github.com/vttrifonov
|
https://api.github.com/users/vttrifonov/followers
|
https://api.github.com/users/vttrifonov/following{/other_user}
|
https://api.github.com/users/vttrifonov/gists{/gist_id}
|
https://api.github.com/users/vttrifonov/starred{/owner}{/repo}
|
https://api.github.com/users/vttrifonov/subscriptions
|
https://api.github.com/users/vttrifonov/orgs
|
https://api.github.com/users/vttrifonov/repos
|
https://api.github.com/users/vttrifonov/events{/privacy}
|
https://api.github.com/users/vttrifonov/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7345/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
lhoestq
| 42,851,186 |
MDQ6VXNlcjQyODUxMTg2
|
https://avatars.githubusercontent.com/u/42851186?v=4
|
https://api.github.com/users/lhoestq
|
https://github.com/lhoestq
|
https://api.github.com/users/lhoestq/followers
|
https://api.github.com/users/lhoestq/following{/other_user}
|
https://api.github.com/users/lhoestq/gists{/gist_id}
|
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
|
https://api.github.com/users/lhoestq/subscriptions
|
https://api.github.com/users/lhoestq/orgs
|
https://api.github.com/users/lhoestq/repos
|
https://api.github.com/users/lhoestq/events{/privacy}
|
https://api.github.com/users/lhoestq/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Good catch ! Do you think you can open a PR to fix this issue ?"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7344
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7344/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7344/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7344/events
|
https://github.com/huggingface/datasets/issues/7344
| 2,754,735,951 |
I_kwDODunzps6kMe9P
| 7,344 |
HfHubHTTPError: 429 Client Error: Too Many Requests for URL when trying to access SlimPajama-627B or c4 on TPUs
|
[] |
closed
| false | null |
[] | null | 2 | 1,734 | 1,736 | 1,736 |
NONE
| null | null |
### Describe the bug
I am trying to run some trainings on Google's TPUs using Huggingface's DataLoader on [SlimPajama-627B](https://huggingface.co/datasets/cerebras/SlimPajama-627B) and [c4](https://huggingface.co/datasets/allenai/c4), but I end up running into `429 Client Error: Too Many Requests for URL` error when I call `load_dataset`. The even odder part is that I am able to sucessfully run trainings with the [wikitext dataset](https://huggingface.co/datasets/Salesforce/wikitext). Is there something I need to setup to specifically train with SlimPajama or C4 with TPUs because I am not clear why I am getting these errors.
### Steps to reproduce the bug
These are the commands you could run to produce the error below but you will require a ClearML account (you can create one [here](https://app.clear.ml/login?redirect=%2Fdashboard)) with a queue setup to run on Google TPUs
```bash
git clone https://github.com/clankur/muGPT.git
cd muGPT
python -m train --config-name=slim_v4-32_84m.yaml +training.queue={NAME_OF_CLEARML_QUEUE}
```
The error I see:
```
Traceback (most recent call last):
File "/home/clankur/conda/envs/jax/lib/python3.10/site-packages/clearml/binding/hydra_bind.py", line 230, in _patched_task_function
return task_function(a_config, *a_args, **a_kwargs)
File "/home/clankur/.clearml/venvs-builds/3.10/task_repository/muGPT.git/train.py", line 1037, in main
main_contained(config, logger)
File "/home/clankur/.clearml/venvs-builds/3.10/task_repository/muGPT.git/train.py", line 840, in main_contained
loader = get_loader("train", config.training_data, config.training.tokens)
File "/home/clankur/.clearml/venvs-builds/3.10/task_repository/muGPT.git/input_loader.py", line 549, in get_loader
return HuggingFaceDataLoader(split, config, token_batch_params)
File "/home/clankur/.clearml/venvs-builds/3.10/task_repository/muGPT.git/input_loader.py", line 395, in __init__
self.dataset = load_dataset(
File "/home/clankur/conda/envs/jax/lib/python3.10/site-packages/datasets/load.py", line 2112, in load_dataset
builder_instance = load_dataset_builder(
File "/home/clankur/conda/envs/jax/lib/python3.10/site-packages/datasets/load.py", line 1798, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/clankur/conda/envs/jax/lib/python3.10/site-packages/datasets/load.py", line 1495, in dataset_module_factory
raise e1 from None
File "/home/clankur/conda/envs/jax/lib/python3.10/site-packages/datasets/load.py", line 1479, in dataset_module_factory
).get_module()
File "/home/clankur/conda/envs/jax/lib/python3.10/site-packages/datasets/load.py", line 1034, in get_module
else get_data_patterns(base_path, download_config=self.download_config)
File "/home/clankur/conda/envs/jax/lib/python3.10/site-packages/datasets/data_files.py", line 457, in get_data_patterns
return _get_data_files_patterns(resolver)
File "/home/clankur/conda/envs/jax/lib/python3.10/site-packages/datasets/data_files.py", line 248, in _get_data_files_patterns
data_files = pattern_resolver(pattern)
File "/home/clankur/conda/envs/jax/lib/python3.10/site-packages/datasets/data_files.py", line 340, in resolve_pattern
for filepath, info in fs.glob(pattern, detail=True).items()
File "/home/clankur/conda/envs/jax/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 409, in glob
return super().glob(path, **kwargs)
File "/home/clankur/.clearml/venvs-builds/3.10/lib/python3.10/site-packages/fsspec/spec.py", line 602, in glob
allpaths = self.find(root, maxdepth=depth, withdirs=True, detail=True, **kwargs)
File "/home/clankur/conda/envs/jax/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 429, in find
out = self._ls_tree(path, recursive=True, refresh=refresh, revision=resolved_path.revision, **kwargs)
File "/home/clankur/conda/envs/jax/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 358, in _ls_tree
self._ls_tree(
File "/home/clankur/conda/envs/jax/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 375, in _ls_tree
for path_info in tree:
File "/home/clankur/conda/envs/jax/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 3080, in list_repo_tree
for path_info in paginate(path=tree_url, headers=headers, params={"recursive": recursive, "expand": expand}):
File "/home/clankur/conda/envs/jax/lib/python3.10/site-packages/huggingface_hub/utils/_pagination.py", line 46, in paginate
hf_raise_for_status(r)
File "/home/clankur/conda/envs/jax/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 477, in hf_raise_for_status
raise _format(HfHubHTTPError, str(e), response) from e
huggingface_hub.errors.HfHubHTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/api/datasets/cerebras/SlimPajama-627B/tree/2d0accdd58c5d5511943ca1f5ff0e3eb5e293543?recursive=True&expand=True&cursor=ZXlKbWFXeGxYMjVoYldVaU9pSjBaWE4wTDJOb2RXNXJNUzlsZUdGdGNHeGxYMmh2YkdSdmRYUmZPVFEzTG1wemIyNXNMbnB6ZENKOTo2MjUw (Request ID: Root=1-67673de9-1413900606ede7712b08ef2c;1304c09c-3e69-4222-be14-f10ee709d49c)
maximum queue size reached
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
```
### Expected behavior
I'd expect the DataLoader to load from the SlimPajama-627B and c4 dataset without issue.
### Environment info
- `datasets` version: 2.14.4
- Platform: Linux-5.8.0-1035-gcp-x86_64-with-glibc2.31
- Python version: 3.10.16
- Huggingface_hub version: 0.26.5
- PyArrow version: 18.1.0
- Pandas version: 2.2.3
| null |
https://api.github.com/repos/huggingface/datasets/issues/7344/timeline
| null |
completed
|
clankur
| 9,397,233 |
MDQ6VXNlcjkzOTcyMzM=
|
https://avatars.githubusercontent.com/u/9397233?v=4
|
https://api.github.com/users/clankur
|
https://github.com/clankur
|
https://api.github.com/users/clankur/followers
|
https://api.github.com/users/clankur/following{/other_user}
|
https://api.github.com/users/clankur/gists{/gist_id}
|
https://api.github.com/users/clankur/starred{/owner}{/repo}
|
https://api.github.com/users/clankur/subscriptions
|
https://api.github.com/users/clankur/orgs
|
https://api.github.com/users/clankur/repos
|
https://api.github.com/users/clankur/events{/privacy}
|
https://api.github.com/users/clankur/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7344/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
clankur
| 9,397,233 |
MDQ6VXNlcjkzOTcyMzM=
|
https://avatars.githubusercontent.com/u/9397233?v=4
|
https://api.github.com/users/clankur
|
https://github.com/clankur
|
https://api.github.com/users/clankur/followers
|
https://api.github.com/users/clankur/following{/other_user}
|
https://api.github.com/users/clankur/gists{/gist_id}
|
https://api.github.com/users/clankur/starred{/owner}{/repo}
|
https://api.github.com/users/clankur/subscriptions
|
https://api.github.com/users/clankur/orgs
|
https://api.github.com/users/clankur/repos
|
https://api.github.com/users/clankur/events{/privacy}
|
https://api.github.com/users/clankur/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi ! This is due to your old version of `datasets` which calls HF with `expand=True`, an option that is strongly rate limited.\r\n\r\nRecent versions of `datasets` don't rely on this anymore, you can fix your issue by upgrading `datasets` :)\r\n\r\n```\r\npip install -U datasets\r\n```\r\n\r\nYou can also get maximum HF availability on your compute nodes with HF Enterprise (see [network security features](https://huggingface.co/docs/hub/enterprise-hub-network-security))",
"Upgrading fixed the issue for me. Thanks! "
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7343
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7343/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7343/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7343/events
|
https://github.com/huggingface/datasets/issues/7343
| 2,750,525,823 |
I_kwDODunzps6j8bF_
| 7,343 |
[Bug] Inconsistent behavior of data_files and data_dir in load_dataset method.
|
[] |
closed
| false | null |
[] | null | 4 | 1,734 | 1,735 | 1,735 |
NONE
| null | null |
### Describe the bug
Inconsistent operation of data_files and data_dir in load_dataset method.
### Steps to reproduce the bug
# First
I have three files, named 'train.json', 'val.json', 'test.json'.
Each one has a simple dict `{text:'aaa'}`.
Their path are `/data/train.json`, `/data/val.json`, `/data/test.json`
I load dataset with `data_files` argument:
```py
files = [os.path.join('./data',file) for file in os.listdir('./data')]
ds = load_dataset(
path='json',
data_files=files,)
```
And I get:
```py
DatasetDict({
train: Dataset({
features: ['text'],
num_rows: 3
})
})
```
However, If I load dataset with `data_dir` argument:
```py
ds = load_dataset(
path='json',
data_dir='./data',)
```
And I get:
```py
DatasetDict({
train: Dataset({
features: ['text'],
num_rows: 1
})
validation: Dataset({
features: ['text'],
num_rows: 1
})
test: Dataset({
features: ['text'],
num_rows: 1
})
})
```
Two results are not the same. Their behaviors are not equal, even if the statement [here](https://github.com/huggingface/datasets/blob/d0c152a979d91cc34b605c0298aebc650ab7dd27/src/datasets/load.py#L1790) said that their behaviors are equal.
# Second
If some filename include 'test' while others do not, `load_dataset` only return `test` dataset and others files are **abandoned**.
Given two files named `test.json` and `1.json`
Each one has a simple dict `{text:'aaa'}`.
I load the dataset using:
```py
ds = load_dataset(
path='json',
data_dir='./data',)
```
Only `test` is returned, `1.json` is missing:
```py
DatasetDict({
test: Dataset({
features: ['text'],
num_rows: 1
})
})
```
Things do not change even I manually set `split='train'`
### Expected behavior
1. Fix the above bugs.
2. Although the document says that load_dataset method will `Find which file goes into which split (e.g. train/test) based on file and directory names or on the YAML configuration`, I hope I can manually decide whether to do so. Sometimes users may accidentally put a `test` string in the filename but they just want a single `train` dataset. If the number of files in `data_dir` is huge, it's not easy to find out what cause the second situation metioned above.
### Environment info
datasets==3.2.0
Ubuntu18.84
| null |
https://api.github.com/repos/huggingface/datasets/issues/7343/timeline
| null |
completed
|
JasonCZH4
| 74,161,960 |
MDQ6VXNlcjc0MTYxOTYw
|
https://avatars.githubusercontent.com/u/74161960?v=4
|
https://api.github.com/users/JasonCZH4
|
https://github.com/JasonCZH4
|
https://api.github.com/users/JasonCZH4/followers
|
https://api.github.com/users/JasonCZH4/following{/other_user}
|
https://api.github.com/users/JasonCZH4/gists{/gist_id}
|
https://api.github.com/users/JasonCZH4/starred{/owner}{/repo}
|
https://api.github.com/users/JasonCZH4/subscriptions
|
https://api.github.com/users/JasonCZH4/orgs
|
https://api.github.com/users/JasonCZH4/repos
|
https://api.github.com/users/JasonCZH4/events{/privacy}
|
https://api.github.com/users/JasonCZH4/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7343/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
JasonCZH4
| 74,161,960 |
MDQ6VXNlcjc0MTYxOTYw
|
https://avatars.githubusercontent.com/u/74161960?v=4
|
https://api.github.com/users/JasonCZH4
|
https://github.com/JasonCZH4
|
https://api.github.com/users/JasonCZH4/followers
|
https://api.github.com/users/JasonCZH4/following{/other_user}
|
https://api.github.com/users/JasonCZH4/gists{/gist_id}
|
https://api.github.com/users/JasonCZH4/starred{/owner}{/repo}
|
https://api.github.com/users/JasonCZH4/subscriptions
|
https://api.github.com/users/JasonCZH4/orgs
|
https://api.github.com/users/JasonCZH4/repos
|
https://api.github.com/users/JasonCZH4/events{/privacy}
|
https://api.github.com/users/JasonCZH4/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi ! `data_files` with a list is equivalent to `data_files={\"train\": data_files}` with a train test only.\r\n\r\nWhen no split are specified, they are inferred based on file names, and files with no apparent split are ignored",
"Thanks for your reply!\r\n`files with no apparent split are ignored`. Is there a option that I can choose to ignored it or not as I mention aboved? Thanks!",
"To include all the files, the best way is to pass `data_files` yourself. There is no option to disable split detection at the moment",
"Thanks! I hope you guys can consider adding this option in the future. :)"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7337
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7337/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7337/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7337/events
|
https://github.com/huggingface/datasets/issues/7337
| 2,744,877,569 |
I_kwDODunzps6jm4IB
| 7,337 |
One or several metadata.jsonl were found, but not in the same directory or in a parent directory of
|
[] |
open
| false | null |
[] | null | 1 | 1,734 | 1,735 | null |
NONE
| null | null |
### Describe the bug
ImageFolder with metadata.jsonl error. I downloaded liuhaotian/LLaVA-CC3M-Pretrain-595K locally from Hugging Face. According to the tutorial in https://huggingface.co/docs/datasets/image_dataset#image-captioning, only put images.zip and metadata.jsonl containing information in the same folder. However, after loading, an error was reported: One or several metadata.jsonl were found, but not in the same directory or in a parent directory of.
The data in my jsonl file is as follows:
> {"id": "GCC_train_002448550", "file_name": "GCC_train_002448550.jpg", "conversations": [{"from": "human", "value": "<image>\nProvide a brief description of the given image."}, {"from": "gpt", "value": "a view of a city , where the flyover was proposed to reduce the increasing traffic on thursday ."}]}
### Steps to reproduce the bug
from datasets import load_dataset
image = load_dataset("imagefolder",data_dir='data/opensource_data')
### Expected behavior
success
### Environment info
datasets==3.2.0
| null |
https://api.github.com/repos/huggingface/datasets/issues/7337/timeline
| null | null |
mst272
| 67,250,532 |
MDQ6VXNlcjY3MjUwNTMy
|
https://avatars.githubusercontent.com/u/67250532?v=4
|
https://api.github.com/users/mst272
|
https://github.com/mst272
|
https://api.github.com/users/mst272/followers
|
https://api.github.com/users/mst272/following{/other_user}
|
https://api.github.com/users/mst272/gists{/gist_id}
|
https://api.github.com/users/mst272/starred{/owner}{/repo}
|
https://api.github.com/users/mst272/subscriptions
|
https://api.github.com/users/mst272/orgs
|
https://api.github.com/users/mst272/repos
|
https://api.github.com/users/mst272/events{/privacy}
|
https://api.github.com/users/mst272/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7337/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hmmm I double checked in the source code and I found a contradiction: in the current implementation the metadata file is ignored if it's not in the same archive as the zip image somehow:\r\n\r\nhttps://github.com/huggingface/datasets/blob/caa705e8bf4bedf1a956f48b545283b2ca14170a/src/datasets/packaged_modules/folder_based_builder/folder_based_builder.py#L352-L353\r\n\r\nin the tests suite the metadata file is placed inside the archive:\r\n\r\nhttps://github.com/huggingface/datasets/blob/caa705e8bf4bedf1a956f48b545283b2ca14170a/tests/packaged_modules/test_imagefolder.py#L223-L223\r\n\r\nThanks for reporting this issue, it seems the documentation is wrong and we never implemented the support for zip + metadata outside zip. We might rewrite part of this code soon though to make it more flexible, it can be a good occasion to fix this. In the meantime feel free to open a PR to fix the documentation if you'd like"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7336
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7336/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7336/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7336/events
|
https://github.com/huggingface/datasets/issues/7336
| 2,744,746,456 |
I_kwDODunzps6jmYHY
| 7,336 |
Clarify documentation or Create DatasetCard
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
open
| false | null |
[] | null | 0 | 1,734 | 1,734 | null |
NONE
| null | null |
### Feature request
I noticed that you can use a Model Card instead of a Dataset Card when pushing a dataset to the Hub, but this isn’t clearly mentioned in [the docs.](https://huggingface.co/docs/datasets/dataset_card)
- Update the docs to clarify that a Model Card can work for datasets too.
- It might be worth creating a dedicated DatasetCard module, similar to the ModelCard module, for consistency and better support.
Not sure if this belongs here or on the [Hub repo](https://github.com/huggingface/huggingface_hub), but thought I’d bring it up!
### Motivation
I just spent an hour like on [this issue](https://github.com/huggingface/trl/pull/2491) trying to create a `DatasetCard` for a script.
### Your contribution
might later
| null |
https://api.github.com/repos/huggingface/datasets/issues/7336/timeline
| null | null |
August-murr
| 145,011,209 |
U_kgDOCKSyCQ
|
https://avatars.githubusercontent.com/u/145011209?v=4
|
https://api.github.com/users/August-murr
|
https://github.com/August-murr
|
https://api.github.com/users/August-murr/followers
|
https://api.github.com/users/August-murr/following{/other_user}
|
https://api.github.com/users/August-murr/gists{/gist_id}
|
https://api.github.com/users/August-murr/starred{/owner}{/repo}
|
https://api.github.com/users/August-murr/subscriptions
|
https://api.github.com/users/August-murr/orgs
|
https://api.github.com/users/August-murr/repos
|
https://api.github.com/users/August-murr/events{/privacy}
|
https://api.github.com/users/August-murr/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7336/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7335
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7335/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7335/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7335/events
|
https://github.com/huggingface/datasets/issues/7335
| 2,743,437,260 |
I_kwDODunzps6jhYfM
| 7,335 |
Too many open files: '/root/.cache/huggingface/token'
|
[] |
open
| false | null |
[] | null | 0 | 1,734 | 1,734 | null |
NONE
| null | null |
### Describe the bug
I ran this code:
```
from datasets import load_dataset
dataset = load_dataset("common-canvas/commoncatalog-cc-by", cache_dir="/datadrive/datasets/cc", num_proc=1000)
```
And got this error.
Before it was some other file though (lie something...incomplete)
runnting
```
ulimit -n 8192
```
did not help at all.
### Steps to reproduce the bug
Run the code i sent
### Expected behavior
Should be no errors
### Environment info
linux, jupyter lab.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7335/timeline
| null | null |
kopyl
| 17,604,849 |
MDQ6VXNlcjE3NjA0ODQ5
|
https://avatars.githubusercontent.com/u/17604849?v=4
|
https://api.github.com/users/kopyl
|
https://github.com/kopyl
|
https://api.github.com/users/kopyl/followers
|
https://api.github.com/users/kopyl/following{/other_user}
|
https://api.github.com/users/kopyl/gists{/gist_id}
|
https://api.github.com/users/kopyl/starred{/owner}{/repo}
|
https://api.github.com/users/kopyl/subscriptions
|
https://api.github.com/users/kopyl/orgs
|
https://api.github.com/users/kopyl/repos
|
https://api.github.com/users/kopyl/events{/privacy}
|
https://api.github.com/users/kopyl/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7335/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7334
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7334/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7334/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7334/events
|
https://github.com/huggingface/datasets/issues/7334
| 2,740,266,503 |
I_kwDODunzps6jVSYH
| 7,334 |
TypeError: Value.__init__() missing 1 required positional argument: 'dtype'
|
[] |
open
| false | null |
[] | null | 3 | 1,734 | 1,752 | null |
NONE
| null | null |
### Describe the bug
ds = load_dataset(
"./xxx.py",
name="default",
split="train",
)
The datasets does not support debugging locally anymore...
### Steps to reproduce the bug
```
from datasets import load_dataset
ds = load_dataset(
"./repo.py",
name="default",
split="train",
)
for item in ds:
print(item)
```
It works fine for "username/repo", but it does not work for "./repo.py" when debugging locally...
Running above code template will report TypeError: Value.__init__() missing 1 required positional argument: 'dtype'
### Expected behavior
fix this bug
### Environment info
python 3.10 datasets==2.21
| null |
https://api.github.com/repos/huggingface/datasets/issues/7334/timeline
| null | null |
ghost
| 10,137 |
MDQ6VXNlcjEwMTM3
|
https://avatars.githubusercontent.com/u/10137?v=4
|
https://api.github.com/users/ghost
|
https://github.com/ghost
|
https://api.github.com/users/ghost/followers
|
https://api.github.com/users/ghost/following{/other_user}
|
https://api.github.com/users/ghost/gists{/gist_id}
|
https://api.github.com/users/ghost/starred{/owner}{/repo}
|
https://api.github.com/users/ghost/subscriptions
|
https://api.github.com/users/ghost/orgs
|
https://api.github.com/users/ghost/repos
|
https://api.github.com/users/ghost/events{/privacy}
|
https://api.github.com/users/ghost/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7334/reactions
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"same error \n```\ndata = load_dataset('/opt/deepseek_R1_finetune/hf_datasets/openai/gsm8k', 'main')[split] \n```",
"> same error\n> \n> ```\n> data = load_dataset('/opt/deepseek_R1_finetune/hf_datasets/openai/gsm8k', 'main')[split] \n> ```\n\nhttps://github.com/huggingface/open-r1/issues/204 this help me",
"Solved by delete `dataset_infos.json` file in dataset dir, or you can transfer datasets from Hugginface to Modelscope by [hf-ms-transfer](https://github.com/wa008/hf-ms-transfer), which will solve this problem by default. "
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7327
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7327/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7327/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7327/events
|
https://github.com/huggingface/datasets/issues/7327
| 2,738,514,909 |
I_kwDODunzps6jOmvd
| 7,327 |
.map() is not caching and ram goes OOM
|
[] |
open
| false | null |
[] | null | 1 | 1,734 | 1,739 | null |
NONE
| null | null |
### Describe the bug
Im trying to run a fairly simple map that is converting a dataset into numpy arrays. however, it just piles up on memory and doesnt write to disk. Ive tried multiple cache techniques such as specifying the cache dir, setting max mem, +++ but none seem to work. What am I missing here?
### Steps to reproduce the bug
```
from pydub import AudioSegment
import io
import base64
import numpy as np
import os
CACHE_PATH = "/mnt/extdisk/cache" # "/root/.cache/huggingface/"#
os.environ["HF_HOME"] = CACHE_PATH
import datasets
import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
# Create a handler for Jupyter notebook
handler = logging.StreamHandler()
formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
logger.addHandler(handler)
#datasets.config.IN_MEMORY_MAX_SIZE= 1000#*(2**30) #50 gb
print(datasets.config.HF_CACHE_HOME)
print(datasets.config.HF_DATASETS_CACHE)
# Decode the base64 string into bytes
def convert_mp3_to_audio_segment(example):
"""
example = ds['train'][0]
"""
try:
audio_data_bytes = base64.b64decode(example['audio'])
# Use pydub to load the MP3 audio from the decoded bytes
audio_segment = AudioSegment.from_file(io.BytesIO(audio_data_bytes), format="mp3")
# Resample to 24_000
audio_segment = audio_segment.set_frame_rate(24_000)
audio = {'sampling_rate' : audio_segment.frame_rate,
'array' : np.array(audio_segment.get_array_of_samples(), dtype="float")}
del audio_segment
duration = len(audio['array']) / audio['sampling_rate']
except Exception as e:
logger.warning(f"Failed to convert audio for {example['id']}. Error: {e}")
audio = {'sampling_rate' : 0,
'array' : np.array([]), duration : 0}
return {'audio' : audio, 'duration' : duration}
ds = datasets.load_dataset("NbAiLab/nb_distil_speech_noconcat_stortinget", cache_dir=CACHE_PATH, keep_in_memory=False)
#%%
num_proc=32
ds_processed = (
ds
#.select(range(10))
.map(convert_mp3_to_audio_segment, num_proc=num_proc, desc="Converting mp3 to audio segment") #, cache_file_name=f"{CACHE_PATH}/stortinget_audio" # , cache_file_name="test"
)
```
### Expected behavior
the map should write to disk
### Environment info
- `datasets` version: 3.2.0
- Platform: Linux-6.8.0-45-generic-x86_64-with-glibc2.39
- Python version: 3.12.7
- `huggingface_hub` version: 0.26.3
- PyArrow version: 18.1.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.9.0
| null |
https://api.github.com/repos/huggingface/datasets/issues/7327/timeline
| null | null |
simeneide
| 7,136,076 |
MDQ6VXNlcjcxMzYwNzY=
|
https://avatars.githubusercontent.com/u/7136076?v=4
|
https://api.github.com/users/simeneide
|
https://github.com/simeneide
|
https://api.github.com/users/simeneide/followers
|
https://api.github.com/users/simeneide/following{/other_user}
|
https://api.github.com/users/simeneide/gists{/gist_id}
|
https://api.github.com/users/simeneide/starred{/owner}{/repo}
|
https://api.github.com/users/simeneide/subscriptions
|
https://api.github.com/users/simeneide/orgs
|
https://api.github.com/users/simeneide/repos
|
https://api.github.com/users/simeneide/events{/privacy}
|
https://api.github.com/users/simeneide/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7327/reactions
| 3 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"I have the same issue - any update on this?"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7326
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7326/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7326/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7326/events
|
https://github.com/huggingface/datasets/issues/7326
| 2,738,188,902 |
I_kwDODunzps6jNXJm
| 7,326 |
Remove upper bound for fsspec
|
[] |
open
| false | null |
[] | null | 1 | 1,734 | 1,735 | null |
NONE
| null | null |
### Describe the bug
As also raised by @cyyever in https://github.com/huggingface/datasets/pull/7296 and @NeilGirdhar in https://github.com/huggingface/datasets/commit/d5468836fe94e8be1ae093397dd43d4a2503b926#commitcomment-140952162 , `datasets` has a problematic version constraint on `fsspec`.
In our case this causes (unnecessary?) troubles due to a race condition bug in that version of the corresponding `gcsfs` plugin, that causes deadlocks: https://github.com/fsspec/gcsfs/pull/643
We just use a version override to ignore the constraint from `datasets`, but imho the version constraint could just be removed in the first place?
The last few PRs bumping the upper bound were basically uneventful:
* https://github.com/huggingface/datasets/pull/7219
* https://github.com/huggingface/datasets/pull/6921
* https://github.com/huggingface/datasets/pull/6747
### Steps to reproduce the bug
-
### Expected behavior
Installing `fsspec>=2024.10.0` along `datasets` should be possible without overwriting constraints.
### Environment info
All recent datasets versions
| null |
https://api.github.com/repos/huggingface/datasets/issues/7326/timeline
| null | null |
fellhorn
| 26,092,524 |
MDQ6VXNlcjI2MDkyNTI0
|
https://avatars.githubusercontent.com/u/26092524?v=4
|
https://api.github.com/users/fellhorn
|
https://github.com/fellhorn
|
https://api.github.com/users/fellhorn/followers
|
https://api.github.com/users/fellhorn/following{/other_user}
|
https://api.github.com/users/fellhorn/gists{/gist_id}
|
https://api.github.com/users/fellhorn/starred{/owner}{/repo}
|
https://api.github.com/users/fellhorn/subscriptions
|
https://api.github.com/users/fellhorn/orgs
|
https://api.github.com/users/fellhorn/repos
|
https://api.github.com/users/fellhorn/events{/privacy}
|
https://api.github.com/users/fellhorn/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7326/reactions
| 3 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Unfortunately `fsspec` versioning allows breaking changes across version and there is no way we can keep it without constrains at the moment. It already broke `datasets` once in the past. Maybe one day once `fsspec` decides on a stable and future proof API but I don't think this will happen anytime soon\r\n\r\nedit: bumped to 2024.10.0 in https://github.com/huggingface/datasets/pull/7352"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7323
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7323/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7323/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7323/events
|
https://github.com/huggingface/datasets/issues/7323
| 2,736,008,698 |
I_kwDODunzps6jFC36
| 7,323 |
Unexpected cache behaviour using load_dataset
|
[] |
closed
| false | null |
[] | null | 1 | 1,734 | 1,738 | 1,738 |
NONE
| null | null |
### Describe the bug
Following the (Cache management)[https://huggingface.co/docs/datasets/en/cache] docu and previous behaviour from datasets version 2.18.0, one is able to change the cache directory. Previously, all downloaded/extracted/etc files were found in this folder. As i have recently update to the latest version this is not the case anymore. Downloaded files are stored in `~/.cache/huggingface/hub`.
Providing the `cache_dir` argument in `load_dataset` the cache directory is created and there are some files but the bulk is still in `~/.cache/huggingface/hub`.
I believe this could be solved by adding the cache_dir argument [here](https://github.com/huggingface/datasets/blob/fdda5585ab18ea1292547f36c969d12c408ab842/src/datasets/utils/file_utils.py#L188)
### Steps to reproduce the bug
For example using https://huggingface.co/datasets/ashraq/esc50:
```python
from datasets import load_dataset
ds = load_dataset("ashraq/esc50", "default", cache_dir="~/custom/cache/path/esc50")
```
### Expected behavior
I would expect the bulk of files related to the dataset to be stored somewhere in `~/custom/cache/path/esc50`, but it seems they are in `~/.cache/huggingface/hub/datasets--ashraq--esc50`.
### Environment info
- `datasets` version: 3.2.0
- Platform: Linux-5.14.0-503.15.1.el9_5.x86_64-x86_64-with-glibc2.34
- Python version: 3.10.14
- `huggingface_hub` version: 0.26.5
- PyArrow version: 17.0.0
- Pandas version: 2.2.2
- `fsspec` version: 2024.6.1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7323/timeline
| null |
completed
|
Moritz-Wirth
| 74,349,080 |
MDQ6VXNlcjc0MzQ5MDgw
|
https://avatars.githubusercontent.com/u/74349080?v=4
|
https://api.github.com/users/Moritz-Wirth
|
https://github.com/Moritz-Wirth
|
https://api.github.com/users/Moritz-Wirth/followers
|
https://api.github.com/users/Moritz-Wirth/following{/other_user}
|
https://api.github.com/users/Moritz-Wirth/gists{/gist_id}
|
https://api.github.com/users/Moritz-Wirth/starred{/owner}{/repo}
|
https://api.github.com/users/Moritz-Wirth/subscriptions
|
https://api.github.com/users/Moritz-Wirth/orgs
|
https://api.github.com/users/Moritz-Wirth/repos
|
https://api.github.com/users/Moritz-Wirth/events{/privacy}
|
https://api.github.com/users/Moritz-Wirth/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7323/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
Moritz-Wirth
| 74,349,080 |
MDQ6VXNlcjc0MzQ5MDgw
|
https://avatars.githubusercontent.com/u/74349080?v=4
|
https://api.github.com/users/Moritz-Wirth
|
https://github.com/Moritz-Wirth
|
https://api.github.com/users/Moritz-Wirth/followers
|
https://api.github.com/users/Moritz-Wirth/following{/other_user}
|
https://api.github.com/users/Moritz-Wirth/gists{/gist_id}
|
https://api.github.com/users/Moritz-Wirth/starred{/owner}{/repo}
|
https://api.github.com/users/Moritz-Wirth/subscriptions
|
https://api.github.com/users/Moritz-Wirth/orgs
|
https://api.github.com/users/Moritz-Wirth/repos
|
https://api.github.com/users/Moritz-Wirth/events{/privacy}
|
https://api.github.com/users/Moritz-Wirth/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi ! Since `datasets` 3.x, the `datasets` specific files are in `cache_dir=` and the HF files are cached using `huggingface_hub` and you can set its cache directory using the `HF_HOME` environment variable.\r\n\r\nThey are independent, for example you can delete the Hub cache (containing downloaded files) but still reload your cached datasets from the `datasets` cache (containing prepared datasets in Arrow format)"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7322
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7322/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7322/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7322/events
|
https://github.com/huggingface/datasets/issues/7322
| 2,732,254,868 |
I_kwDODunzps6i2uaU
| 7,322 |
ArrowInvalid: JSON parse error: Column() changed from object to array in row 0
|
[] |
open
| false | null |
[] | null | 4 | 1,733 | 1,752 | null |
NONE
| null | null |
### Describe the bug
Encountering an error while loading the ```liuhaotian/LLaVA-Instruct-150K dataset```.
### Steps to reproduce the bug
```
from datasets import load_dataset
fw =load_dataset("liuhaotian/LLaVA-Instruct-150K")
```
Error:
```
ArrowInvalid Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/datasets/packaged_modules/json/json.py](https://localhost:8080/#) in _generate_tables(self, files)
136 try:
--> 137 pa_table = paj.read_json(
138 io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size)
20 frames
ArrowInvalid: JSON parse error: Column() changed from object to array in row 0
During handling of the above exception, another exception occurred:
ArrowTypeError Traceback (most recent call last)
ArrowTypeError: ("Expected bytes, got a 'int' object", 'Conversion failed for column id with type object')
The above exception was the direct cause of the following exception:
DatasetGenerationError Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id)
1895 if isinstance(e, DatasetGenerationError):
1896 raise
-> 1897 raise DatasetGenerationError("An error occurred while generating the dataset") from e
1898
1899 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths)
DatasetGenerationError: An error occurred while generating the dataset
```
### Expected behavior
I have tried loading the dataset both on my own server and on Colab, and encountered errors in both instances.
### Environment info
```
- `datasets` version: 3.2.0
- Platform: Linux-6.1.85+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.26.3
- PyArrow version: 17.0.0
- Pandas version: 2.2.2
- `fsspec` version: 2024.9.0
```
| null |
https://api.github.com/repos/huggingface/datasets/issues/7322/timeline
| null | null |
Polarisamoon
| 41,767,521 |
MDQ6VXNlcjQxNzY3NTIx
|
https://avatars.githubusercontent.com/u/41767521?v=4
|
https://api.github.com/users/Polarisamoon
|
https://github.com/Polarisamoon
|
https://api.github.com/users/Polarisamoon/followers
|
https://api.github.com/users/Polarisamoon/following{/other_user}
|
https://api.github.com/users/Polarisamoon/gists{/gist_id}
|
https://api.github.com/users/Polarisamoon/starred{/owner}{/repo}
|
https://api.github.com/users/Polarisamoon/subscriptions
|
https://api.github.com/users/Polarisamoon/orgs
|
https://api.github.com/users/Polarisamoon/repos
|
https://api.github.com/users/Polarisamoon/events{/privacy}
|
https://api.github.com/users/Polarisamoon/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7322/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi ! `datasets` uses Arrow under the hood which expects each column and array to have fixed types that don't change across rows of a dataset, which is why we get this error. This dataset in particular doesn't have a format compatible with Arrow unfortunately. Don't hesitate to open a discussion or PR on HF to fix the dataset",
"@lhoestq Is it correct to assume that most multimodal datasets with variable number of images across conversations are not compatible with Arrow ? \n\nI’m running into a problem while trying to format multimodal datasets (image + text) using the Hugging Face datasets library. Specifically, I’m working with a structure where conversations include both images and text messages. When I convert my dataset from a Python dict to a Hugging Face Dataset, I’m seeing unexpected None values being inserted for some fields that aren’t relevant for a given message (e.g., \"text\": None in image messages). Here’s what seems to be happening:\n\n🔍 What’s going wrong\n\nHugging Face datasets (backed by Apache Arrow) tries to flatten the schema across all samples. That means it enforces a fixed set of fields across the dataset – even if some of them are None for a given entry. Since my dataset contains heterogeneous conversation messages (some with images, others with text), Arrow is injecting None for whichever attributes don’t exist in each message type to preserve a unified schema.\n\nThis results in a lot of meaningless or misleading Nones across the dataset, and breaks logic further down the pipeline – in particular, it causes the qwen_vl_utils functions (like process_vision_info) to crash or misbehave.\n\n\n🤔 Workarounds considered\n\nI could stick with raw JSON, which preserves the heterogeneous structure properly. But that means giving up all the nice features of datasets and Arrow (e.g. streaming, map/filter, etc.), which feels like a shame.\n\n❓My question\n\nDo you know of a clean way to define a flexible schema with Hugging Face Datasets – maybe using nested structures or dynamic fields – so that each conversation message doesn’t get forced into a flat structure with irrelevant keys? Or should I just stick with JSON for this kind of multimodal case?\n\nLet me know if you’ve run into this before or have any tips!\n",
"Datasets without fixed types are harder to use in many data frameworks unfortunately. You will have to handle the case with None values if you want to use Arrow/`datasets` (or any other framework using Arrow like spark, ray, dask). **IMO the short term solution is to fix qwen_vl_utils / process_vision_info.**\n\nAlternatively we can explore adding the Arrow `Json` type to `datasets`, but doesn't allow having image types in the Json object so I don't think this is the right solution.",
"I totally share the analysis, I am happy to try to help with this! I am currently using Unsloth so it is the `UnslothVisionDataCollator` which has almost the same logic as `qwen_vl_utils.process_vision_info`. Is there a Huggingface class I could patch too ? "
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7321
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7321/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7321/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7321/events
|
https://github.com/huggingface/datasets/issues/7321
| 2,731,626,760 |
I_kwDODunzps6i0VEI
| 7,321 |
ImportError: cannot import name 'set_caching_enabled' from 'datasets'
|
[] |
open
| false | null |
[] | null | 2 | 1,733 | 1,733 | null |
NONE
| null | null |
### Describe the bug
Traceback (most recent call last):
File "/usr/local/lib/python3.10/runpy.py", line 187, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/local/lib/python3.10/runpy.py", line 110, in _get_module_details
__import__(pkg_name)
File "/home/Medusa/axolotl/src/axolotl/cli/__init__.py", line 23, in <module>
from axolotl.train import TrainDatasetMeta
File "/home/Medusa/axolotl/src/axolotl/train.py", line 23, in <module>
from axolotl.utils.trainer import setup_trainer
File "/home/Medusa/axolotl/src/axolotl/utils/trainer.py", line 13, in <module>
from datasets import set_caching_enabled
ImportError: cannot import name 'set_caching_enabled' from 'datasets' (/usr/local/lib/python3.10/site-packages/datasets/__init__.py)
### Steps to reproduce the bug
1、axolotl
2、accelerate launch -m axolotl.cli.train examples/medusa/qwen_lora_stage1.yml
### Expected behavior
enable datasets
### Environment info
python3.10
| null |
https://api.github.com/repos/huggingface/datasets/issues/7321/timeline
| null | null |
sankexin
| 33,318,353 |
MDQ6VXNlcjMzMzE4MzUz
|
https://avatars.githubusercontent.com/u/33318353?v=4
|
https://api.github.com/users/sankexin
|
https://github.com/sankexin
|
https://api.github.com/users/sankexin/followers
|
https://api.github.com/users/sankexin/following{/other_user}
|
https://api.github.com/users/sankexin/gists{/gist_id}
|
https://api.github.com/users/sankexin/starred{/owner}{/repo}
|
https://api.github.com/users/sankexin/subscriptions
|
https://api.github.com/users/sankexin/orgs
|
https://api.github.com/users/sankexin/repos
|
https://api.github.com/users/sankexin/events{/privacy}
|
https://api.github.com/users/sankexin/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7321/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"pip install datasets==2.18.0",
"Hi ! I think you need to update axolotl"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7320
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7320/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7320/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7320/events
|
https://github.com/huggingface/datasets/issues/7320
| 2,731,112,100 |
I_kwDODunzps6iyXak
| 7,320 |
ValueError: You should supply an encoding or a list of encodings to this method that includes input_ids, but you provided ['label']
|
[] |
closed
| false | null |
[] | null | 1 | 1,733 | 1,733 | 1,733 |
NONE
| null | null |
### Describe the bug
I am trying to create a PEFT model from DISTILBERT model, and run a training loop. However, the trainer.train() is giving me this error: ValueError: You should supply an encoding or a list of encodings to this method that includes input_ids, but you provided ['label']
Here is my code:
### Steps to reproduce the bug
#Creating a PEFT Config
from peft import LoraConfig
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from peft import get_peft_model
lora_config = LoraConfig(
task_type="SEQ_CLASS",
r=8,
lora_alpha=32,
target_modules=["q_lin", "k_lin", "v_lin"],
lora_dropout=0.01,
)
#Converting a Transformers Model into a PEFT Model
model = AutoModelForSequenceClassification.from_pretrained(
"distilbert-base-uncased",
num_labels=2, #Binary classification, 1 = positive, 0 = negative
)
lora_model = get_peft_model(model, lora_config)
print(lora_model)
Tokenize data set
from datasets import load_dataset
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
# Load the train and test splits dataset
dataset = load_dataset("fancyzhx/amazon_polarity")
#create a smaller subset for train and test
subset_size = 5000
small_train_dataset = dataset["train"].shuffle(seed=42).select(range(subset_size))
small_test_dataset = dataset["test"].shuffle(seed=42).select(range(subset_size))
#Tokenize data
def tokenize_function(example):
return tokenizer(example["content"], padding="max_length", truncation=True)
tokenized_train_dataset = small_train_dataset.map(tokenize_function, batched=True)
tokenized_test_dataset = small_test_dataset.map(tokenize_function, batched=True)
train_lora = tokenized_train_dataset.rename_column('label', 'labels')
test_lora = tokenized_test_dataset.rename_column('label', 'labels')
print(tokenized_train_dataset.column_names)
print(tokenized_test_dataset.column_names)
#Train the PEFT model
import numpy as np
from transformers import Trainer, TrainingArguments, default_data_collator, DataCollatorWithPadding
from datasets import load_dataset
from transformers import AutoTokenizer, AutoModelForSequenceClassification
def compute_metrics(eval_pred):
predictions, labels = eval_pred
predictions = np.argmax(predictions, axis=1)
return {"accuracy": (predictions == labels).mean()}
trainer = Trainer(
model=lora_model,
args=TrainingArguments(
output_dir=".",
learning_rate=2e-3,
# Reduce the batch size if you don't have enough memory
per_device_train_batch_size=1,
per_device_eval_batch_size=1,
num_train_epochs=3,
weight_decay=0.01,
evaluation_strategy="epoch",
save_strategy="epoch",
load_best_model_at_end=True,
),
train_dataset=tokenized_train_dataset,
eval_dataset=tokenized_test_dataset,
tokenizer=tokenizer,
data_collator=DataCollatorWithPadding(tokenizer=tokenizer, return_tensors="pt"),
compute_metrics=compute_metrics,
)
trainer.train()
### Expected behavior
Example of output:
[558/558 01:04, Epoch XX]
Epoch | Training Loss | Validation Loss | Accuracy
-- | -- | -- | --
1 | No log | 0.046478 | 0.988341
2 | 0.052800 | 0.048840 | 0.988341
### Environment info
Using python and jupyter notbook
| null |
https://api.github.com/repos/huggingface/datasets/issues/7320/timeline
| null |
completed
|
atrompeterog
| 38,381,084 |
MDQ6VXNlcjM4MzgxMDg0
|
https://avatars.githubusercontent.com/u/38381084?v=4
|
https://api.github.com/users/atrompeterog
|
https://github.com/atrompeterog
|
https://api.github.com/users/atrompeterog/followers
|
https://api.github.com/users/atrompeterog/following{/other_user}
|
https://api.github.com/users/atrompeterog/gists{/gist_id}
|
https://api.github.com/users/atrompeterog/starred{/owner}{/repo}
|
https://api.github.com/users/atrompeterog/subscriptions
|
https://api.github.com/users/atrompeterog/orgs
|
https://api.github.com/users/atrompeterog/repos
|
https://api.github.com/users/atrompeterog/events{/privacy}
|
https://api.github.com/users/atrompeterog/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7320/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
atrompeterog
| 38,381,084 |
MDQ6VXNlcjM4MzgxMDg0
|
https://avatars.githubusercontent.com/u/38381084?v=4
|
https://api.github.com/users/atrompeterog
|
https://github.com/atrompeterog
|
https://api.github.com/users/atrompeterog/followers
|
https://api.github.com/users/atrompeterog/following{/other_user}
|
https://api.github.com/users/atrompeterog/gists{/gist_id}
|
https://api.github.com/users/atrompeterog/starred{/owner}{/repo}
|
https://api.github.com/users/atrompeterog/subscriptions
|
https://api.github.com/users/atrompeterog/orgs
|
https://api.github.com/users/atrompeterog/repos
|
https://api.github.com/users/atrompeterog/events{/privacy}
|
https://api.github.com/users/atrompeterog/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Now i have other error"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7318
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7318/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7318/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7318/events
|
https://github.com/huggingface/datasets/issues/7318
| 2,730,676,278 |
I_kwDODunzps6iwtA2
| 7,318 |
Introduce support for PDFs
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
open
| false | null |
[] | null | 6 | 1,733 | 1,734 | null |
CONTRIBUTOR
| null | null |
### Feature request
The idea (discussed in the Discord server with @lhoestq ) is to have a Pdf type like Image/Audio/Video. For example [Video](https://github.com/huggingface/datasets/blob/main/src/datasets/features/video.py) was recently added and contains how to decode a video file encoded in a dictionary like {"path": ..., "bytes": ...} as a VideoReader using decord. We want to do the same with pdf and get a [pypdfium2.PdfDocument](https://pypdfium2.readthedocs.io/en/stable/_modules/pypdfium2/_helpers/document.html#PdfDocument).
### Motivation
In many cases PDFs contain very valuable information beyond text (e.g. images, figures). Support for PDFs would help create datasets where all the information is preserved.
### Your contribution
I can start the implementation of the Pdf type :)
| null |
https://api.github.com/repos/huggingface/datasets/issues/7318/timeline
| null | null |
yabramuvdi
| 4,812,761 |
MDQ6VXNlcjQ4MTI3NjE=
|
https://avatars.githubusercontent.com/u/4812761?v=4
|
https://api.github.com/users/yabramuvdi
|
https://github.com/yabramuvdi
|
https://api.github.com/users/yabramuvdi/followers
|
https://api.github.com/users/yabramuvdi/following{/other_user}
|
https://api.github.com/users/yabramuvdi/gists{/gist_id}
|
https://api.github.com/users/yabramuvdi/starred{/owner}{/repo}
|
https://api.github.com/users/yabramuvdi/subscriptions
|
https://api.github.com/users/yabramuvdi/orgs
|
https://api.github.com/users/yabramuvdi/repos
|
https://api.github.com/users/yabramuvdi/events{/privacy}
|
https://api.github.com/users/yabramuvdi/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7318/reactions
| 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"#self-assign",
"Awesome ! Let me know if you have any question or if I can help :)\r\n\r\ncc @AndreaFrancis as well for viz",
"Other candidates libraries for the Pdf type: PyMuPDF pypdf and pdfplumber\r\n\r\nEDIT: Pymupdf looks like a good choice when it comes to maturity + performance + versatility BUT the license is maybe an issue, and pypdf, pypdfium2 or pdfplumber are good options imo",
"Related to https://github.com/huggingface/datasets/issues/7058",
"PyMuPDF is AGPL licensed, so we can't use it. I will move forward with [pdfplumber](https://github.com/jsvine/pdfplumber?tab=readme-ov-file#python-library).",
"Hi both! I have made a pull request with a first basic implementation of the Pdf feature. I followed closely what I saw on the Video and Image features. It is my first time contributing so any comments are very welcomed. I think it would be useful to outline together what additional things we can implement (e.g. enabling parsing of the pdf). Thanks :) "
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7313
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7313/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7313/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7313/events
|
https://github.com/huggingface/datasets/issues/7313
| 2,726,240,634 |
I_kwDODunzps6ifyF6
| 7,313 |
Cannot create a dataset with relative audio path
|
[] |
open
| false | null |
[] | null | 4 | 1,733 | 1,745 | null |
NONE
| null | null |
### Describe the bug
Hello! I want to create a dataset of parquet files, with audios stored as separate .mp3 files. However, it says "No such file or directory" (see the reproducing code).
### Steps to reproduce the bug
Creating a dataset
```
from pathlib import Path
from datasets import Dataset, load_dataset, Audio
Path('my_dataset/audio').mkdir(parents=True, exist_ok=True)
Path('my_dataset/audio/file.mp3').touch(exist_ok=True)
Dataset.from_list(
[{'audio': {'path': 'audio/file.mp3'}}]
).to_parquet('my_dataset/data.parquet')
```
Result:
```
# my_dataset
# ├── audio
# │ └── file.mp3
# └── data.parquet
```
Trying to load the dataset
```
dataset = (
load_dataset('my_dataset', split='train')
.cast_column('audio', Audio(sampling_rate=16_000))
)
dataset[0]
>>> FileNotFoundError: [Errno 2] No such file or directory: 'audio/file.mp3'
```
### Expected behavior
I expect the dataset to load correctly.
I've found 2 workarounds, but they are not very good:
1. I can specify an absolute path to the audio, however, when I move the folder or upload to HF it will stop working.
2. I can set `'path': 'file.mp3'`, and load with `load_dataset('my_dataset', data_dir='audio')` - it seems to work, but does this mean that anyone from Hugging Face who wants to use this dataset should also pass the `data_dir` argument, otherwise it won't work?
### Environment info
datasets 3.1.0, Ubuntu 24.04.1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7313/timeline
| null | null |
sedol1339
| 5,188,731 |
MDQ6VXNlcjUxODg3MzE=
|
https://avatars.githubusercontent.com/u/5188731?v=4
|
https://api.github.com/users/sedol1339
|
https://github.com/sedol1339
|
https://api.github.com/users/sedol1339/followers
|
https://api.github.com/users/sedol1339/following{/other_user}
|
https://api.github.com/users/sedol1339/gists{/gist_id}
|
https://api.github.com/users/sedol1339/starred{/owner}{/repo}
|
https://api.github.com/users/sedol1339/subscriptions
|
https://api.github.com/users/sedol1339/orgs
|
https://api.github.com/users/sedol1339/repos
|
https://api.github.com/users/sedol1339/events{/privacy}
|
https://api.github.com/users/sedol1339/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7313/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hello ! when you `cast_column` you need the paths to be absolute paths or relative paths to your working directory, not the original dataset directory.\r\n\r\nThough I'd recommend structuring your dataset as an AudioFolder which automatically links a metadata.jsonl or csv to the audio files via relative paths **within** the dataset repository: https://huggingface.co/docs/datasets/v3.2.0/en/audio_load#audiofolder",
"@lhoestq thank you, but there are two problems with using AudioFolder:\r\n1. It is said that AudioFolder requires metadata.csv. However, my datset is too large and contains nested and np.ndarray fields, so I can't use csv.\r\n2. It is said that I need to load the dataset with `load_dataset(\"audiofolder\", ...)`. However, if possible, I want my dataset to be loaded as usual with `load_dataset(dataset_name)` after I upload if to HF.",
"You can use metadata.jsonl if you have nested data :)\r\n\r\nAnd actually if you have a dataset structured as an AudioFolder then `load_dataset(dataset_name)` does work after uploading to HF",
"I have created an audio dataset. In my repo, I have explained the steps and structure. An example dataset is also available in the repo. https://github.com/pr0mila/ParquetToHuggingFace "
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7311
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7311/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7311/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7311/events
|
https://github.com/huggingface/datasets/issues/7311
| 2,725,002,630 |
I_kwDODunzps6ibD2G
| 7,311 |
How to get the original dataset name with username?
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
open
| false | null |
[] | null | 2 | 1,733 | 1,736 | null |
CONTRIBUTOR
| null | null |
### Feature request
The issue is related to ray data https://github.com/ray-project/ray/issues/49008 which it requires to check if the dataset is the original one just after `load_dataset` and parquet files are already available on hf hub.
The solution used now is to get the dataset name, config and split, then `load_dataset` again and check the fingerprint. But it's unable to get the correct dataset name if it contains username. So how to get the dataset name with username prefix, or is there another way to query if a dataset is the original one with parquet available?
@lhoestq
### Motivation
https://github.com/ray-project/ray/issues/49008
### Your contribution
Would like to fix that.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7311/timeline
| null | null |
npuichigo
| 11,533,479 |
MDQ6VXNlcjExNTMzNDc5
|
https://avatars.githubusercontent.com/u/11533479?v=4
|
https://api.github.com/users/npuichigo
|
https://github.com/npuichigo
|
https://api.github.com/users/npuichigo/followers
|
https://api.github.com/users/npuichigo/following{/other_user}
|
https://api.github.com/users/npuichigo/gists{/gist_id}
|
https://api.github.com/users/npuichigo/starred{/owner}{/repo}
|
https://api.github.com/users/npuichigo/subscriptions
|
https://api.github.com/users/npuichigo/orgs
|
https://api.github.com/users/npuichigo/repos
|
https://api.github.com/users/npuichigo/events{/privacy}
|
https://api.github.com/users/npuichigo/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7311/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi ! why not pass the dataset id to Ray and let it check the parquet files ? Or pass the parquet files lists directly ?",
"I'm not sure why ray design an API like this to accept a `Dataset` object, so they need to verify the `Dataset` is the original one and use the `DatasetInfo` to query the huggingface hub. I'll advise the ray data team to use dataset id instead of dataset for the `HuggingFaceDatasource` API."
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7310
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7310/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7310/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7310/events
|
https://github.com/huggingface/datasets/issues/7310
| 2,724,830,603 |
I_kwDODunzps6iaZ2L
| 7,310 |
Enable the Audio Feature to decode / read with an offset + duration
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
open
| false | null |
[] | null | 2 | 1,733 | 1,733 | null |
NONE
| null | null |
### Feature request
For most large speech dataset, we do not wish to generate hundreds of millions of small audio samples. Instead, it is quite common to provide larger audio files with frame offset (soundfile start and stop arguments). We should be able to pass these arguments to Audio() (column ID corresponding in the dataset row).
### Motivation
I am currently generating a fairly big dataset to .parquet(). Unfortunately, it does not work because all existing functions load the whole .wav file corresponding to the row. All my attempts at bypassing this failed. We should be able to put in the Table only the bytes corresponding to what soundfile reads with an offset (and subset of the audio file).
### Your contribution
I can totally test whatever code on my large dataset creation script.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7310/timeline
| null | null |
TParcollet
| 11,910,731 |
MDQ6VXNlcjExOTEwNzMx
|
https://avatars.githubusercontent.com/u/11910731?v=4
|
https://api.github.com/users/TParcollet
|
https://github.com/TParcollet
|
https://api.github.com/users/TParcollet/followers
|
https://api.github.com/users/TParcollet/following{/other_user}
|
https://api.github.com/users/TParcollet/gists{/gist_id}
|
https://api.github.com/users/TParcollet/starred{/owner}{/repo}
|
https://api.github.com/users/TParcollet/subscriptions
|
https://api.github.com/users/TParcollet/orgs
|
https://api.github.com/users/TParcollet/repos
|
https://api.github.com/users/TParcollet/events{/privacy}
|
https://api.github.com/users/TParcollet/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7310/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi ! What about having audio + start + duration columns and enable something like this ?\r\n\r\n```python\r\nfor example in ds:\r\n array = example[\"audio\"].read(start=example[\"start\"], frames=example[\"duration\"])\r\n```",
"Hi @lhoestq, this would work with a file-based dataset but would be terrible for a sharded one as it would duplicate the large audio file many times. Also, very long audio files are not embedded very well in the parquet file, even with large_binary(). It crashed a few times for me until I switched to one sample == one file :-( "
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7315
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7315/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7315/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7315/events
|
https://github.com/huggingface/datasets/issues/7315
| 2,729,738,963 |
I_kwDODunzps6itILT
| 7,315 |
Allow manual configuration of Dataset Viewer for datasets not created with the `datasets` library
|
[] |
open
| false | null |
[] | null | 13 | 1,733 | 1,733 | null |
NONE
| null | null |
#### **Problem Description**
Currently, the Hugging Face Dataset Viewer automatically interprets dataset fields for datasets created with the `datasets` library. However, for datasets pushed directly via `git`, the Viewer:
- Defaults to generic columns like `label` with `null` values if no explicit mapping is provided.
- Does not allow dataset creators to configure field mappings or suppress default fields unless the dataset is recreated and pushed using the `datasets` library.
This creates a limitation for creators who:
- Use custom workflows to prepare datasets (e.g., manifest files with audio-transcription mappings).
- Push large datasets directly via `git` and cannot easily restructure them to conform to the `datasets` library format.
#### **Proposed Solution**
Introduce a feature that allows dataset creators to manually configure the Dataset Viewer behavior for datasets not created with the `datasets` library. This could be achieved by:
1. **Using the YAML Metadata in `README.md`:**
- Add support for defining the dataset's field mappings directly in the `README.md` YAML section.
- Example:
```yaml
viewer:
fields:
- name: "audio"
type: "audio_path" / "text"
source: "manifest['audio']"
- name: "bambara_transcription"
type: "text"
source: "manifest['bambara']"
- name: "french_translation"
type: "text"
source: "manifest['french']"
```
With manifest being a csv or json like format file in the repository so that the viewer understands that it should look for the values of each field in that file.
#### **Benefits**
- Improves flexibility for dataset creators who push datasets via `git`.
- Enhances dataset discoverability and usability on the Hugging Face Hub by allowing creators to present meaningful field mappings without restructuring their data.
- Reduces overhead for creators of large or complex datasets.
#### **Examples of Use Case**
- An audio dataset with transcriptions in multiple languages stored in a `manifest.json` file, where the user wants the Viewer to:
- Display the `audio` column and Explicitly map features that he defined such as `bambara_transcription` and `french_translation` from the manifest.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7315/timeline
| null | null |
diarray-hub
| 114,512,099 |
U_kgDOBtNQ4w
|
https://avatars.githubusercontent.com/u/114512099?v=4
|
https://api.github.com/users/diarray-hub
|
https://github.com/diarray-hub
|
https://api.github.com/users/diarray-hub/followers
|
https://api.github.com/users/diarray-hub/following{/other_user}
|
https://api.github.com/users/diarray-hub/gists{/gist_id}
|
https://api.github.com/users/diarray-hub/starred{/owner}{/repo}
|
https://api.github.com/users/diarray-hub/subscriptions
|
https://api.github.com/users/diarray-hub/orgs
|
https://api.github.com/users/diarray-hub/repos
|
https://api.github.com/users/diarray-hub/events{/privacy}
|
https://api.github.com/users/diarray-hub/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7315/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi @diarray-hub , thanks for opening the issue :) Let me ping @lhoestq and @severo from the dataset viewer team :hugs: ",
"amazing :)",
"Hi ! why not modify the manifest.json file directly ? this way users see in the viewer the dataset as is instead which makes it easier to use using e.g. the `datasets` library",
"Can I create and push the dataset with the dataset library while also pushing the dataset directory, mainting its structure and all the files as with git? ",
"(I transferred to the issue to the `datasets` repo as it's not related to `huggingface_hub`)",
"> Can I create and push the dataset with the dataset library while also pushing the dataset directory, mainting its structure and all the files as with git?\r\n\r\nyes push_to_hub simply uploads Parquet files in a directory named \"data\" in the git repository\r\n",
"That's the problem actually, I need that the data stays in the same format and the directory they are in keep the same structure in order to go quick with Nemo training so users of Nvidia's Nemo framework don't need to write any preprocessing code before starting training. That's why I used git instead of push_to_hub so me and other users working with Nemo can just:\r\n1. git clone\r\n2. asr_model.setup_training_data(train_data_config={'manifest_filepath': training_manifest_filepath})\r\n\r\nAnd start training already. It may be not very kind of me to prioritize users of a specific framework but I noticed that it take much more code to convert an huggingFace dataset with the parquet file to Nemo manifest format than the inverse :haha: ",
"Happy to help if you think the Nemo dataset format should be supported in `datasets` (and therefore in the HF Viewer that is based on `datasets`). Maybe the Nemo team could help as well\r\n\r\nThough I'm not sure if there is only one but actually many formats/structure in Nemo depending on the task ?",
"Yeah, you're right Quentin, it depends of the task. This one is for ASR. And, yes maybe they can help. I noticed that they already share their models through HF. Maybe someone in your teams already have a contact point there. Anyway it's not really a big issues since people can easily understand the dataset and its format with the dataset card but it's a little annoying for those who wanna visually explore each features with the viewer as for regular HF datasets",
"In that case I'd recommend you to upload the dataset in Nemo format and \r\n1) add the \"nemo\" tag\r\n2) add how to use the dataset in Nemo in the dataset README.md\r\n\r\nThe viewer is likely to show the audio content by default but without the transcriptions. You can also configure the viewer to show the transcriptions instead (without the audio).",
"I already did, it's just a little bit \"dommage\" (Hope you'll understand, you speak french right? Cause I don't know any english word for this) that I have to choose which one the viewer displays. But it's no problem for the usability of the dataset. Thanks Quentin :+1: ",
"It's \"dommage\" for now, but feel free to ping the Nemo people if you think there is room for making this better together :)\r\n\r\nKinda related, but the `datasets` AudioFolder structure looks similar and simply asks for a `metadata.jsonl` with a field named \"file_name\" to link the transcriptions to the audio files - you could also add this file to your repository to make the viewer show audio + transcripts.\r\n\r\nAlternatively maybe we can expand the AudioFolder configuration to allow you to set the metadata file to be the \"manifest.json\" and the linking field to be \"audio_file_name\" (we just need to agree on something general - not just for Nemo)",
"Right, actually that was my idea when I opened this issues. That's what I suggested, taking my case as an exemple but you should think of a more general approach like adding a field to configure the viewer as you wish in the metadata (in the dataset card) or a config.yaml or json file. With a level of abstraction like the solution I proposed ot even higher abstraction, it would allow for more customizability :)"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7306
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7306/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7306/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7306/events
|
https://github.com/huggingface/datasets/issues/7306
| 2,719,807,464 |
I_kwDODunzps6iHPfo
| 7,306 |
Creating new dataset from list loses information. (Audio Information Lost - either Datatype or Values).
|
[] |
open
| false | null |
[] | null | 0 | 1,733 | 1,733 | null |
NONE
| null | null |
### Describe the bug
When creating a dataset from a list of datapoints, information is lost of the individual items.
Specifically, when creating a dataset from a list of datapoints (from another dataset). Either the datatype is lost or the values are lost. See examples below.
-> What is the best way to create a dataset from a list of datapoints?
---
e.g.:
**When running this code:**
```python
from datasets import load_dataset, Dataset
commonvoice_data = load_dataset("mozilla-foundation/common_voice_17_0", "it", split="test", streaming=True)
datapoint = next(iter(commonvoice_data))
out = [datapoint]
new_data = Dataset.from_list(out) #this loses datatype information
new_data2= Dataset.from_list(out,features=commonvoice_data.features) #this loses value information
```
**We get the following**:
---
1. `datapoint`: (the original datapoint)
```
'audio': {'path': 'it_test_0/common_voice_it_23606167.mp3', 'array': array([0.00000000e+00, 0.00000000e+00, 0.00000000e+00, ...,
2.21619011e-05, 2.72628222e-05, 0.00000000e+00]), 'sampling_rate': 48000}
```
Original Dataset Features:
```
>>> commonvoice_data.features
'audio': Audio(sampling_rate=48000, mono=True, decode=True, id=None)
```
- Here we see column "audio", has the proper values (both `path` & and `array`) and has the correct datatype (Audio).
----
2. new_data[0]:
```
# Cannot be printed (as it prints the entire array).
```
New Dataset 1 Features:
```
>>> new_data.features
'audio': {'array': Sequence(feature=Value(dtype='float64', id=None), length=-1, id=None), 'path': Value(dtype='string', id=None), 'sampling_rate': Value(dtype='int64', id=None)}
```
- Here we see that the column "audio", has the correct values, but is not the Audio datatype anymore.
---
3. new_data2[0]:
```
'audio': {'path': None, 'array': array([0., 0., 0., ..., 0., 0., 0.]), 'sampling_rate': 48000},
```
New Dataset 2 Features:
```
>>> new_data2.features
'audio': Audio(sampling_rate=48000, mono=True, decode=True, id=None),
```
- Here we see that the column "audio", has the correct datatype, but all the array & path values were lost!
### Steps to reproduce the bug
## Run:
```python
from datasets import load_dataset, Dataset
commonvoice_data = load_dataset("mozilla-foundation/common_voice_17_0", "it", split="test", streaming=True)
datapoint = next(iter(commonvoice_data))
out = [datapoint]
new_data = Dataset.from_list(out) #this loses datatype information
new_data2= Dataset.from_list(out,features=commonvoice_data.features) #this loses value information
```
### Expected behavior
## Expected:
```datapoint == new_data[0]```
AND
```datapoint == new_data2[0]```
### Environment info
- `datasets` version: 3.1.0
- Platform: Linux-6.2.0-37-generic-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.26.2
- PyArrow version: 15.0.2
- Pandas version: 2.2.2
- `fsspec` version: 2024.3.1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7306/timeline
| null | null |
ai-nikolai
| 9,797,804 |
MDQ6VXNlcjk3OTc4MDQ=
|
https://avatars.githubusercontent.com/u/9797804?v=4
|
https://api.github.com/users/ai-nikolai
|
https://github.com/ai-nikolai
|
https://api.github.com/users/ai-nikolai/followers
|
https://api.github.com/users/ai-nikolai/following{/other_user}
|
https://api.github.com/users/ai-nikolai/gists{/gist_id}
|
https://api.github.com/users/ai-nikolai/starred{/owner}{/repo}
|
https://api.github.com/users/ai-nikolai/subscriptions
|
https://api.github.com/users/ai-nikolai/orgs
|
https://api.github.com/users/ai-nikolai/repos
|
https://api.github.com/users/ai-nikolai/events{/privacy}
|
https://api.github.com/users/ai-nikolai/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7306/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7305
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7305/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7305/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7305/events
|
https://github.com/huggingface/datasets/issues/7305
| 2,715,907,267 |
I_kwDODunzps6h4XTD
| 7,305 |
Build Documentation Test Fails Due to "Bad Credentials" Error
|
[] |
open
| false | null |
[] | null | 2 | 1,733 | 1,736 | null |
CONTRIBUTOR
| null | null |
### Describe the bug
The `Build documentation / build / build_main_documentation (push)` job is consistently failing during the "Syncing repository" step. The error occurs when attempting to determine the default branch name, resulting in "Bad credentials" errors.
### Steps to reproduce the bug
1. Trigger the `build_main_documentation` job.
2. Observe the logs during the "Syncing repository" step.
### Expected behavior
The workflow should be able to retrieve the default branch name without encountering credential issues.
### Environment info
```plaintext
Syncing repository: huggingface/notebooks
Getting Git version info
Temporarily overriding HOME='/home/runner/work/_temp/00e62748-9940-4a4f-bbbc-eb2cda6d7ed6' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
/usr/bin/git config --global --add safe.directory /home/runner/work/datasets/datasets/notebooks
Initializing the repository
Disabling automatic garbage collection
Setting up auth
Determining the default branch
Retrieving the default branch name
Bad credentials - https://docs.github.com/rest
Waiting 20 seconds before trying again
Retrieving the default branch name
Bad credentials - https://docs.github.com/rest
Waiting 19 seconds before trying again
Retrieving the default branch name
Error: Bad credentials - https://docs.github.com/rest
```
| null |
https://api.github.com/repos/huggingface/datasets/issues/7305/timeline
| null | null |
ruidazeng
| 31,152,346 |
MDQ6VXNlcjMxMTUyMzQ2
|
https://avatars.githubusercontent.com/u/31152346?v=4
|
https://api.github.com/users/ruidazeng
|
https://github.com/ruidazeng
|
https://api.github.com/users/ruidazeng/followers
|
https://api.github.com/users/ruidazeng/following{/other_user}
|
https://api.github.com/users/ruidazeng/gists{/gist_id}
|
https://api.github.com/users/ruidazeng/starred{/owner}{/repo}
|
https://api.github.com/users/ruidazeng/subscriptions
|
https://api.github.com/users/ruidazeng/orgs
|
https://api.github.com/users/ruidazeng/repos
|
https://api.github.com/users/ruidazeng/events{/privacy}
|
https://api.github.com/users/ruidazeng/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7305/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"how were you able to fix this please?",
"> how were you able to fix this please?\r\n\r\nI was not able to fix this."
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7303
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7303/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7303/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7303/events
|
https://github.com/huggingface/datasets/issues/7303
| 2,705,729,696 |
I_kwDODunzps6hRiig
| 7,303 |
DataFilesNotFoundError for datasets LM1B
|
[] |
closed
| false | null |
[] | null | 1 | 1,732 | 1,733 | 1,733 |
NONE
| null | null |
### Describe the bug
Cannot load the dataset https://huggingface.co/datasets/billion-word-benchmark/lm1b
### Steps to reproduce the bug
`dataset = datasets.load_dataset('lm1b', split=split)`
### Expected behavior
`Traceback (most recent call last):
File "/home/hml/projects/DeepLearning/Generative_model/Diffusion-BERT/word_freq.py", line 13, in <module>
train_data = DiffusionLoader(tokenizer=tokenizer).my_load(task_name='lm1b', splits=['train'])[0]
File "/home/hml/projects/DeepLearning/Generative_model/Diffusion-BERT/dataloader.py", line 20, in my_load
return [self._load(task_name, name) for name in splits]
File "/home/hml/projects/DeepLearning/Generative_model/Diffusion-BERT/dataloader.py", line 20, in <listcomp>
return [self._load(task_name, name) for name in splits]
File "/home/hml/projects/DeepLearning/Generative_model/Diffusion-BERT/dataloader.py", line 13, in _load
dataset = datasets.load_dataset('lm1b', split=split)
File "/home/hml/.conda/envs/DB/lib/python3.10/site-packages/datasets/load.py", line 2594, in load_dataset
builder_instance = load_dataset_builder(
File "/home/hml/.conda/envs/DB/lib/python3.10/site-packages/datasets/load.py", line 2266, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/hml/.conda/envs/DB/lib/python3.10/site-packages/datasets/load.py", line 1827, in dataset_module_factory
).get_module()
File "/home/hml/.conda/envs/DB/lib/python3.10/site-packages/datasets/load.py", line 1040, in get_module
module_name, default_builder_kwargs = infer_module_for_data_files(
File "/home/hml/.conda/envs/DB/lib/python3.10/site-packages/datasets/load.py", line 598, in infer_module_for_data_files
raise DataFilesNotFoundError("No (supported) data files found" + (f" in {path}" if path else ""))
datasets.exceptions.DataFilesNotFoundError: No (supported) data files found in lm1b`
### Environment info
datasets: 2.20.0
| null |
https://api.github.com/repos/huggingface/datasets/issues/7303/timeline
| null |
completed
|
hml1996-fight
| 72,264,324 |
MDQ6VXNlcjcyMjY0MzI0
|
https://avatars.githubusercontent.com/u/72264324?v=4
|
https://api.github.com/users/hml1996-fight
|
https://github.com/hml1996-fight
|
https://api.github.com/users/hml1996-fight/followers
|
https://api.github.com/users/hml1996-fight/following{/other_user}
|
https://api.github.com/users/hml1996-fight/gists{/gist_id}
|
https://api.github.com/users/hml1996-fight/starred{/owner}{/repo}
|
https://api.github.com/users/hml1996-fight/subscriptions
|
https://api.github.com/users/hml1996-fight/orgs
|
https://api.github.com/users/hml1996-fight/repos
|
https://api.github.com/users/hml1996-fight/events{/privacy}
|
https://api.github.com/users/hml1996-fight/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7303/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
hml1996-fight
| 72,264,324 |
MDQ6VXNlcjcyMjY0MzI0
|
https://avatars.githubusercontent.com/u/72264324?v=4
|
https://api.github.com/users/hml1996-fight
|
https://github.com/hml1996-fight
|
https://api.github.com/users/hml1996-fight/followers
|
https://api.github.com/users/hml1996-fight/following{/other_user}
|
https://api.github.com/users/hml1996-fight/gists{/gist_id}
|
https://api.github.com/users/hml1996-fight/starred{/owner}{/repo}
|
https://api.github.com/users/hml1996-fight/subscriptions
|
https://api.github.com/users/hml1996-fight/orgs
|
https://api.github.com/users/hml1996-fight/repos
|
https://api.github.com/users/hml1996-fight/events{/privacy}
|
https://api.github.com/users/hml1996-fight/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi ! Can you try with a more recent version of `datasets` ? Also you might need to pass trust_remote_code=True since it's a script based dataset"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7299
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7299/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7299/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7299/events
|
https://github.com/huggingface/datasets/issues/7299
| 2,695,378,251 |
I_kwDODunzps6gqDVL
| 7,299 |
Efficient Image Augmentation in Hugging Face Datasets
|
[] |
open
| false | null |
[] | null | 0 | 1,732 | 1,732 | null |
NONE
| null | null |
### Describe the bug
I'm using the Hugging Face datasets library to load images in batch and would like to apply a torchvision transform to solve the inconsistent image sizes in the dataset and apply some on the fly image augmentation. I can just think about using the collate_fn, but seems quite inefficient.
I'm new to the Hugging Face datasets library, I didn't find nothing in the documentation or the issues here on github.
Is there an existing way to add image transformations directly to the dataset loading pipeline?
### Steps to reproduce the bug
from datasets import load_dataset
from torch.utils.data import DataLoader
```python
def collate_fn(batch):
images = [item['image'] for item in batch]
texts = [item['text'] for item in batch]
return {
'images': images,
'texts': texts
}
dataset = load_dataset("Yuki20/pokemon_caption", split="train")
dataloader = DataLoader(dataset, batch_size=4, collate_fn=collate_fn)
# Output shows varying image sizes:
# [(1280, 1280), (431, 431), (789, 789), (769, 769)]
```
### Expected behavior
I'm looking for a way to resize images on-the-fly when loading the dataset, similar to PyTorch's Dataset.__getitem__ functionality. This would be more efficient than handling resizing in the collate_fn.
### Environment info
- `datasets` version: 3.1.0
- Platform: Linux-6.5.0-41-generic-x86_64-with-glibc2.35
- Python version: 3.11.10
- `huggingface_hub` version: 0.26.2
- PyArrow version: 18.0.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.9.0
| null |
https://api.github.com/repos/huggingface/datasets/issues/7299/timeline
| null | null |
fabiozappo
| 46,443,190 |
MDQ6VXNlcjQ2NDQzMTkw
|
https://avatars.githubusercontent.com/u/46443190?v=4
|
https://api.github.com/users/fabiozappo
|
https://github.com/fabiozappo
|
https://api.github.com/users/fabiozappo/followers
|
https://api.github.com/users/fabiozappo/following{/other_user}
|
https://api.github.com/users/fabiozappo/gists{/gist_id}
|
https://api.github.com/users/fabiozappo/starred{/owner}{/repo}
|
https://api.github.com/users/fabiozappo/subscriptions
|
https://api.github.com/users/fabiozappo/orgs
|
https://api.github.com/users/fabiozappo/repos
|
https://api.github.com/users/fabiozappo/events{/privacy}
|
https://api.github.com/users/fabiozappo/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7299/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7298
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7298/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7298/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7298/events
|
https://github.com/huggingface/datasets/issues/7298
| 2,694,196,968 |
I_kwDODunzps6gli7o
| 7,298 |
loading dataset issue with load_dataset() when training controlnet
|
[] |
open
| false | null |
[] | null | 0 | 1,732 | 1,732 | null |
NONE
| null | null |
### Describe the bug
i'm unable to load my dataset for [controlnet training](https://github.com/huggingface/diffusers/blob/074e12358bc17e7dbe111ea4f62f05dbae8a49d5/examples/controlnet/train_controlnet.py#L606) using load_dataset(). however, load_from_disk() seems to work?
would appreciate if someone can explain why that's the case here
1. for reference here's the structure of the original training files _before_ dataset creation -
```
- dir train
- dir A (illustrations)
- dir B (SignWriting)
- prompt.json containing:
{"source": "B/file.png", "target": "A/file.png", "prompt": "..."}
```
2. here are features _after_ dataset creation -
```
"features": {
"control_image": {
"_type": "Image"
},
"image": {
"_type": "Image"
},
"caption": {
"dtype": "string",
"_type": "Value"
}
```
3. I've also attempted to upload the dataset to huggingface with the same error output
### Steps to reproduce the bug
1. [dataset creation script](https://github.com/sign-language-processing/signwriting-illustration/blob/main/signwriting_illustration/controlnet_huggingface/dataset.py)
2. controlnet [training script](examples/controlnet/train_controlnet.py) used
3. training parameters -
! accelerate launch diffusers/examples/controlnet/train_controlnet.py \
--pretrained_model_name_or_path="stable-diffusion-v1-5/stable-diffusion-v1-5" \
--output_dir="$OUTPUT_DIR" \
--train_data_dir="$HF_DATASET_DIR" \
--conditioning_image_column=control_image \
--image_column=image \
--caption_column=caption \
--resolution=512\
--learning_rate=1e-5 \
--validation_image "./validation/0a4b3c71265bb3a726457837428dda78.png" "./validation/0a5922fe2c638e6776bd62f623145004.png" "./validation/1c9f1a53106f64c682cf5d009ee7156f.png" \
--validation_prompt "An illustration of a man with short hair" "An illustration of a woman with short hair" "An illustration of Barack Obama" \
--train_batch_size=4 \
--num_train_epochs=500 \
--tracker_project_name="sd-controlnet-signwriting-test" \
--hub_model_id="sarahahtee/signwriting-illustration-test" \
--checkpointing_steps=5000 \
--validation_steps=1000 \
--report_to wandb \
--push_to_hub
4. command -
` sbatch --export=HUGGINGFACE_TOKEN=hf_token,WANDB_API_KEY=api_key script.sh`
### Expected behavior
```
11/25/2024 17:12:18 - INFO - __main__ - Initializing controlnet weights from unet
Generating train split: 1 examples [00:00, 334.85 examples/s]
Traceback (most recent call last):
File "/data/user/user/signwriting_illustration/controlnet_huggingface/diffusers/examples/controlnet/train_controlnet.py", line 1189, in <module>
main(args)
File "/data/user/user/signwriting_illustration/controlnet_huggingface/diffusers/examples/controlnet/train_controlnet.py", line 923, in main
train_dataset = make_train_dataset(args, tokenizer, accelerator)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/user/user/signwriting_illustration/controlnet_huggingface/diffusers/examples/controlnet/train_controlnet.py", line 639, in make_train_dataset
raise ValueError(
ValueError: `--image_column` value 'image' not found in dataset columns. Dataset columns are: _data_files, _fingerprint, _format_columns, _format_kwargs, _format_type, _output_all_columns, _split
```
### Environment info
accelerate 1.1.1
huggingface-hub 0.26.2
python 3.11
torch 2.5.1
transformers 4.46.2
| null |
https://api.github.com/repos/huggingface/datasets/issues/7298/timeline
| null | null |
sarahahtee
| 81,594,044 |
MDQ6VXNlcjgxNTk0MDQ0
|
https://avatars.githubusercontent.com/u/81594044?v=4
|
https://api.github.com/users/sarahahtee
|
https://github.com/sarahahtee
|
https://api.github.com/users/sarahahtee/followers
|
https://api.github.com/users/sarahahtee/following{/other_user}
|
https://api.github.com/users/sarahahtee/gists{/gist_id}
|
https://api.github.com/users/sarahahtee/starred{/owner}{/repo}
|
https://api.github.com/users/sarahahtee/subscriptions
|
https://api.github.com/users/sarahahtee/orgs
|
https://api.github.com/users/sarahahtee/repos
|
https://api.github.com/users/sarahahtee/events{/privacy}
|
https://api.github.com/users/sarahahtee/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7298/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7297
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7297/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7297/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7297/events
|
https://github.com/huggingface/datasets/issues/7297
| 2,683,977,430 |
I_kwDODunzps6f-j7W
| 7,297 |
wrong return type for `IterableDataset.shard()`
|
[] |
closed
| false | null |
[] | null | 1 | 1,732 | 1,733 | 1,733 |
NONE
| null | null |
### Describe the bug
`IterableDataset.shard()` has the wrong typing for its return as `"Dataset"`. It should be `"IterableDataset"`. Makes my IDE unhappy.
### Steps to reproduce the bug
look at [the source code](https://github.com/huggingface/datasets/blob/main/src/datasets/iterable_dataset.py#L2668)?
### Expected behavior
Correct return type as `"IterableDataset"`
### Environment info
datasets==3.1.0
| null |
https://api.github.com/repos/huggingface/datasets/issues/7297/timeline
| null |
completed
|
ysngshn
| 47,225,236 |
MDQ6VXNlcjQ3MjI1MjM2
|
https://avatars.githubusercontent.com/u/47225236?v=4
|
https://api.github.com/users/ysngshn
|
https://github.com/ysngshn
|
https://api.github.com/users/ysngshn/followers
|
https://api.github.com/users/ysngshn/following{/other_user}
|
https://api.github.com/users/ysngshn/gists{/gist_id}
|
https://api.github.com/users/ysngshn/starred{/owner}{/repo}
|
https://api.github.com/users/ysngshn/subscriptions
|
https://api.github.com/users/ysngshn/orgs
|
https://api.github.com/users/ysngshn/repos
|
https://api.github.com/users/ysngshn/events{/privacy}
|
https://api.github.com/users/ysngshn/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7297/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
lhoestq
| 42,851,186 |
MDQ6VXNlcjQyODUxMTg2
|
https://avatars.githubusercontent.com/u/42851186?v=4
|
https://api.github.com/users/lhoestq
|
https://github.com/lhoestq
|
https://api.github.com/users/lhoestq/followers
|
https://api.github.com/users/lhoestq/following{/other_user}
|
https://api.github.com/users/lhoestq/gists{/gist_id}
|
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
|
https://api.github.com/users/lhoestq/subscriptions
|
https://api.github.com/users/lhoestq/orgs
|
https://api.github.com/users/lhoestq/repos
|
https://api.github.com/users/lhoestq/events{/privacy}
|
https://api.github.com/users/lhoestq/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Oops my bad ! thanks for reporting"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7295
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7295/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7295/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7295/events
|
https://github.com/huggingface/datasets/issues/7295
| 2,672,003,384 |
I_kwDODunzps6fQ4k4
| 7,295 |
[BUG]: Streaming from S3 triggers `unexpected keyword argument 'requote_redirect_url'`
|
[] |
open
| false | null |
[] | null | 0 | 1,732 | 1,732 | null |
NONE
| null | null |
### Describe the bug
Note that this bug is only triggered when `streaming=True`. #5459 introduced always calling fsspec with `client_kwargs={"requote_redirect_url": False}`, which seems to have incompatibility issues even in the newest versions.
Analysis of what's happening:
1. `datasets` passes the `client_kwargs` through `fsspec`
2. `fsspec` passes the `client_kwargs` through `s3fs`
3. `s3fs` passes the `client_kwargs` to `aiobotocore` which uses `aiohttp`
```
s3creator = self.session.create_client(
"s3", config=conf, **init_kwargs, **client_kwargs
)
```
4. The `session` tries to create an `aiohttp` session but the `**kwargs` are not just kept as unfolded `**kwargs` but passed in as individual variables (`requote_redirect_url` and `trust_env`).
Error:
```
Traceback (most recent call last):
File "/Users/cxrh/Documents/GitHub/nlp_foundation/nlp_train/test.py", line 14, in <module>
batch = next(iter(ds))
File "/Users/cxrh/miniconda3/envs/s3_data_loader/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 1353, in __iter__
for key, example in ex_iterable:
File "/Users/cxrh/miniconda3/envs/s3_data_loader/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 255, in __iter__
for key, pa_table in self.generate_tables_fn(**self.kwargs):
File "/Users/cxrh/miniconda3/envs/s3_data_loader/lib/python3.10/site-packages/datasets/packaged_modules/json/json.py", line 78, in _generate_tables
for file_idx, file in enumerate(itertools.chain.from_iterable(files)):
File "/Users/cxrh/miniconda3/envs/s3_data_loader/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py", line 840, in __iter__
yield from self.generator(*self.args, **self.kwargs)
File "/Users/cxrh/miniconda3/envs/s3_data_loader/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py", line 921, in _iter_from_urlpaths
elif xisdir(urlpath, download_config=download_config):
File "/Users/cxrh/miniconda3/envs/s3_data_loader/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py", line 305, in xisdir
return fs.isdir(inner_path)
File "/Users/cxrh/miniconda3/envs/s3_data_loader/lib/python3.10/site-packages/fsspec/spec.py", line 721, in isdir
return self.info(path)["type"] == "directory"
File "/Users/cxrh/miniconda3/envs/s3_data_loader/lib/python3.10/site-packages/fsspec/archive.py", line 38, in info
self._get_dirs()
File "/Users/cxrh/miniconda3/envs/s3_data_loader/lib/python3.10/site-packages/datasets/filesystems/compression.py", line 64, in _get_dirs
f = {**self.file.fs.info(self.file.path), "name": self.uncompressed_name}
File "/Users/cxrh/miniconda3/envs/s3_data_loader/lib/python3.10/site-packages/fsspec/asyn.py", line 118, in wrapper
return sync(self.loop, func, *args, **kwargs)
File "/Users/cxrh/miniconda3/envs/s3_data_loader/lib/python3.10/site-packages/fsspec/asyn.py", line 103, in sync
raise return_result
File "/Users/cxrh/miniconda3/envs/s3_data_loader/lib/python3.10/site-packages/fsspec/asyn.py", line 56, in _runner
result[0] = await coro
File "/Users/cxrh/miniconda3/envs/s3_data_loader/lib/python3.10/site-packages/s3fs/core.py", line 1302, in _info
out = await self._call_s3(
File "/Users/cxrh/miniconda3/envs/s3_data_loader/lib/python3.10/site-packages/s3fs/core.py", line 341, in _call_s3
await self.set_session()
File "/Users/cxrh/miniconda3/envs/s3_data_loader/lib/python3.10/site-packages/s3fs/core.py", line 524, in set_session
s3creator = self.session.create_client(
File "/Users/cxrh/miniconda3/envs/s3_data_loader/lib/python3.10/site-packages/aiobotocore/session.py", line 114, in create_client
return ClientCreatorContext(self._create_client(*args, **kwargs))
TypeError: AioSession._create_client() got an unexpected keyword argument 'requote_redirect_url'
```
### Steps to reproduce the bug
1. Install the necessary libraries, datasets having a requirement for being at least 2.19.0:
```
pip install s3fs fsspec aiohttp aiobotocore botocore 'datasets>=2.19.0'
```
2. Run this code:
```
from datasets import load_dataset
ds = load_dataset(
"json",
data_files="s3://your_path/*.jsonl.gz",
streaming=True,
split="train",
)
batch = next(iter(ds))
print(batch)
```
3. You get the `unexpected keyword argument 'requote_redirect_url'` error.
### Expected behavior
The datasets is able to load a batch from the dataset stored on S3, without triggering this `requote_redirect_url` error.
Fix: I could fix this by directly removing the `requote_redirect_url` and `trust_env` - then it loads properly.
<img width="1127" alt="image" src="https://github.com/user-attachments/assets/4c40efa9-8787-4919-b613-e4908c3d1ab2">
### Environment info
- `datasets` version: 3.1.0
- Platform: macOS-15.1-arm64-arm-64bit
- Python version: 3.10.15
- `huggingface_hub` version: 0.26.2
- PyArrow version: 18.0.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.9.0
| null |
https://api.github.com/repos/huggingface/datasets/issues/7295/timeline
| null | null |
casper-hansen
| 27,340,033 |
MDQ6VXNlcjI3MzQwMDMz
|
https://avatars.githubusercontent.com/u/27340033?v=4
|
https://api.github.com/users/casper-hansen
|
https://github.com/casper-hansen
|
https://api.github.com/users/casper-hansen/followers
|
https://api.github.com/users/casper-hansen/following{/other_user}
|
https://api.github.com/users/casper-hansen/gists{/gist_id}
|
https://api.github.com/users/casper-hansen/starred{/owner}{/repo}
|
https://api.github.com/users/casper-hansen/subscriptions
|
https://api.github.com/users/casper-hansen/orgs
|
https://api.github.com/users/casper-hansen/repos
|
https://api.github.com/users/casper-hansen/events{/privacy}
|
https://api.github.com/users/casper-hansen/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7295/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7292
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7292/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7292/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7292/events
|
https://github.com/huggingface/datasets/issues/7292
| 2,664,250,855 |
I_kwDODunzps6ezT3n
| 7,292 |
DataFilesNotFoundError for datasets `OpenMol/PubChemSFT`
|
[] |
closed
| false | null |
[] | null | 3 | 1,731 | 1,731 | 1,731 |
NONE
| null | null |
### Describe the bug
Cannot load the dataset https://huggingface.co/datasets/OpenMol/PubChemSFT
### Steps to reproduce the bug
```
from datasets import load_dataset
dataset = load_dataset('OpenMol/PubChemSFT')
```
### Expected behavior
```
---------------------------------------------------------------------------
DataFilesNotFoundError Traceback (most recent call last)
Cell In[7], [line 2](vscode-notebook-cell:?execution_count=7&line=2)
[1](vscode-notebook-cell:?execution_count=7&line=1) from datasets import load_dataset
----> [2](vscode-notebook-cell:?execution_count=7&line=2) dataset = load_dataset('OpenMol/PubChemSFT')
File ~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2587, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs)
[2582](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2582) verification_mode = VerificationMode(
[2583](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2583) (verification_mode or VerificationMode.BASIC_CHECKS) if not save_infos else VerificationMode.ALL_CHECKS
[2584](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2584) )
[2586](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2586) # Create a dataset builder
-> [2587](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2587) builder_instance = load_dataset_builder(
[2588](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2588) path=path,
[2589](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2589) name=name,
[2590](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2590) data_dir=data_dir,
[2591](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2591) data_files=data_files,
[2592](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2592) cache_dir=cache_dir,
[2593](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2593) features=features,
[2594](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2594) download_config=download_config,
[2595](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2595) download_mode=download_mode,
[2596](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2596) revision=revision,
[2597](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2597) token=token,
[2598](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2598) storage_options=storage_options,
[2599](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2599) trust_remote_code=trust_remote_code,
[2600](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2600) _require_default_config_name=name is None,
[2601](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2601) **config_kwargs,
[2602](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2602) )
[2604](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2604) # Return iterable dataset in case of streaming
[2605](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2605) if streaming:
File ~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2259, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, token, use_auth_token, storage_options, trust_remote_code, _require_default_config_name, **config_kwargs)
[2257](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2257) download_config = download_config.copy() if download_config else DownloadConfig()
[2258](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2258) download_config.storage_options.update(storage_options)
-> [2259](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2259) dataset_module = dataset_module_factory(
[2260](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2260) path,
[2261](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2261) revision=revision,
[2262](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2262) download_config=download_config,
[2263](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2263) download_mode=download_mode,
[2264](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2264) data_dir=data_dir,
[2265](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2265) data_files=data_files,
[2266](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2266) cache_dir=cache_dir,
[2267](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2267) trust_remote_code=trust_remote_code,
[2268](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2268) _require_default_config_name=_require_default_config_name,
[2269](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2269) _require_custom_configs=bool(config_kwargs),
[2270](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2270) )
[2271](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2271) # Get dataset builder class from the processing script
[2272](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:2272) builder_kwargs = dataset_module.builder_kwargs
File ~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1904, in dataset_module_factory(path, revision, download_config, download_mode, dynamic_modules_path, data_dir, data_files, cache_dir, trust_remote_code, _require_default_config_name, _require_custom_configs, **download_kwargs)
[1902](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1902) raise ConnectionError(f"Couldn't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
[1903](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1903) if isinstance(e1, (DataFilesNotFoundError, DatasetNotFoundError, EmptyDatasetError)):
-> [1904](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1904) raise e1 from None
[1905](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1905) if isinstance(e1, FileNotFoundError):
[1906](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1906) raise FileNotFoundError(
[1907](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1907) f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory. "
[1908](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1908) f"Couldn't find '{path}' on the Hugging Face Hub either: {type(e1).__name__}: {e1}"
[1909](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1909) ) from None
File ~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1885, in dataset_module_factory(path, revision, download_config, download_mode, dynamic_modules_path, data_dir, data_files, cache_dir, trust_remote_code, _require_default_config_name, _require_custom_configs, **download_kwargs)
[1876](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1876) return HubDatasetModuleFactoryWithScript(
[1877](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1877) path,
[1878](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1878) revision=revision,
(...)
[1882](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1882) trust_remote_code=trust_remote_code,
[1883](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1883) ).get_module()
[1884](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1884) else:
-> [1885](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1885) return HubDatasetModuleFactoryWithoutScript(
[1886](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1886) path,
[1887](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1887) revision=revision,
[1888](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1888) data_dir=data_dir,
[1889](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1889) data_files=data_files,
[1890](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1890) download_config=download_config,
[1891](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1891) download_mode=download_mode,
[1892](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1892) ).get_module()
[1893](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1893) except Exception as e1:
[1894](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1894) # All the attempts failed, before raising the error we should check if the module is already cached
[1895](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1895) try:
File ~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1270, in HubDatasetModuleFactoryWithoutScript.get_module(self)
[1263](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1263) patterns = get_data_patterns(base_path, download_config=self.download_config)
[1264](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1264) data_files = DataFilesDict.from_patterns(
[1265](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1265) patterns,
[1266](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1266) base_path=base_path,
[1267](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1267) allowed_extensions=ALL_ALLOWED_EXTENSIONS,
[1268](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1268) download_config=self.download_config,
[1269](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1269) )
-> [1270](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1270) module_name, default_builder_kwargs = infer_module_for_data_files(
[1271](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1271) data_files=data_files,
[1272](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1272) path=self.name,
[1273](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1273) download_config=self.download_config,
[1274](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1274) )
[1275](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1275) data_files = data_files.filter_extensions(_MODULE_TO_EXTENSIONS[module_name])
[1276](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:1276) # Collect metadata files if the module supports them
File ~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:597, in infer_module_for_data_files(data_files, path, download_config)
[595](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:595) raise ValueError(f"Couldn't infer the same data file format for all splits. Got {split_modules}")
[596](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:596) if not module_name:
--> [597](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:597) raise DataFilesNotFoundError("No (supported) data files found" + (f" in {path}" if path else ""))
[598](https://file+.vscode-resource.vscode-cdn.net/home/ubuntu/Projects/notebook/~/Softwares/anaconda3/envs/pyg-dev/lib/python3.9/site-packages/datasets/load.py:598) return module_name, default_builder_kwargs
DataFilesNotFoundError: No (supported) data files found in OpenMol/PubChemSFT
```
### Environment info
```
- `datasets` version: 3.1.0
- Platform: Linux-5.15.0-125-generic-x86_64-with-glibc2.31
- Python version: 3.9.18
- `huggingface_hub` version: 0.25.2
- PyArrow version: 18.0.0
- Pandas version: 2.0.3
- `fsspec` version: 2023.9.2
```
| null |
https://api.github.com/repos/huggingface/datasets/issues/7292/timeline
| null |
completed
|
xnuohz
| 17,878,022 |
MDQ6VXNlcjE3ODc4MDIy
|
https://avatars.githubusercontent.com/u/17878022?v=4
|
https://api.github.com/users/xnuohz
|
https://github.com/xnuohz
|
https://api.github.com/users/xnuohz/followers
|
https://api.github.com/users/xnuohz/following{/other_user}
|
https://api.github.com/users/xnuohz/gists{/gist_id}
|
https://api.github.com/users/xnuohz/starred{/owner}{/repo}
|
https://api.github.com/users/xnuohz/subscriptions
|
https://api.github.com/users/xnuohz/orgs
|
https://api.github.com/users/xnuohz/repos
|
https://api.github.com/users/xnuohz/events{/privacy}
|
https://api.github.com/users/xnuohz/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7292/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
xnuohz
| 17,878,022 |
MDQ6VXNlcjE3ODc4MDIy
|
https://avatars.githubusercontent.com/u/17878022?v=4
|
https://api.github.com/users/xnuohz
|
https://github.com/xnuohz
|
https://api.github.com/users/xnuohz/followers
|
https://api.github.com/users/xnuohz/following{/other_user}
|
https://api.github.com/users/xnuohz/gists{/gist_id}
|
https://api.github.com/users/xnuohz/starred{/owner}{/repo}
|
https://api.github.com/users/xnuohz/subscriptions
|
https://api.github.com/users/xnuohz/orgs
|
https://api.github.com/users/xnuohz/repos
|
https://api.github.com/users/xnuohz/events{/privacy}
|
https://api.github.com/users/xnuohz/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi ! If the dataset owner uses `push_to_hub()` instead of `save_to_disk()` and upload the local files it will fix the issue.\r\nRight now `datasets` sees the train/test/valid pickle files but they are not supported file formats.",
"Alternatively you can load the arrow file instead:\r\n\r\n```python\r\nfrom datasets import load_dataset\r\ndataset = load_dataset('OpenMol/PubChemSFT', data_files='stage1/*.arrow')\r\n```",
"Thanks! I'll have a try."
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7291
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7291/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7291/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7291/events
|
https://github.com/huggingface/datasets/issues/7291
| 2,662,244,643 |
I_kwDODunzps6erqEj
| 7,291 |
Why return_tensors='pt' doesn't work?
|
[] |
open
| false | null |
[] | null | 2 | 1,731 | 1,731 | null |
NONE
| null | null |
### Describe the bug
I tried to add input_ids to dataset with map(), and I used the return_tensors='pt', but why I got the callback with the type of List?

### Steps to reproduce the bug

### Expected behavior
Sorry for this silly question, I'm noob on using this tool. But I think it should return a tensor value as I have used the protocol?
When I tokenize only one sentence using tokenized_input=tokenizer(input, return_tensors='pt' ),it does return in tensor type. Why doesn't it work in map()?
### Environment info
transformers>=4.41.2,<=4.45.0
datasets>=2.16.0,<=2.21.0
accelerate>=0.30.1,<=0.34.2
peft>=0.11.1,<=0.12.0
trl>=0.8.6,<=0.9.6
gradio>=4.0.0
pandas>=2.0.0
scipy
einops
sentencepiece
tiktoken
protobuf
uvicorn
pydantic
fastapi
sse-starlette
matplotlib>=3.7.0
fire
packaging
pyyaml
numpy<2.0.0
| null |
https://api.github.com/repos/huggingface/datasets/issues/7291/timeline
| null | null |
bw-wang19
| 86,752,851 |
MDQ6VXNlcjg2NzUyODUx
|
https://avatars.githubusercontent.com/u/86752851?v=4
|
https://api.github.com/users/bw-wang19
|
https://github.com/bw-wang19
|
https://api.github.com/users/bw-wang19/followers
|
https://api.github.com/users/bw-wang19/following{/other_user}
|
https://api.github.com/users/bw-wang19/gists{/gist_id}
|
https://api.github.com/users/bw-wang19/starred{/owner}{/repo}
|
https://api.github.com/users/bw-wang19/subscriptions
|
https://api.github.com/users/bw-wang19/orgs
|
https://api.github.com/users/bw-wang19/repos
|
https://api.github.com/users/bw-wang19/events{/privacy}
|
https://api.github.com/users/bw-wang19/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7291/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi ! `datasets` uses Arrow as storage backend which is agnostic to deep learning frameworks like torch. If you want to get torch tensors back, you need to do `dataset = dataset.with_format(\"torch\")`",
"> Hi ! `datasets` uses Arrow as storage backend which is agnostic to deep learning frameworks like torch. If you want to get torch tensors back, you need to do `dataset = dataset.with_format(\"torch\")`\r\n\r\nIt does work! Thanks for your suggestion!"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7290
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7290/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7290/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7290/events
|
https://github.com/huggingface/datasets/issues/7290
| 2,657,620,816 |
I_kwDODunzps6eaBNQ
| 7,290 |
`Dataset.save_to_disk` hangs when using num_proc > 1
|
[] |
open
| false | null |
[] | null | 3 | 1,731 | 1,750 | null |
NONE
| null | null |
### Describe the bug
Hi, I'm encountered a small issue when saving datasets that led to the saving taking up to multiple hours.
Specifically, [`Dataset.save_to_disk`](https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset.save_to_disk) is a lot slower when using `num_proc>1` than when using `num_proc=1`
The documentation mentions that "Multiprocessing is disabled by default.", but there is no explanation on how to enable it.
### Steps to reproduce the bug
```
import numpy as np
from datasets import Dataset
n_samples = int(4e6)
n_tokens_sample = 100
data_dict = {
'tokens' : np.random.randint(0, 100, (n_samples, n_tokens_sample)),
}
dataset = Dataset.from_dict(data_dict)
dataset.save_to_disk('test_dataset', num_proc=1)
dataset.save_to_disk('test_dataset', num_proc=4)
dataset.save_to_disk('test_dataset', num_proc=8)
```
This results in:
```
>>> dataset.save_to_disk('test_dataset', num_proc=1)
Saving the dataset (7/7 shards): 100%|██████████████| 4000000/4000000 [00:17<00:00, 228075.15 examples/s]
>>> dataset.save_to_disk('test_dataset', num_proc=4)
Saving the dataset (7/7 shards): 100%|██████████████| 4000000/4000000 [01:49<00:00, 36583.75 examples/s]
>>> dataset.save_to_disk('test_dataset', num_proc=8)
Saving the dataset (8/8 shards): 100%|██████████████| 4000000/4000000 [02:11<00:00, 30518.43 examples/s]
```
With larger datasets it can take hours, but I didn't benchmark that for this bug report.
### Expected behavior
I would expect using `num_proc>1` to be faster instead of slower than `num_proc=1`.
### Environment info
- `datasets` version: 3.1.0
- Platform: Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.26.2
- PyArrow version: 18.0.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.6.1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7290/timeline
| null | null |
JohannesAck
| 22,243,463 |
MDQ6VXNlcjIyMjQzNDYz
|
https://avatars.githubusercontent.com/u/22243463?v=4
|
https://api.github.com/users/JohannesAck
|
https://github.com/JohannesAck
|
https://api.github.com/users/JohannesAck/followers
|
https://api.github.com/users/JohannesAck/following{/other_user}
|
https://api.github.com/users/JohannesAck/gists{/gist_id}
|
https://api.github.com/users/JohannesAck/starred{/owner}{/repo}
|
https://api.github.com/users/JohannesAck/subscriptions
|
https://api.github.com/users/JohannesAck/orgs
|
https://api.github.com/users/JohannesAck/repos
|
https://api.github.com/users/JohannesAck/events{/privacy}
|
https://api.github.com/users/JohannesAck/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7290/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"I've met the same situations.\r\n\r\nHere's my logs:\r\nnum_proc = 64, I stop it early as it cost **too** much time.\r\n```\r\nSaving the dataset (1540/4775 shards): 32%|███▏ | 47752224/147853764 [15:32:54<132:28:34, 209.89 examples/s]\r\nSaving the dataset (1540/4775 shards): 32%|███▏ | 47754224/147853764 [15:32:54<78:14:37, 355.37 examples/s] \r\nSaving the dataset (1540/4775 shards): 32%|███▏ | 47755224/147853764 [15:32:59<93:43:45, 296.65 examples/s]\r\n```\r\n\r\nnum_proc = 1(Not set num_proc parameter)\r\n```\r\nSaving the dataset (1753/4775 shards): 37%|███▋ | 54301556/147853764 [24:46<38:33, 40440.93 examples/s]\r\nSaving the dataset (1753/4775 shards): 37%|███▋ | 54306556/147853764 [24:46<39:34, 39392.01 examples/s]\r\nSaving the dataset (1753/4775 shards): 37%|███▋ | 54311520/147853764 [24:46<38:56, 40030.53 examples/s]\r\n```\r\n\r\nI check the conditions of CPUs and Memory I/O, I found that disk I/O was blocked, but CPU and memory usage was high. There should be some bugs in the code.\r\n\r\n",
"Any new process on this issue? I'm encountering the same issue.",
"Not getting this issue. \n\nMy output;\n\n`Saving the dataset (0/87 shards): 7%|▎ | 588000/8557560 [01:29<21:02, 6314.04 examples/s]`\n\nAt setting `num_proc=64`, and \n\n`Saving the dataset (0/87 shards): 0%| | 28000/8557560 [03:20<16:59:06, 139.49 examples/s]` \n\nAt num_proc=1 (pass nothing)\n\nMy `pyproject.toml`; \n\n```\n[project]\nname = \"test\"\nversion = \"0.1.0\"\nrequires-python = \"==3.13.0\"\ndependencies = [\n \"absl-py==2.1.0\",\n \"accelerate==1.7.0\",\n \"aiohappyeyeballs==2.6.1\",\n \"aiohttp==3.12.11\",\n \"aiosignal==1.3.2\",\n \"annotated-types==0.7.0\",\n \"appdirs==1.4.4\",\n \"argcomplete>=1.8.1\",\n \"astunparse==1.6.3\",\n \"async-timeout==5.0.1\",\n \"attrs==21.2.0\",\n \"automat==20.2.0\",\n \"babel==2.8.0\",\n \"backcall==0.2.0\",\n \"bcrypt==3.2.0\",\n \"beautifulsoup4==4.10.0\",\n \"beniget==0.4.2\",\n \"bleach==4.1.0\",\n \"blinker==1.4\",\n \"blis==1.3.0\",\n \"bottle==0.12.19\",\n \"brotli==1.0.9\",\n \"catalogue==2.0.10\",\n \"certifi==2020.6.20\",\n \"cffi==1.15.0\",\n \"chardet==4.0.0\",\n \"charset-normalizer==3.4.2\",\n \"click==8.0.3\",\n \"cloudpathlib==0.21.1\",\n \"colorama>=0.4.4\",\n \"commonmark==0.9.1\",\n \"confection==0.1.5\",\n \"configobj==5.0.6\",\n \"constantly==15.1.0\",\n \"cryptography==3.4.8\",\n \"ctop==1.0.0\",\n \"cycler==0.11.0\",\n \"cymem==2.0.11\",\n \"datasets==3.6.0\",\n \"dbus-python==1.2.18\",\n \"decorator==4.4.2\",\n \"defusedxml==0.7.1\",\n \"dill==0.3.8\",\n \"distlib==0.3.4\",\n \"distro==1.7.0\",\n \"einops==0.8.1\",\n \"en-core-web-sm\",\n \"entrypoints==0.4\",\n \"evaluate==0.4.3\",\n \"filelock==3.6.0\",\n \"flake8==4.0.1\",\n \"flatbuffers==25.2.10\",\n \"fonttools==4.29.1\",\n \"frozenlist==1.7.0\",\n \"fs==2.4.12\",\n \"fsspec==2024.3.1\",\n \"future==0.18.2\",\n \"gast==0.6.0\",\n \"gitdb==4.0.12\",\n \"gitpython==3.1.44\",\n \"glances==3.2.4.2\",\n \"google-pasta==0.2.0\",\n \"grpcio==1.73.0\",\n \"h5py==3.14.0\",\n \"hf-xet==1.1.3\",\n \"html5lib==1.1\",\n \"httplib2==0.20.2\",\n \"huggingface-hub==0.32.4\",\n \"hyperlink==21.0.0\",\n \"icdiff==2.0.4\",\n \"idna==3.3\",\n \"importlib-metadata==4.6.4\",\n \"incremental==21.3.0\",\n \"influxdb==5.3.1\",\n \"ipykernel==6.7.0\",\n \"ipython==7.31.1\",\n \"ipython-genutils==0.2.0\",\n \"jax>=0.5.1\",\n \"jax-cuda12-pjrt>=0.5.1\",\n \"jax-cuda12-plugin>=0.5.1\",\n \"jaxlib>=0.5.1\",\n \"jedi==0.18.0\",\n \"jeepney==0.7.1\",\n \"jinja2==3.0.3\",\n \"joblib>=0.17.0\",\n \"jsonpatch==1.32\",\n \"jsonpointer==2.0\",\n \"jsonschema==3.2.0\",\n \"jupyter-client==7.1.2\",\n \"jupyter-core==4.9.1\",\n \"kaptan>=0.5.12\",\n \"keras==3.6.0\",\n \"keyring==23.5.0\",\n \"kiwisolver==1.3.2\",\n \"langcodes==3.5.0\",\n \"language-data==1.3.0\",\n \"launchpadlib==1.10.16\",\n \"lazr-restfulclient==0.14.4\",\n \"lazr-uri==1.0.6\",\n \"libclang==18.1.1\",\n \"libtmux==0.10.1\",\n \"livereload==2.6.3\",\n \"lxml==6.0.0\",\n \"lz4==3.1.3\",\n \"marisa-trie==1.2.1\",\n \"markdown==3.3.6\",\n \"markupsafe==2.0.1\",\n \"matplotlib==3.5.1\",\n \"matplotlib-inline==0.1.3\",\n \"mccabe==0.6.1\",\n \"mkdocs==1.1.2\",\n \"ml-dtypes==0.5.1\",\n \"more-itertools==8.10.0\",\n \"mpmath>=0.0.0\",\n \"msgpack==1.0.3\",\n \"multidict==6.4.4\",\n \"multiprocess==0.70.16\",\n \"murmurhash==1.0.13\",\n \"namex==0.0.8\",\n \"nest-asyncio==1.5.4\",\n \"netifaces==0.11.0\",\n \"networkx==2.4\",\n \"nltk==3.9.1\",\n \"numpy>=1.23.3\",\n \"nvidia-ml-py==12.555.43\",\n \"oauthlib==3.2.0\",\n \"olefile==0.46\",\n \"opt-einsum==3.3.0\",\n \"optree==0.13.1\",\n \"packaging==21.3\",\n \"pandas==2.3.0\",\n \"parso==0.8.1\",\n \"pexpect==4.8.0\",\n \"pickleshare==0.7.5\",\n \"pillow>=9.0.1\",\n \"pipx==1.0.0\",\n \"platformdirs==2.5.1\",\n \"ply==3.11\",\n \"portalocker==3.1.1\",\n \"preshed==3.0.10\",\n \"prompt-toolkit==3.0.28\",\n \"propcache==0.3.2\",\n \"protobuf==4.21.12\",\n \"psutil==5.9.0\",\n \"ptyprocess==0.7.0\",\n \"py==1.10.0\",\n \"pyarrow==20.0.0\",\n \"pyasn1==0.4.8\",\n \"pyasn1-modules==0.2.1\",\n \"pycodestyle==2.8.0\",\n \"pycparser==2.21\",\n \"pycryptodomex==3.11.0\",\n \"pydantic==2.11.5\",\n \"pydantic-core==2.33.2\",\n \"pyflakes==2.4.0\",\n \"pygments==2.11.2\",\n \"pyhamcrest==2.0.2\",\n \"pyinotify==0.9.6\",\n \"pyjwt==2.3.0\",\n \"pyopenssl==21.0.0\",\n \"pyparsing==2.4.7\",\n \"pyrsistent==0.18.1\",\n \"pyserial==3.5\",\n \"pysmi==0.3.2\",\n \"pysnmp==4.4.12\",\n \"pystache==0.6.0\",\n \"python-dateutil>=2.8.1\",\n \"python-magic==0.4.24\",\n \"pythran>=0.10.0\",\n \"pytz==2022.1\",\n \"pyyaml==6.0.2\",\n \"regex==2024.11.6\",\n \"requests==2.32.4\",\n \"rich==11.2.0\",\n \"rouge-score==0.1.2\",\n \"sacrebleu==2.5.1\",\n \"safetensors==0.5.3\",\n \"scikit-learn==1.7.0\",\n \"scipy>=1.8.0\",\n \"secretstorage==3.3.1\",\n \"sentence-transformers==4.1.0\",\n \"sentry-sdk==2.29.1\",\n \"service-identity==18.1.0\",\n \"setproctitle==1.3.6\",\n \"shellingham==1.5.4\",\n \"six==1.16.0\",\n \"smart-open==7.1.0\",\n \"smmap==5.0.2\",\n \"soupsieve==2.3.1\",\n \"spacy==3.8.7\",\n \"spacy-legacy==3.0.12\",\n \"spacy-loggers==1.0.5\",\n \"srsly==2.5.1\",\n \"ssh-import-id==5.11\",\n \"sympy>=1.12\",\n \"tabulate==0.9.0\",\n \"tensorboard==2.19.0\",\n \"tensorboard-data-server==0.7.2\",\n \"termcolor==1.1.0\",\n \"thinc==8.3.6\",\n \"threadpoolctl==3.1.0\",\n \"tmuxp==1.9.2\",\n \"tokenizers==0.21.1\",\n \"torch==2.6.0\",\n \"torchvision==0.21.0\",\n \"tornado==6.1\",\n \"tqdm==4.67.1\",\n \"traitlets==5.1.1\",\n \"transformers==4.52.4\",\n \"triton==3.2.0\",\n \"twisted==22.1.0\",\n \"typer==0.16.0\",\n \"typing-extensions==4.14.0\",\n \"typing-inspection==0.4.1\",\n \"ufolib2==0.13.1\",\n \"urllib3==2.4.0\",\n \"userpath==1.8.0\",\n \"virtualenv==20.13.0\",\n \"wadllib==1.3.6\",\n \"wandb==0.20.1\",\n \"wasabi==1.1.3\",\n \"wcwidth==0.2.5\",\n \"weasel==0.4.1\",\n \"webencodings==0.5.1\",\n \"websocket-client==1.2.3\",\n \"werkzeug==2.0.2\",\n \"xxhash==3.5.0\",\n \"yarl==1.20.1\",\n \"zipp==1.0.0\",\n \"zope-interface==5.4.0\",\n]\n\n[tool.uv.sources]\nen-core-web-sm = { url = \"https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl\" }\n```"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7289
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7289/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7289/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7289/events
|
https://github.com/huggingface/datasets/issues/7289
| 2,648,019,507 |
I_kwDODunzps6d1ZIz
| 7,289 |
Dataset viewer displays wrong statists
|
[] |
closed
| false | null |
[] | null | 1 | 1,731 | 1,731 | 1,731 |
NONE
| null | null |
### Describe the bug
In [my dataset](https://huggingface.co/datasets/speedcell4/opus-unigram2), there is a column called `lang2`, and there are 94 different classes in total, but the viewer says there are 83 values only. This issue only arises in the `train` split. The total number of values is also 94 in the `test` and `dev` columns, viewer tells the correct number of them.
<img width="177" alt="image" src="https://github.com/user-attachments/assets/78d76ef2-fe0e-4fa3-85e0-fb2552813d1c">
### Steps to reproduce the bug
```python3
from datasets import load_dataset
ds = load_dataset('speedcell4/opus-unigram2').unique('lang2')
for key, lang2 in ds.items():
print(key, len(lang2))
```
This script returns the following and tells that the `train` split has 94 values in the `lang2` column.
```
train 94
dev 94
test 94
zero 5
```
### Expected behavior
94 in the reviewer.
### Environment info
Collecting environment information...
PyTorch version: 2.4.1+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A
OS: CentOS Linux release 8.2.2004 (Core) (x86_64)
GCC version: (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)
Clang version: Could not collect
CMake version: version 3.11.4
Libc version: glibc-2.28
Python version: 3.9.20 (main, Oct 3 2024, 07:27:41) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-4.18.0-193.28.1.el8_2.x86_64-x86_64-with-glibc2.28
Is CUDA available: True
CUDA runtime version: 12.2.140
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA A100-SXM4-40GB
GPU 1: NVIDIA A100-SXM4-40GB
GPU 2: NVIDIA A100-SXM4-40GB
GPU 3: NVIDIA A100-SXM4-40GB
GPU 4: NVIDIA A100-SXM4-40GB
GPU 5: NVIDIA A100-SXM4-40GB
GPU 6: NVIDIA A100-SXM4-40GB
GPU 7: NVIDIA A100-SXM4-40GB
Nvidia driver version: 525.85.05
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 64
On-line CPU(s) list: 0-63
Thread(s) per core: 1
Core(s) per socket: 32
Socket(s): 2
NUMA node(s): 4
Vendor ID: AuthenticAMD
CPU family: 23
Model: 49
Model name: AMD EPYC 7542 32-Core Processor
Stepping: 0
CPU MHz: 3389.114
BogoMIPS: 5789.40
Virtualization: AMD-V
L1d cache: 32K
L1i cache: 32K
L2 cache: 512K
L3 cache: 16384K
NUMA node0 CPU(s): 0-15
NUMA node1 CPU(s): 16-31
NUMA node2 CPU(s): 32-47
NUMA node3 CPU(s): 48-63
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif umip rdpid overflow_recov succor smca
Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] torch==2.4.1+cu121
[pip3] torchaudio==2.4.1+cu121
[pip3] torchdevice==0.1.1
[pip3] torchglyph==0.3.2
[pip3] torchmetrics==1.5.0
[pip3] torchrua==0.5.1
[pip3] torchvision==0.19.1+cu121
[pip3] triton==3.0.0
[pip3] datasets==3.0.1
[conda] numpy 1.26.4 pypi_0 pypi
[conda] torch 2.4.1+cu121 pypi_0 pypi
[conda] torchaudio 2.4.1+cu121 pypi_0 pypi
[conda] torchdevice 0.1.1 pypi_0 pypi
[conda] torchglyph 0.3.2 pypi_0 pypi
[conda] torchmetrics 1.5.0 pypi_0 pypi
[conda] torchrua 0.5.1 pypi_0 pypi
[conda] torchvision 0.19.1+cu121 pypi_0 pypi
[conda] triton 3.0.0 pypi_0 pypi
| null |
https://api.github.com/repos/huggingface/datasets/issues/7289/timeline
| null |
completed
|
speedcell4
| 3,585,459 |
MDQ6VXNlcjM1ODU0NTk=
|
https://avatars.githubusercontent.com/u/3585459?v=4
|
https://api.github.com/users/speedcell4
|
https://github.com/speedcell4
|
https://api.github.com/users/speedcell4/followers
|
https://api.github.com/users/speedcell4/following{/other_user}
|
https://api.github.com/users/speedcell4/gists{/gist_id}
|
https://api.github.com/users/speedcell4/starred{/owner}{/repo}
|
https://api.github.com/users/speedcell4/subscriptions
|
https://api.github.com/users/speedcell4/orgs
|
https://api.github.com/users/speedcell4/repos
|
https://api.github.com/users/speedcell4/events{/privacy}
|
https://api.github.com/users/speedcell4/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7289/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
speedcell4
| 3,585,459 |
MDQ6VXNlcjM1ODU0NTk=
|
https://avatars.githubusercontent.com/u/3585459?v=4
|
https://api.github.com/users/speedcell4
|
https://github.com/speedcell4
|
https://api.github.com/users/speedcell4/followers
|
https://api.github.com/users/speedcell4/following{/other_user}
|
https://api.github.com/users/speedcell4/gists{/gist_id}
|
https://api.github.com/users/speedcell4/starred{/owner}{/repo}
|
https://api.github.com/users/speedcell4/subscriptions
|
https://api.github.com/users/speedcell4/orgs
|
https://api.github.com/users/speedcell4/repos
|
https://api.github.com/users/speedcell4/events{/privacy}
|
https://api.github.com/users/speedcell4/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"i think this issue is more for https://github.com/huggingface/dataset-viewer"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7287
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7287/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7287/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7287/events
|
https://github.com/huggingface/datasets/issues/7287
| 2,646,958,393 |
I_kwDODunzps6dxWE5
| 7,287 |
Support for identifier-based automated split construction
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
open
| false | null |
[] | null | 3 | 1,731 | 1,732 | null |
CONTRIBUTOR
| null | null |
### Feature request
As far as I understand, automated construction of splits for hub datasets is currently based on either file names or directory structure ([as described here](https://huggingface.co/docs/datasets/en/repository_structure))
It would seem to be pretty useful to also allow splits to be based on identifiers of individual examples
This could be configured like
{"split_name": {"column_name": [column values in split]}}
(This in turn requires unique 'index' columns, which could be explicitly supported or just assumed to be defined appropriately by the user).
I guess a potential downside would be that shards would end up spanning different splits - is this something that can be handled somehow? Would this only affect streaming from hub?
### Motivation
The main motivation would be that all data files could be stored in a single directory, and multiple sets of splits could be generated from the same data. This is often useful for large datasets with multiple distinct sets of splits.
This could all be configured via the README.md yaml configs
### Your contribution
May be able to contribute if it seems like a good idea
| null |
https://api.github.com/repos/huggingface/datasets/issues/7287/timeline
| null | null |
alex-hh
| 5,719,745 |
MDQ6VXNlcjU3MTk3NDU=
|
https://avatars.githubusercontent.com/u/5719745?v=4
|
https://api.github.com/users/alex-hh
|
https://github.com/alex-hh
|
https://api.github.com/users/alex-hh/followers
|
https://api.github.com/users/alex-hh/following{/other_user}
|
https://api.github.com/users/alex-hh/gists{/gist_id}
|
https://api.github.com/users/alex-hh/starred{/owner}{/repo}
|
https://api.github.com/users/alex-hh/subscriptions
|
https://api.github.com/users/alex-hh/orgs
|
https://api.github.com/users/alex-hh/repos
|
https://api.github.com/users/alex-hh/events{/privacy}
|
https://api.github.com/users/alex-hh/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7287/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi ! You can already configure the README.md to have multiple sets of splits, e.g.\r\n\r\n```yaml\r\nconfigs:\r\n- config_name: my_first_set_of_split\r\n data_files:\r\n - split: train\r\n path: *.csv\r\n- config_name: my_second_set_of_split\r\n data_files:\r\n - split: train\r\n path: train-*.csv\r\n - split: test\r\n path: test-*.csv\r\n```",
"Hi - I had something slightly different in mind:\r\n\r\nCurrently the yaml splits specified like this only allow specifying which filenames to pass to each split.\r\nBut what if I have a situation where I know which individual *training examples* I want to put in each split.\r\n\r\nI could build split-specific files, however for large datasets with overlapping (e.g. multiple sets of) splits this could result in significant duplication of data.\r\n\r\nI can see that this could actually be very much intended (i.e. to discourage overlapping splits), but wondered whether some support for handling splits based on individual identifiers is something that could be considered. ",
"This is not supported right now :/ Though you can load the data in two steps like this\r\n```python\r\nfrom datasets import load_dataset\r\n\r\nfull_dataset = load_dataset(\"username/dataset\", split=\"train\")\r\nmy_first_set_indices = load_dataset(\"username/dataset\", \"my_first_set_of_split\", split=\"train\")\r\n\r\nmy_first_set = full_dataset.select(my_first_set_indices[\"indices\"])\r\n```\r\n\r\nyou can create such a dataset by adapting this code for example\r\n```python\r\n# upload the full dataset\r\nfull_dataset.push_to_hub(\"username/dataset\")\r\n# then upload the indices for each set\r\nDatasetDict({\r\n \"train\": Dataset.from_dict({\"indices\": [0, 1, 2, 3]}),\r\n \"test\": Dataset.from_dict({\"indices\": [4, 5]}),\r\n}).push_to_hub(\"username/dataset\", \"my_first_set_of_split\")"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7286
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7286/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7286/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7286/events
|
https://github.com/huggingface/datasets/issues/7286
| 2,645,350,151 |
I_kwDODunzps6drNcH
| 7,286 |
Concurrent loading in `load_from_disk` - `num_proc` as a param
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
closed
| false | null |
[] | null | 0 | 1,731 | 1,731 | 1,731 |
NONE
| null | null |
### Feature request
https://github.com/huggingface/datasets/pull/6464 mentions a `num_proc` param while loading dataset from disk, but can't find that in the documentation and code anywhere
### Motivation
Make loading large datasets from disk faster
### Your contribution
Happy to contribute if given pointers
| null |
https://api.github.com/repos/huggingface/datasets/issues/7286/timeline
| null |
not_planned
|
unography
| 5,240,449 |
MDQ6VXNlcjUyNDA0NDk=
|
https://avatars.githubusercontent.com/u/5240449?v=4
|
https://api.github.com/users/unography
|
https://github.com/unography
|
https://api.github.com/users/unography/followers
|
https://api.github.com/users/unography/following{/other_user}
|
https://api.github.com/users/unography/gists{/gist_id}
|
https://api.github.com/users/unography/starred{/owner}{/repo}
|
https://api.github.com/users/unography/subscriptions
|
https://api.github.com/users/unography/orgs
|
https://api.github.com/users/unography/repos
|
https://api.github.com/users/unography/events{/privacy}
|
https://api.github.com/users/unography/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7286/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
unography
| 5,240,449 |
MDQ6VXNlcjUyNDA0NDk=
|
https://avatars.githubusercontent.com/u/5240449?v=4
|
https://api.github.com/users/unography
|
https://github.com/unography
|
https://api.github.com/users/unography/followers
|
https://api.github.com/users/unography/following{/other_user}
|
https://api.github.com/users/unography/gists{/gist_id}
|
https://api.github.com/users/unography/starred{/owner}{/repo}
|
https://api.github.com/users/unography/subscriptions
|
https://api.github.com/users/unography/orgs
|
https://api.github.com/users/unography/repos
|
https://api.github.com/users/unography/events{/privacy}
|
https://api.github.com/users/unography/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
||
https://api.github.com/repos/huggingface/datasets/issues/7282
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7282/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7282/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7282/events
|
https://github.com/huggingface/datasets/issues/7282
| 2,642,075,491 |
I_kwDODunzps6det9j
| 7,282 |
Faulty datasets.exceptions.ExpectedMoreSplitsError
|
[] |
open
| false | null |
[] | null | 0 | 1,731 | 1,731 | null |
CONTRIBUTOR
| null | null |
### Describe the bug
Trying to download only the 'validation' split of my dataset; instead hit the error `datasets.exceptions.ExpectedMoreSplitsError`.
Appears to be the same undesired behavior as reported in [#6939](https://github.com/huggingface/datasets/issues/6939), but with `data_files`, not `data_dir`.
Here is the Traceback:
```
Traceback (most recent call last):
File "/home/user/app/app.py", line 12, in <module>
ds = load_dataset('datacomp/imagenet-1k-random0.0', token=GATED_IMAGENET, data_files={'validation': 'data/val*'}, split='validation', trust_remote_code=True)
File "/usr/local/lib/python3.10/site-packages/datasets/load.py", line 2154, in load_dataset
builder_instance.download_and_prepare(
File "/usr/local/lib/python3.10/site-packages/datasets/builder.py", line 924, in download_and_prepare
self._download_and_prepare(
File "/usr/local/lib/python3.10/site-packages/datasets/builder.py", line 1018, in _download_and_prepare
verify_splits(self.info.splits, split_dict)
File "/usr/local/lib/python3.10/site-packages/datasets/utils/info_utils.py", line 68, in verify_splits
raise ExpectedMoreSplitsError(str(set(expected_splits) - set(recorded_splits)))
datasets.exceptions.ExpectedMoreSplitsError: {'train', 'test'}
```
Note: I am using the `data_files` argument only because I am trying to specify that I only want the 'validation' split, and the whole dataset will be downloaded even when the `split='validation'` argument is specified, unless you also specify `data_files`, as described here: https://discuss.huggingface.co/t/how-can-i-download-a-specific-split-of-a-dataset/79027
### Steps to reproduce the bug
1. Create a Space with the default blank 'gradio' SDK https://huggingface.co/new-space
2. Create a file 'app.py' that loads a dataset to only extract a 'validation' split:
`ds = load_dataset('datacomp/imagenet-1k-random0.0', token=GATED_IMAGENET, data_files={'validation': 'data/val*'}, split='validation', trust_remote_code=True)`
### Expected behavior
Downloading validation split.
### Environment info
Default environment for creating a new Space. Relevant to this bug, that is:
```
FROM docker.io/library/python:3.10@sha256:fd0fa50d997eb56ce560c6e5ca6a1f5cf8fdff87572a16ac07fb1f5ca01eb608
--> RUN pip install --no-cache-dir pip==22.3.1 && pip install --no-cache-dir datasets "huggingface-hub>=0.19" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1"
```
| null |
https://api.github.com/repos/huggingface/datasets/issues/7282/timeline
| null | null |
meg-huggingface
| 90,473,723 |
MDQ6VXNlcjkwNDczNzIz
|
https://avatars.githubusercontent.com/u/90473723?v=4
|
https://api.github.com/users/meg-huggingface
|
https://github.com/meg-huggingface
|
https://api.github.com/users/meg-huggingface/followers
|
https://api.github.com/users/meg-huggingface/following{/other_user}
|
https://api.github.com/users/meg-huggingface/gists{/gist_id}
|
https://api.github.com/users/meg-huggingface/starred{/owner}{/repo}
|
https://api.github.com/users/meg-huggingface/subscriptions
|
https://api.github.com/users/meg-huggingface/orgs
|
https://api.github.com/users/meg-huggingface/repos
|
https://api.github.com/users/meg-huggingface/events{/privacy}
|
https://api.github.com/users/meg-huggingface/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7282/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7281
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7281/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7281/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7281/events
|
https://github.com/huggingface/datasets/issues/7281
| 2,640,346,339 |
I_kwDODunzps6dYHzj
| 7,281 |
File not found error
|
[] |
open
| false | null |
[] | null | 1 | 1,730 | 1,730 | null |
NONE
| null | null |
### Describe the bug
I get a FileNotFoundError:
<img width="944" alt="image" src="https://github.com/user-attachments/assets/1336bc08-06f6-4682-a3c0-071ff65efa87">
### Steps to reproduce the bug
See screenshot.
### Expected behavior
I want to load one audiofile from the dataset.
### Environment info
MacOs Intel 14.6.1 (23G93)
Python 3.10.9
Numpy 1.23
Datasets latest version
| null |
https://api.github.com/repos/huggingface/datasets/issues/7281/timeline
| null | null |
MichielBontenbal
| 37,507,786 |
MDQ6VXNlcjM3NTA3Nzg2
|
https://avatars.githubusercontent.com/u/37507786?v=4
|
https://api.github.com/users/MichielBontenbal
|
https://github.com/MichielBontenbal
|
https://api.github.com/users/MichielBontenbal/followers
|
https://api.github.com/users/MichielBontenbal/following{/other_user}
|
https://api.github.com/users/MichielBontenbal/gists{/gist_id}
|
https://api.github.com/users/MichielBontenbal/starred{/owner}{/repo}
|
https://api.github.com/users/MichielBontenbal/subscriptions
|
https://api.github.com/users/MichielBontenbal/orgs
|
https://api.github.com/users/MichielBontenbal/repos
|
https://api.github.com/users/MichielBontenbal/events{/privacy}
|
https://api.github.com/users/MichielBontenbal/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7281/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Link to the dataset: https://huggingface.co/datasets/MichielBontenbal/UrbanSounds "
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7280
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7280/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7280/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7280/events
|
https://github.com/huggingface/datasets/issues/7280
| 2,639,977,077 |
I_kwDODunzps6dWtp1
| 7,280 |
Add filename in error message when ReadError or similar occur
|
[] |
open
| false | null |
[] | null | 5 | 1,730 | 1,732 | null |
NONE
| null | null |
Please update error messages to include relevant information for debugging when loading datasets with `load_dataset()` that may have a few corrupted files.
Whenever downloading a full dataset, some files might be corrupted (either at the source or from downloading corruption).
However the errors often only let me know it was a tar file if `tarfile.ReadError` appears on the traceback, and I imagine similarly for other file types.
This makes it really hard to debug which file is corrupted, and when dealing with very large datasets, it shouldn't be necessary to force download everything again.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7280/timeline
| null | null |
elisa-aleman
| 37,046,039 |
MDQ6VXNlcjM3MDQ2MDM5
|
https://avatars.githubusercontent.com/u/37046039?v=4
|
https://api.github.com/users/elisa-aleman
|
https://github.com/elisa-aleman
|
https://api.github.com/users/elisa-aleman/followers
|
https://api.github.com/users/elisa-aleman/following{/other_user}
|
https://api.github.com/users/elisa-aleman/gists{/gist_id}
|
https://api.github.com/users/elisa-aleman/starred{/owner}{/repo}
|
https://api.github.com/users/elisa-aleman/subscriptions
|
https://api.github.com/users/elisa-aleman/orgs
|
https://api.github.com/users/elisa-aleman/repos
|
https://api.github.com/users/elisa-aleman/events{/privacy}
|
https://api.github.com/users/elisa-aleman/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7280/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi Elisa, please share the error traceback here, and if you manage to find the location in the `datasets` code where the error occurs, feel free to open a PR to add the necessary logging / improve the error message.",
"> please share the error traceback\n\nI don't have access to it but it should be during [this exception](https://github.com/huggingface/datasets/blob/2049c00921c59cdeb835137a1c49639cf175af07/src/datasets/builder.py#L1643) which happens during the loading of a dataset. If one of the downloaded files is corrupted, the for loop will not yield correctly, and the error will come from, say, in the case of tar files, [this iterable](https://github.com/huggingface/datasets/blob/2049c00921c59cdeb835137a1c49639cf175af07/src/datasets/utils/file_utils.py#L1293) which has no explicit error handling that leaves clues as to which file has failed.\n\nI only know the case for tar files, but I consider this issue could be happening across different file types too.",
"I think having a better error handling for this tar iterable would be useful already, maybe a simple try/except in `_iter_from_urlpath` that checks for `tarfile.ReadError` and raises an error with the `urlpath` mentioned in the error ?",
"I think not just from higher calls like the `_iter_from_urlpath` but directly wherever a file is attempted to be opened would be the best case, as the traceback would simply lead to that.",
"so maybe there should be better error messages in each dataset builder definition ? e.g. in https://github.com/huggingface/datasets/blob/main/src/datasets/packaged_modules/webdataset/webdataset.py for webdataset TAR archives"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7276
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7276/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7276/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7276/events
|
https://github.com/huggingface/datasets/issues/7276
| 2,631,917,431 |
I_kwDODunzps6c3993
| 7,276 |
Accessing audio dataset value throws Format not recognised error
|
[] |
open
| false | null |
[] | null | 3 | 1,730 | 1,731 | null |
NONE
| null | null |
### Describe the bug
Accessing audio dataset value throws `Format not recognised error`
### Steps to reproduce the bug
**code:**
```py
from datasets import load_dataset
dataset = load_dataset("fawazahmed0/bug-audio")
for data in dataset["train"]:
print(data)
```
**output:**
```bash
(mypy) C:\Users\Nawaz-Server\Documents\ml>python myest.py
[C:\vcpkg\buildtrees\mpg123\src\0d8db63f9b-3db975bc05.clean\src\libmpg123\layer3.c:INT123_do_layer3():1801] error: dequantization failed!
{'audio': {'path': 'C:\\Users\\Nawaz-Server\\.cache\\huggingface\\hub\\datasets--fawazahmed0--bug-audio\\snapshots\\fab1398431fed1c0a2a7bff0945465bab8b5daef\\data\\Ghamadi\\037135.mp3', 'array': array([ 0.00000000e+00, -2.86519935e-22, -2.56504911e-21, ...,
-1.94239747e-02, -2.42924765e-02, -2.99104657e-02]), 'sampling_rate': 22050}, 'reciter': 'Ghamadi', 'transcription': 'الا عجوز ا في الغبرين', 'line': 3923, 'chapter': 37, 'verse': 135, 'text': 'إِلَّا عَجُوزࣰ ا فِي ٱلۡغَٰبِرِينَ'}
Traceback (most recent call last):
File "C:\Users\Nawaz-Server\Documents\ml\myest.py", line 5, in <module>
for data in dataset["train"]:
~~~~~~~^^^^^^^^^
File "C:\Users\Nawaz-Server\.conda\envs\mypy\Lib\site-packages\datasets\arrow_dataset.py", line 2372, in __iter__
formatted_output = format_table(
^^^^^^^^^^^^^
File "C:\Users\Nawaz-Server\.conda\envs\mypy\Lib\site-packages\datasets\formatting\formatting.py", line 639, in format_table
return formatter(pa_table, query_type=query_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Nawaz-Server\.conda\envs\mypy\Lib\site-packages\datasets\formatting\formatting.py", line 403, in __call__
return self.format_row(pa_table)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Nawaz-Server\.conda\envs\mypy\Lib\site-packages\datasets\formatting\formatting.py", line 444, in format_row
row = self.python_features_decoder.decode_row(row)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Nawaz-Server\.conda\envs\mypy\Lib\site-packages\datasets\formatting\formatting.py", line 222, in decode_row
return self.features.decode_example(row) if self.features else row
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Nawaz-Server\.conda\envs\mypy\Lib\site-packages\datasets\features\features.py", line 2042, in decode_example
column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Nawaz-Server\.conda\envs\mypy\Lib\site-packages\datasets\features\features.py", line 1403, in decode_nested_example
return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Nawaz-Server\.conda\envs\mypy\Lib\site-packages\datasets\features\audio.py", line 184, in decode_example
array, sampling_rate = sf.read(f)
^^^^^^^^^^
File "C:\Users\Nawaz-Server\.conda\envs\mypy\Lib\site-packages\soundfile.py", line 285, in read
with SoundFile(file, 'r', samplerate, channels,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Nawaz-Server\.conda\envs\mypy\Lib\site-packages\soundfile.py", line 658, in __init__
self._file = self._open(file, mode_int, closefd)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Nawaz-Server\.conda\envs\mypy\Lib\site-packages\soundfile.py", line 1216, in _open
raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
soundfile.LibsndfileError: Error opening <_io.BufferedReader name='C:\\Users\\Nawaz-Server\\.cache\\huggingface\\hub\\datasets--fawazahmed0--bug-audio\\snapshots\\fab1398431fed1c0a2a7bff0945465bab8b5daef\\data\\Ghamadi\\037136.mp3'>: Format not recognised.
```
### Expected behavior
Everything should work fine, as loading the problematic audio file directly with soundfile package works fine
**code:**
```
import soundfile as sf
print(sf.read('C:\\Users\\Nawaz-Server\\.cache\\huggingface\\hub\\datasets--fawazahmed0--bug-audio\\snapshots\\fab1398431fed1c0a2a7bff0945465bab8b5daef\\data\\Ghamadi\\037136.mp3'))
```
**output:**
```bash
(mypy) C:\Users\Nawaz-Server\Documents\ml>python myest.py
[C:\vcpkg\buildtrees\mpg123\src\0d8db63f9b-3db975bc05.clean\src\libmpg123\layer3.c:INT123_do_layer3():1801] error: dequantization failed!
(array([ 0.00000000e+00, -8.43723821e-22, -2.45370628e-22, ...,
-7.71464454e-03, -6.90496899e-03, -8.63333419e-03]), 22050)
```
### Environment info
- `datasets` version: 3.0.2
- Platform: Windows-11-10.0.22621-SP0
- Python version: 3.12.7
- `huggingface_hub` version: 0.26.2
- PyArrow version: 17.0.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.10.0
- soundfile: 0.12.1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7276/timeline
| null | null |
fawazahmed0
| 20,347,013 |
MDQ6VXNlcjIwMzQ3MDEz
|
https://avatars.githubusercontent.com/u/20347013?v=4
|
https://api.github.com/users/fawazahmed0
|
https://github.com/fawazahmed0
|
https://api.github.com/users/fawazahmed0/followers
|
https://api.github.com/users/fawazahmed0/following{/other_user}
|
https://api.github.com/users/fawazahmed0/gists{/gist_id}
|
https://api.github.com/users/fawazahmed0/starred{/owner}{/repo}
|
https://api.github.com/users/fawazahmed0/subscriptions
|
https://api.github.com/users/fawazahmed0/orgs
|
https://api.github.com/users/fawazahmed0/repos
|
https://api.github.com/users/fawazahmed0/events{/privacy}
|
https://api.github.com/users/fawazahmed0/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7276/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi ! can you try if this works ?\r\n\r\n```python\r\nimport soundfile as sf\r\n\r\nwith open('C:\\\\Users\\\\Nawaz-Server\\\\.cache\\\\huggingface\\\\hub\\\\datasets--fawazahmed0--bug-audio\\\\snapshots\\\\fab1398431fed1c0a2a7bff0945465bab8b5daef\\\\data\\\\Ghamadi\\\\037136.mp3', 'rb') as f:\r\n print(sf.read(f))\r\n```",
"@lhoestq Same error, here is the output:\r\n\r\n```bash\r\n(mypy) C:\\Users\\Nawaz-Server\\Documents\\ml>python myest.py\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\Nawaz-Server\\Documents\\ml\\myest.py\", line 5, in <module>\r\n print(sf.read(f))\r\n ^^^^^^^^^^\r\n File \"C:\\Users\\Nawaz-Server\\.conda\\envs\\mypy\\Lib\\site-packages\\soundfile.py\", line 285, in read\r\n with SoundFile(file, 'r', samplerate, channels,\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"C:\\Users\\Nawaz-Server\\.conda\\envs\\mypy\\Lib\\site-packages\\soundfile.py\", line 658, in __init__\r\n self._file = self._open(file, mode_int, closefd)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"C:\\Users\\Nawaz-Server\\.conda\\envs\\mypy\\Lib\\site-packages\\soundfile.py\", line 1216, in _open\r\n raise LibsndfileError(err, prefix=\"Error opening {0!r}: \".format(self.name))\r\nsoundfile.LibsndfileError: Error opening <_io.BufferedReader name='C:\\\\Users\\\\Nawaz-Server\\\\.cache\\\\huggingface\\\\hub\\\\datasets--fawazahmed0--bug-audio\\\\snapshots\\\\fab1398431fed1c0a2a7bff0945465bab8b5daef\\\\data\\\\Ghamadi\\\\037136.mp3'>: Format not recognised.\r\n\r\n```",
"upstream bug: https://github.com/bastibe/python-soundfile/issues/439"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7275
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7275/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7275/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7275/events
|
https://github.com/huggingface/datasets/issues/7275
| 2,631,713,397 |
I_kwDODunzps6c3MJ1
| 7,275 |
load_dataset
|
[] |
open
| false | null |
[] | null | 0 | 1,730 | 1,730 | null |
NONE
| null | null |
### Describe the bug
I am performing two operations I see on a hugging face tutorial (Fine-tune a language model), and I am defining every aspect inside the mapped functions, also some imports of the library because it doesnt identify anything not defined outside that function where the dataset elements are being mapped:
https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb#scrollTo=iaAJy5Hu3l_B
`- lm_datasets = tokenized_datasets.map(
group_texts,
batched=True,
batch_size=batch_size,
num_proc=4,
)
- tokenized_datasets = datasets.map(tokenize_function, batched=True, num_proc=4, remove_columns=["text"])
def tokenize_function(examples):
model_checkpoint = 'gpt2'
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint, use_fast=True)
return tokenizer(examples["text"])`
### Steps to reproduce the bug
Currently handle all the imports inside the function
### Expected behavior
The code must work es expected in the notebook, but currently this is not happening.
https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb#scrollTo=iaAJy5Hu3l_B
### Environment info
print(transformers.__version__)
4.46.1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7275/timeline
| null | null |
santiagobp99
| 46,941,974 |
MDQ6VXNlcjQ2OTQxOTc0
|
https://avatars.githubusercontent.com/u/46941974?v=4
|
https://api.github.com/users/santiagobp99
|
https://github.com/santiagobp99
|
https://api.github.com/users/santiagobp99/followers
|
https://api.github.com/users/santiagobp99/following{/other_user}
|
https://api.github.com/users/santiagobp99/gists{/gist_id}
|
https://api.github.com/users/santiagobp99/starred{/owner}{/repo}
|
https://api.github.com/users/santiagobp99/subscriptions
|
https://api.github.com/users/santiagobp99/orgs
|
https://api.github.com/users/santiagobp99/repos
|
https://api.github.com/users/santiagobp99/events{/privacy}
|
https://api.github.com/users/santiagobp99/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7275/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7269
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7269/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7269/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7269/events
|
https://github.com/huggingface/datasets/issues/7269
| 2,626,873,843 |
I_kwDODunzps6ckunz
| 7,269 |
Memory leak when streaming
|
[] |
open
| false | null |
[] | null | 6 | 1,730 | 1,756 | null |
NONE
| null | null |
### Describe the bug
I try to use a dataset with streaming=True, the issue I have is that the RAM usage becomes higher and higher until it is no longer sustainable.
I understand that huggingface store data in ram during the streaming, and more worker in dataloader there are, more a lot of shard will be stored in ram, but the issue I have is that the ram usage is not constant. So after each new shard loaded, the ram usage will be higher and higher.
### Steps to reproduce the bug
You can run this code and see you ram usage, after each shard of 255 examples, your ram usage will be extended.
```py
from datasets import load_dataset
from torch.utils.data import DataLoader
dataset = load_dataset("WaveGenAI/dataset", streaming=True)
dataloader = DataLoader(dataset["train"], num_workers=3)
for i, data in enumerate(dataloader):
print(i, end="\r")
```
### Expected behavior
The Ram usage should be always the same (just 3 shards loaded in the ram).
### Environment info
- `datasets` version: 3.0.1
- Platform: Linux-6.10.5-arch1-1-x86_64-with-glibc2.40
- Python version: 3.12.4
- `huggingface_hub` version: 0.26.0
- PyArrow version: 17.0.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.6.1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7269/timeline
| null | null |
Jourdelune
| 64,205,064 |
MDQ6VXNlcjY0MjA1MDY0
|
https://avatars.githubusercontent.com/u/64205064?v=4
|
https://api.github.com/users/Jourdelune
|
https://github.com/Jourdelune
|
https://api.github.com/users/Jourdelune/followers
|
https://api.github.com/users/Jourdelune/following{/other_user}
|
https://api.github.com/users/Jourdelune/gists{/gist_id}
|
https://api.github.com/users/Jourdelune/starred{/owner}{/repo}
|
https://api.github.com/users/Jourdelune/subscriptions
|
https://api.github.com/users/Jourdelune/orgs
|
https://api.github.com/users/Jourdelune/repos
|
https://api.github.com/users/Jourdelune/events{/privacy}
|
https://api.github.com/users/Jourdelune/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7269/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"I seem to have encountered the same problem when loading non streaming datasets. load_from_disk. Causing hundreds of GB of memory, but the dataset actually only has 50GB",
"FYI when streaming parquet data, only one row group per worker is loaded in memory at a time.\r\n\r\nBtw for datasets of embeddings you can surely optimize your RAM by reading the data as torch tensors directly instead of the default python lists\r\n\r\n```python\r\nfrom datasets import load_dataset\r\nfrom torch.utils.data import DataLoader\r\n\r\ndataset = load_dataset(\"WaveGenAI/dataset\", streaming=True).with_format(\"torch\")\r\n\r\ndataloader = DataLoader(dataset[\"train\"], num_workers=3)\r\n```",
"Im also, hitting this issue.....\n\n```python\n # This is what's causing the leak:\n batch_datasets = []\n for file_path in batch_files:\n dataset = load_dataset(..., streaming=True)\n shuffled_dataset = dataset.shuffle(seed=42, buffer_size=1000) # 1000-item buffer\n batch_datasets.append(shuffled_dataset) # Buffer persists\n\n interleaved_dataset = interleave_datasets(batch_datasets, seed=42) \n```\n\nAnd, nothing helps\n```python\n del batch_datasets, interleaved_dataset\n gc.collect() # This doesn't work for HuggingFace internal memory structures\n```\nso my guess is that they wrote this in RUST and forgot to clean up!!!\n\nNow, if i remove the interleaving and process files sequentially... like this it still leaks\n```python\n\n # Process files one by one - no batching, no interleaving\n for file_idx, file_path in enumerate(file_paths):\n dataset = load_dataset(\"parquet\", data_files=file_path, split=\"train\", streaming=True)\n shuffled_dataset = dataset.shuffle(seed=42, buffer_size=1000) \n \n for record in shuffled_dataset:\n # Process record immediately\n pass\n \n del dataset, shuffled_dataset\n gc.collect()\n```\n\n - File 1: 42.4% memory\n - File 2: 42.5% memory\n - File 3: 42.5% memory\n - File 4: 48.4% memory (+6%)\n - File 5: 52.7% memory (+4.3%)\n - File 6: 56.7% memory (+4%)\n - File 7: 59.6% memory (+2.9%)\n - File 8: 62.0% memory (+2.4%)\n\nI had to go back to sequential shuffling (NO Interleaving) and clean up like this\n```python\n dataset.cleanup_cache_files() \n del dataset, shuffled_dataset \n gc.collect() \n pa.default_memory_pool().release_unused() \n libc.malloc_trim(0) # when available \n```",
"i have also observed these memory leaks inside the huggingface library when developing bghira/captionflow and had the same outcome of being unable to actually free anything when it occurs. i've worked around it by avoiding some of the more damaging parts of the library, but in doing so i've essentially restricted the compatibility levels of the project.",
"Could it be a leak from PyArrow which is used to stream the data from the Parquet files ?",
"i believe it's heavily involved yeah"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7268
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7268/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7268/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7268/events
|
https://github.com/huggingface/datasets/issues/7268
| 2,626,664,687 |
I_kwDODunzps6cj7jv
| 7,268 |
load_from_disk
|
[] |
open
| false | null |
[] | null | 3 | 1,730 | 1,751 | null |
NONE
| null | null |
### Describe the bug
I have data saved with save_to_disk. The data is big (700Gb). When I try loading it, the only option is load_from_disk, and this function copies the data to a tmp directory, causing me to run out of disk space. Is there an alternative solution to that?
### Steps to reproduce the bug
when trying to load data using load_From_disk after being saved using save_to_disk
### Expected behavior
run out of disk space
### Environment info
lateest version
| null |
https://api.github.com/repos/huggingface/datasets/issues/7268/timeline
| null | null |
ghaith-mq
| 71,670,961 |
MDQ6VXNlcjcxNjcwOTYx
|
https://avatars.githubusercontent.com/u/71670961?v=4
|
https://api.github.com/users/ghaith-mq
|
https://github.com/ghaith-mq
|
https://api.github.com/users/ghaith-mq/followers
|
https://api.github.com/users/ghaith-mq/following{/other_user}
|
https://api.github.com/users/ghaith-mq/gists{/gist_id}
|
https://api.github.com/users/ghaith-mq/starred{/owner}{/repo}
|
https://api.github.com/users/ghaith-mq/subscriptions
|
https://api.github.com/users/ghaith-mq/orgs
|
https://api.github.com/users/ghaith-mq/repos
|
https://api.github.com/users/ghaith-mq/events{/privacy}
|
https://api.github.com/users/ghaith-mq/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7268/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hello, It's an interesting issue here. I have the same problem, I have a local dataset and I want to push the dataset to the hub but huggingface does a copy of it.\r\n\r\n```py\r\nfrom datasets import load_dataset\r\n\r\ndataset = load_dataset(\"webdataset\", data_files=\"/media/works/data/*.tar\") # copy here\r\ndataset.push_to_hub(\"WaveGenAI/audios2\")\r\n```\r\n\r\nEdit: I can use HfApi for my use case\r\n",
"Is there any update on this issue? I found the same behavior too.\nMy datasets version is `2.13.2`",
"Updating to the newest version of datasets lib resolved the issue. "
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7267
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7267/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7267/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7267/events
|
https://github.com/huggingface/datasets/issues/7267
| 2,626,490,029 |
I_kwDODunzps6cjQ6t
| 7,267 |
Source installation fails on Macintosh with python 3.10
|
[] |
open
| false | null |
[] | null | 1 | 1,730 | 1,730 | null |
NONE
| null | null |
### Describe the bug
Hi,
Decord is a dev dependency not maintained since couple years.
It does not have an ARM package available rendering it uninstallable on non-intel based macs
Suggestion is to move to eva-decord (https://github.com/georgia-tech-db/eva-decord) which doesnt have this problem.
Happy to raise a PR
### Steps to reproduce the bug
Source installation as mentioned in contributinog.md
### Expected behavior
Installation without decord failing to be installed.
### Environment info
python=3.10, M3 Mac
| null |
https://api.github.com/repos/huggingface/datasets/issues/7267/timeline
| null | null |
mayankagarwals
| 39,498,938 |
MDQ6VXNlcjM5NDk4OTM4
|
https://avatars.githubusercontent.com/u/39498938?v=4
|
https://api.github.com/users/mayankagarwals
|
https://github.com/mayankagarwals
|
https://api.github.com/users/mayankagarwals/followers
|
https://api.github.com/users/mayankagarwals/following{/other_user}
|
https://api.github.com/users/mayankagarwals/gists{/gist_id}
|
https://api.github.com/users/mayankagarwals/starred{/owner}{/repo}
|
https://api.github.com/users/mayankagarwals/subscriptions
|
https://api.github.com/users/mayankagarwals/orgs
|
https://api.github.com/users/mayankagarwals/repos
|
https://api.github.com/users/mayankagarwals/events{/privacy}
|
https://api.github.com/users/mayankagarwals/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7267/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"I encountered the same problem on M1, a workaround I did was to simply comment out the dependency:\r\n\r\n```python\r\n...\r\n \"zstandard\",\r\n \"polars[timezone]>=0.20.0\",\r\n # \"decord==0.6.0\",\r\n]\r\n```\r\n\r\nThis worked for me as the adjustments I did to the code do not use the dependency, but I do not know if the same holds for you.\r\n\r\nI also do not think it is a good idea to rely on a dependency (I mean decord) that has not been maintained for 2 years, but I saw that even eva-decord hasn't been maintained since last year.\r\n\r\nDid you get it to work with eva-decord?"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7266
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7266/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7266/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7266/events
|
https://github.com/huggingface/datasets/issues/7266
| 2,624,666,087 |
I_kwDODunzps6ccTnn
| 7,266 |
The dataset viewer should be available soon. Please retry later.
|
[] |
closed
| false | null |
[] | null | 1 | 1,730 | 1,730 | 1,730 |
NONE
| null | null |
### Describe the bug
After waiting for 2 hours, it still presents ``The dataset viewer should be available soon. Please retry later.''
### Steps to reproduce the bug
dataset link: https://huggingface.co/datasets/BryanW/HI_EDIT
### Expected behavior
Present the dataset viewer.
### Environment info
NA
| null |
https://api.github.com/repos/huggingface/datasets/issues/7266/timeline
| null |
completed
|
viiika
| 39,821,659 |
MDQ6VXNlcjM5ODIxNjU5
|
https://avatars.githubusercontent.com/u/39821659?v=4
|
https://api.github.com/users/viiika
|
https://github.com/viiika
|
https://api.github.com/users/viiika/followers
|
https://api.github.com/users/viiika/following{/other_user}
|
https://api.github.com/users/viiika/gists{/gist_id}
|
https://api.github.com/users/viiika/starred{/owner}{/repo}
|
https://api.github.com/users/viiika/subscriptions
|
https://api.github.com/users/viiika/orgs
|
https://api.github.com/users/viiika/repos
|
https://api.github.com/users/viiika/events{/privacy}
|
https://api.github.com/users/viiika/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7266/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
viiika
| 39,821,659 |
MDQ6VXNlcjM5ODIxNjU5
|
https://avatars.githubusercontent.com/u/39821659?v=4
|
https://api.github.com/users/viiika
|
https://github.com/viiika
|
https://api.github.com/users/viiika/followers
|
https://api.github.com/users/viiika/following{/other_user}
|
https://api.github.com/users/viiika/gists{/gist_id}
|
https://api.github.com/users/viiika/starred{/owner}{/repo}
|
https://api.github.com/users/viiika/subscriptions
|
https://api.github.com/users/viiika/orgs
|
https://api.github.com/users/viiika/repos
|
https://api.github.com/users/viiika/events{/privacy}
|
https://api.github.com/users/viiika/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Waiting is all you need. 10 hours later, it works."
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7261
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7261/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7261/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7261/events
|
https://github.com/huggingface/datasets/issues/7261
| 2,620,510,840 |
I_kwDODunzps6cMdJ4
| 7,261 |
Cannot load the cache when mapping the dataset
|
[] |
open
| false | null |
[] | null | 2 | 1,730 | 1,742 | null |
NONE
| null | null |
### Describe the bug
I'm training the flux controlnet. The train_dataset.map() takes long time to finish. However, when I killed one training process and want to restart a new training with the same dataset. I can't reuse the mapped result even I defined the cache dir for the dataset.
with accelerator.main_process_first():
from datasets.fingerprint import Hasher
# fingerprint used by the cache for the other processes to load the result
# details: https://github.com/huggingface/diffusers/pull/4038#discussion_r1266078401
new_fingerprint = Hasher.hash(args)
train_dataset = train_dataset.map(
compute_embeddings_fn, batched=True, new_fingerprint=new_fingerprint, batch_size=10,
)
### Steps to reproduce the bug
train flux controlnet and start again
### Expected behavior
will not map again
### Environment info
latest diffusers
| null |
https://api.github.com/repos/huggingface/datasets/issues/7261/timeline
| null | null |
zhangn77
| 43,033,959 |
MDQ6VXNlcjQzMDMzOTU5
|
https://avatars.githubusercontent.com/u/43033959?v=4
|
https://api.github.com/users/zhangn77
|
https://github.com/zhangn77
|
https://api.github.com/users/zhangn77/followers
|
https://api.github.com/users/zhangn77/following{/other_user}
|
https://api.github.com/users/zhangn77/gists{/gist_id}
|
https://api.github.com/users/zhangn77/starred{/owner}{/repo}
|
https://api.github.com/users/zhangn77/subscriptions
|
https://api.github.com/users/zhangn77/orgs
|
https://api.github.com/users/zhangn77/repos
|
https://api.github.com/users/zhangn77/events{/privacy}
|
https://api.github.com/users/zhangn77/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7261/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"@zhangn77 Hi ,have you solved this problem? I encountered the same issue during training. Could we discuss it?",
"I also encountered the same problem, why is that?"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7260
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7260/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7260/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7260/events
|
https://github.com/huggingface/datasets/issues/7260
| 2,620,014,285 |
I_kwDODunzps6cKj7N
| 7,260 |
cache can't cleaned or disabled
|
[] |
open
| false | null |
[] | null | 1 | 1,730 | 1,733 | null |
NONE
| null | null |
### Describe the bug
I tried following ways, the cache can't be disabled.
I got 2T data, but I also got more than 2T cache file. I got pressure on storage. I need to diable cache or cleaned immediately after processed. Following ways are all not working, please give some help!
```python
from datasets import disable_caching
from transformers import AutoTokenizer
disable_caching()
tokenizer = AutoTokenizer.from_pretrained(args.tokenizer_path)
def tokenization_fn(examples):
column_name = 'text' if 'text' in examples else 'data'
tokenized_inputs = tokenizer(
examples[column_name], return_special_tokens_mask=True, truncation=False,
max_length=tokenizer.model_max_length
)
return tokenized_inputs
data = load_dataset('json', data_files=save_local_path, split='train', cache_dir=None)
data.cleanup_cache_files()
updated_dataset = data.map(tokenization_fn, load_from_cache_file=False)
updated_dataset .cleanup_cache_files()
```
### Expected behavior
no cache file generated
### Environment info
Ubuntu 20.04.6 LTS
datasets 3.0.2
| null |
https://api.github.com/repos/huggingface/datasets/issues/7260/timeline
| null | null |
charliedream1
| 15,007,828 |
MDQ6VXNlcjE1MDA3ODI4
|
https://avatars.githubusercontent.com/u/15007828?v=4
|
https://api.github.com/users/charliedream1
|
https://github.com/charliedream1
|
https://api.github.com/users/charliedream1/followers
|
https://api.github.com/users/charliedream1/following{/other_user}
|
https://api.github.com/users/charliedream1/gists{/gist_id}
|
https://api.github.com/users/charliedream1/starred{/owner}{/repo}
|
https://api.github.com/users/charliedream1/subscriptions
|
https://api.github.com/users/charliedream1/orgs
|
https://api.github.com/users/charliedream1/repos
|
https://api.github.com/users/charliedream1/events{/privacy}
|
https://api.github.com/users/charliedream1/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7260/reactions
| 2 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hey I have a similar problem and found a workaround using [temporary directories](https://docs.python.org/3/library/tempfile.html):\r\n\r\n```python\r\nfrom tempfile import TemporaryDirectory\r\n\r\nwith TemporaryDirectory() as cache_dir:\r\n data = load_dataset('json', data_files=save_local_path, split='train', cache_dir=cache_dir)\r\n```\r\n\r\nBut I do agree that it would be more intuitive if `datasets` supported this directly. Especially `disable_caching` is confusing, since it basically doesn't disable caching."
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7254
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7254/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7254/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7254/events
|
https://github.com/huggingface/datasets/issues/7254
| 2,616,174,996 |
I_kwDODunzps6b76mU
| 7,254 |
mismatch for datatypes when providing `Features` with `Array2D` and user specified `dtype` and using with_format("numpy")
|
[] |
open
| false | null |
[] | null | 1 | 1,729 | 1,729 | null |
NONE
| null | null |
### Describe the bug
If the user provides a `Features` type value to `datasets.Dataset` with members having `Array2D` with a value for `dtype`, it is not respected during `with_format("numpy")` which should return a `np.array` with `dtype` that the user provided for `Array2D`. It seems for floats, it will be set to `float32` and for ints it will be set to `int64`
### Steps to reproduce the bug
```python
import numpy as np
import datasets
from datasets import Dataset, Features, Array2D
print(f"datasets version: {datasets.__version__}")
data_info = {
"arr_float" : "float64",
"arr_int" : "int32"
}
sample = {key : [np.zeros([4, 5], dtype=dtype)] for key, dtype in data_info.items()}
features = {key : Array2D(shape=(None, 5), dtype=dtype) for key, dtype in data_info.items()}
features = Features(features)
dataset = Dataset.from_dict(sample, features=features)
ds = dataset.with_format("numpy")
for key in features:
print(f"{key} feature dtype: ", ds.features[key].dtype)
print(f"{key} dtype:", ds[key].dtype)
```
Output:
```bash
datasets version: 3.0.2
arr_float feature dtype: float64
arr_float dtype: float32
arr_int feature dtype: int32
arr_int dtype: int64
```
### Expected behavior
It should return a `np.array` with `dtype` that the user provided for the corresponding member in the `Features` type value
### Environment info
- `datasets` version: 3.0.2
- Platform: Linux-6.11.5-arch1-1-x86_64-with-glibc2.40
- Python version: 3.12.7
- `huggingface_hub` version: 0.26.1
- PyArrow version: 16.1.0
- Pandas version: 2.2.2
- `fsspec` version: 2024.5.0
| null |
https://api.github.com/repos/huggingface/datasets/issues/7254/timeline
| null | null |
Akhil-CM
| 97,193,607 |
U_kgDOBcsOhw
|
https://avatars.githubusercontent.com/u/97193607?v=4
|
https://api.github.com/users/Akhil-CM
|
https://github.com/Akhil-CM
|
https://api.github.com/users/Akhil-CM/followers
|
https://api.github.com/users/Akhil-CM/following{/other_user}
|
https://api.github.com/users/Akhil-CM/gists{/gist_id}
|
https://api.github.com/users/Akhil-CM/starred{/owner}{/repo}
|
https://api.github.com/users/Akhil-CM/subscriptions
|
https://api.github.com/users/Akhil-CM/orgs
|
https://api.github.com/users/Akhil-CM/repos
|
https://api.github.com/users/Akhil-CM/events{/privacy}
|
https://api.github.com/users/Akhil-CM/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7254/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"It seems that https://github.com/huggingface/datasets/issues/5517 is exactly the same issue.\r\n\r\nIt was mentioned there that this would be fixed in version 3.x"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7253
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7253/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7253/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7253/events
|
https://github.com/huggingface/datasets/issues/7253
| 2,615,862,202 |
I_kwDODunzps6b6uO6
| 7,253 |
Unable to upload a large dataset zip either from command line or UI
|
[] |
open
| false | null |
[] | null | 0 | 1,729 | 1,729 | null |
NONE
| null | null |
### Describe the bug
Unable to upload a large dataset zip from command line or UI. UI simply says error. I am trying to a upload a tar.gz file of 17GB.
<img width="550" alt="image" src="https://github.com/user-attachments/assets/f9d29024-06c8-49c4-a109-0492cff79d34">
<img width="755" alt="image" src="https://github.com/user-attachments/assets/a8d4acda-7f02-4279-9c2d-b2e0282b4faa">
### Steps to reproduce the bug
Upload a large file
### Expected behavior
The file should upload without any issue.
### Environment info
None
| null |
https://api.github.com/repos/huggingface/datasets/issues/7253/timeline
| null | null |
vakyansh
| 159,609,047 |
U_kgDOCYNw1w
|
https://avatars.githubusercontent.com/u/159609047?v=4
|
https://api.github.com/users/vakyansh
|
https://github.com/vakyansh
|
https://api.github.com/users/vakyansh/followers
|
https://api.github.com/users/vakyansh/following{/other_user}
|
https://api.github.com/users/vakyansh/gists{/gist_id}
|
https://api.github.com/users/vakyansh/starred{/owner}{/repo}
|
https://api.github.com/users/vakyansh/subscriptions
|
https://api.github.com/users/vakyansh/orgs
|
https://api.github.com/users/vakyansh/repos
|
https://api.github.com/users/vakyansh/events{/privacy}
|
https://api.github.com/users/vakyansh/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7253/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7249
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7249/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7249/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7249/events
|
https://github.com/huggingface/datasets/issues/7249
| 2,610,136,636 |
I_kwDODunzps6bk4Y8
| 7,249 |
How to debugging
|
[] |
open
| false | null |
[] | null | 0 | 1,729 | 1,729 | null |
NONE
| null | null |
### Describe the bug
I wanted to use my own script to handle the processing, and followed the tutorial documentation by rewriting the MyDatasetConfig and MyDatasetBuilder (which contains the _info,_split_generators and _generate_examples methods) classes. Testing with simple data was able to output the results of the processing, but when I wished to do more complex processing, I found that I was unable to debug (even the simple samples were inaccessible). There are no errors reported, and I am able to print the _info,_split_generators and _generate_examples messages, but I am unable to access the breakpoints.
### Steps to reproduce the bug
# my_dataset.py
import json
import datasets
class MyDatasetConfig(datasets.BuilderConfig):
def __init__(self, **kwargs):
super(MyDatasetConfig, self).__init__(**kwargs)
class MyDataset(datasets.GeneratorBasedBuilder):
VERSION = datasets.Version("1.0.0")
BUILDER_CONFIGS = [
MyDatasetConfig(
name="default",
version=VERSION,
description="myDATASET"
),
]
def _info(self):
print("info") # breakpoints
return datasets.DatasetInfo(
description="myDATASET",
features=datasets.Features(
{
"id": datasets.Value("int32"),
"text": datasets.Value("string"),
"label": datasets.ClassLabel(names=["negative", "positive"]),
}
),
supervised_keys=("text", "label"),
)
def _split_generators(self, dl_manager):
print("generate") # breakpoints
data_file = "data.json"
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_file}
),
]
def _generate_examples(self, filepath):
print("example") # breakpoints
with open(filepath, encoding="utf-8") as f:
data = json.load(f)
for idx, sample in enumerate(data):
yield idx, {
"id": sample["id"],
"text": sample["text"],
"label": sample["label"],
}
#main.py
import os
os.environ["TRANSFORMERS_NO_MULTIPROCESSING"] = "1"
from datasets import load_dataset
dataset = load_dataset("my_dataset.py", split="train", cache_dir=None)
print(dataset[:5])
### Expected behavior
Pause at breakpoints while running debugging
### Environment info
pycharm
| null |
https://api.github.com/repos/huggingface/datasets/issues/7249/timeline
| null | null |
ShDdu
| 49,576,595 |
MDQ6VXNlcjQ5NTc2NTk1
|
https://avatars.githubusercontent.com/u/49576595?v=4
|
https://api.github.com/users/ShDdu
|
https://github.com/ShDdu
|
https://api.github.com/users/ShDdu/followers
|
https://api.github.com/users/ShDdu/following{/other_user}
|
https://api.github.com/users/ShDdu/gists{/gist_id}
|
https://api.github.com/users/ShDdu/starred{/owner}{/repo}
|
https://api.github.com/users/ShDdu/subscriptions
|
https://api.github.com/users/ShDdu/orgs
|
https://api.github.com/users/ShDdu/repos
|
https://api.github.com/users/ShDdu/events{/privacy}
|
https://api.github.com/users/ShDdu/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7249/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7248
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7248/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7248/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7248/events
|
https://github.com/huggingface/datasets/issues/7248
| 2,609,926,089 |
I_kwDODunzps6bkE_J
| 7,248 |
ModuleNotFoundError: No module named 'datasets.tasks'
|
[] |
open
| false | null |
[] | null | 2 | 1,729 | 1,729 | null |
NONE
| null | null |
### Describe the bug
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
[<ipython-input-9-13b5f31bd391>](https://bcb6shpazyu-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20241022-060119_RC00_688494744#) in <cell line: 1>()
----> 1 dataset = load_dataset('knowledgator/events_classification_biotech')
11 frames
[/usr/local/lib/python3.10/dist-packages/datasets/load.py](https://bcb6shpazyu-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20241022-060119_RC00_688494744#) in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, keep_in_memory, save_infos, revision, token, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs)
2130
2131 # Create a dataset builder
-> 2132 builder_instance = load_dataset_builder(
2133 path=path,
2134 name=name,
[/usr/local/lib/python3.10/dist-packages/datasets/load.py](https://bcb6shpazyu-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20241022-060119_RC00_688494744#) in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, token, storage_options, trust_remote_code, _require_default_config_name, **config_kwargs)
1886 raise ValueError(error_msg)
1887
-> 1888 builder_cls = get_dataset_builder_class(dataset_module, dataset_name=dataset_name)
1889 # Instantiate the dataset builder
1890 builder_instance: DatasetBuilder = builder_cls(
[/usr/local/lib/python3.10/dist-packages/datasets/load.py](https://bcb6shpazyu-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20241022-060119_RC00_688494744#) in get_dataset_builder_class(dataset_module, dataset_name)
246 dataset_module.importable_file_path
247 ) if dataset_module.importable_file_path else nullcontext():
--> 248 builder_cls = import_main_class(dataset_module.module_path)
249 if dataset_module.builder_configs_parameters.builder_configs:
250 dataset_name = dataset_name or dataset_module.builder_kwargs.get("dataset_name")
[/usr/local/lib/python3.10/dist-packages/datasets/load.py](https://bcb6shpazyu-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20241022-060119_RC00_688494744#) in import_main_class(module_path)
167 def import_main_class(module_path) -> Optional[Type[DatasetBuilder]]:
168 """Import a module at module_path and return its main class: a DatasetBuilder"""
--> 169 module = importlib.import_module(module_path)
170 # Find the main class in our imported module
171 module_main_cls = None
[/usr/lib/python3.10/importlib/__init__.py](https://bcb6shpazyu-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20241022-060119_RC00_688494744#) in import_module(name, package)
124 break
125 level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)
127
128
/usr/lib/python3.10/importlib/_bootstrap.py in _gcd_import(name, package, level)
/usr/lib/python3.10/importlib/_bootstrap.py in _find_and_load(name, import_)
/usr/lib/python3.10/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)
/usr/lib/python3.10/importlib/_bootstrap.py in _load_unlocked(spec)
/usr/lib/python3.10/importlib/_bootstrap_external.py in exec_module(self, module)
/usr/lib/python3.10/importlib/_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)
[~/.cache/huggingface/modules/datasets_modules/datasets/knowledgator--events_classification_biotech/9c8086d498c3104de3a3c5b6640837e18ccd829dcaca49f1cdffe3eb5c4a6361/events_classification_biotech.py](https://bcb6shpazyu-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20241022-060119_RC00_688494744#) in <module>
1 import datasets
2 from datasets import load_dataset
----> 3 from datasets.tasks import TextClassification
4
5 DESCRIPTION = """
ModuleNotFoundError: No module named 'datasets.tasks'
---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------
### Steps to reproduce the bug
!pip install datasets
from datasets import load_dataset
dataset = load_dataset('knowledgator/events_classification_biotech')
### Expected behavior
no ModuleNotFoundError
### Environment info
google colab
| null |
https://api.github.com/repos/huggingface/datasets/issues/7248/timeline
| null | null |
shoowadoo
| 93,593,941 |
U_kgDOBZQhVQ
|
https://avatars.githubusercontent.com/u/93593941?v=4
|
https://api.github.com/users/shoowadoo
|
https://github.com/shoowadoo
|
https://api.github.com/users/shoowadoo/followers
|
https://api.github.com/users/shoowadoo/following{/other_user}
|
https://api.github.com/users/shoowadoo/gists{/gist_id}
|
https://api.github.com/users/shoowadoo/starred{/owner}{/repo}
|
https://api.github.com/users/shoowadoo/subscriptions
|
https://api.github.com/users/shoowadoo/orgs
|
https://api.github.com/users/shoowadoo/repos
|
https://api.github.com/users/shoowadoo/events{/privacy}
|
https://api.github.com/users/shoowadoo/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7248/reactions
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"tasks was removed in v3: #6999 \r\n\r\nI also don't see why TextClassification is imported, since it's not used after. So the fix is simple: delete this line.",
"I opened https://huggingface.co/datasets/knowledgator/events_classification_biotech/discussions/7 to remove the line, hopefully the dataset owner will merge it soon"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7247
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7247/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7247/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7247/events
|
https://github.com/huggingface/datasets/issues/7247
| 2,606,230,029 |
I_kwDODunzps6bV-oN
| 7,247 |
Adding column with dict struction when mapping lead to wrong order
|
[] |
open
| false | null |
[] | null | 0 | 1,729 | 1,729 | null |
NONE
| null | null |
### Describe the bug
in `map()` function, I want to add a new column with a dict structure.
```
def map_fn(example):
example['text'] = {'user': ..., 'assistant': ...}
return example
```
However this leads to a wrong order `{'assistant':..., 'user':...}` in the dataset.
Thus I can't concatenate two datasets due to the different feature structures.
[Here](https://colab.research.google.com/drive/1zeaWq9Ith4DKWP_EiBNyLfc8S8I68LyY?usp=sharing) is a minimal reproducible example
This seems an issue in low level pyarrow library instead of datasets, however, I think datasets should allow concatenate two datasets actually in the same structure.
### Steps to reproduce the bug
[Here](https://colab.research.google.com/drive/1zeaWq9Ith4DKWP_EiBNyLfc8S8I68LyY?usp=sharing) is a minimal reproducible example
### Expected behavior
two datasets could be concatenated.
### Environment info
N/A
| null |
https://api.github.com/repos/huggingface/datasets/issues/7247/timeline
| null | null |
chchch0109
| 114,604,968 |
U_kgDOBtS7qA
|
https://avatars.githubusercontent.com/u/114604968?v=4
|
https://api.github.com/users/chchch0109
|
https://github.com/chchch0109
|
https://api.github.com/users/chchch0109/followers
|
https://api.github.com/users/chchch0109/following{/other_user}
|
https://api.github.com/users/chchch0109/gists{/gist_id}
|
https://api.github.com/users/chchch0109/starred{/owner}{/repo}
|
https://api.github.com/users/chchch0109/subscriptions
|
https://api.github.com/users/chchch0109/orgs
|
https://api.github.com/users/chchch0109/repos
|
https://api.github.com/users/chchch0109/events{/privacy}
|
https://api.github.com/users/chchch0109/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7247/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7243
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7243/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7243/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7243/events
|
https://github.com/huggingface/datasets/issues/7243
| 2,602,853,172 |
I_kwDODunzps6bJGM0
| 7,243 |
ArrayXD with None as leading dim incompatible with DatasetCardData
|
[] |
open
| false | null |
[] | null | 5 | 1,729 | 1,729 | null |
CONTRIBUTOR
| null | null |
### Describe the bug
Creating a dataset with ArrayXD features leads to errors when downloading from hub due to DatasetCardData removing the Nones
@lhoestq
### Steps to reproduce the bug
```python
import numpy as np
from datasets import Array2D, Dataset, Features, load_dataset
def examples_generator():
for i in range(4):
yield {
"array_1d": np.zeros((10,1), dtype="uint16"),
"array_2d": np.zeros((10, 1), dtype="uint16"),
}
features = Features(array_1d=Array2D((None,1), "uint16"), array_2d=Array2D((None, 1), "uint16"))
dataset = Dataset.from_generator(examples_generator, features=features)
dataset.push_to_hub("alex-hh/test_array_1d2d")
ds = load_dataset("alex-hh/test_array_1d2d")
```
Source of error appears to be DatasetCardData.to_dict invoking DatasetCardData._remove_none
```python
from huggingface_hub import DatasetCardData
from datasets.info import DatasetInfosDict
dataset_card_data = DatasetCardData()
DatasetInfosDict({"default": dataset.info.copy()}).to_dataset_card_data(dataset_card_data)
print(dataset_card_data.to_dict()) # removes Nones in shape
```
### Expected behavior
Should be possible to load datasets saved with shape None in leading dimension
### Environment info
3.0.2 and latest huggingface_hub
| null |
https://api.github.com/repos/huggingface/datasets/issues/7243/timeline
| null | null |
alex-hh
| 5,719,745 |
MDQ6VXNlcjU3MTk3NDU=
|
https://avatars.githubusercontent.com/u/5719745?v=4
|
https://api.github.com/users/alex-hh
|
https://github.com/alex-hh
|
https://api.github.com/users/alex-hh/followers
|
https://api.github.com/users/alex-hh/following{/other_user}
|
https://api.github.com/users/alex-hh/gists{/gist_id}
|
https://api.github.com/users/alex-hh/starred{/owner}{/repo}
|
https://api.github.com/users/alex-hh/subscriptions
|
https://api.github.com/users/alex-hh/orgs
|
https://api.github.com/users/alex-hh/repos
|
https://api.github.com/users/alex-hh/events{/privacy}
|
https://api.github.com/users/alex-hh/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7243/reactions
| 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"It looks like `CardData` in `huggingface_hub` removes None values where it shouldn't. Indeed it calls `_remove_none` on the return of `to_dict()`:\r\n\r\n```python\r\n def to_dict(self) -> Dict[str, Any]:\r\n \"\"\"Converts CardData to a dict.\r\n\r\n Returns:\r\n `dict`: CardData represented as a dictionary ready to be dumped to a YAML\r\n block for inclusion in a README.md file.\r\n \"\"\"\r\n\r\n data_dict = copy.deepcopy(self.__dict__)\r\n self._to_dict(data_dict)\r\n return _remove_none(data_dict)\r\n```\r\n\r\nWould it be ok to remove `list()` from being scanned in `_remove_none` ? it could also be a specific behavior to DatasetCardData if necessary @Wauplin ",
"I have actually no idea why none values are removed in model and dataset card data... :see_no_evil:\r\nLooks like `_remove_none` has been introduced at the same time as the entire repocard module (see https://github.com/huggingface/huggingface_hub/pull/940). I would be tempted to remove `_remove_none` entirely actually and only remove \"top-level\" None values (i.e. if something like `pipeline_tag=None` due to a default value in kwargs => we remove it). Hard to tell what could be the side effects but I'm not against trying.\r\n\r\n\r\nHowever, I'm not really in favor in making an exception only for lists. It would mean that tuples, sets and dicts are filtered but not lists, which is pretty inconsistent.",
"let's do it for top level attributes yes",
"I opened https://github.com/huggingface/huggingface_hub/pull/2626 to address it :)",
"thanks !"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7241
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7241/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7241/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7241/events
|
https://github.com/huggingface/datasets/issues/7241
| 2,599,899,156 |
I_kwDODunzps6a91AU
| 7,241 |
`push_to_hub` overwrite argument
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
closed
| false | null |
[] | null | 9 | 1,729 | 1,729 | 1,729 |
NONE
| null | null |
### Feature request
Add an `overwrite` argument to the `push_to_hub` method.
### Motivation
I want to overwrite a repo without deleting it on Hugging Face. Is this possible? I couldn't find anything in the documentation or tutorials.
### Your contribution
I can create a PR.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7241/timeline
| null |
completed
|
ceferisbarov
| 60,838,378 |
MDQ6VXNlcjYwODM4Mzc4
|
https://avatars.githubusercontent.com/u/60838378?v=4
|
https://api.github.com/users/ceferisbarov
|
https://github.com/ceferisbarov
|
https://api.github.com/users/ceferisbarov/followers
|
https://api.github.com/users/ceferisbarov/following{/other_user}
|
https://api.github.com/users/ceferisbarov/gists{/gist_id}
|
https://api.github.com/users/ceferisbarov/starred{/owner}{/repo}
|
https://api.github.com/users/ceferisbarov/subscriptions
|
https://api.github.com/users/ceferisbarov/orgs
|
https://api.github.com/users/ceferisbarov/repos
|
https://api.github.com/users/ceferisbarov/events{/privacy}
|
https://api.github.com/users/ceferisbarov/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7241/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
ceferisbarov
| 60,838,378 |
MDQ6VXNlcjYwODM4Mzc4
|
https://avatars.githubusercontent.com/u/60838378?v=4
|
https://api.github.com/users/ceferisbarov
|
https://github.com/ceferisbarov
|
https://api.github.com/users/ceferisbarov/followers
|
https://api.github.com/users/ceferisbarov/following{/other_user}
|
https://api.github.com/users/ceferisbarov/gists{/gist_id}
|
https://api.github.com/users/ceferisbarov/starred{/owner}{/repo}
|
https://api.github.com/users/ceferisbarov/subscriptions
|
https://api.github.com/users/ceferisbarov/orgs
|
https://api.github.com/users/ceferisbarov/repos
|
https://api.github.com/users/ceferisbarov/events{/privacy}
|
https://api.github.com/users/ceferisbarov/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi ! Do you mean deleting all the files ? or erasing the repository git history before push_to_hub ?",
"Hi! I meant the latter.",
"I don't think there is a `huggingface_hub` utility to erase the git history, cc @Wauplin maybe ?",
"What is the goal exactly of deleting all the git history without deleting the repo? ",
"You can use [`super_squash_commit`](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.super_squash_history) to squash all the commits into a single one, hence deleting the git history. This is not exactly what you asked for since it squashes the commits for a specific revision (example: \"all commits on main\"). This means that if other branches exists, they are kept the same. Also if some PRs are already opened on the repo, they will become unmergeable since the commits will have diverted.",
"So the solution is:\r\n\r\n```python\r\nfrom huggingface_hub import HfApi\r\nrepo_id = \"username/dataset_name\"\r\nds.push_to_hub(repo_id)\r\nHfApi().super_squash_commit(repo_id)\r\n```\r\n\r\nThis way you erase previous git history to end up with only 1 commit containing your dataset.\r\nStill, I'd be curious why it's important in your case. Is it to save storage space ? or to disallow loading old versions of the data ?",
"Thanks, everyone! I am building a new dataset and playing around with column names, splits, etc. Sometimes I push to the hub to share it with other teammates, I don't want those variations to be part of the repo. Deleting the repo from the website takes a little time, but it also loses repo settings that I have set, since I always set it to public with manually approved requests.\r\n\r\nBTW, I had to write `HfApi().super_squash_history(repo_id, repo_type=\"dataset\")`, but otherwise it works.",
"@ceferisbarov just to let you know, recreating a gated repo + granting access to your teammates is something that you can automate with something like this (not fully tested but should work):\r\n\r\n```py\r\nfrom huggingface_hub import HfApi\r\n\r\napi = HfApi()\r\napi.delete_repo(repo_id, repo_type=\"dataset\", missing_ok=True)\r\napi.create_repo(repo_id, repo_type=\"dataset\", private=False)\r\napi.update_repo_settings(repo_id, repo_type=\"dataset\", gated=\"manual\")\r\nfor user in [\"user1\", \"user2\"] # list of teammates\r\n api.grant_access(repo_id, user, repo_type=\"dataset\")\r\n```\r\n\r\nI think it'd be a better solution than squashing commits (which is more of a hack), typically if you are using the dataset viewer.",
"This is great, @Wauplin. If we can achieve this with HfApi, then we probably don't need to add another parameter to push_to_hub. I am closing the issue."
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7238
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7238/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7238/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7238/events
|
https://github.com/huggingface/datasets/issues/7238
| 2,598,409,993 |
I_kwDODunzps6a4JcJ
| 7,238 |
incompatibily issue when using load_dataset with datasets==3.0.1
|
[] |
open
| false | null |
[] | null | 2 | 1,729 | 1,733 | null |
NONE
| null | null |
### Describe the bug
There is a bug when using load_dataset with dataset version at 3.0.1 .
Please see below in the "steps to reproduce the bug".
To resolve the bug, I had to downgrade to version 2.21.0
OS: Ubuntu 24 (AWS instance)
Python: same bug under 3.12 and 3.10
The error I had was:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ubuntu/miniconda3/envs/maxence_env/lib/python3.10/site-packages/datasets/load.py", line 2096, in load_dataset
builder_instance.download_and_prepare(
File "/home/ubuntu/miniconda3/envs/maxence_env/lib/python3.10/site-packages/datasets/builder.py", line 924, in download_and_prepare
self._download_and_prepare(
File "/home/ubuntu/miniconda3/envs/maxence_env/lib/python3.10/site-packages/datasets/builder.py", line 1647, in _download_and_prepare
super()._download_and_prepare(
File "/home/ubuntu/miniconda3/envs/maxence_env/lib/python3.10/site-packages/datasets/builder.py", line 977, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/home/ubuntu/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_6_0/cb17afd34f5799f97e8f48398748f83006335b702bd785f9880797838d541b81/common_voice_6_0.py", line 159, in _split_generators
archive_path = dl_manager.download(self._get_bundle_url(self.config.name, bundle_url_template))
File "/home/ubuntu/miniconda3/envs/maxence_env/lib/python3.10/site-packages/datasets/download/download_manager.py", line 150, in download
download_config = self.download_config.copy()
File "/home/ubuntu/miniconda3/envs/maxence_env/lib/python3.10/site-packages/datasets/download/download_config.py", line 73, in copy
return self.__class__(**{k: copy.deepcopy(v) for k, v in self.__dict__.items()})
TypeError: DownloadConfig.__init__() got an unexpected keyword argument 'ignore_url_params'
### Steps to reproduce the bug
1. install dataset with ```pip install datasets --upgrade```
2. launch python; from datasets import loaad_dataset
3. run load_dataset("mozilla-foundation/common_voice_6_0")
4. exit python
5. uninstall datasets; then ```pip install datasets==2.21.0```
6. launch python; from datasets import loaad_dataset
7. run load_dataset("mozilla-foundation/common_voice_6_0")
8. Everything runs great now
### Expected behavior
Be able to download a dataset without error
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 3.0.1
- Platform: Linux-6.8.0-1017-aws-x86_64-with-glibc2.39
- Python version: 3.12.4
- `huggingface_hub` version: 0.26.0
- PyArrow version: 17.0.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.6.1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7238/timeline
| null | null |
jupiterMJM
| 74,985,234 |
MDQ6VXNlcjc0OTg1MjM0
|
https://avatars.githubusercontent.com/u/74985234?v=4
|
https://api.github.com/users/jupiterMJM
|
https://github.com/jupiterMJM
|
https://api.github.com/users/jupiterMJM/followers
|
https://api.github.com/users/jupiterMJM/following{/other_user}
|
https://api.github.com/users/jupiterMJM/gists{/gist_id}
|
https://api.github.com/users/jupiterMJM/starred{/owner}{/repo}
|
https://api.github.com/users/jupiterMJM/subscriptions
|
https://api.github.com/users/jupiterMJM/orgs
|
https://api.github.com/users/jupiterMJM/repos
|
https://api.github.com/users/jupiterMJM/events{/privacy}
|
https://api.github.com/users/jupiterMJM/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7238/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi! I'm also getting the same issue - have you been able to find a solution to this? ",
"From what I remember, I stayed at the \"downgraded\" version of dataset (2.21.0)"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7233
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7233/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7233/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7233/events
|
https://github.com/huggingface/datasets/issues/7233
| 2,593,903,113 |
I_kwDODunzps6am9IJ
| 7,233 |
数据集数量问题
|
[] |
open
| false | null |
[] | null | 0 | 1,729 | 1,729 | null |
NONE
| null | null |
### Describe the bug
这里我进行大模型微调,当数据集数量为718时,模型可以正常微调,但是当我添加一个在前718个数据集中的数据或者新增一个数据就会报错
### Steps to reproduce the bug
1.
这里我的数据集可以微调的最后两个数据集是:
{
"messages": [
{
"role": "user",
"content": "完成校正装置设计后需要进行哪些工作?"
},
{
"role": "assistant",
"content": "一旦完成校正装置设计后,需要进行系统实际调校工作,或者进行MATLAB仿真以检查系统的时间响应特性。这时,需将系统建模时省略的部分尽可能加入系统,以保证仿真结果的逼真度。如果由于系统各种固有非线性因素影响,或者由于系统噪声和负载效应等因素的影响,使已校正系统不能满足全部性能指标要求,则需要适当调整校正装置的形式或参数,直到已校正系统满足全部性能指标为止。"
}
]
}
{
"messages": [
{
"role": "user",
"content": "为什么闭环带宽要求会影响串联超前校正的效果?"
},
{
"role": "assistant",
"content": "如果待校正系统不稳定,为了满足相角裕度的要求,超前网络需要提供很大的相角超前量。这会导致超前网络的a值必须选得很大,从而使已校正系统的带宽过大。带宽过大会使通过系统的高频噪声电平变高,可能导致系统失控。因此,闭环带宽的要求会影响串联超前校正的效果。"
}
]
}
2.
当我把倒数第二个数据集再次添加到数据集中时,此时我的最后三个数据集是
{
"messages": [
{
"role": "user",
"content": "完成校正装置设计后需要进行哪些工作?"
},
{
"role": "assistant",
"content": "一旦完成校正装置设计后,需要进行系统实际调校工作,或者进行MATLAB仿真以检查系统的时间响应特性。这时,需将系统建模时省略的部分尽可能加入系统,以保证仿真结果的逼真度。如果由于系统各种固有非线性因素影响,或者由于系统噪声和负载效应等因素的影响,使已校正系统不能满足全部性能指标要求,则需要适当调整校正装置的形式或参数,直到已校正系统满足全部性能指标为止。"
}
]
}
{
"messages": [
{
"role": "user",
"content": "为什么闭环带宽要求会影响串联超前校正的效果?"
},
{
"role": "assistant",
"content": "如果待校正系统不稳定,为了满足相角裕度的要求,超前网络需要提供很大的相角超前量。这会导致超前网络的a值必须选得很大,从而使已校正系统的带宽过大。带宽过大会使通过系统的高频噪声电平变高,可能导致系统失控。因此,闭环带宽的要求会影响串联超前校正的效果。"
}
]
}
{
"messages": [
{
"role": "user",
"content": "完成校正装置设计后需要进行哪些工作?"
},
{
"role": "assistant",
"content": "一旦完成校正装置设计后,需要进行系统实际调校工作,或者进行MATLAB仿真以检查系统的时间响应特性。这时,需将系统建模时省略的部分尽可能加入系统,以保证仿真结果的逼真度。如果由于系统各种固有非线性因素影响,或者由于系统噪声和负载效应等因素的影响,使已校正系统不能满足全部性能指标要求,则需要适当调整校正装置的形式或参数,直到已校正系统满足全部性能指标为止。"
}
]
}
这时系统会显示bug:
root@autodl-container-027f4cad3d-6baf4e64:~/autodl-tmp# python GLM-4/finetune_demo/finetune.py datasets/ ZhipuAI/glm-4-9b-chat GLM-4/finetune_demo/configs/lora.yaml
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [00:02<00:00, 4.04it/s]
The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable.
trainable params: 2,785,280 || all params: 9,402,736,640 || trainable%: 0.0296
Generating train split: 0 examples [00:00, ? examples/s]Failed to load JSON from file '/root/autodl-tmp/datasets/train.jsonl' with error <class 'pyarrow.lib.ArrowInvalid'>: JSON parse error: Missing a name for object member. in row 718
Generating train split: 0 examples [00:00, ? examples/s]
╭──────────────────────────────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ /root/miniconda3/lib/python3.10/site-packages/datasets/packaged_modules/json/json.py:153 in _generate_tables │
│ │
│ 150 │ │ │ │ │ │ │ │ with open( │
│ 151 │ │ │ │ │ │ │ │ │ file, encoding=self.config.encoding, errors=self.con │
│ 152 │ │ │ │ │ │ │ │ ) as f: │
│ ❱ 153 │ │ │ │ │ │ │ │ │ df = pd.read_json(f, dtype_backend="pyarrow") │
│ 154 │ │ │ │ │ │ │ except ValueError: │
│ 155 │ │ │ │ │ │ │ │ logger.error(f"Failed to load JSON from file '{file}' wi │
│ 156 │ │ │ │ │ │ │ │ raise e │
│ │
│ /root/miniconda3/lib/python3.10/site-packages/pandas/io/json/_json.py:815 in read_json │
│ │
│ 812 │ if chunksize: │
│ 813 │ │ return json_reader │
│ 814 │ else: │
│ ❱ 815 │ │ return json_reader.read() │
│ 816 │
│ 817 │
│ 818 class JsonReader(abc.Iterator, Generic[FrameSeriesStrT]): │
│ │
│ /root/miniconda3/lib/python3.10/site-packages/pandas/io/json/_json.py:1025 in read │
│ │
│ 1022 │ │ │ │ │ │ data_lines = data.split("\n") │
│ 1023 │ │ │ │ │ │ obj = self._get_object_parser(self._combine_lines(data_lines)) │
│ 1024 │ │ │ │ else: │
│ ❱ 1025 │ │ │ │ │ obj = self._get_object_parser(self.data) │
│ 1026 │ │ │ │ if self.dtype_backend is not lib.no_default: │
│ 1027 │ │ │ │ │ return obj.convert_dtypes( │
│ 1028 │ │ │ │ │ │ infer_objects=False, dtype_backend=self.dtype_backend │
│ │
│ /root/miniconda3/lib/python3.10/site-packages/pandas/io/json/_json.py:1051 in _get_object_parser │
│ │
│ 1048 │ │ } │
│ 1049 │ │ obj = None │
│ 1050 │ │ if typ == "frame": │
│ ❱ 1051 │ │ │ obj = FrameParser(json, **kwargs).parse() │
│ 1052 │ │ │
│ 1053 │ │ if typ == "series" or obj is None: │
│ 1054 │ │ │ if not isinstance(dtype, bool): │
│ │
│ /root/miniconda3/lib/python3.10/site-packages/pandas/io/json/_json.py:1187 in parse │
│ │
│ 1184 │ │
│ 1185 │ @final │
│ 1186 │ def parse(self): │
│ ❱ 1187 │ │ self._parse() │
│ 1188 │ │ │
│ 1189 │ │ if self.obj is None: │
│ 1190 │ │ │ return None │
│ │
│ /root/miniconda3/lib/python3.10/site-packages/pandas/io/json/_json.py:1403 in _parse │
│ │
│ 1400 │ │ │
│ 1401 │ │ if orient == "columns": │
│ 1402 │ │ │ self.obj = DataFrame( │
│ ❱ 1403 │ │ │ │ ujson_loads(json, precise_float=self.precise_float), dtype=None │
│ 1404 │ │ │ ) │
│ 1405 │ │ elif orient == "split": │
│ 1406 │ │ │ decoded = { │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: Trailing data
During handling of the above exception, another exception occurred:
╭──────────────────────────────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ /root/miniconda3/lib/python3.10/site-packages/datasets/builder.py:1997 in _prepare_split_single │
│ │
│ 1994 │ │ │ ) │
│ 1995 │ │ │ try: │
│ 1996 │ │ │ │ _time = time.time() │
│ ❱ 1997 │ │ │ │ for _, table in generator: │
│ 1998 │ │ │ │ │ if max_shard_size is not None and writer._num_bytes > max_shard_size │
│ 1999 │ │ │ │ │ │ num_examples, num_bytes = writer.finalize() │
│ 2000 │ │ │ │ │ │ writer.close() │
│ │
│ /root/miniconda3/lib/python3.10/site-packages/datasets/packaged_modules/json/json.py:156 in _generate_tables │
│ │
│ 153 │ │ │ │ │ │ │ │ │ df = pd.read_json(f, dtype_backend="pyarrow") │
│ 154 │ │ │ │ │ │ │ except ValueError: │
│ 155 │ │ │ │ │ │ │ │ logger.error(f"Failed to load JSON from file '{file}' wi │
│ ❱ 156 │ │ │ │ │ │ │ │ raise e │
│ 157 │ │ │ │ │ │ │ if df.columns.tolist() == [0]: │
│ 158 │ │ │ │ │ │ │ │ df.columns = list(self.config.features) if self.config.f │
│ 159 │ │ │ │ │ │ │ try: │
│ │
│ /root/miniconda3/lib/python3.10/site-packages/datasets/packaged_modules/json/json.py:130 in _generate_tables │
│ │
│ 127 │ │ │ │ │ │ try: │
│ 128 │ │ │ │ │ │ │ while True: │
│ 129 │ │ │ │ │ │ │ │ try: │
│ ❱ 130 │ │ │ │ │ │ │ │ │ pa_table = paj.read_json( │
│ 131 │ │ │ │ │ │ │ │ │ │ io.BytesIO(batch), read_options=paj.ReadOptions( │
│ 132 │ │ │ │ │ │ │ │ │ ) │
│ 133 │ │ │ │ │ │ │ │ │ break │
│ │
│ in pyarrow._json.read_json:308 │
│ │
│ in pyarrow.lib.pyarrow_internal_check_status:154 │
│ │
│ in pyarrow.lib.check_status:91 │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
ArrowInvalid: JSON parse error: Missing a name for object member. in row 718
The above exception was the direct cause of the following exception:
╭──────────────────────────────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ /root/autodl-tmp/GLM-4/finetune_demo/finetune.py:406 in main │
│ │
│ 403 ): │
│ 404 │ ft_config = FinetuningConfig.from_file(config_file) │
│ 405 │ tokenizer, model = load_tokenizer_and_model(model_dir, peft_config=ft_config.peft_co │
│ ❱ 406 │ data_manager = DataManager(data_dir, ft_config.data_config) │
│ 407 │ │
│ 408 │ train_dataset = data_manager.get_dataset( │
│ 409 │ │ Split.TRAIN, │
│ │
│ /root/autodl-tmp/GLM-4/finetune_demo/finetune.py:204 in __init__ │
│ │
│ 201 │ def __init__(self, data_dir: str, data_config: DataConfig): │
│ 202 │ │ self._num_proc = data_config.num_proc │
│ 203 │ │ │
│ ❱ 204 │ │ self._dataset_dct = _load_datasets( │
│ 205 │ │ │ data_dir, │
│ 206 │ │ │ data_config.data_format, │
│ 207 │ │ │ data_config.data_files, │
│ │
│ /root/autodl-tmp/GLM-4/finetune_demo/finetune.py:189 in _load_datasets │
│ │
│ 186 │ │ num_proc: Optional[int], │
│ 187 ) -> DatasetDict: │
│ 188 │ if data_format == '.jsonl': │
│ ❱ 189 │ │ dataset_dct = load_dataset( │
│ 190 │ │ │ data_dir, │
│ 191 │ │ │ data_files=data_files, │
│ 192 │ │ │ split=None, │
│ │
│ /root/miniconda3/lib/python3.10/site-packages/datasets/load.py:2616 in load_dataset │
│ │
│ 2613 │ │ return builder_instance.as_streaming_dataset(split=split) │
│ 2614 │ │
│ 2615 │ # Download and prepare data │
│ ❱ 2616 │ builder_instance.download_and_prepare( │
│ 2617 │ │ download_config=download_config, │
│ 2618 │ │ download_mode=download_mode, │
│ 2619 │ │ verification_mode=verification_mode, │
│ │
│ /root/miniconda3/lib/python3.10/site-packages/datasets/builder.py:1029 in download_and_prepare │
│ │
│ 1026 │ │ │ │ │ │ │ prepare_split_kwargs["max_shard_size"] = max_shard_size │
│ 1027 │ │ │ │ │ │ if num_proc is not None: │
│ 1028 │ │ │ │ │ │ │ prepare_split_kwargs["num_proc"] = num_proc │
│ ❱ 1029 │ │ │ │ │ │ self._download_and_prepare( │
│ 1030 │ │ │ │ │ │ │ dl_manager=dl_manager, │
│ 1031 │ │ │ │ │ │ │ verification_mode=verification_mode, │
│ 1032 │ │ │ │ │ │ │ **prepare_split_kwargs, │
│ │
│ /root/miniconda3/lib/python3.10/site-packages/datasets/builder.py:1124 in _download_and_prepare │
│ │
│ 1121 │ │ │ │
│ 1122 │ │ │ try: │
│ 1123 │ │ │ │ # Prepare split will record examples associated to the split │
│ ❱ 1124 │ │ │ │ self._prepare_split(split_generator, **prepare_split_kwargs) │
│ 1125 │ │ │ except OSError as e: │
│ 1126 │ │ │ │ raise OSError( │
│ 1127 │ │ │ │ │ "Cannot find data file. " │
│ │
│ /root/miniconda3/lib/python3.10/site-packages/datasets/builder.py:1884 in _prepare_split │
│ │
│ 1881 │ │ │ gen_kwargs = split_generator.gen_kwargs │
│ 1882 │ │ │ job_id = 0 │
│ 1883 │ │ │ with pbar: │
│ ❱ 1884 │ │ │ │ for job_id, done, content in self._prepare_split_single( │
│ 1885 │ │ │ │ │ gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args │
│ 1886 │ │ │ │ ): │
│ 1887 │ │ │ │ │ if done: │
│ │
│ /root/miniconda3/lib/python3.10/site-packages/datasets/builder.py:2040 in _prepare_split_single │
│ │
│ 2037 │ │ │ │ e = e.__context__ │
│ 2038 │ │ │ if isinstance(e, DatasetGenerationError): │
│ 2039 │ │ │ │ raise │
│ ❱ 2040 │ │ │ raise DatasetGenerationError("An error occurred while generating the dataset │
│ 2041 │ │ │
│ 2042 │ │ yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_ │
│ 2043 │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
DatasetGenerationError: An error occurred while generating the dataset
3.请问是否可以帮我解决
### Expected behavior
希望问题可以得到解决
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.20.0
- Platform: Linux-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64-x86_64-with-glibc2.35
- Python version: 3.10.8
- `huggingface_hub` version: 0.24.6
- PyArrow version: 16.1.0
- Pandas version: 2.2.2
- `fsspec` version: 2023.12.2
| null |
https://api.github.com/repos/huggingface/datasets/issues/7233/timeline
| null | null |
want-well
| 180,297,268 |
U_kgDOCr8eNA
|
https://avatars.githubusercontent.com/u/180297268?v=4
|
https://api.github.com/users/want-well
|
https://github.com/want-well
|
https://api.github.com/users/want-well/followers
|
https://api.github.com/users/want-well/following{/other_user}
|
https://api.github.com/users/want-well/gists{/gist_id}
|
https://api.github.com/users/want-well/starred{/owner}{/repo}
|
https://api.github.com/users/want-well/subscriptions
|
https://api.github.com/users/want-well/orgs
|
https://api.github.com/users/want-well/repos
|
https://api.github.com/users/want-well/events{/privacy}
|
https://api.github.com/users/want-well/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7233/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7228
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7228/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7228/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7228/events
|
https://github.com/huggingface/datasets/issues/7228
| 2,587,310,094 |
I_kwDODunzps6aNzgO
| 7,228 |
Composite (multi-column) features
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
open
| false | null |
[] | null | 0 | 1,728 | 1,728 | null |
CONTRIBUTOR
| null | null |
### Feature request
Structured data types (graphs etc.) might often be most efficiently stored as multiple columns, which then need to be combined during feature decoding
Although it is currently possible to nest features as structs, my impression is that in particular when dealing with e.g. a feature composed of multiple numpy array / ArrayXD's, it would be more efficient to store each ArrayXD as a separate column (though I'm not sure by how much)
Perhaps specification / implementation could be supported by something like:
```
features=Features(**{("feature0", "feature1")=Features(feature0=Array2D((None,10), dtype="float32"), feature1=Array2D((None,10), dtype="float32"))
```
### Motivation
Defining efficient composite feature types based on numpy arrays for representing data such as graphs with multiple node and edge attributes is currently challenging.
### Your contribution
Possibly able to contribute
| null |
https://api.github.com/repos/huggingface/datasets/issues/7228/timeline
| null | null |
alex-hh
| 5,719,745 |
MDQ6VXNlcjU3MTk3NDU=
|
https://avatars.githubusercontent.com/u/5719745?v=4
|
https://api.github.com/users/alex-hh
|
https://github.com/alex-hh
|
https://api.github.com/users/alex-hh/followers
|
https://api.github.com/users/alex-hh/following{/other_user}
|
https://api.github.com/users/alex-hh/gists{/gist_id}
|
https://api.github.com/users/alex-hh/starred{/owner}{/repo}
|
https://api.github.com/users/alex-hh/subscriptions
|
https://api.github.com/users/alex-hh/orgs
|
https://api.github.com/users/alex-hh/repos
|
https://api.github.com/users/alex-hh/events{/privacy}
|
https://api.github.com/users/alex-hh/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7228/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7226
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7226/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7226/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7226/events
|
https://github.com/huggingface/datasets/issues/7226
| 2,586,920,351 |
I_kwDODunzps6aMUWf
| 7,226 |
Add R as a How to use from the Polars (R) Library as an option
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
open
| false | null |
[] | null | 0 | 1,728 | 1,728 | null |
NONE
| null | null |
### Feature request
The boiler plate code to access a dataset via the hugging face file system is very useful. Please addd
## Add Polars (R) option
The equivailent code works, because the [Polars-R](https://github.com/pola-rs/r-polars) wrapper has hugging faces funcitonaliy as well.
```r
library(polars)
df <- pl$read_parquet("hf://datasets/SALURBAL/core__admin_cube_public/core__admin_cube_public.parquet")
```
## Polars (python) option

## Libraries Currently

### Motivation
There are many data/analysis/research/statistics teams (particularly in academia and pharma) that use R as the default language. R has great integration with most of the newer data techs (arrow, parquet, polars) and having this included could really help in bringing this community into the hugging faces ecosystem.
**This is a small/low-hanging-fruit front end change but would make a big impact expanding the community**
### Your contribution
I am not sure which repositroy this should be in, but I have experience in R, Python and JS and happy to submit a PR in the appropriate repository.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7226/timeline
| null | null |
ran-codes
| 45,013,044 |
MDQ6VXNlcjQ1MDEzMDQ0
|
https://avatars.githubusercontent.com/u/45013044?v=4
|
https://api.github.com/users/ran-codes
|
https://github.com/ran-codes
|
https://api.github.com/users/ran-codes/followers
|
https://api.github.com/users/ran-codes/following{/other_user}
|
https://api.github.com/users/ran-codes/gists{/gist_id}
|
https://api.github.com/users/ran-codes/starred{/owner}{/repo}
|
https://api.github.com/users/ran-codes/subscriptions
|
https://api.github.com/users/ran-codes/orgs
|
https://api.github.com/users/ran-codes/repos
|
https://api.github.com/users/ran-codes/events{/privacy}
|
https://api.github.com/users/ran-codes/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7226/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7225
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7225/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7225/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7225/events
|
https://github.com/huggingface/datasets/issues/7225
| 2,586,229,216 |
I_kwDODunzps6aJrng
| 7,225 |
Huggingface GIT returns null as Content-Type instead of application/x-git-receive-pack-result
|
[] |
open
| false | null |
[] | null | 0 | 1,728 | 1,728 | null |
NONE
| null | null |
### Describe the bug
We push changes to our datasets programmatically. Our git client jGit reports that the hf git server returns null as Content-Type after a push.
### Steps to reproduce the bug
A basic kotlin application:
```
val person = PersonIdent(
"padmalcom",
"[email protected]"
)
val cp = UsernamePasswordCredentialsProvider(
"padmalcom",
"mysecrettoken"
)
val git =
KGit.cloneRepository {
setURI("https://huggingface.co/datasets/sth/images")
setTimeout(60)
setProgressMonitor(TextProgressMonitor())
setCredentialsProvider(cp)
}
FileOutputStream("./images/images.csv").apply { writeCsv(images) }
git.add {
addFilepattern("images.csv")
}
for (i in images) {
FileUtils.copyFile(
File("./files/${i.id}"),
File("./images/${i.id + File(i.fileName).extension }")
)
git.add {
addFilepattern("${i.id + File(i.fileName).extension }")
}
}
val revCommit = git.commit {
author = person
message = "Uploading images at " + LocalDateTime.now()
.format(DateTimeFormatter.ISO_DATE_TIME)
setCredentialsProvider(cp)
}
val push = git.push {
setCredentialsProvider(cp)
}
```
### Expected behavior
The git server is expected to return the Content-Type _application/x-git-receive-pack-result_.
### Environment info
It is independent from the datasets library.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7225/timeline
| null | null |
padmalcom
| 3,961,950 |
MDQ6VXNlcjM5NjE5NTA=
|
https://avatars.githubusercontent.com/u/3961950?v=4
|
https://api.github.com/users/padmalcom
|
https://github.com/padmalcom
|
https://api.github.com/users/padmalcom/followers
|
https://api.github.com/users/padmalcom/following{/other_user}
|
https://api.github.com/users/padmalcom/gists{/gist_id}
|
https://api.github.com/users/padmalcom/starred{/owner}{/repo}
|
https://api.github.com/users/padmalcom/subscriptions
|
https://api.github.com/users/padmalcom/orgs
|
https://api.github.com/users/padmalcom/repos
|
https://api.github.com/users/padmalcom/events{/privacy}
|
https://api.github.com/users/padmalcom/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7225/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7223
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7223/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7223/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7223/events
|
https://github.com/huggingface/datasets/issues/7223
| 2,583,231,590 |
I_kwDODunzps6Z-Pxm
| 7,223 |
Fallback to arrow defaults when loading dataset with custom features that aren't registered locally
|
[] |
open
| false | null |
[] | null | 0 | 1,728 | 1,728 | null |
CONTRIBUTOR
| null | null |
### Describe the bug
Datasets allows users to create and register custom features.
However if datasets are then pushed to the hub, this means that anyone calling load_dataset without registering the custom Features in the same way as the dataset creator will get an error message.
It would be nice to offer a fallback in this case.
### Steps to reproduce the bug
```python
load_dataset("alex-hh/custom-features-example")
```
(Dataset creation process - must be run in separate session so that NewFeature isn't registered in session in which download is attempted:)
```python
from dataclasses import dataclass, field
import pyarrow as pa
from datasets.features.features import register_feature
from datasets import Dataset, Features, Value, load_dataset
from datasets import Feature
@dataclass
class NewFeature(Feature):
_type: str = field(default="NewFeature", init=False, repr=False)
def __call__(self):
return pa.int32()
def examples_generator():
for i in range(5):
yield {"feature": i}
ds = Dataset.from_generator(examples_generator, features=Features(feature=NewFeature()))
ds.push_to_hub("alex-hh/custom-features-example")
register_feature(NewFeature, "NewFeature")
```
### Expected behavior
It would be nice, and offer greater extensibility, if there was some kind of graceful fallback mechanism in place for cases where user-defined features are stored in the dataset but not available locally.
### Environment info
3.0.2
| null |
https://api.github.com/repos/huggingface/datasets/issues/7223/timeline
| null | null |
alex-hh
| 5,719,745 |
MDQ6VXNlcjU3MTk3NDU=
|
https://avatars.githubusercontent.com/u/5719745?v=4
|
https://api.github.com/users/alex-hh
|
https://github.com/alex-hh
|
https://api.github.com/users/alex-hh/followers
|
https://api.github.com/users/alex-hh/following{/other_user}
|
https://api.github.com/users/alex-hh/gists{/gist_id}
|
https://api.github.com/users/alex-hh/starred{/owner}{/repo}
|
https://api.github.com/users/alex-hh/subscriptions
|
https://api.github.com/users/alex-hh/orgs
|
https://api.github.com/users/alex-hh/repos
|
https://api.github.com/users/alex-hh/events{/privacy}
|
https://api.github.com/users/alex-hh/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7223/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7222
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7222/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7222/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7222/events
|
https://github.com/huggingface/datasets/issues/7222
| 2,582,678,033 |
I_kwDODunzps6Z8IoR
| 7,222 |
TypeError: Couldn't cast array of type string to null in long json
|
[] |
open
| false | null |
[] | null | 6 | 1,728 | 1,758 | null |
NONE
| null | null |
### Describe the bug
In general, changing the type from string to null is allowed within a dataset — there are even examples of this in the documentation.
However, if the dataset is large and unevenly distributed, this allowance stops working. The schema gets locked in after reading a chunk.
Consequently, if all values in the first chunk of a field are, for example, null, the field will be locked as type null, and if a string appears in that field in the second chunk, it will trigger this error:
<details>
<summary>Traceback </summary>
```
TypeError Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id)
1868 try:
-> 1869 writer.write_table(table)
1870 except CastError as cast_error:
14 frames
[/usr/local/lib/python3.10/dist-packages/datasets/arrow_writer.py](https://localhost:8080/#) in write_table(self, pa_table, writer_batch_size)
579 pa_table = pa_table.combine_chunks()
--> 580 pa_table = table_cast(pa_table, self._schema)
581 if self.embed_local_files:
[/usr/local/lib/python3.10/dist-packages/datasets/table.py](https://localhost:8080/#) in table_cast(table, schema)
2291 if table.schema != schema:
-> 2292 return cast_table_to_schema(table, schema)
2293 elif table.schema.metadata != schema.metadata:
[/usr/local/lib/python3.10/dist-packages/datasets/table.py](https://localhost:8080/#) in cast_table_to_schema(table, schema)
2244 )
-> 2245 arrays = [
2246 cast_array_to_feature(
[/usr/local/lib/python3.10/dist-packages/datasets/table.py](https://localhost:8080/#) in <listcomp>(.0)
2245 arrays = [
-> 2246 cast_array_to_feature(
2247 table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),
[/usr/local/lib/python3.10/dist-packages/datasets/table.py](https://localhost:8080/#) in wrapper(array, *args, **kwargs)
1794 if isinstance(array, pa.ChunkedArray):
-> 1795 return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
1796 else:
[/usr/local/lib/python3.10/dist-packages/datasets/table.py](https://localhost:8080/#) in <listcomp>(.0)
1794 if isinstance(array, pa.ChunkedArray):
-> 1795 return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
1796 else:
[/usr/local/lib/python3.10/dist-packages/datasets/table.py](https://localhost:8080/#) in cast_array_to_feature(array, feature, allow_primitive_to_str, allow_decimal_to_str)
2101 elif not isinstance(feature, (Sequence, dict, list, tuple)):
-> 2102 return array_cast(
2103 array,
[/usr/local/lib/python3.10/dist-packages/datasets/table.py](https://localhost:8080/#) in wrapper(array, *args, **kwargs)
1796 else:
-> 1797 return func(array, *args, **kwargs)
1798
[/usr/local/lib/python3.10/dist-packages/datasets/table.py](https://localhost:8080/#) in array_cast(array, pa_type, allow_primitive_to_str, allow_decimal_to_str)
1947 if pa.types.is_null(pa_type) and not pa.types.is_null(array.type):
-> 1948 raise TypeError(f"Couldn't cast array of type {_short_str(array.type)} to {_short_str(pa_type)}")
1949 return array.cast(pa_type)
TypeError: Couldn't cast array of type string to null
The above exception was the direct cause of the following exception:
DatasetGenerationError Traceback (most recent call last)
[<ipython-input-353-e02f83980611>](https://localhost:8080/#) in <cell line: 1>()
----> 1 dd = load_dataset("json", data_files=["TEST.json"])
[/usr/local/lib/python3.10/dist-packages/datasets/load.py](https://localhost:8080/#) in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, keep_in_memory, save_infos, revision, token, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs)
2094
2095 # Download and prepare data
-> 2096 builder_instance.download_and_prepare(
2097 download_config=download_config,
2098 download_mode=download_mode,
[/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, dl_manager, base_path, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)
922 if num_proc is not None:
923 prepare_split_kwargs["num_proc"] = num_proc
--> 924 self._download_and_prepare(
925 dl_manager=dl_manager,
926 verification_mode=verification_mode,
[/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
997 try:
998 # Prepare split will record examples associated to the split
--> 999 self._prepare_split(split_generator, **prepare_split_kwargs)
1000 except OSError as e:
1001 raise OSError(
[/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split(self, split_generator, file_format, num_proc, max_shard_size)
1738 job_id = 0
1739 with pbar:
-> 1740 for job_id, done, content in self._prepare_split_single(
1741 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
1742 ):
[/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id)
1894 if isinstance(e, DatasetGenerationError):
1895 raise
-> 1896 raise DatasetGenerationError("An error occurred while generating the dataset") from e
1897
1898 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths)
DatasetGenerationError: An error occurred while generating the dataset
```
</details>
### Steps to reproduce the bug
```python
import json
from datasets import load_dataset
with open("TEST.json", "w") as f:
row = {"ballast": "qwerty" * 1000, "b": None}
row_str = json.dumps(row) + "\n"
line_size = len(row_str)
chunk_size = 10 << 20
lines_in_chunk = chunk_size // line_size + 1
print(f"Writing {lines_in_chunk} lines")
for i in range(lines_in_chunk):
f.write(row_str)
null_row = {"ballast": "Gotcha", "b": "Not Null"}
f.write(json.dumps(null_row) + "\n")
load_dataset("json", data_files=["TEST.json"])
```
### Expected behavior
Concatenation of the chunks without errors
### Environment info
- `datasets` version: 3.0.1
- Platform: Linux-6.1.85+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.24.7
- PyArrow version: 16.1.0
- Pandas version: 2.2.2
- `fsspec` version: 2024.6.1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7222/timeline
| null | null |
nokados
| 5,142,577 |
MDQ6VXNlcjUxNDI1Nzc=
|
https://avatars.githubusercontent.com/u/5142577?v=4
|
https://api.github.com/users/nokados
|
https://github.com/nokados
|
https://api.github.com/users/nokados/followers
|
https://api.github.com/users/nokados/following{/other_user}
|
https://api.github.com/users/nokados/gists{/gist_id}
|
https://api.github.com/users/nokados/starred{/owner}{/repo}
|
https://api.github.com/users/nokados/subscriptions
|
https://api.github.com/users/nokados/orgs
|
https://api.github.com/users/nokados/repos
|
https://api.github.com/users/nokados/events{/privacy}
|
https://api.github.com/users/nokados/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7222/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"I am encountering this same issue. It seems that the library manages to recognise an optional column (but not **exclusively** null) if there is at least one non-null instance within the same file. For example, given a `test_0.jsonl` file:\r\n```json\r\n{\"a\": \"a1\", \"b\": \"b1\", \"c\": null, \"d\": null}\r\n{\"a\": \"a2\", \"b\": null, \"c\": \"c2\", \"d\": null}\r\n```\r\nthe data is correctly loaded, recognising that columns `b` & `c` are optional, while `d` is null.\r\n```python\r\n{'a': ['a1', 'a2'], 'b': ['b1', None], 'c': [None, 'c2'], 'd': [None, None]}\r\n```\r\n\r\nBut if the `config` has another file, say `test_1.jsonl` where `d` now has some non-null values:\r\n```json\r\n{\"a\": null, \"b\": \"b3\", \"c\": \"c3\", \"d\": \"d3\"}\r\n{\"a\": \"a4\", \"b\": \"b4\", \"c\": null, \"d\": null}\r\n```\r\nthen, an error is raised:\r\n```\r\nTypeError Traceback (most recent call last)\r\n\r\n[/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id)\r\n 1869 try:\r\n-> 1870 writer.write_table(table)\r\n 1871 except CastError as cast_error:\r\n\r\n14 frames\r\n\r\nTypeError: Couldn't cast array of type string to null\r\n\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nDatasetGenerationError Traceback (most recent call last)\r\n\r\n[/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id)\r\n 1895 if isinstance(e, DatasetGenerationError):\r\n 1896 raise\r\n-> 1897 raise DatasetGenerationError(\"An error occurred while generating the dataset\") from e\r\n 1898 \r\n 1899 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths)\r\n\r\nDatasetGenerationError: An error occurred while generating the dataset\r\n```\r\n\r\n---\r\n\r\nI have created a [sample repository](https://huggingface.co/datasets/KurtMica/optional_columns_mutiple_files) if that helps. Interestingly, the dataset viewer correctly shows the data across files, although it still indicates the above error.",
" Managed to find a workaround, by [specifying the features explicitly](https://huggingface.co/docs/datasets/main/en/loading#specify-features), which is also possible to do directly using the [YAML file configuration](https://discuss.huggingface.co/t/appropriate-yaml-for-dataset-info-list-float/74418).",
"I hit the same issue for `datasets 3.2.0`. Given the two jsonl files with the same content but different ordering, `load_dataset` worked for one but did not work for the other.\n\n```\nfrom datasets import load_dataset\n\nissues_dataset = load_dataset(\n \"json\", data_files=\"NeMo-issues-fixed.jsonl\", split=\"train\"\n)\nissues_dataset\n```\n\nFor [NeMo-issues.jsonl](https://github.com/renweizhukov/jupyter-lab-notebook/blob/main/hugging-face-nlp-course/NeMo-issues.jsonl), I got an exception:\n\n```\n---------------------------------------------------------------------------\nTypeError Traceback (most recent call last)\nFile [~/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/builder.py:1870](http://localhost:8888/home/renwei/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/builder.py#line=1869), in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id)\n 1869 try:\n-> 1870 writer.write_table(table)\n 1871 except CastError as cast_error:\n\nFile [~/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/arrow_writer.py:622](http://localhost:8888/home/renwei/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/arrow_writer.py#line=621), in ArrowWriter.write_table(self, pa_table, writer_batch_size)\n 621 pa_table = pa_table.combine_chunks()\n--> 622 pa_table = table_cast(pa_table, self._schema)\n 623 if self.embed_local_files:\n\nFile [~/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/table.py:2292](http://localhost:8888/home/renwei/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/table.py#line=2291), in table_cast(table, schema)\n 2291 if table.schema != schema:\n-> 2292 return cast_table_to_schema(table, schema)\n 2293 elif table.schema.metadata != schema.metadata:\n\nFile [~/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/table.py:2246](http://localhost:8888/home/renwei/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/table.py#line=2245), in cast_table_to_schema(table, schema)\n 2240 raise CastError(\n 2241 f\"Couldn't cast\\n{_short_str(table.schema)}\\nto\\n{_short_str(features)}\\nbecause column names don't match\",\n 2242 table_column_names=table.column_names,\n 2243 requested_column_names=list(features),\n 2244 )\n 2245 arrays = [\n-> 2246 cast_array_to_feature(\n 2247 table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),\n 2248 feature,\n 2249 )\n 2250 for name, feature in features.items()\n 2251 ]\n 2252 return pa.Table.from_arrays(arrays, schema=schema)\n\nFile [~/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/table.py:1795](http://localhost:8888/home/renwei/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/table.py#line=1794), in _wrap_for_chunked_arrays.<locals>.wrapper(array, *args, **kwargs)\n 1794 if isinstance(array, pa.ChunkedArray):\n-> 1795 return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])\n 1796 else:\n\nFile [~/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/table.py:2102](http://localhost:8888/home/renwei/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/table.py#line=2101), in cast_array_to_feature(array, feature, allow_primitive_to_str, allow_decimal_to_str)\n 2101 elif not isinstance(feature, (Sequence, dict, list, tuple)):\n-> 2102 return array_cast(\n 2103 array,\n 2104 feature(),\n 2105 allow_primitive_to_str=allow_primitive_to_str,\n 2106 allow_decimal_to_str=allow_decimal_to_str,\n 2107 )\n 2108 raise TypeError(f\"Couldn't cast array of type\\n{_short_str(array.type)}\\nto\\n{_short_str(feature)}\")\n\nFile [~/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/table.py:1797](http://localhost:8888/home/renwei/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/table.py#line=1796), in _wrap_for_chunked_arrays.<locals>.wrapper(array, *args, **kwargs)\n 1796 else:\n-> 1797 return func(array, *args, **kwargs)\n\nFile [~/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/table.py:1948](http://localhost:8888/home/renwei/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/table.py#line=1947), in array_cast(array, pa_type, allow_primitive_to_str, allow_decimal_to_str)\n 1947 if pa.types.is_null(pa_type) and not pa.types.is_null(array.type):\n-> 1948 raise TypeError(f\"Couldn't cast array of type {_short_str(array.type)} to {_short_str(pa_type)}\")\n 1949 return array.cast(pa_type)\n\nTypeError: Couldn't cast array of type string to null\n\nThe above exception was the direct cause of the following exception:\n\nDatasetGenerationError Traceback (most recent call last)\nCell In[73], line 3\n 1 from datasets import load_dataset\n----> 3 issues_dataset = load_dataset(\n 4 \"json\", data_files=\"NeMo-issues.jsonl\", split=\"train\"\n 5 )\n 6 issues_dataset\n\nFile [~/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/load.py:2151](http://localhost:8888/home/renwei/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/load.py#line=2150), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, keep_in_memory, save_infos, revision, token, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs)\n 2148 return builder_instance.as_streaming_dataset(split=split)\n 2150 # Download and prepare data\n-> 2151 builder_instance.download_and_prepare(\n 2152 download_config=download_config,\n 2153 download_mode=download_mode,\n 2154 verification_mode=verification_mode,\n 2155 num_proc=num_proc,\n 2156 storage_options=storage_options,\n 2157 )\n 2159 # Build dataset for splits\n 2160 keep_in_memory = (\n 2161 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)\n 2162 )\n\nFile [~/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/builder.py:924](http://localhost:8888/home/renwei/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/builder.py#line=923), in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, dl_manager, base_path, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)\n 922 if num_proc is not None:\n 923 prepare_split_kwargs[\"num_proc\"] = num_proc\n--> 924 self._download_and_prepare(\n 925 dl_manager=dl_manager,\n 926 verification_mode=verification_mode,\n 927 **prepare_split_kwargs,\n 928 **download_and_prepare_kwargs,\n 929 )\n 930 # Sync info\n 931 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values())\n\nFile [~/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/builder.py:1000](http://localhost:8888/home/renwei/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/builder.py#line=999), in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)\n 996 split_dict.add(split_generator.split_info)\n 998 try:\n 999 # Prepare split will record examples associated to the split\n-> 1000 self._prepare_split(split_generator, **prepare_split_kwargs)\n 1001 except OSError as e:\n 1002 raise OSError(\n 1003 \"Cannot find data file. \"\n 1004 + (self.manual_download_instructions or \"\")\n 1005 + \"\\nOriginal erro[r:\\n](file:///R:/n)\"\n 1006 + str(e)\n 1007 ) from None\n\nFile [~/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/builder.py:1741](http://localhost:8888/home/renwei/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/builder.py#line=1740), in ArrowBasedBuilder._prepare_split(self, split_generator, file_format, num_proc, max_shard_size)\n 1739 job_id = 0\n 1740 with pbar:\n-> 1741 for job_id, done, content in self._prepare_split_single(\n 1742 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args\n 1743 ):\n 1744 if done:\n 1745 result = content\n\nFile [~/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/builder.py:1897](http://localhost:8888/home/renwei/anaconda3/envs/llm/lib/python3.12/site-packages/datasets/builder.py#line=1896), in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id)\n 1895 if isinstance(e, DatasetGenerationError):\n 1896 raise\n-> 1897 raise DatasetGenerationError(\"An error occurred while generating the dataset\") from e\n 1899 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths)\n\nDatasetGenerationError: An error occurred while generating the dataset\n```\n\nFor [NeMo-issues-fixed.json](https://github.com/renweizhukov/jupyter-lab-notebook/blob/main/hugging-face-nlp-course/NeMo-issues-fixed.jsonl) which consists of the last 1000 lines and then the first 9000 lines of NeMo-issues.jsonl, I could load the data:\n\n```\nDataset({\n features: ['url', 'repository_url', 'labels_url', 'comments_url', 'events_url', 'html_url', 'id', 'node_id', 'number', 'title', 'user', 'labels', 'state', 'locked', 'assignee', 'assignees', 'milestone', 'comments', 'created_at', 'updated_at', 'closed_at', 'author_association', 'sub_issues_summary', 'active_lock_reason', 'draft', 'pull_request', 'body', 'closed_by', 'reactions', 'timeline_url', 'performed_via_github_app', 'state_reason'],\n num_rows: 10000\n})\n```",
"having the same issue as well!",
"Is this fixed in the latest version?",
"@DronHazra @renweizhukov Is this fixed in the latest version?"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7220
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7220/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7220/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7220/events
|
https://github.com/huggingface/datasets/issues/7220
| 2,582,036,110 |
I_kwDODunzps6Z5r6O
| 7,220 |
Custom features not compatible with special encoding/decoding logic
|
[] |
open
| false | null |
[] | null | 2 | 1,728 | 1,731 | null |
CONTRIBUTOR
| null | null |
### Describe the bug
It is possible to register custom features using datasets.features.features.register_feature (https://github.com/huggingface/datasets/pull/6727)
However such features are not compatible with Features.encode_example/decode_example if they require special encoding / decoding logic because encode_nested_example / decode_nested_example checks whether the feature is in a fixed list of encodable types:
https://github.com/huggingface/datasets/blob/16a121d7821a7691815a966270f577e2c503473f/src/datasets/features/features.py#L1349
This prevents the extensibility of features to complex cases
### Steps to reproduce the bug
```python
class ListOfStrs:
def encode_example(self, value):
if isinstance(value, str):
return [str]
else:
return value
feats = Features(strlist=ListOfStrs())
assert feats.encode_example({"strlist": "a"})["strlist"] = feats["strlist"].encode_example("a")}
```
### Expected behavior
Registered feature types should be encoded based on some property of the feature (e.g. requires_encoding)?
### Environment info
3.0.2
| null |
https://api.github.com/repos/huggingface/datasets/issues/7220/timeline
| null | null |
alex-hh
| 5,719,745 |
MDQ6VXNlcjU3MTk3NDU=
|
https://avatars.githubusercontent.com/u/5719745?v=4
|
https://api.github.com/users/alex-hh
|
https://github.com/alex-hh
|
https://api.github.com/users/alex-hh/followers
|
https://api.github.com/users/alex-hh/following{/other_user}
|
https://api.github.com/users/alex-hh/gists{/gist_id}
|
https://api.github.com/users/alex-hh/starred{/owner}{/repo}
|
https://api.github.com/users/alex-hh/subscriptions
|
https://api.github.com/users/alex-hh/orgs
|
https://api.github.com/users/alex-hh/repos
|
https://api.github.com/users/alex-hh/events{/privacy}
|
https://api.github.com/users/alex-hh/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7220/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"I think you can fix this simply by replacing the line with hardcoded features with `hastattr(schema, \"encode_example\")` actually",
"#7284 "
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7217
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7217/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7217/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7217/events
|
https://github.com/huggingface/datasets/issues/7217
| 2,581,095,098 |
I_kwDODunzps6Z2GK6
| 7,217 |
ds.map(f, num_proc=10) is slower than df.apply
|
[] |
open
| false | null |
[] | null | 3 | 1,728 | 1,740 | null |
NONE
| null | null |
### Describe the bug
pandas columns: song_id, song_name
ds = Dataset.from_pandas(df)
def has_cover(song_name):
if song_name is None or pd.isna(song_name):
return False
return 'cover' in song_name.lower()
df['has_cover'] = df.song_name.progress_apply(has_cover)
ds = ds.map(lambda x: {'has_cover': has_cover(x['song_name'])}, num_proc=10)
time cost:
1. df.apply: 100%|██████████| 12500592/12500592 [00:13<00:00, 959825.47it/s]
2. ds.map: Map (num_proc=10): 31%
3899028/12500592 [00:28<00:38, 222532.89 examples/s]
### Steps to reproduce the bug
pandas columns: song_id, song_name
ds = Dataset.from_pandas(df)
def has_cover(song_name):
if song_name is None or pd.isna(song_name):
return False
return 'cover' in song_name.lower()
df['has_cover'] = df.song_name.progress_apply(has_cover)
ds = ds.map(lambda x: {'has_cover': has_cover(x['song_name'])}, num_proc=10)
### Expected behavior
ds.map is ~num_proc faster than df.apply
### Environment info
pandas: 2.2.2
datasets: 2.19.1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7217/timeline
| null | null |
lanlanlanlanlanlan365
| 178,981,231 |
U_kgDOCqsJbw
|
https://avatars.githubusercontent.com/u/178981231?v=4
|
https://api.github.com/users/lanlanlanlanlanlan365
|
https://github.com/lanlanlanlanlanlan365
|
https://api.github.com/users/lanlanlanlanlanlan365/followers
|
https://api.github.com/users/lanlanlanlanlanlan365/following{/other_user}
|
https://api.github.com/users/lanlanlanlanlanlan365/gists{/gist_id}
|
https://api.github.com/users/lanlanlanlanlanlan365/starred{/owner}{/repo}
|
https://api.github.com/users/lanlanlanlanlanlan365/subscriptions
|
https://api.github.com/users/lanlanlanlanlanlan365/orgs
|
https://api.github.com/users/lanlanlanlanlanlan365/repos
|
https://api.github.com/users/lanlanlanlanlanlan365/events{/privacy}
|
https://api.github.com/users/lanlanlanlanlanlan365/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7217/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Hi ! `map()` reads all the columns and writes the resulting dataset with all the columns as well, while df.column_name.apply only reads and writes one column and does it in memory. So this is speed difference is actually expected.\r\n\r\nMoreover using multiprocessing on a dataset that lives in memory (from_pandas uses the same in-memory data as the pandas DataFrame while load_dataset or from_generator load from disk) requires to copy the data to each subprocess which can also be slow. Data loaded from disk don't need to be copied though since they work as a form of shared memory thanks to memory mapping.\r\n\r\nHowever you can make you map() call much faster by making it read and write only the column you want:\r\n\r\n```python\r\nhas_cover_ds = ds.map(lambda song_name: {'has_cover': has_cover(song_name)}, input_columns=[\"song_name\"], remove_columns=ds.column_names) # outputs a dataset with 1 column\r\nds = ds.concatenate_datasets([ds, has_cover_ds], axis=1)\r\n```\r\n\r\nand if your dataset is loaded from disk you can pass num_proc=10 and get a nice speed up as well (no need to copy the data to subprocesses)",
"Isn't there a way to do memory mapping with the in-memory dataset without saving it to disk?",
"Maybe saving it to a memory-mapped filesystem? It'd be like a trick to make datasets save to \"disk\" but actually it's memory. But it feels like there should be a better \"automatic\" way provided by `datasets`."
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7215
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7215/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7215/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7215/events
|
https://github.com/huggingface/datasets/issues/7215
| 2,579,942,939 |
I_kwDODunzps6Zxs4b
| 7,215 |
Iterable dataset map with explicit features causes slowdown for Sequence features
|
[] |
open
| false | null |
[] | null | 0 | 1,728 | 1,728 | null |
CONTRIBUTOR
| null | null |
### Describe the bug
When performing map, it's nice to be able to pass the new feature type, and indeed required by interleave and concatenate datasets.
However, this can cause a major slowdown for certain types of array features due to the features being re-encoded.
This is separate to the slowdown reported in #7206
### Steps to reproduce the bug
```
from datasets import Dataset, Features, Array3D, Sequence, Value
import numpy as np
import time
features=Features(**{"array0": Sequence(feature=Value("float32"), length=-1), "array1": Sequence(feature=Value("float32"), length=-1)})
dataset = Dataset.from_dict({f"array{i}": [np.zeros((x,), dtype=np.float32) for x in [5000,10000]*25] for i in range(2)}, features=features)
```
```
ds = dataset.to_iterable_dataset()
ds = ds.with_format("numpy").map(lambda x: x)
t0 = time.time()
for ex in ds:
pass
t1 = time.time()
```
~1.5 s on main
```
ds = dataset.to_iterable_dataset()
ds = ds.with_format("numpy").map(lambda x: x, features=features)
t0 = time.time()
for ex in ds:
pass
t1 = time.time()
```
~ 3 s on main
### Expected behavior
I'm not 100% sure whether passing new feature types to formatted outputs of map should be supported or not, but assuming it should, then there should be a cost-free way to specify the new feature type - knowing feature type is required by interleave_datasets and concatenate_datasets for example
### Environment info
3.0.2
| null |
https://api.github.com/repos/huggingface/datasets/issues/7215/timeline
| null | null |
alex-hh
| 5,719,745 |
MDQ6VXNlcjU3MTk3NDU=
|
https://avatars.githubusercontent.com/u/5719745?v=4
|
https://api.github.com/users/alex-hh
|
https://github.com/alex-hh
|
https://api.github.com/users/alex-hh/followers
|
https://api.github.com/users/alex-hh/following{/other_user}
|
https://api.github.com/users/alex-hh/gists{/gist_id}
|
https://api.github.com/users/alex-hh/starred{/owner}{/repo}
|
https://api.github.com/users/alex-hh/subscriptions
|
https://api.github.com/users/alex-hh/orgs
|
https://api.github.com/users/alex-hh/repos
|
https://api.github.com/users/alex-hh/events{/privacy}
|
https://api.github.com/users/alex-hh/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7215/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7214
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7214/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7214/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7214/events
|
https://github.com/huggingface/datasets/issues/7214
| 2,578,743,713 |
I_kwDODunzps6ZtIGh
| 7,214 |
Formatted map + with_format(None) changes array dtype for iterable datasets
|
[] |
open
| false | null |
[] | null | 1 | 1,728 | 1,728 | null |
CONTRIBUTOR
| null | null |
### Describe the bug
When applying with_format -> map -> with_format(None), array dtypes seem to change, even if features are passed
### Steps to reproduce the bug
```python
features=Features(**{"array0": Array3D((None, 10, 10), dtype="float32")})
dataset = Dataset.from_dict({f"array0": [np.zeros((100,10,10), dtype=np.float32)]*25}, features=features)
ds = dataset.to_iterable_dataset().with_format("numpy").map(lambda x: x, features=features)
ex_0 = next(iter(ds))
ds = dataset.to_iterable_dataset().with_format("numpy").map(lambda x: x, features=features).with_format(None)
ex_1 = next(iter(ds))
assert ex_1["array0"].dtype == ex_0["array0"].dtype, f"{ex_1['array0'].dtype} {ex_0['array0'].dtype}"
```
### Expected behavior
Dtypes should be preserved.
### Environment info
3.0.2
| null |
https://api.github.com/repos/huggingface/datasets/issues/7214/timeline
| null | null |
alex-hh
| 5,719,745 |
MDQ6VXNlcjU3MTk3NDU=
|
https://avatars.githubusercontent.com/u/5719745?v=4
|
https://api.github.com/users/alex-hh
|
https://github.com/alex-hh
|
https://api.github.com/users/alex-hh/followers
|
https://api.github.com/users/alex-hh/following{/other_user}
|
https://api.github.com/users/alex-hh/gists{/gist_id}
|
https://api.github.com/users/alex-hh/starred{/owner}{/repo}
|
https://api.github.com/users/alex-hh/subscriptions
|
https://api.github.com/users/alex-hh/orgs
|
https://api.github.com/users/alex-hh/repos
|
https://api.github.com/users/alex-hh/events{/privacy}
|
https://api.github.com/users/alex-hh/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7214/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"possibly due to this logic:\r\n\r\n```python\r\n def _arrow_array_to_numpy(self, pa_array: pa.Array) -> np.ndarray:\r\n if isinstance(pa_array, pa.ChunkedArray):\r\n if isinstance(pa_array.type, _ArrayXDExtensionType):\r\n # don't call to_pylist() to preserve dtype of the fixed-size array\r\n zero_copy_only = _is_zero_copy_only(pa_array.type.storage_dtype, unnest=True)\r\n array: List = [\r\n row for chunk in pa_array.chunks for row in chunk.to_numpy(zero_copy_only=zero_copy_only)\r\n ]\r\n else:\r\n zero_copy_only = _is_zero_copy_only(pa_array.type) and all(\r\n not _is_array_with_nulls(chunk) for chunk in pa_array.chunks\r\n )\r\n array: List = [\r\n row for chunk in pa_array.chunks for row in chunk.to_numpy(zero_copy_only=zero_copy_only)\r\n ]\r\n else:\r\n if isinstance(pa_array.type, _ArrayXDExtensionType):\r\n # don't call to_pylist() to preserve dtype of the fixed-size array\r\n zero_copy_only = _is_zero_copy_only(pa_array.type.storage_dtype, unnest=True)\r\n array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only)\r\n else:\r\n zero_copy_only = _is_zero_copy_only(pa_array.type) and not _is_array_with_nulls(pa_array)\r\n array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist()\r\n```"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7213
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7213/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7213/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7213/events
|
https://github.com/huggingface/datasets/issues/7213
| 2,578,675,565 |
I_kwDODunzps6Zs3dt
| 7,213 |
Add with_rank to Dataset.from_generator
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
open
| false | null |
[] | null | 0 | 1,728 | 1,728 | null |
NONE
| null | null |
### Feature request
Add `with_rank` to `Dataset.from_generator` similar to `Dataset.map` and `Dataset.filter`.
### Motivation
As for `Dataset.map` and `Dataset.filter`, this is useful when creating cache files using multi-GPU, where the rank can be used to select GPU IDs. For now, rank can be added in the `gen_kwars` argument; however, this, in turn, includes the rank when computing the fingerprint.
### Your contribution
Added #7199 which passes rank based on the `job_id` set by `num_proc`.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7213/timeline
| null | null |
muthissar
| 17,828,087 |
MDQ6VXNlcjE3ODI4MDg3
|
https://avatars.githubusercontent.com/u/17828087?v=4
|
https://api.github.com/users/muthissar
|
https://github.com/muthissar
|
https://api.github.com/users/muthissar/followers
|
https://api.github.com/users/muthissar/following{/other_user}
|
https://api.github.com/users/muthissar/gists{/gist_id}
|
https://api.github.com/users/muthissar/starred{/owner}{/repo}
|
https://api.github.com/users/muthissar/subscriptions
|
https://api.github.com/users/muthissar/orgs
|
https://api.github.com/users/muthissar/repos
|
https://api.github.com/users/muthissar/events{/privacy}
|
https://api.github.com/users/muthissar/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7213/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7212
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7212/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7212/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7212/events
|
https://github.com/huggingface/datasets/issues/7212
| 2,578,641,259 |
I_kwDODunzps6ZsvFr
| 7,212 |
Windows do not supprot signal.alarm and singal.signal
|
[] |
open
| false | null |
[] | null | 0 | 1,728 | 1,728 | null |
NONE
| null | null |
### Describe the bug
signal.alarm and signal.signal are used in the load.py module, but these are not supported by Windows.
### Steps to reproduce the bug
lighteval accelerate --model_args "pretrained=gpt2,trust_remote_code=True" --tasks "community|kinit_sts" --custom_tasks "community_tasks/kinit_evals.py" --output_dir "./evals"
### Expected behavior
proceed with input(..) method
### Environment info
Windows 11
| null |
https://api.github.com/repos/huggingface/datasets/issues/7212/timeline
| null | null |
TomasJavurek
| 33,832,672 |
MDQ6VXNlcjMzODMyNjcy
|
https://avatars.githubusercontent.com/u/33832672?v=4
|
https://api.github.com/users/TomasJavurek
|
https://github.com/TomasJavurek
|
https://api.github.com/users/TomasJavurek/followers
|
https://api.github.com/users/TomasJavurek/following{/other_user}
|
https://api.github.com/users/TomasJavurek/gists{/gist_id}
|
https://api.github.com/users/TomasJavurek/starred{/owner}{/repo}
|
https://api.github.com/users/TomasJavurek/subscriptions
|
https://api.github.com/users/TomasJavurek/orgs
|
https://api.github.com/users/TomasJavurek/repos
|
https://api.github.com/users/TomasJavurek/events{/privacy}
|
https://api.github.com/users/TomasJavurek/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7212/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7211
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7211/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7211/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7211/events
|
https://github.com/huggingface/datasets/issues/7211
| 2,576,400,502 |
I_kwDODunzps6ZkMB2
| 7,211 |
Describe only selected fields in README
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
open
| false | null |
[] | null | 0 | 1,728 | 1,728 | null |
NONE
| null | null |
### Feature request
Hi Datasets team!
Is it possible to add the ability to describe only selected fields of the dataset files in `README.md`? For example, I have this open dataset ([open-llm-leaderboard/results](https://huggingface.co/datasets/open-llm-leaderboard/results?row=0)) and I want to describe only some fields in order not to overcomplicate the Dataset Preview and filter out some fields
### Motivation
The `Results` dataset for the Open LLM Leaderboard contains json files with a complex nested structure. I would like to add `README.md` there to use the SQL console, for example. But if I describe the structure of this dataset completely, it will overcomplicate the use of Dataset Preview and the total number of columns will exceed 50
### Your contribution
I'm afraid I'm not familiar with the project structure, so I won't be able to open a PR, but I'll try to help with something else if possible
| null |
https://api.github.com/repos/huggingface/datasets/issues/7211/timeline
| null | null |
alozowski
| 67,658,835 |
MDQ6VXNlcjY3NjU4ODM1
|
https://avatars.githubusercontent.com/u/67658835?v=4
|
https://api.github.com/users/alozowski
|
https://github.com/alozowski
|
https://api.github.com/users/alozowski/followers
|
https://api.github.com/users/alozowski/following{/other_user}
|
https://api.github.com/users/alozowski/gists{/gist_id}
|
https://api.github.com/users/alozowski/starred{/owner}{/repo}
|
https://api.github.com/users/alozowski/subscriptions
|
https://api.github.com/users/alozowski/orgs
|
https://api.github.com/users/alozowski/repos
|
https://api.github.com/users/alozowski/events{/privacy}
|
https://api.github.com/users/alozowski/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7211/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7210
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7210/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7210/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7210/events
|
https://github.com/huggingface/datasets/issues/7210
| 2,575,883,939 |
I_kwDODunzps6ZiN6j
| 7,210 |
Convert Array features to numpy arrays rather than lists by default
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
open
| false | null |
[] | null | 0 | 1,728 | 1,728 | null |
CONTRIBUTOR
| null | null |
### Feature request
It is currently quite easy to cause massive slowdowns when using datasets and not familiar with the underlying data conversions by e.g. making bad choices of formatting.
Would it be more user-friendly to set defaults that avoid this as much as possible? e.g. format Array features as numpy arrays rather than python lists
### Motivation
Default array formatting leads to slow performance: e.g.
```python
import numpy as np
from datasets import Dataset, Features, Array3D
features=Features(**{"array0": Array3D((None, 10, 10), dtype="float32"), "array1": Array3D((None,10,10), dtype="float32")})
dataset = Dataset.from_dict({f"array{i}": [np.zeros((x,10,10), dtype=np.float32) for x in [2000,1000]*25] for i in range(2)}, features=features)
```
```python
t0 = time.time()
for ex in ds:
pass
t1 = time.time()
```
~1.4 s
```python
ds = dataset.to_iterable_dataset()
t0 = time.time()
for ex in ds:
pass
t1 = time.time()
```
~10s
```python
ds = dataset.with_format("numpy")
t0 = time.time()
for ex in ds:
pass
t1 = time.time()
```
~0.04s
```python
ds = dataset.to_iterable_dataset().with_format("numpy")
t0 = time.time()
for ex in ds:
pass
t1 = time.time()
```
~0.04s
### Your contribution
May be able to contribute
| null |
https://api.github.com/repos/huggingface/datasets/issues/7210/timeline
| null | null |
alex-hh
| 5,719,745 |
MDQ6VXNlcjU3MTk3NDU=
|
https://avatars.githubusercontent.com/u/5719745?v=4
|
https://api.github.com/users/alex-hh
|
https://github.com/alex-hh
|
https://api.github.com/users/alex-hh/followers
|
https://api.github.com/users/alex-hh/following{/other_user}
|
https://api.github.com/users/alex-hh/gists{/gist_id}
|
https://api.github.com/users/alex-hh/starred{/owner}{/repo}
|
https://api.github.com/users/alex-hh/subscriptions
|
https://api.github.com/users/alex-hh/orgs
|
https://api.github.com/users/alex-hh/repos
|
https://api.github.com/users/alex-hh/events{/privacy}
|
https://api.github.com/users/alex-hh/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7210/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7208
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7208/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7208/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7208/events
|
https://github.com/huggingface/datasets/issues/7208
| 2,575,484,256 |
I_kwDODunzps6ZgsVg
| 7,208 |
Iterable dataset.filter should not override features
|
[] |
closed
| false | null |
[] | null | 1 | 1,728 | 1,728 | 1,728 |
CONTRIBUTOR
| null | null |
### Describe the bug
When calling filter on an iterable dataset, the features get set to None
### Steps to reproduce the bug
import numpy as np
import time
from datasets import Dataset, Features, Array3D
```python
features=Features(**{"array0": Array3D((None, 10, 10), dtype="float32"), "array1": Array3D((None,10,10), dtype="float32")})
dataset = Dataset.from_dict({f"array{i}": [np.zeros((x,10,10), dtype=np.float32) for x in [2000,1000]*25] for i in range(2)}, features=features)
ds = dataset.to_iterable_dataset()
orig_column_names = ds.column_names
ds = ds.filter(lambda x: True)
assert ds.column_names == orig_column_names
```
### Expected behavior
Filter should preserve features information
### Environment info
3.0.2
| null |
https://api.github.com/repos/huggingface/datasets/issues/7208/timeline
| null |
completed
|
alex-hh
| 5,719,745 |
MDQ6VXNlcjU3MTk3NDU=
|
https://avatars.githubusercontent.com/u/5719745?v=4
|
https://api.github.com/users/alex-hh
|
https://github.com/alex-hh
|
https://api.github.com/users/alex-hh/followers
|
https://api.github.com/users/alex-hh/following{/other_user}
|
https://api.github.com/users/alex-hh/gists{/gist_id}
|
https://api.github.com/users/alex-hh/starred{/owner}{/repo}
|
https://api.github.com/users/alex-hh/subscriptions
|
https://api.github.com/users/alex-hh/orgs
|
https://api.github.com/users/alex-hh/repos
|
https://api.github.com/users/alex-hh/events{/privacy}
|
https://api.github.com/users/alex-hh/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7208/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
lhoestq
| 42,851,186 |
MDQ6VXNlcjQyODUxMTg2
|
https://avatars.githubusercontent.com/u/42851186?v=4
|
https://api.github.com/users/lhoestq
|
https://github.com/lhoestq
|
https://api.github.com/users/lhoestq/followers
|
https://api.github.com/users/lhoestq/following{/other_user}
|
https://api.github.com/users/lhoestq/gists{/gist_id}
|
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
|
https://api.github.com/users/lhoestq/subscriptions
|
https://api.github.com/users/lhoestq/orgs
|
https://api.github.com/users/lhoestq/repos
|
https://api.github.com/users/lhoestq/events{/privacy}
|
https://api.github.com/users/lhoestq/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"closed by https://github.com/huggingface/datasets/pull/7209, thanks @alex-hh !"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7206
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7206/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7206/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7206/events
|
https://github.com/huggingface/datasets/issues/7206
| 2,573,567,467 |
I_kwDODunzps6ZZYXr
| 7,206 |
Slow iteration for iterable dataset with numpy formatting for array data
|
[] |
open
| false | null |
[] | null | 1 | 1,728 | 1,729 | null |
CONTRIBUTOR
| null | null |
### Describe the bug
When working with large arrays, setting with_format to e.g. numpy then applying map causes a significant slowdown for iterable datasets.
### Steps to reproduce the bug
```python
import numpy as np
import time
from datasets import Dataset, Features, Array3D
features=Features(**{"array0": Array3D((None, 10, 10), dtype="float32"), "array1": Array3D((None,10,10), dtype="float32")})
dataset = Dataset.from_dict({f"array{i}": [np.zeros((x,10,10), dtype=np.float32) for x in [2000,1000]*25] for i in range(2)}, features=features)
```
Then
```python
ds = dataset.to_iterable_dataset()
ds = ds.with_format("numpy").map(lambda x: x)
t0 = time.time()
for ex in ds:
pass
t1 = time.time()
print(t1-t0)
```
takes 27 s, whereas
```python
ds = dataset.to_iterable_dataset()
ds = ds.with_format("numpy")
ds = dataset.to_iterable_dataset()
t0 = time.time()
for ex in ds:
pass
t1 = time.time()
print(t1 - t0)
```
takes ~1s
### Expected behavior
Map should not introduce a slowdown when formatting is enabled.
### Environment info
3.0.2
| null |
https://api.github.com/repos/huggingface/datasets/issues/7206/timeline
| null | null |
alex-hh
| 5,719,745 |
MDQ6VXNlcjU3MTk3NDU=
|
https://avatars.githubusercontent.com/u/5719745?v=4
|
https://api.github.com/users/alex-hh
|
https://github.com/alex-hh
|
https://api.github.com/users/alex-hh/followers
|
https://api.github.com/users/alex-hh/following{/other_user}
|
https://api.github.com/users/alex-hh/gists{/gist_id}
|
https://api.github.com/users/alex-hh/starred{/owner}{/repo}
|
https://api.github.com/users/alex-hh/subscriptions
|
https://api.github.com/users/alex-hh/orgs
|
https://api.github.com/users/alex-hh/repos
|
https://api.github.com/users/alex-hh/events{/privacy}
|
https://api.github.com/users/alex-hh/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7206/reactions
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"The below easily eats up 32G of RAM. Leaving it for a while bricked the laptop with 16GB.\r\n\r\n```\r\ndataset = load_dataset(\"Voxel51/OxfordFlowers102\", data_dir=\"data\").with_format(\"numpy\")\r\nprocessed_dataset = dataset.map(lambda x: x)\r\n```\r\n\r\n\r\n\r\nSimilar problems occur if using a real transform function in `.map()`."
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7202
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7202/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7202/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7202/events
|
https://github.com/huggingface/datasets/issues/7202
| 2,572,583,798 |
I_kwDODunzps6ZVoN2
| 7,202 |
`from_parquet` return type annotation
|
[] |
open
| false | null |
[] | null | 0 | 1,728 | 1,728 | null |
NONE
| null | null |
### Describe the bug
As already posted in https://github.com/microsoft/pylance-release/issues/6534, the correct type hinting fails when building a dataset using the `from_parquet` constructor.
Their suggestion is to comprehensively annotate the method's return type to better align with the docstring information.
### Steps to reproduce the bug
```python
from datasets import Dataset
dataset = Dataset.from_parquet(path_or_paths="file")
dataset.map(lambda x: {"new": x["old"]}, batched=True)
```
### Expected behavior
map is a [valid](https://huggingface.co/docs/datasets/v3.0.1/en/package_reference/main_classes#datasets.Dataset.map), no error should be thrown.
### Environment info
- `datasets` version: 3.0.1
- Platform: macOS-15.0.1-arm64-arm-64bit
- Python version: 3.12.6
- `huggingface_hub` version: 0.25.1
- PyArrow version: 17.0.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.6.1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7202/timeline
| null | null |
saiden89
| 45,285,915 |
MDQ6VXNlcjQ1Mjg1OTE1
|
https://avatars.githubusercontent.com/u/45285915?v=4
|
https://api.github.com/users/saiden89
|
https://github.com/saiden89
|
https://api.github.com/users/saiden89/followers
|
https://api.github.com/users/saiden89/following{/other_user}
|
https://api.github.com/users/saiden89/gists{/gist_id}
|
https://api.github.com/users/saiden89/starred{/owner}{/repo}
|
https://api.github.com/users/saiden89/subscriptions
|
https://api.github.com/users/saiden89/orgs
|
https://api.github.com/users/saiden89/repos
|
https://api.github.com/users/saiden89/events{/privacy}
|
https://api.github.com/users/saiden89/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7202/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7201
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7201/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7201/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7201/events
|
https://github.com/huggingface/datasets/issues/7201
| 2,569,837,015 |
I_kwDODunzps6ZLJnX
| 7,201 |
`load_dataset()` of images from a single directory where `train.png` image exists
|
[] |
open
| false | null |
[] | null | 0 | 1,728 | 1,728 | null |
NONE
| null | null |
### Describe the bug
Hey!
Firstly, thanks for maintaining such framework!
I had a small issue, where I wanted to load a custom dataset of image+text captioning. I had all of my images in a single directory, and one of the images had the name `train.png`. Then, the loaded dataset had only this image.
I guess it's related to "train" as a split name, but it's definitely an unexpected behavior :)
Unfortunately I don't have time to submit a proper PR. I'm attaching a toy example to reproduce the issue.
Thanks,
Sagi
### Steps to reproduce the bug
All of the steps I'm attaching are in a fresh env :)
```
(base) sagipolaczek@Sagis-MacBook-Pro ~ % conda activate hf_issue_env
(hf_issue_env) sagipolaczek@Sagis-MacBook-Pro ~ % python --version
Python 3.10.15
(hf_issue_env) sagipolaczek@Sagis-MacBook-Pro ~ % pip list | grep datasets
datasets 3.0.1
(hf_issue_env) sagipolaczek@Sagis-MacBook-Pro ~ % ls -la Documents/hf_datasets_issue
total 352
drwxr-xr-x 6 sagipolaczek staff 192 Oct 7 11:59 .
drwx------@ 23 sagipolaczek staff 736 Oct 7 11:46 ..
-rw-r--r--@ 1 sagipolaczek staff 72 Oct 7 11:59 metadata.csv
-rw-r--r--@ 1 sagipolaczek staff 160154 Oct 6 18:00 pika.png
-rw-r--r--@ 1 sagipolaczek staff 5495 Oct 6 12:02 pika_pika.png
-rw-r--r--@ 1 sagipolaczek staff 1753 Oct 6 11:50 train.png
(hf_issue_env) sagipolaczek@Sagis-MacBook-Pro ~ % cat Documents/hf_datasets_issue/metadata.csv
file_name,text
train.png,A train
pika.png,Pika
pika_pika.png,Pika Pika!
(hf_issue_env) sagipolaczek@Sagis-MacBook-Pro ~ % python
Python 3.10.15 (main, Oct 3 2024, 02:33:33) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from datasets import load_dataset
>>> dataset = load_dataset("imagefolder", data_dir="Documents/hf_datasets_issue/")
>>> dataset
DatasetDict({
train: Dataset({
features: ['image', 'text'],
num_rows: 1
})
})
>>> dataset["train"][0]
{'image': <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=354x84 at 0x10B50FD90>, 'text': 'A train'}
### DELETING `train.png` sample ###
(hf_issue_env) sagipolaczek@Sagis-MacBook-Pro ~ % vim Documents/hf_datasets_issue/metadata.csv
(hf_issue_env) sagipolaczek@Sagis-MacBook-Pro ~ % rm Documents/hf_datasets_issue/train.png
(hf_issue_env) sagipolaczek@Sagis-MacBook-Pro ~ % python
Python 3.10.15 (main, Oct 3 2024, 02:33:33) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from datasets import load_dataset
>>> dataset = load_dataset("imagefolder", data_dir="Documents/hf_datasets_issue/")
Generating train split: 2 examples [00:00, 65.99 examples/s]
>>> dataset
DatasetDict({
train: Dataset({
features: ['image', 'text'],
num_rows: 2
})
})
>>> dataset["train"]
Dataset({
features: ['image', 'text'],
num_rows: 2
})
>>> dataset["train"][0],dataset["train"][1]
({'image': <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=2356x1054 at 0x10DD11E70>, 'text': 'Pika'}, {'image': <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=343x154 at 0x10E258C70>, 'text': 'Pika Pika!'})
```
### Expected behavior
My expected behavior would be to get a dataset with the sample `train.png` in it (along with the others data points).
### Environment info
I've attached it in the example:
Python 3.10.15
datasets 3.0.1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7201/timeline
| null | null |
SagiPolaczek
| 56,922,146 |
MDQ6VXNlcjU2OTIyMTQ2
|
https://avatars.githubusercontent.com/u/56922146?v=4
|
https://api.github.com/users/SagiPolaczek
|
https://github.com/SagiPolaczek
|
https://api.github.com/users/SagiPolaczek/followers
|
https://api.github.com/users/SagiPolaczek/following{/other_user}
|
https://api.github.com/users/SagiPolaczek/gists{/gist_id}
|
https://api.github.com/users/SagiPolaczek/starred{/owner}{/repo}
|
https://api.github.com/users/SagiPolaczek/subscriptions
|
https://api.github.com/users/SagiPolaczek/orgs
|
https://api.github.com/users/SagiPolaczek/repos
|
https://api.github.com/users/SagiPolaczek/events{/privacy}
|
https://api.github.com/users/SagiPolaczek/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7201/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[] |
|
https://api.github.com/repos/huggingface/datasets/issues/7197
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7197/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7197/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7197/events
|
https://github.com/huggingface/datasets/issues/7197
| 2,565,924,788 |
I_kwDODunzps6Y8Oe0
| 7,197 |
ConnectionError: Couldn't reach 'allenai/c4' on the Hub (ConnectionError)数据集下不下来,怎么回事
|
[] |
open
| false | null |
[] | null | 2 | 1,728 | 1,740 | null |
NONE
| null | null |
### Describe the bug
from datasets import load_dataset
print("11")
traindata = load_dataset('ptb_text_only', 'penn_treebank', split='train')
print("22")
valdata = load_dataset('ptb_text_only',
'penn_treebank',
split='validation')
### Steps to reproduce the bug
1
### Expected behavior
1
### Environment info
1
| null |
https://api.github.com/repos/huggingface/datasets/issues/7197/timeline
| null | null |
Mrgengli
| 114,299,344 |
U_kgDOBtAR0A
|
https://avatars.githubusercontent.com/u/114299344?v=4
|
https://api.github.com/users/Mrgengli
|
https://github.com/Mrgengli
|
https://api.github.com/users/Mrgengli/followers
|
https://api.github.com/users/Mrgengli/following{/other_user}
|
https://api.github.com/users/Mrgengli/gists{/gist_id}
|
https://api.github.com/users/Mrgengli/starred{/owner}{/repo}
|
https://api.github.com/users/Mrgengli/subscriptions
|
https://api.github.com/users/Mrgengli/orgs
|
https://api.github.com/users/Mrgengli/repos
|
https://api.github.com/users/Mrgengli/events{/privacy}
|
https://api.github.com/users/Mrgengli/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7197/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Also cant download \"allenai/c4\", but with different error reported:\r\n```\r\nTraceback (most recent call last): \r\n File \"/***/lib/python3.10/site-packages/datasets/load.py\", line 2074, in load_dataset \r\n builder_instance = load_dataset_builder( \r\n File \"/***/lib/python3.10/site-packages/datasets/load.py\", line 1795, in load_dataset_builder \r\n dataset_module = dataset_module_factory( \r\n File \"/***/lib/python3.10/site-packages/datasets/load.py\", line 1659, in dataset_module_factory \r\n raise e1 from None \r\n File \"/***/lib/python3.10/site-packages/datasets/load.py\", line 1647, in dataset_module_factory \r\n ).get_module() \r\n File \"/***/lib/python3.10/site-packages/datasets/load.py\", line 1069, in get_module \r\n module_name, default_builder_kwargs = infer_module_for_data_files( \r\n File \"/***/lib/python3.10/site-packages/datasets/load.py\", line 594, in infer_module_for_data_files \r\n raise DataFilesNotFoundError(\"No (supported) data files found\" + (f\" in {path}\" if path else \"\")) \r\ndatasets.exceptions.DataFilesNotFoundError: No (supported) data files found in allenai/c4 \r\n```\r\n\r\n## Code to reproduce\r\n```\r\ndataset = load_dataset(\"allenai/c4\", \"en\", split=\"train\", streaming=True,trust_remote_code=True,\r\n cache_dir=\"dataset/en\",\r\n download_mode=\"force_redownload\")\r\n```\r\n\r\n## Environment\r\ndatasets 3.0.1 \r\nhuggingface_hub 0.25.1",
"应该是网络问题,无法访问外网?"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7196
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7196/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7196/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7196/events
|
https://github.com/huggingface/datasets/issues/7196
| 2,564,218,566 |
I_kwDODunzps6Y1t7G
| 7,196 |
concatenate_datasets does not preserve shuffling state
|
[] |
open
| false | null |
[] | null | 1 | 1,727 | 1,742 | null |
CONTRIBUTOR
| null | null |
### Describe the bug
After concatenate datasets on an iterable dataset, the shuffling state is destroyed, similar to #7156
This means concatenation cant be used for resolving uneven numbers of samples across devices when using iterable datasets in a distributed setting as discussed in #6623
I also noticed that the number of shards is the same after concatenation, which I found surprising, but I don't understand the internals well enough to know whether this is actually surprising or not
### Steps to reproduce the bug
```python
import datasets
import torch.utils.data
def gen(shards):
yield {"shards": shards}
def main():
dataset1 = datasets.IterableDataset.from_generator(
gen, gen_kwargs={"shards": list(range(25))} # TODO: how to understand this?
)
dataset2 = datasets.IterableDataset.from_generator(
gen, gen_kwargs={"shards": list(range(25, 50))} # TODO: how to understand this?
)
dataset1 = dataset1.shuffle(buffer_size=1)
dataset2 = dataset2.shuffle(buffer_size=1)
print(dataset1.n_shards)
print(dataset2.n_shards)
dataset = datasets.concatenate_datasets(
[dataset1, dataset2]
)
print(dataset.n_shards)
# dataset = dataset1
dataloader = torch.utils.data.DataLoader(
dataset,
batch_size=8,
num_workers=0,
)
for i, batch in enumerate(dataloader):
print(batch)
print("\nNew epoch")
dataset = dataset.set_epoch(1)
for i, batch in enumerate(dataloader):
print(batch)
if __name__ == "__main__":
main()
```
### Expected behavior
Shuffling state should be preserved
### Environment info
Latest datasets
| null |
https://api.github.com/repos/huggingface/datasets/issues/7196/timeline
| null | null |
alex-hh
| 5,719,745 |
MDQ6VXNlcjU3MTk3NDU=
|
https://avatars.githubusercontent.com/u/5719745?v=4
|
https://api.github.com/users/alex-hh
|
https://github.com/alex-hh
|
https://api.github.com/users/alex-hh/followers
|
https://api.github.com/users/alex-hh/following{/other_user}
|
https://api.github.com/users/alex-hh/gists{/gist_id}
|
https://api.github.com/users/alex-hh/starred{/owner}{/repo}
|
https://api.github.com/users/alex-hh/subscriptions
|
https://api.github.com/users/alex-hh/orgs
|
https://api.github.com/users/alex-hh/repos
|
https://api.github.com/users/alex-hh/events{/privacy}
|
https://api.github.com/users/alex-hh/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7196/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"It also does preserve `split_by_node`, so in the meantime you should call `shuffle` or `split_by_node` AFTER `interleave_datasets` or `concatenate_datasets`"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7195
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7195/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7195/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7195/events
|
https://github.com/huggingface/datasets/issues/7195
| 2,564,070,809 |
I_kwDODunzps6Y1J2Z
| 7,195 |
Add support for 3D datasets
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
open
| false | null |
[
{
"login": "severo",
"id": 1676121,
"node_id": "MDQ6VXNlcjE2NzYxMjE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1676121?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/severo",
"html_url": "https://github.com/severo",
"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}",
"starred_url": "https://api.github.com/users/severo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/severo/subscriptions",
"organizations_url": "https://api.github.com/users/severo/orgs",
"repos_url": "https://api.github.com/users/severo/repos",
"events_url": "https://api.github.com/users/severo/events{/privacy}",
"received_events_url": "https://api.github.com/users/severo/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
] | null | 3 | 1,727 | 1,728 | null |
COLLABORATOR
| null | null |
See https://huggingface.co/datasets/allenai/objaverse for example
| null |
https://api.github.com/repos/huggingface/datasets/issues/7195/timeline
| null | null |
severo
| 1,676,121 |
MDQ6VXNlcjE2NzYxMjE=
|
https://avatars.githubusercontent.com/u/1676121?v=4
|
https://api.github.com/users/severo
|
https://github.com/severo
|
https://api.github.com/users/severo/followers
|
https://api.github.com/users/severo/following{/other_user}
|
https://api.github.com/users/severo/gists{/gist_id}
|
https://api.github.com/users/severo/starred{/owner}{/repo}
|
https://api.github.com/users/severo/subscriptions
|
https://api.github.com/users/severo/orgs
|
https://api.github.com/users/severo/repos
|
https://api.github.com/users/severo/events{/privacy}
|
https://api.github.com/users/severo/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7195/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
severo
| 1,676,121 |
MDQ6VXNlcjE2NzYxMjE=
|
https://avatars.githubusercontent.com/u/1676121?v=4
|
https://api.github.com/users/severo
|
https://github.com/severo
|
https://api.github.com/users/severo/followers
|
https://api.github.com/users/severo/following{/other_user}
|
https://api.github.com/users/severo/gists{/gist_id}
|
https://api.github.com/users/severo/starred{/owner}{/repo}
|
https://api.github.com/users/severo/subscriptions
|
https://api.github.com/users/severo/orgs
|
https://api.github.com/users/severo/repos
|
https://api.github.com/users/severo/events{/privacy}
|
https://api.github.com/users/severo/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"maybe related: https://github.com/huggingface/datasets/issues/6388",
"Also look at https://github.com/huggingface/dataset-viewer/blob/f5fd117ceded990a7766e705bba1203fa907d6ad/services/worker/src/worker/job_runners/dataset/modalities.py#L241 which lists the 3D file formats that will assign the 3D modality to a dataset.",
"~~we can brainstorm about the UX maybe (i don't expect we should load all models on the page at once – IMO there should be a manual action from user to load + maybe load first couple of row by default) cc @gary149 @cfahlgren1~~\r\n\r\nit's more for the viewer issue (https://github.com/huggingface/dataset-viewer/issues/1003)"
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7194
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7194/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7194/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7194/events
|
https://github.com/huggingface/datasets/issues/7194
| 2,563,364,199 |
I_kwDODunzps6YydVn
| 7,194 |
datasets.exceptions.DatasetNotFoundError for private dataset
|
[] |
closed
| false | null |
[] | null | 2 | 1,727 | 1,727 | 1,727 |
NONE
| null | null |
### Describe the bug
The following Python code tries to download a private dataset and fails with the error `datasets.exceptions.DatasetNotFoundError: Dataset 'ClimatePolicyRadar/all-document-text-data-weekly' doesn't exist on the Hub or cannot be accessed.`. Downloading a public dataset doesn't work.
``` py
from datasets import load_dataset
_ = load_dataset("ClimatePolicyRadar/all-document-text-data-weekly")
```
This seems to be just an issue with my machine config as the code above works with a colleague's machine. So far I have tried:
- logging back out and in from the Huggingface CLI using `huggingface-cli logout`
- manually removing the token cache at `/Users/kalyan/.cache/huggingface/token` (found using `huggingface-cli env`)
- manually passing a token in `load_dataset`
My output of `huggingface-cli whoami`:
```
kdutia
orgs: ClimatePolicyRadar
```
### Steps to reproduce the bug
```
python
Python 3.12.2 (main, Feb 6 2024, 20:19:44) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from datasets import load_dataset
>>> _ = load_dataset("ClimatePolicyRadar/all-document-text-data-weekly")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/kalyan/Library/Caches/pypoetry/virtualenvs/open-data-cnKQNmjn-py3.12/lib/python3.12/site-packages/datasets/load.py", line 2074, in load_dataset
builder_instance = load_dataset_builder(
^^^^^^^^^^^^^^^^^^^^^
File "/Users/kalyan/Library/Caches/pypoetry/virtualenvs/open-data-cnKQNmjn-py3.12/lib/python3.12/site-packages/datasets/load.py", line 1795, in load_dataset_builder
dataset_module = dataset_module_factory(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kalyan/Library/Caches/pypoetry/virtualenvs/open-data-cnKQNmjn-py3.12/lib/python3.12/site-packages/datasets/load.py", line 1659, in dataset_module_factory
raise e1 from None
File "/Users/kalyan/Library/Caches/pypoetry/virtualenvs/open-data-cnKQNmjn-py3.12/lib/python3.12/site-packages/datasets/load.py", line 1597, in dataset_module_factory
raise DatasetNotFoundError(f"Dataset '{path}' doesn't exist on the Hub or cannot be accessed.") from e
datasets.exceptions.DatasetNotFoundError: Dataset 'ClimatePolicyRadar/all-document-text-data-weekly' doesn't exist on the Hub or cannot be accessed.
>>>
```
### Expected behavior
The dataset downloads successfully.
### Environment info
From `huggingface-cli env`:
```
- huggingface_hub version: 0.25.1
- Platform: macOS-14.2.1-arm64-arm-64bit
- Python version: 3.12.2
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Running in Google Colab Enterprise ?: No
- Token path ?: /Users/kalyan/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: kdutia
- Configured git credential helpers: osxkeychain
- FastAI: N/A
- Tensorflow: N/A
- Torch: N/A
- Jinja2: 3.1.4
- Graphviz: N/A
- keras: N/A
- Pydot: N/A
- Pillow: N/A
- hf_transfer: N/A
- gradio: N/A
- tensorboard: N/A
- numpy: 2.1.1
- pydantic: N/A
- aiohttp: 3.10.8
- ENDPOINT: https://huggingface.co
- HF_HUB_CACHE: /Users/kalyan/.cache/huggingface/hub
- HF_ASSETS_CACHE: /Users/kalyan/.cache/huggingface/assets
- HF_TOKEN_PATH: /Users/kalyan/.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
- HF_HUB_ETAG_TIMEOUT: 10
- HF_HUB_DOWNLOAD_TIMEOUT: 10
```
from `datasets-cli env`:
```
- `datasets` version: 3.0.1
- Platform: macOS-14.2.1-arm64-arm-64bit
- Python version: 3.12.2
- `huggingface_hub` version: 0.25.1
- PyArrow version: 17.0.0
- Pandas version: 2.2.3
- `fsspec` version: 2024.6.1
```
| null |
https://api.github.com/repos/huggingface/datasets/issues/7194/timeline
| null |
completed
|
kdutia
| 20,212,179 |
MDQ6VXNlcjIwMjEyMTc5
|
https://avatars.githubusercontent.com/u/20212179?v=4
|
https://api.github.com/users/kdutia
|
https://github.com/kdutia
|
https://api.github.com/users/kdutia/followers
|
https://api.github.com/users/kdutia/following{/other_user}
|
https://api.github.com/users/kdutia/gists{/gist_id}
|
https://api.github.com/users/kdutia/starred{/owner}{/repo}
|
https://api.github.com/users/kdutia/subscriptions
|
https://api.github.com/users/kdutia/orgs
|
https://api.github.com/users/kdutia/repos
|
https://api.github.com/users/kdutia/events{/privacy}
|
https://api.github.com/users/kdutia/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7194/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
davanstrien
| 8,995,957 |
MDQ6VXNlcjg5OTU5NTc=
|
https://avatars.githubusercontent.com/u/8995957?v=4
|
https://api.github.com/users/davanstrien
|
https://github.com/davanstrien
|
https://api.github.com/users/davanstrien/followers
|
https://api.github.com/users/davanstrien/following{/other_user}
|
https://api.github.com/users/davanstrien/gists{/gist_id}
|
https://api.github.com/users/davanstrien/starred{/owner}{/repo}
|
https://api.github.com/users/davanstrien/subscriptions
|
https://api.github.com/users/davanstrien/orgs
|
https://api.github.com/users/davanstrien/repos
|
https://api.github.com/users/davanstrien/events{/privacy}
|
https://api.github.com/users/davanstrien/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"Actually there is no such dataset available, that is why you are getting that error.",
"Fixed with @kdutia in Slack chat. Generating a new token fixed this issue. "
] |
||
https://api.github.com/repos/huggingface/datasets/issues/7193
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7193/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7193/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7193/events
|
https://github.com/huggingface/datasets/issues/7193
| 2,562,392,887 |
I_kwDODunzps6YuwM3
| 7,193 |
Support of num_workers (multiprocessing) in map for IterableDataset
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
open
| false | null |
[] | null | 1 | 1,727 | 1,727 | null |
NONE
| null | null |
### Feature request
Currently, IterableDataset doesn't support setting num_worker in .map(), which results in slow processing here. Could we add support for it? As .map() can be run in the batch fashion (e.g., batch_size is default to 1000 in datasets), it seems to be doable for IterableDataset as the regular Dataset.
### Motivation
Improving data processing efficiency
### Your contribution
Testing
| null |
https://api.github.com/repos/huggingface/datasets/issues/7193/timeline
| null | null |
getao
| 12,735,658 |
MDQ6VXNlcjEyNzM1NjU4
|
https://avatars.githubusercontent.com/u/12735658?v=4
|
https://api.github.com/users/getao
|
https://github.com/getao
|
https://api.github.com/users/getao/followers
|
https://api.github.com/users/getao/following{/other_user}
|
https://api.github.com/users/getao/gists{/gist_id}
|
https://api.github.com/users/getao/starred{/owner}{/repo}
|
https://api.github.com/users/getao/subscriptions
|
https://api.github.com/users/getao/orgs
|
https://api.github.com/users/getao/repos
|
https://api.github.com/users/getao/events{/privacy}
|
https://api.github.com/users/getao/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7193/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"I was curious about the same - since map is applied on the fly I was assuming that setting num_workers>1 in DataLoader would effectively do the map in parallel, have you tried that?"
] |
|
https://api.github.com/repos/huggingface/datasets/issues/7192
|
https://api.github.com/repos/huggingface/datasets
|
https://api.github.com/repos/huggingface/datasets/issues/7192/labels{/name}
|
https://api.github.com/repos/huggingface/datasets/issues/7192/comments
|
https://api.github.com/repos/huggingface/datasets/issues/7192/events
|
https://github.com/huggingface/datasets/issues/7192
| 2,562,289,642 |
I_kwDODunzps6YuW_q
| 7,192 |
Add repeat() for iterable datasets
|
[
{
"id": 1935892871,
"node_id": "MDU6TGFiZWwxOTM1ODkyODcx",
"url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"description": "New feature or request"
}
] |
closed
| false | null |
[] | null | 3 | 1,727 | 1,742 | 1,742 |
CONTRIBUTOR
| null | null |
### Feature request
It would be useful to be able to straightforwardly repeat iterable datasets indefinitely, to provide complete control over starting and ending of iteration to the user.
An IterableDataset.repeat(n) function could do this automatically
### Motivation
This feature was discussed in this issue https://github.com/huggingface/datasets/issues/7147, and would resolve the need to use the hack of interleave datasets with probability 0 as a simple way to achieve this functionality.
An additional benefit might be the simplification of the use of iterable datasets in a distributed setting:
If the user can assume that datasets will repeat indefinitely, then issues around different numbers of samples appearing on different devices (e.g. https://github.com/huggingface/datasets/issues/6437, https://github.com/huggingface/datasets/issues/6594, https://github.com/huggingface/datasets/issues/6623, https://github.com/huggingface/datasets/issues/6719) can potentially be straightforwardly resolved by simply doing:
ids.repeat(None).take(n_samples_per_epoch)
### Your contribution
I'm not familiar enough with the codebase to assess how straightforward this would be to implement.
If it might be very straightforward, I could possibly have a go.
| null |
https://api.github.com/repos/huggingface/datasets/issues/7192/timeline
| null |
completed
|
alex-hh
| 5,719,745 |
MDQ6VXNlcjU3MTk3NDU=
|
https://avatars.githubusercontent.com/u/5719745?v=4
|
https://api.github.com/users/alex-hh
|
https://github.com/alex-hh
|
https://api.github.com/users/alex-hh/followers
|
https://api.github.com/users/alex-hh/following{/other_user}
|
https://api.github.com/users/alex-hh/gists{/gist_id}
|
https://api.github.com/users/alex-hh/starred{/owner}{/repo}
|
https://api.github.com/users/alex-hh/subscriptions
|
https://api.github.com/users/alex-hh/orgs
|
https://api.github.com/users/alex-hh/repos
|
https://api.github.com/users/alex-hh/events{/privacy}
|
https://api.github.com/users/alex-hh/received_events
|
User
|
public
| false | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
https://api.github.com/repos/huggingface/datasets/issues/7192/reactions
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | null | null | null | null |
lhoestq
| 42,851,186 |
MDQ6VXNlcjQyODUxMTg2
|
https://avatars.githubusercontent.com/u/42851186?v=4
|
https://api.github.com/users/lhoestq
|
https://github.com/lhoestq
|
https://api.github.com/users/lhoestq/followers
|
https://api.github.com/users/lhoestq/following{/other_user}
|
https://api.github.com/users/lhoestq/gists{/gist_id}
|
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
|
https://api.github.com/users/lhoestq/subscriptions
|
https://api.github.com/users/lhoestq/orgs
|
https://api.github.com/users/lhoestq/repos
|
https://api.github.com/users/lhoestq/events{/privacy}
|
https://api.github.com/users/lhoestq/received_events
|
User
|
public
| false | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | false |
[
"perhaps concatenate_datasets can already be used to achieve almost the same effect? ",
"`concatenate_datasets` does the job when there is a finite number of repetitions, but in case of `.repeat()` forever we need a new logic in `iterable_dataset.py`",
"done in https://github.com/huggingface/datasets/pull/7198"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.