url
string
repository_url
string
labels_url
string
comments_url
string
events_url
string
html_url
string
id
int64
node_id
string
number
int64
title
string
user
dict
labels
list
state
string
locked
bool
assignee
dict
assignees
list
milestone
dict
comments
int64
created_at
timestamp[ms]
updated_at
timestamp[ms]
closed_at
timestamp[ms]
author_association
string
type
null
sub_issues_summary
dict
active_lock_reason
null
draft
bool
pull_request
dict
body
string
closed_by
dict
reactions
dict
timeline_url
string
performed_via_github_app
null
state_reason
string
is_pull_request
bool
https://api.github.com/repos/huggingface/datasets/issues/7523
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7523/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7523/comments
https://api.github.com/repos/huggingface/datasets/issues/7523/events
https://github.com/huggingface/datasets/pull/7523
2,999,616,692
PR_kwDODunzps6S1r8w
7,523
mention av in video docs
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-04-16T13:11:12
2025-04-16T13:13:45
2025-04-16T13:11:42
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7523", "html_url": "https://github.com/huggingface/datasets/pull/7523", "diff_url": "https://github.com/huggingface/datasets/pull/7523.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7523.patch", "merged_at": "2025-04-16T13:11:42" }
null
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7523/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7523/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7522
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7522/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7522/comments
https://api.github.com/repos/huggingface/datasets/issues/7522/events
https://github.com/huggingface/datasets/pull/7522
2,998,169,017
PR_kwDODunzps6SwwXW
7,522
Preserve formatting in concatenated IterableDataset
{ "login": "francescorubbo", "id": 5140987, "node_id": "MDQ6VXNlcjUxNDA5ODc=", "avatar_url": "https://avatars.githubusercontent.com/u/5140987?v=4", "gravatar_id": "", "url": "https://api.github.com/users/francescorubbo", "html_url": "https://github.com/francescorubbo", "followers_url": "https://api.github.com/users/francescorubbo/followers", "following_url": "https://api.github.com/users/francescorubbo/following{/other_user}", "gists_url": "https://api.github.com/users/francescorubbo/gists{/gist_id}", "starred_url": "https://api.github.com/users/francescorubbo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/francescorubbo/subscriptions", "organizations_url": "https://api.github.com/users/francescorubbo/orgs", "repos_url": "https://api.github.com/users/francescorubbo/repos", "events_url": "https://api.github.com/users/francescorubbo/events{/privacy}", "received_events_url": "https://api.github.com/users/francescorubbo/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
0
2025-04-16T02:37:33
2025-04-16T02:37:33
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7522", "html_url": "https://github.com/huggingface/datasets/pull/7522", "diff_url": "https://github.com/huggingface/datasets/pull/7522.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7522.patch", "merged_at": null }
Fixes #7515
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7522/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7522/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7521
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7521/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7521/comments
https://api.github.com/repos/huggingface/datasets/issues/7521/events
https://github.com/huggingface/datasets/pull/7521
2,997,666,366
PR_kwDODunzps6SvEZp
7,521
fix: Image Feature in Datasets Library Fails to Handle bytearray Objects from Spark DataFrames (#7517)
{ "login": "giraffacarp", "id": 73196164, "node_id": "MDQ6VXNlcjczMTk2MTY0", "avatar_url": "https://avatars.githubusercontent.com/u/73196164?v=4", "gravatar_id": "", "url": "https://api.github.com/users/giraffacarp", "html_url": "https://github.com/giraffacarp", "followers_url": "https://api.github.com/users/giraffacarp/followers", "following_url": "https://api.github.com/users/giraffacarp/following{/other_user}", "gists_url": "https://api.github.com/users/giraffacarp/gists{/gist_id}", "starred_url": "https://api.github.com/users/giraffacarp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/giraffacarp/subscriptions", "organizations_url": "https://api.github.com/users/giraffacarp/orgs", "repos_url": "https://api.github.com/users/giraffacarp/repos", "events_url": "https://api.github.com/users/giraffacarp/events{/privacy}", "received_events_url": "https://api.github.com/users/giraffacarp/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
1
2025-04-15T21:23:58
2025-04-16T06:57:22
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7521", "html_url": "https://github.com/huggingface/datasets/pull/7521", "diff_url": "https://github.com/huggingface/datasets/pull/7521.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7521.patch", "merged_at": null }
## Task Support bytes-like objects (bytes and bytearray) in Features classes ### Description The `Features` classes only accept `bytes` objects for binary data, but not `bytearray`. This leads to errors when using `IterableDataset.from_spark()` with Spark DataFrames as they contain `bytearray` objects, even though both `bytes` and `bytearray` are valid [*bytes-like objects* in Python](https://docs.python.org/3/glossary.html#term-bytes-like-object). ### Changes - Updated `Features` classes to accept both `bytes` and `bytearray` types for binary data fields. ### Reasoning - `bytes` and `bytearray` serve the same purpose for binary data, with the only difference being mutability. - Modifying the Spark iterator to convert `bytearray` to `bytes` would be a workaround, not a true fix. I think the correct solution is to accept all bytes-like objects as input. - This approach is more robust and future-proof since Python 3.12+ provides a [standard way to check for buffer protocol](https://docs.python.org/3/c-api/buffer.html#bufferobjects). ### Testing - Added tests to cover `bytearray` inputs for image features. ### Related Issues - Fixes: #7517
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7521/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7521/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7520
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7520/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7520/comments
https://api.github.com/repos/huggingface/datasets/issues/7520/events
https://github.com/huggingface/datasets/issues/7520
2,997,422,044
I_kwDODunzps6yqQfc
7,520
Update items in the dataset without `map`
{ "login": "mashdragon", "id": 122402293, "node_id": "U_kgDOB0u19Q", "avatar_url": "https://avatars.githubusercontent.com/u/122402293?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mashdragon", "html_url": "https://github.com/mashdragon", "followers_url": "https://api.github.com/users/mashdragon/followers", "following_url": "https://api.github.com/users/mashdragon/following{/other_user}", "gists_url": "https://api.github.com/users/mashdragon/gists{/gist_id}", "starred_url": "https://api.github.com/users/mashdragon/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mashdragon/subscriptions", "organizations_url": "https://api.github.com/users/mashdragon/orgs", "repos_url": "https://api.github.com/users/mashdragon/repos", "events_url": "https://api.github.com/users/mashdragon/events{/privacy}", "received_events_url": "https://api.github.com/users/mashdragon/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "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
2025-04-15T19:39:01
2025-04-15T19:39:01
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Feature request I would like to be able to update items in my dataset without affecting all rows. At least if there was a range option, I would be able to process those items, save the dataset, and then continue. If I am supposed to split the dataset first, that is not clear, since the docs suggest that any of those functions returns a new object, so I don't think I can do that. ### Motivation I am applying an extremely time-consuming function to each item in my `Dataset`. Unfortunately, datasets only supports updating values via `map`, so if my computer dies in the middle of this long-running process, I lose all progress. This is far from ideal. I would like to use `datasets` throughout this processing, but this limitation is now forcing me to write my own dataset format just to do this intermediary operation. It would be less intuitive but I suppose I could split and then concatenate the dataset before saving? But this feels very inefficient. ### Your contribution I can test the feature.
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7520/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7520/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7519
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7519/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7519/comments
https://api.github.com/repos/huggingface/datasets/issues/7519/events
https://github.com/huggingface/datasets/pull/7519
2,996,458,961
PR_kwDODunzps6Sq76Z
7,519
pdf docs fixes
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-04-15T13:35:56
2025-04-15T13:38:31
2025-04-15T13:36:03
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7519", "html_url": "https://github.com/huggingface/datasets/pull/7519", "diff_url": "https://github.com/huggingface/datasets/pull/7519.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7519.patch", "merged_at": "2025-04-15T13:36:03" }
close https://github.com/huggingface/datasets/issues/7494
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7519/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7519/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7518
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7518/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7518/comments
https://api.github.com/repos/huggingface/datasets/issues/7518/events
https://github.com/huggingface/datasets/issues/7518
2,996,141,825
I_kwDODunzps6ylX8B
7,518
num_proc parallelization works only for first ~10s.
{ "login": "pshishodiaa", "id": 33901783, "node_id": "MDQ6VXNlcjMzOTAxNzgz", "avatar_url": "https://avatars.githubusercontent.com/u/33901783?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pshishodiaa", "html_url": "https://github.com/pshishodiaa", "followers_url": "https://api.github.com/users/pshishodiaa/followers", "following_url": "https://api.github.com/users/pshishodiaa/following{/other_user}", "gists_url": "https://api.github.com/users/pshishodiaa/gists{/gist_id}", "starred_url": "https://api.github.com/users/pshishodiaa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pshishodiaa/subscriptions", "organizations_url": "https://api.github.com/users/pshishodiaa/orgs", "repos_url": "https://api.github.com/users/pshishodiaa/repos", "events_url": "https://api.github.com/users/pshishodiaa/events{/privacy}", "received_events_url": "https://api.github.com/users/pshishodiaa/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
2
2025-04-15T11:44:03
2025-04-15T13:12:13
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug When I try to load an already downloaded dataset with num_proc=64, the speed is very high for the first 10-20 seconds acheiving 30-40K samples / s, and 100% utilization for all cores but it soon drops to <= 1000 with almost 0% utilization for most cores. ### Steps to reproduce the bug ``` // download dataset with cli !huggingface-cli download --repo-type dataset timm/imagenet-1k-wds --max-workers 32 from datasets import load_dataset ds = load_dataset("timm/imagenet-1k-wds", num_proc=64) ``` ### Expected behavior 100% core utilization throughout. ### Environment info Azure A100-80GB, 16 cores VM ![Image](https://github.com/user-attachments/assets/69d00fe3-d720-4474-9439-21e046d85034)
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7518/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7518/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7517
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7517/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7517/comments
https://api.github.com/repos/huggingface/datasets/issues/7517/events
https://github.com/huggingface/datasets/issues/7517
2,996,106,077
I_kwDODunzps6ylPNd
7,517
Image Feature in Datasets Library Fails to Handle bytearray Objects from Spark DataFrames
{ "login": "giraffacarp", "id": 73196164, "node_id": "MDQ6VXNlcjczMTk2MTY0", "avatar_url": "https://avatars.githubusercontent.com/u/73196164?v=4", "gravatar_id": "", "url": "https://api.github.com/users/giraffacarp", "html_url": "https://github.com/giraffacarp", "followers_url": "https://api.github.com/users/giraffacarp/followers", "following_url": "https://api.github.com/users/giraffacarp/following{/other_user}", "gists_url": "https://api.github.com/users/giraffacarp/gists{/gist_id}", "starred_url": "https://api.github.com/users/giraffacarp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/giraffacarp/subscriptions", "organizations_url": "https://api.github.com/users/giraffacarp/orgs", "repos_url": "https://api.github.com/users/giraffacarp/repos", "events_url": "https://api.github.com/users/giraffacarp/events{/privacy}", "received_events_url": "https://api.github.com/users/giraffacarp/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
{ "login": "giraffacarp", "id": 73196164, "node_id": "MDQ6VXNlcjczMTk2MTY0", "avatar_url": "https://avatars.githubusercontent.com/u/73196164?v=4", "gravatar_id": "", "url": "https://api.github.com/users/giraffacarp", "html_url": "https://github.com/giraffacarp", "followers_url": "https://api.github.com/users/giraffacarp/followers", "following_url": "https://api.github.com/users/giraffacarp/following{/other_user}", "gists_url": "https://api.github.com/users/giraffacarp/gists{/gist_id}", "starred_url": "https://api.github.com/users/giraffacarp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/giraffacarp/subscriptions", "organizations_url": "https://api.github.com/users/giraffacarp/orgs", "repos_url": "https://api.github.com/users/giraffacarp/repos", "events_url": "https://api.github.com/users/giraffacarp/events{/privacy}", "received_events_url": "https://api.github.com/users/giraffacarp/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "login": "giraffacarp", "id": 73196164, "node_id": "MDQ6VXNlcjczMTk2MTY0", "avatar_url": "https://avatars.githubusercontent.com/u/73196164?v=4", "gravatar_id": "", "url": "https://api.github.com/users/giraffacarp", "html_url": "https://github.com/giraffacarp", "followers_url": "https://api.github.com/users/giraffacarp/followers", "following_url": "https://api.github.com/users/giraffacarp/following{/other_user}", "gists_url": "https://api.github.com/users/giraffacarp/gists{/gist_id}", "starred_url": "https://api.github.com/users/giraffacarp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/giraffacarp/subscriptions", "organizations_url": "https://api.github.com/users/giraffacarp/orgs", "repos_url": "https://api.github.com/users/giraffacarp/repos", "events_url": "https://api.github.com/users/giraffacarp/events{/privacy}", "received_events_url": "https://api.github.com/users/giraffacarp/received_events", "type": "User", "user_view_type": "public", "site_admin": false } ]
null
4
2025-04-15T11:29:17
2025-04-15T15:57:15
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug When using `IterableDataset.from_spark()` with a Spark DataFrame containing image data, the `Image` feature class fails to properly process this data type, causing an `AttributeError: 'bytearray' object has no attribute 'get'` ### Steps to reproduce the bug 1. Create a Spark DataFrame with a column containing image data as bytearray objects 2. Define a Feature schema with an Image feature 3. Create an IterableDataset using `IterableDataset.from_spark()` 4. Attempt to iterate through the dataset ``` from pyspark.sql import SparkSession from datasets import Dataset, IterableDataset, Features, Image, Value # initialize spark spark = SparkSession.builder.appName("MinimalRepro").getOrCreate() # create spark dataframe data = [(0, open("image.png", "rb").read())] df = spark.createDataFrame(data, "idx: int, image: binary") # convert to dataset features = Features({"idx": Value("int64"), "image": Image()}) ds = Dataset.from_spark(df, features=features) ds_iter = IterableDataset.from_spark(df, features=features) # iterate print(next(iter(ds))) print(next(iter(ds_iter))) ``` ### Expected behavior The features should work on `IterableDataset` the same way they work on `Dataset` ### Environment info - `datasets` version: 3.5.0 - Platform: macOS-15.3.2-arm64-arm-64bit - Python version: 3.12.7 - `huggingface_hub` version: 0.30.2 - PyArrow version: 18.1.0 - Pandas version: 2.2.3 - `fsspec` version: 2024.12.0
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7517/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7517/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7516
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7516/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7516/comments
https://api.github.com/repos/huggingface/datasets/issues/7516/events
https://github.com/huggingface/datasets/issues/7516
2,995,780,283
I_kwDODunzps6yj_q7
7,516
unsloth/DeepSeek-R1-Distill-Qwen-32B server error
{ "login": "Editor-1", "id": 164353862, "node_id": "U_kgDOCcvXRg", "avatar_url": "https://avatars.githubusercontent.com/u/164353862?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Editor-1", "html_url": "https://github.com/Editor-1", "followers_url": "https://api.github.com/users/Editor-1/followers", "following_url": "https://api.github.com/users/Editor-1/following{/other_user}", "gists_url": "https://api.github.com/users/Editor-1/gists{/gist_id}", "starred_url": "https://api.github.com/users/Editor-1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Editor-1/subscriptions", "organizations_url": "https://api.github.com/users/Editor-1/orgs", "repos_url": "https://api.github.com/users/Editor-1/repos", "events_url": "https://api.github.com/users/Editor-1/events{/privacy}", "received_events_url": "https://api.github.com/users/Editor-1/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
0
2025-04-15T09:26:53
2025-04-15T09:57:26
2025-04-15T09:57:26
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug hfhubhttperror: 500 server error: internal server error for url: https://huggingface.co/api/models/unsloth/deepseek-r1-distill-qwen-32b-bnb-4bit/commits/main (request id: root=1-67fe23fa-3a2150eb444c2a823c388579;de3aed68-c397-4da5-94d4-6565efd3b919) internal error - we're working hard to fix this as soon as possible! ### Steps to reproduce the bug unsloth/DeepSeek-R1-Distill-Qwen-32B server error ### Expected behavior Network repair ### Environment info The web side is also unavailable
{ "login": "Editor-1", "id": 164353862, "node_id": "U_kgDOCcvXRg", "avatar_url": "https://avatars.githubusercontent.com/u/164353862?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Editor-1", "html_url": "https://github.com/Editor-1", "followers_url": "https://api.github.com/users/Editor-1/followers", "following_url": "https://api.github.com/users/Editor-1/following{/other_user}", "gists_url": "https://api.github.com/users/Editor-1/gists{/gist_id}", "starred_url": "https://api.github.com/users/Editor-1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Editor-1/subscriptions", "organizations_url": "https://api.github.com/users/Editor-1/orgs", "repos_url": "https://api.github.com/users/Editor-1/repos", "events_url": "https://api.github.com/users/Editor-1/events{/privacy}", "received_events_url": "https://api.github.com/users/Editor-1/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7516/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7516/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/7515
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7515/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7515/comments
https://api.github.com/repos/huggingface/datasets/issues/7515/events
https://github.com/huggingface/datasets/issues/7515
2,995,082,418
I_kwDODunzps6yhVSy
7,515
`concatenate_datasets` does not preserve Pytorch format for IterableDataset
{ "login": "francescorubbo", "id": 5140987, "node_id": "MDQ6VXNlcjUxNDA5ODc=", "avatar_url": "https://avatars.githubusercontent.com/u/5140987?v=4", "gravatar_id": "", "url": "https://api.github.com/users/francescorubbo", "html_url": "https://github.com/francescorubbo", "followers_url": "https://api.github.com/users/francescorubbo/followers", "following_url": "https://api.github.com/users/francescorubbo/following{/other_user}", "gists_url": "https://api.github.com/users/francescorubbo/gists{/gist_id}", "starred_url": "https://api.github.com/users/francescorubbo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/francescorubbo/subscriptions", "organizations_url": "https://api.github.com/users/francescorubbo/orgs", "repos_url": "https://api.github.com/users/francescorubbo/repos", "events_url": "https://api.github.com/users/francescorubbo/events{/privacy}", "received_events_url": "https://api.github.com/users/francescorubbo/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
2
2025-04-15T04:36:34
2025-04-16T02:39:16
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug When concatenating datasets with `concatenate_datasets`, I would expect the resulting combined dataset to be in the same format as the inputs (assuming it's consistent). This is indeed the behavior when combining `Dataset`, but not when combining `IterableDataset`. Specifically, when applying `concatenate_datasets` to a list of `IterableDataset` in Pytorch format (i.e. using `.with_format(Pytorch)`), the output `IterableDataset` is not in Pytorch format. ### Steps to reproduce the bug ``` import datasets ds = datasets.Dataset.from_dict({"a": [1,2,3]}) iterable_ds = ds.to_iterable_dataset() datasets.concatenate_datasets([ds.with_format("torch")]) # <- this preserves Pytorch format datasets.concatenate_datasets([iterable_ds.with_format("torch")]) # <- this does NOT preserves Pytorch format ``` ### Expected behavior Pytorch format should be preserved when combining IterableDataset in Pytorch format. ### Environment info datasets==3.5.0, Python 3.11.11, torch==2.2.2
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7515/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7515/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7514
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7514/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7514/comments
https://api.github.com/repos/huggingface/datasets/issues/7514/events
https://github.com/huggingface/datasets/pull/7514
2,994,714,923
PR_kwDODunzps6Sk7Et
7,514
Do not hash `generator` in `BuilderConfig.create_config_id`
{ "login": "simonreise", "id": 43753582, "node_id": "MDQ6VXNlcjQzNzUzNTgy", "avatar_url": "https://avatars.githubusercontent.com/u/43753582?v=4", "gravatar_id": "", "url": "https://api.github.com/users/simonreise", "html_url": "https://github.com/simonreise", "followers_url": "https://api.github.com/users/simonreise/followers", "following_url": "https://api.github.com/users/simonreise/following{/other_user}", "gists_url": "https://api.github.com/users/simonreise/gists{/gist_id}", "starred_url": "https://api.github.com/users/simonreise/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/simonreise/subscriptions", "organizations_url": "https://api.github.com/users/simonreise/orgs", "repos_url": "https://api.github.com/users/simonreise/repos", "events_url": "https://api.github.com/users/simonreise/events{/privacy}", "received_events_url": "https://api.github.com/users/simonreise/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
0
2025-04-15T01:26:43
2025-04-15T16:27:51
2025-04-15T16:27:51
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7514", "html_url": "https://github.com/huggingface/datasets/pull/7514", "diff_url": "https://github.com/huggingface/datasets/pull/7514.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7514.patch", "merged_at": null }
`Dataset.from_generator` function passes all of its arguments to `BuilderConfig.create_config_id`, including generator function itself. `BuilderConfig.create_config_id` function tries to hash all the args, and hashing a `generator` can take a large amount of time or even cause MemoryError if the dataset processed in a generator function is large enough. Maybe we should pop generator from `config_kwargs_to_add_to_suffix` before hashing to avoid it. There is a more detailed description of the problem this PR solves in #7513
{ "login": "simonreise", "id": 43753582, "node_id": "MDQ6VXNlcjQzNzUzNTgy", "avatar_url": "https://avatars.githubusercontent.com/u/43753582?v=4", "gravatar_id": "", "url": "https://api.github.com/users/simonreise", "html_url": "https://github.com/simonreise", "followers_url": "https://api.github.com/users/simonreise/followers", "following_url": "https://api.github.com/users/simonreise/following{/other_user}", "gists_url": "https://api.github.com/users/simonreise/gists{/gist_id}", "starred_url": "https://api.github.com/users/simonreise/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/simonreise/subscriptions", "organizations_url": "https://api.github.com/users/simonreise/orgs", "repos_url": "https://api.github.com/users/simonreise/repos", "events_url": "https://api.github.com/users/simonreise/events{/privacy}", "received_events_url": "https://api.github.com/users/simonreise/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7514/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7514/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7513
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7513/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7513/comments
https://api.github.com/repos/huggingface/datasets/issues/7513/events
https://github.com/huggingface/datasets/issues/7513
2,994,678,437
I_kwDODunzps6yfyql
7,513
MemoryError while creating dataset from generator
{ "login": "simonreise", "id": 43753582, "node_id": "MDQ6VXNlcjQzNzUzNTgy", "avatar_url": "https://avatars.githubusercontent.com/u/43753582?v=4", "gravatar_id": "", "url": "https://api.github.com/users/simonreise", "html_url": "https://github.com/simonreise", "followers_url": "https://api.github.com/users/simonreise/followers", "following_url": "https://api.github.com/users/simonreise/following{/other_user}", "gists_url": "https://api.github.com/users/simonreise/gists{/gist_id}", "starred_url": "https://api.github.com/users/simonreise/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/simonreise/subscriptions", "organizations_url": "https://api.github.com/users/simonreise/orgs", "repos_url": "https://api.github.com/users/simonreise/repos", "events_url": "https://api.github.com/users/simonreise/events{/privacy}", "received_events_url": "https://api.github.com/users/simonreise/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
3
2025-04-15T01:02:02
2025-04-15T17:49:39
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug # TL:DR `Dataset.from_generator` function passes all of its arguments to `BuilderConfig.create_config_id`, including `generator` function itself. `BuilderConfig.create_config_id` function tries to hash all the args, which can take a large amount of time or even cause MemoryError if the dataset processed in a generator function is large enough. Maybe we should pop `generator` from `config_kwargs_to_add_to_suffix` before hashing to avoid it. # Full description I have a pretty large spatial imagery dataset that is generated from two xbatcher.BatchGenerators via custom `dataset_generator` function that looks like this if simplified: ``` def dataset_generator(): for index in samples: data_dict = { "key": index, "x": x_batches[index].data, "y": y_batches[index].data, } yield data_dict ``` Then I use `datasets.Dataset.from_generator` to generate the dataset itself. ``` # Create dataset ds = datasets.Dataset.from_generator( dataset_generator, features=feat, cache_dir=(output / ".cache"), ) ``` It works nicely with pretty small data, but if the dataset is huge and barely fits in memory, it crashes with memory error: <details> <summary>Full stack trace</summary> ``` File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\remote_sensing_processor\segmentation\semantic\tiles.py:248](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/remote_sensing_processor/segmentation/semantic/tiles.py#line=247), in generate_tiles(x, y, output, tile_size, shuffle, split, x_dtype, y_dtype, x_nodata, y_nodata) 245 yield data_dict 247 # Create dataset --> 248 ds = datasets.Dataset.from_generator( 249 dataset_generator, 250 features=feat, 251 cache_dir=(output / ".cache"), 252 ) 254 # Save dataset 255 ds.save_to_disk(output / name) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\arrow_dataset.py:1105](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/arrow_dataset.py#line=1104), in Dataset.from_generator(generator, features, cache_dir, keep_in_memory, gen_kwargs, num_proc, split, **kwargs) 1052 """Create a Dataset from a generator. 1053 1054 Args: (...) 1101 ``` 1102 """ 1103 from .io.generator import GeneratorDatasetInputStream -> 1105 return GeneratorDatasetInputStream( 1106 generator=generator, 1107 features=features, 1108 cache_dir=cache_dir, 1109 keep_in_memory=keep_in_memory, 1110 gen_kwargs=gen_kwargs, 1111 num_proc=num_proc, 1112 split=split, 1113 **kwargs, 1114 ).read() File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\io\generator.py:29](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/io/generator.py#line=28), in GeneratorDatasetInputStream.__init__(self, generator, features, cache_dir, keep_in_memory, streaming, gen_kwargs, num_proc, split, **kwargs) 9 def __init__( 10 self, 11 generator: Callable, (...) 19 **kwargs, 20 ): 21 super().__init__( 22 features=features, 23 cache_dir=cache_dir, (...) 27 **kwargs, 28 ) ---> 29 self.builder = Generator( 30 cache_dir=cache_dir, 31 features=features, 32 generator=generator, 33 gen_kwargs=gen_kwargs, 34 split=split, 35 **kwargs, 36 ) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\builder.py:343](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/builder.py#line=342), in DatasetBuilder.__init__(self, cache_dir, dataset_name, config_name, hash, base_path, info, features, token, repo_id, data_files, data_dir, storage_options, writer_batch_size, **config_kwargs) 341 config_kwargs["data_dir"] = data_dir 342 self.config_kwargs = config_kwargs --> 343 self.config, self.config_id = self._create_builder_config( 344 config_name=config_name, 345 custom_features=features, 346 **config_kwargs, 347 ) 349 # prepare info: DatasetInfo are a standardized dataclass across all datasets 350 # Prefill datasetinfo 351 if info is None: 352 # TODO FOR PACKAGED MODULES IT IMPORTS DATA FROM src/packaged_modules which doesn't make sense File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\builder.py:604](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/builder.py#line=603), in DatasetBuilder._create_builder_config(self, config_name, custom_features, **config_kwargs) 598 builder_config._resolve_data_files( 599 base_path=self.base_path, 600 download_config=DownloadConfig(token=self.token, storage_options=self.storage_options), 601 ) 603 # compute the config id that is going to be used for caching --> 604 config_id = builder_config.create_config_id( 605 config_kwargs, 606 custom_features=custom_features, 607 ) 608 is_custom = (config_id not in self.builder_configs) and config_id != "default" 609 if is_custom: File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\builder.py:187](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/builder.py#line=186), in BuilderConfig.create_config_id(self, config_kwargs, custom_features) 185 suffix = Hasher.hash(config_kwargs_to_add_to_suffix) 186 else: --> 187 suffix = Hasher.hash(config_kwargs_to_add_to_suffix) 189 if custom_features is not None: 190 m = Hasher() File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\fingerprint.py:188](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/fingerprint.py#line=187), in Hasher.hash(cls, value) 186 @classmethod 187 def hash(cls, value: Any) -> str: --> 188 return cls.hash_bytes(dumps(value)) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:109](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=108), in dumps(obj) 107 """Pickle an object to a string.""" 108 file = BytesIO() --> 109 dump(obj, file) 110 return file.getvalue() File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:103](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=102), in dump(obj, file) 101 def dump(obj, file): 102 """Pickle an object to a file.""" --> 103 Pickler(file, recurse=True).dump(obj) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:420](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=419), in Pickler.dump(self, obj) 418 def dump(self, obj): #NOTE: if settings change, need to update attributes 419 logger.trace_setup(self) --> 420 StockPickler.dump(self, obj) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:484](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=483), in _Pickler.dump(self, obj) 482 if self.proto >= 4: 483 self.framer.start_framing() --> 484 self.save(obj) 485 self.write(STOP) 486 self.framer.end_framing() File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:558](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=557), in _Pickler.save(self, obj, save_persistent_id) 556 f = self.dispatch.get(t) 557 if f is not None: --> 558 f(self, obj) # Call unbound method with explicit self 559 return 561 # Check private dispatch table if any, or else 562 # copyreg.dispatch_table File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:1217](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=1216), in save_module_dict(pickler, obj) 1214 if is_dill(pickler, child=False) and pickler._session: 1215 # we only care about session the first pass thru 1216 pickler._first_pass = False -> 1217 StockPickler.save_dict(pickler, obj) 1218 logger.trace(pickler, "# D2") 1219 return File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:990](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=989), in _Pickler.save_dict(self, obj) 987 self.write(MARK + DICT) 989 self.memoize(obj) --> 990 self._batch_setitems(obj.items()) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:83](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=82), in Pickler._batch_setitems(self, items) 80 from datasets.fingerprint import Hasher 82 items = sorted(items, key=lambda x: Hasher.hash(x[0])) ---> 83 dill.Pickler._batch_setitems(self, items) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:1014](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=1013), in _Pickler._batch_setitems(self, items) 1012 for k, v in tmp: 1013 save(k) -> 1014 save(v) 1015 write(SETITEMS) 1016 elif n: File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:558](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=557), in _Pickler.save(self, obj, save_persistent_id) 556 f = self.dispatch.get(t) 557 if f is not None: --> 558 f(self, obj) # Call unbound method with explicit self 559 return 561 # Check private dispatch table if any, or else 562 # copyreg.dispatch_table File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:1985](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=1984), in save_function(pickler, obj) 1982 if state_dict: 1983 state = state, state_dict -> 1985 _save_with_postproc(pickler, (_create_function, ( 1986 obj.__code__, globs, obj.__name__, obj.__defaults__, 1987 closure 1988 ), state), obj=obj, postproc_list=postproc_list) 1990 # Lift closure cell update to earliest function (#458) 1991 if _postproc: File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:1117](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=1116), in _save_with_postproc(pickler, reduction, is_pickler_dill, obj, postproc_list) 1115 continue 1116 else: -> 1117 pickler.save_reduce(*reduction) 1118 # pop None created by calling preprocessing step off stack 1119 pickler.write(POP) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:690](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=689), in _Pickler.save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj) 688 else: 689 save(func) --> 690 save(args) 691 write(REDUCE) 693 if obj is not None: 694 # If the object is already in the memo, this means it is 695 # recursive. In this case, throw away everything we put on the 696 # stack, and fetch the object back from the memo. File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:558](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=557), in _Pickler.save(self, obj, save_persistent_id) 556 f = self.dispatch.get(t) 557 if f is not None: --> 558 f(self, obj) # Call unbound method with explicit self 559 return 561 # Check private dispatch table if any, or else 562 # copyreg.dispatch_table File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:905](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=904), in _Pickler.save_tuple(self, obj) 903 if n <= 3 and self.proto >= 2: 904 for element in obj: --> 905 save(element) 906 # Subtle. Same as in the big comment below. 907 if id(obj) in memo: File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:601](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=600), in _Pickler.save(self, obj, save_persistent_id) 597 raise PicklingError("Tuple returned by %s must have " 598 "two to six elements" % reduce) 600 # Save the reduce() output and finally memoize the object --> 601 self.save_reduce(obj=obj, *rv) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:715](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=714), in _Pickler.save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj) 713 if state is not None: 714 if state_setter is None: --> 715 save(state) 716 write(BUILD) 717 else: 718 # If a state_setter is specified, call it instead of load_build 719 # to update obj's with its previous state. 720 # First, push state_setter and its tuple of expected arguments 721 # (obj, state) onto the stack. File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:558](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=557), in _Pickler.save(self, obj, save_persistent_id) 556 f = self.dispatch.get(t) 557 if f is not None: --> 558 f(self, obj) # Call unbound method with explicit self 559 return 561 # Check private dispatch table if any, or else 562 # copyreg.dispatch_table File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:1217](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=1216), in save_module_dict(pickler, obj) 1214 if is_dill(pickler, child=False) and pickler._session: 1215 # we only care about session the first pass thru 1216 pickler._first_pass = False -> 1217 StockPickler.save_dict(pickler, obj) 1218 logger.trace(pickler, "# D2") 1219 return File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:990](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=989), in _Pickler.save_dict(self, obj) 987 self.write(MARK + DICT) 989 self.memoize(obj) --> 990 self._batch_setitems(obj.items()) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:83](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=82), in Pickler._batch_setitems(self, items) 80 from datasets.fingerprint import Hasher 82 items = sorted(items, key=lambda x: Hasher.hash(x[0])) ---> 83 dill.Pickler._batch_setitems(self, items) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:1014](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=1013), in _Pickler._batch_setitems(self, items) 1012 for k, v in tmp: 1013 save(k) -> 1014 save(v) 1015 write(SETITEMS) 1016 elif n: [... skipping similar frames: Pickler.save at line 70 (1 times), Pickler.save at line 414 (1 times)] File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:601](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=600), in _Pickler.save(self, obj, save_persistent_id) 597 raise PicklingError("Tuple returned by %s must have " 598 "two to six elements" % reduce) 600 # Save the reduce() output and finally memoize the object --> 601 self.save_reduce(obj=obj, *rv) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:715](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=714), in _Pickler.save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj) 713 if state is not None: 714 if state_setter is None: --> 715 save(state) 716 write(BUILD) 717 else: 718 # If a state_setter is specified, call it instead of load_build 719 # to update obj's with its previous state. 720 # First, push state_setter and its tuple of expected arguments 721 # (obj, state) onto the stack. File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:558](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=557), in _Pickler.save(self, obj, save_persistent_id) 556 f = self.dispatch.get(t) 557 if f is not None: --> 558 f(self, obj) # Call unbound method with explicit self 559 return 561 # Check private dispatch table if any, or else 562 # copyreg.dispatch_table File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:905](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=904), in _Pickler.save_tuple(self, obj) 903 if n <= 3 and self.proto >= 2: 904 for element in obj: --> 905 save(element) 906 # Subtle. Same as in the big comment below. 907 if id(obj) in memo: File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:558](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=557), in _Pickler.save(self, obj, save_persistent_id) 556 f = self.dispatch.get(t) 557 if f is not None: --> 558 f(self, obj) # Call unbound method with explicit self 559 return 561 # Check private dispatch table if any, or else 562 # copyreg.dispatch_table File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:1217](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=1216), in save_module_dict(pickler, obj) 1214 if is_dill(pickler, child=False) and pickler._session: 1215 # we only care about session the first pass thru 1216 pickler._first_pass = False -> 1217 StockPickler.save_dict(pickler, obj) 1218 logger.trace(pickler, "# D2") 1219 return File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:990](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=989), in _Pickler.save_dict(self, obj) 987 self.write(MARK + DICT) 989 self.memoize(obj) --> 990 self._batch_setitems(obj.items()) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:83](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=82), in Pickler._batch_setitems(self, items) 80 from datasets.fingerprint import Hasher 82 items = sorted(items, key=lambda x: Hasher.hash(x[0])) ---> 83 dill.Pickler._batch_setitems(self, items) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:1014](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=1013), in _Pickler._batch_setitems(self, items) 1012 for k, v in tmp: 1013 save(k) -> 1014 save(v) 1015 write(SETITEMS) 1016 elif n: File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:601](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=600), in _Pickler.save(self, obj, save_persistent_id) 597 raise PicklingError("Tuple returned by %s must have " 598 "two to six elements" % reduce) 600 # Save the reduce() output and finally memoize the object --> 601 self.save_reduce(obj=obj, *rv) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:715](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=714), in _Pickler.save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj) 713 if state is not None: 714 if state_setter is None: --> 715 save(state) 716 write(BUILD) 717 else: 718 # If a state_setter is specified, call it instead of load_build 719 # to update obj's with its previous state. 720 # First, push state_setter and its tuple of expected arguments 721 # (obj, state) onto the stack. File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:558](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=557), in _Pickler.save(self, obj, save_persistent_id) 556 f = self.dispatch.get(t) 557 if f is not None: --> 558 f(self, obj) # Call unbound method with explicit self 559 return 561 # Check private dispatch table if any, or else 562 # copyreg.dispatch_table File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:905](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=904), in _Pickler.save_tuple(self, obj) 903 if n <= 3 and self.proto >= 2: 904 for element in obj: --> 905 save(element) 906 # Subtle. Same as in the big comment below. 907 if id(obj) in memo: File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:558](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=557), in _Pickler.save(self, obj, save_persistent_id) 556 f = self.dispatch.get(t) 557 if f is not None: --> 558 f(self, obj) # Call unbound method with explicit self 559 return 561 # Check private dispatch table if any, or else 562 # copyreg.dispatch_table File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:1217](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=1216), in save_module_dict(pickler, obj) 1214 if is_dill(pickler, child=False) and pickler._session: 1215 # we only care about session the first pass thru 1216 pickler._first_pass = False -> 1217 StockPickler.save_dict(pickler, obj) 1218 logger.trace(pickler, "# D2") 1219 return File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:990](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=989), in _Pickler.save_dict(self, obj) 987 self.write(MARK + DICT) 989 self.memoize(obj) --> 990 self._batch_setitems(obj.items()) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:83](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=82), in Pickler._batch_setitems(self, items) 80 from datasets.fingerprint import Hasher 82 items = sorted(items, key=lambda x: Hasher.hash(x[0])) ---> 83 dill.Pickler._batch_setitems(self, items) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:1014](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=1013), in _Pickler._batch_setitems(self, items) 1012 for k, v in tmp: 1013 save(k) -> 1014 save(v) 1015 write(SETITEMS) 1016 elif n: File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:601](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=600), in _Pickler.save(self, obj, save_persistent_id) 597 raise PicklingError("Tuple returned by %s must have " 598 "two to six elements" % reduce) 600 # Save the reduce() output and finally memoize the object --> 601 self.save_reduce(obj=obj, *rv) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:690](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=689), in _Pickler.save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj) 688 else: 689 save(func) --> 690 save(args) 691 write(REDUCE) 693 if obj is not None: 694 # If the object is already in the memo, this means it is 695 # recursive. In this case, throw away everything we put on the 696 # stack, and fetch the object back from the memo. File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:558](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=557), in _Pickler.save(self, obj, save_persistent_id) 556 f = self.dispatch.get(t) 557 if f is not None: --> 558 f(self, obj) # Call unbound method with explicit self 559 return 561 # Check private dispatch table if any, or else 562 # copyreg.dispatch_table File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:920](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=919), in _Pickler.save_tuple(self, obj) 918 write(MARK) 919 for element in obj: --> 920 save(element) 922 if id(obj) in memo: 923 # Subtle. d was not in memo when we entered save_tuple(), so 924 # the process of saving the tuple's elements must have saved (...) 928 # could have been done in the "for element" loop instead, but 929 # recursive tuples are a rare thing. 930 get = self.get(memo[id(obj)][0]) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:601](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=600), in _Pickler.save(self, obj, save_persistent_id) 597 raise PicklingError("Tuple returned by %s must have " 598 "two to six elements" % reduce) 600 # Save the reduce() output and finally memoize the object --> 601 self.save_reduce(obj=obj, *rv) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:715](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=714), in _Pickler.save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj) 713 if state is not None: 714 if state_setter is None: --> 715 save(state) 716 write(BUILD) 717 else: 718 # If a state_setter is specified, call it instead of load_build 719 # to update obj's with its previous state. 720 # First, push state_setter and its tuple of expected arguments 721 # (obj, state) onto the stack. File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:558](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=557), in _Pickler.save(self, obj, save_persistent_id) 556 f = self.dispatch.get(t) 557 if f is not None: --> 558 f(self, obj) # Call unbound method with explicit self 559 return 561 # Check private dispatch table if any, or else 562 # copyreg.dispatch_table File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:1217](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=1216), in save_module_dict(pickler, obj) 1214 if is_dill(pickler, child=False) and pickler._session: 1215 # we only care about session the first pass thru 1216 pickler._first_pass = False -> 1217 StockPickler.save_dict(pickler, obj) 1218 logger.trace(pickler, "# D2") 1219 return File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:990](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=989), in _Pickler.save_dict(self, obj) 987 self.write(MARK + DICT) 989 self.memoize(obj) --> 990 self._batch_setitems(obj.items()) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:83](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=82), in Pickler._batch_setitems(self, items) 80 from datasets.fingerprint import Hasher 82 items = sorted(items, key=lambda x: Hasher.hash(x[0])) ---> 83 dill.Pickler._batch_setitems(self, items) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:1014](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=1013), in _Pickler._batch_setitems(self, items) 1012 for k, v in tmp: 1013 save(k) -> 1014 save(v) 1015 write(SETITEMS) 1016 elif n: File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:558](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=557), in _Pickler.save(self, obj, save_persistent_id) 556 f = self.dispatch.get(t) 557 if f is not None: --> 558 f(self, obj) # Call unbound method with explicit self 559 return 561 # Check private dispatch table if any, or else 562 # copyreg.dispatch_table File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:1217](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=1216), in save_module_dict(pickler, obj) 1214 if is_dill(pickler, child=False) and pickler._session: 1215 # we only care about session the first pass thru 1216 pickler._first_pass = False -> 1217 StockPickler.save_dict(pickler, obj) 1218 logger.trace(pickler, "# D2") 1219 return File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:990](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=989), in _Pickler.save_dict(self, obj) 987 self.write(MARK + DICT) 989 self.memoize(obj) --> 990 self._batch_setitems(obj.items()) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:83](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=82), in Pickler._batch_setitems(self, items) 80 from datasets.fingerprint import Hasher 82 items = sorted(items, key=lambda x: Hasher.hash(x[0])) ---> 83 dill.Pickler._batch_setitems(self, items) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:1019](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=1018), in _Pickler._batch_setitems(self, items) 1017 k, v = tmp[0] 1018 save(k) -> 1019 save(v) 1020 write(SETITEM) 1021 # else tmp is empty, and we're done File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:601](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=600), in _Pickler.save(self, obj, save_persistent_id) 597 raise PicklingError("Tuple returned by %s must have " 598 "two to six elements" % reduce) 600 # Save the reduce() output and finally memoize the object --> 601 self.save_reduce(obj=obj, *rv) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:715](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=714), in _Pickler.save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj) 713 if state is not None: 714 if state_setter is None: --> 715 save(state) 716 write(BUILD) 717 else: 718 # If a state_setter is specified, call it instead of load_build 719 # to update obj's with its previous state. 720 # First, push state_setter and its tuple of expected arguments 721 # (obj, state) onto the stack. File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:558](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=557), in _Pickler.save(self, obj, save_persistent_id) 556 f = self.dispatch.get(t) 557 if f is not None: --> 558 f(self, obj) # Call unbound method with explicit self 559 return 561 # Check private dispatch table if any, or else 562 # copyreg.dispatch_table File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:1217](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=1216), in save_module_dict(pickler, obj) 1214 if is_dill(pickler, child=False) and pickler._session: 1215 # we only care about session the first pass thru 1216 pickler._first_pass = False -> 1217 StockPickler.save_dict(pickler, obj) 1218 logger.trace(pickler, "# D2") 1219 return File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:990](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=989), in _Pickler.save_dict(self, obj) 987 self.write(MARK + DICT) 989 self.memoize(obj) --> 990 self._batch_setitems(obj.items()) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:83](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=82), in Pickler._batch_setitems(self, items) 80 from datasets.fingerprint import Hasher 82 items = sorted(items, key=lambda x: Hasher.hash(x[0])) ---> 83 dill.Pickler._batch_setitems(self, items) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:1014](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=1013), in _Pickler._batch_setitems(self, items) 1012 for k, v in tmp: 1013 save(k) -> 1014 save(v) 1015 write(SETITEMS) 1016 elif n: [... skipping similar frames: Pickler.save at line 70 (1 times), Pickler.save at line 414 (1 times)] File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:558](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=557), in _Pickler.save(self, obj, save_persistent_id) 556 f = self.dispatch.get(t) 557 if f is not None: --> 558 f(self, obj) # Call unbound method with explicit self 559 return 561 # Check private dispatch table if any, or else 562 # copyreg.dispatch_table File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:1217](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=1216), in save_module_dict(pickler, obj) 1214 if is_dill(pickler, child=False) and pickler._session: 1215 # we only care about session the first pass thru 1216 pickler._first_pass = False -> 1217 StockPickler.save_dict(pickler, obj) 1218 logger.trace(pickler, "# D2") 1219 return File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:990](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=989), in _Pickler.save_dict(self, obj) 987 self.write(MARK + DICT) 989 self.memoize(obj) --> 990 self._batch_setitems(obj.items()) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:83](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=82), in Pickler._batch_setitems(self, items) 80 from datasets.fingerprint import Hasher 82 items = sorted(items, key=lambda x: Hasher.hash(x[0])) ---> 83 dill.Pickler._batch_setitems(self, items) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:1014](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=1013), in _Pickler._batch_setitems(self, items) 1012 for k, v in tmp: 1013 save(k) -> 1014 save(v) 1015 write(SETITEMS) 1016 elif n: [... skipping similar frames: Pickler.save at line 70 (1 times), Pickler.save at line 414 (1 times)] File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:601](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=600), in _Pickler.save(self, obj, save_persistent_id) 597 raise PicklingError("Tuple returned by %s must have " 598 "two to six elements" % reduce) 600 # Save the reduce() output and finally memoize the object --> 601 self.save_reduce(obj=obj, *rv) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:715](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=714), in _Pickler.save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj) 713 if state is not None: 714 if state_setter is None: --> 715 save(state) 716 write(BUILD) 717 else: 718 # If a state_setter is specified, call it instead of load_build 719 # to update obj's with its previous state. 720 # First, push state_setter and its tuple of expected arguments 721 # (obj, state) onto the stack. File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:558](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=557), in _Pickler.save(self, obj, save_persistent_id) 556 f = self.dispatch.get(t) 557 if f is not None: --> 558 f(self, obj) # Call unbound method with explicit self 559 return 561 # Check private dispatch table if any, or else 562 # copyreg.dispatch_table File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:920](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=919), in _Pickler.save_tuple(self, obj) 918 write(MARK) 919 for element in obj: --> 920 save(element) 922 if id(obj) in memo: 923 # Subtle. d was not in memo when we entered save_tuple(), so 924 # the process of saving the tuple's elements must have saved (...) 928 # could have been done in the "for element" loop instead, but 929 # recursive tuples are a rare thing. 930 get = self.get(memo[id(obj)][0]) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\datasets\utils\_dill.py:70](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/datasets/utils/_dill.py#line=69), in Pickler.save(self, obj, save_persistent_id) 68 if obj_type is FunctionType: 69 obj = getattr(obj, "_torchdynamo_orig_callable", obj) ---> 70 dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\site-packages\dill\_dill.py:414](file:///C:/ProgramData/miniforge3/envs/geo/Lib/site-packages/dill/_dill.py#line=413), in Pickler.save(self, obj, save_persistent_id) 412 msg = "Can't pickle %s: attribute lookup builtins.generator failed" % GeneratorType 413 raise PicklingError(msg) --> 414 StockPickler.save(self, obj, save_persistent_id) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:558](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=557), in _Pickler.save(self, obj, save_persistent_id) 556 f = self.dispatch.get(t) 557 if f is not None: --> 558 f(self, obj) # Call unbound method with explicit self 559 return 561 # Check private dispatch table if any, or else 562 # copyreg.dispatch_table File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:809](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=808), in _Pickler.save_bytes(self, obj) 806 self.save_reduce(codecs.encode, 807 (str(obj, 'latin1'), 'latin1'), obj=obj) 808 return --> 809 self._save_bytes_no_memo(obj) 810 self.memoize(obj) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:797](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=796), in _Pickler._save_bytes_no_memo(self, obj) 795 self._write_large_bytes(BINBYTES8 + pack("<Q", n), obj) 796 elif n >= self.framer._FRAME_SIZE_TARGET: --> 797 self._write_large_bytes(BINBYTES + pack("<I", n), obj) 798 else: 799 self.write(BINBYTES + pack("<I", n) + obj) File [C:\ProgramData\miniforge3\envs\geo\Lib\pickle.py:254](file:///C:/ProgramData/miniforge3/envs/geo/Lib/pickle.py#line=253), in _Framer.write_large_bytes(self, header, payload) 247 # Perform direct write of the header and payload of the large binary 248 # object. Be careful not to concatenate the header and the payload 249 # prior to calling 'write' as we do not want to allocate a large 250 # temporary bytes object. 251 # We intentionally do not insert a protocol 4 frame opcode to make 252 # it possible to optimize file.read calls in the loader. 253 write(header) --> 254 write(payload) MemoryError: ``` </details> Memory error is an expected type of error in such case, but when I started digging down, I found out that it occurs in a kinda unexpected place - in `create_config_id` function. It tries to hash `config_kwargs_to_add_to_suffix`, including generator function itself. I modified the `BuilderConfig.create_config_id` code like this to check which values are hashed and how much time it takes to hash them and ran it on a toy dataset: ``` print(config_kwargs_to_add_to_suffix) start_time = time.time() if all(isinstance(v, (str, bool, int, float)) for v in config_kwargs_to_add_to_suffix.values()): suffix = ",".join( str(k) + "=" + urllib.parse.quote_plus(str(v)) for k, v in config_kwargs_to_add_to_suffix.items() ) if len(suffix) > 32: # hash if too long suffix = Hasher.hash(config_kwargs_to_add_to_suffix) else: suffix = Hasher.hash(config_kwargs_to_add_to_suffix) end_time = time.time() print(f"Execution time: {end_time - start_time:.4f} seconds") print(suffix) ``` In my case the content of `config_kwargs_to_add_to_suffix` was like this: ``` {'features': {'key': Value(dtype='int64', id=None), 'x': Array3D(shape=(44, 128, 128), dtype='float32', id=None), 'y_class': Array2D(shape=(128, 128), dtype='int32', id=None)}, 'gen_kwargs': None, 'generator': <function generate_tiles.<locals>.dataset_generator at 0x00000139D10D7920>, 'split': NamedSplit('train')} ``` Also I noticed that hashing took a significant amount of time - 43.1482 seconds, while the overall function execution (with data loading, batching and saving dataset) took 2min 45s. The output of `create_config_id` is just a dataset id, so, it is inappropirately large amount of time. But when I added `config_kwargs_to_add_to_suffix.pop("generator", None)`, the hashing took only 0.0060 seconds. Maybe we shouldn't hash the generator function, as it can be really computationally and memory expensive. ### Steps to reproduce the bug This is a simplified example of a workflow I used to generate dataset. But I think that you can use almost any workflow to reproduce that bug. ``` import pystac import pystac_client import planetary_computer import numpy as np import xarray as xr import rioxarray as rxr import dask import xbatcher import datasets # Loading a dataset, in our case - single Landsat image catalog = pystac_client.Client.open( "https://planetarycomputer.microsoft.com/api/stac/v1", modifier=planetary_computer.sign_inplace, ) brazil = [-60.2, -3.31] time_of_interest = "2021-06-01/2021-08-31" search = catalog.search(collections=["landsat-c2-l2"], intersects={"type": "Point", "coordinates": brazil}, datetime=time_of_interest) items = search.item_collection() item = min(items, key=lambda item: pystac.extensions.eo.EOExtension.ext(item).cloud_cover) # Getting x data bands = [] for band in ["red", "green", "blue", "nir08", "coastal", "swir16", "swir22", "lwir11"]: with rxr.open_rasterio(item.assets[band].href, chunks=True, lock=True) as raster: raster = raster.to_dataset('band') #print(raster) raster = raster.rename({1: band}) bands.append(raster) x = xr.merge(bands).squeeze().to_array("band").persist() # Getting y data with rxr.open_rasterio(item.assets['qa_pixel'].href, chunks=True, lock=True) as raster: y = raster.squeeze().persist() # Setting up batches generators x_batches = xbatcher.BatchGenerator(ds=x, input_dims={"x": 256, "y": 256}) y_batches = xbatcher.BatchGenerator(ds=y, input_dims={"x": 256, "y": 256}) # Filtering samples that contain only nodata samples = list(range(len(x_batches))) samples_filtered = [] for i in samples: if not np.array_equal(np.unique(x_batches[i]), np.array([0.])) and not np.array_equal(np.unique(y_batches[i]), np.array([0])): samples_filtered.append(i) samples = samples_filtered np.random.shuffle(samples) # Setting up features feat = { "key": datasets.Value(dtype="int64"), "x": datasets.Array3D(dtype="float32", shape=(4, 256, 256)), "y": datasets.Array2D(dtype="int32", shape=(256, 256)) } feat = datasets.Features(feat) # Setting up a generator def dataset_generator(): for index in samples: data_dict = { "key": index, "x": x_batches[index].data, "y": y_batches[index].data, } yield data_dict # Create dataset ds = datasets.Dataset.from_generator( dataset_generator, features=feat, cache_dir="temp/cache", ) ``` Please, try adding `config_kwargs_to_add_to_suffix.pop("generator", None)` to `BuilderConfig.create_config_id` and then measuring how much time it takes to run ``` if all(isinstance(v, (str, bool, int, float)) for v in config_kwargs_to_add_to_suffix.values()): suffix = ",".join( str(k) + "=" + urllib.parse.quote_plus(str(v)) for k, v in config_kwargs_to_add_to_suffix.items() ) if len(suffix) > 32: # hash if too long suffix = Hasher.hash(config_kwargs_to_add_to_suffix) else: suffix = Hasher.hash(config_kwargs_to_add_to_suffix) ``` code block with and without `config_kwargs_to_add_to_suffix.pop("generator", None)` In my case the difference was 3.3828 seconds without popping generator function and 0.0010 seconds with popping. ### Expected behavior Much faster hashing and no MemoryErrors ### Environment info - `datasets` version: 3.5.0 - Platform: Windows-11-10.0.26100-SP0 - Python version: 3.12.9 - `huggingface_hub` version: 0.30.1 - PyArrow version: 17.0.0 - Pandas version: 2.2.2 - `fsspec` version: 2024.12.0
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7513/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7513/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7512
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7512/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7512/comments
https://api.github.com/repos/huggingface/datasets/issues/7512/events
https://github.com/huggingface/datasets/issues/7512
2,994,043,544
I_kwDODunzps6ydXqY
7,512
.map() fails if function uses pyvista
{ "login": "el-hult", "id": 11832922, "node_id": "MDQ6VXNlcjExODMyOTIy", "avatar_url": "https://avatars.githubusercontent.com/u/11832922?v=4", "gravatar_id": "", "url": "https://api.github.com/users/el-hult", "html_url": "https://github.com/el-hult", "followers_url": "https://api.github.com/users/el-hult/followers", "following_url": "https://api.github.com/users/el-hult/following{/other_user}", "gists_url": "https://api.github.com/users/el-hult/gists{/gist_id}", "starred_url": "https://api.github.com/users/el-hult/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/el-hult/subscriptions", "organizations_url": "https://api.github.com/users/el-hult/orgs", "repos_url": "https://api.github.com/users/el-hult/repos", "events_url": "https://api.github.com/users/el-hult/events{/privacy}", "received_events_url": "https://api.github.com/users/el-hult/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
1
2025-04-14T19:43:02
2025-04-14T20:01:53
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug Using PyVista inside a .map() produces a crash with `objc[78796]: +[NSResponder initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.` ### Steps to reproduce the bug Run ```python import numpy as np import pyvista as pv import datasets data = [{"coords": np.random.rand(5, 3)} for _ in range(3)] def render_point(example): plotter = pv.Plotter(off_screen=True) cloud = pv.PolyData(example["coords"]) plotter.add_mesh(cloud) img = plotter.screenshot(return_img=True) return {"image": img} # breaks if num_proc>1 ds = datasets.Dataset.from_list(data).map(render_point, num_proc=2) ``` ### Expected behavior It should work. Just like when I use a process pool to make it work. ```python import numpy as np import pyvista as pv import multiprocessing data = [{"coords": np.random.rand(5, 3)} for _ in range(3)] def render_point(example): plotter = pv.Plotter(off_screen=True) cloud = pv.PolyData(example["coords"]) plotter.add_mesh(cloud) img = plotter.screenshot(return_img=True) return {"image": img} if __name__ == "__main__": with multiprocessing.Pool(processes=2) as pool: results = pool.map(render_point, data) print(results[0]["image"].shape) ``` ### Environment info - `datasets` version: 3.3.2 - Platform: macOS-15.3.2-arm64-arm-64bit - Python version: 3.11.10 - `huggingface_hub` version: 0.28.1 - PyArrow version: 18.1.0 - Pandas version: 2.2.3 - `fsspec` version: 2024.10.0 And then I suppose pyvista info is good to have. ```python import pyvista as pv print(pv.Report()) ``` gives -------------------------------------------------------------------------------- Date: Mon Apr 14 21:42:08 2025 CEST OS : Darwin (macOS 15.3.2) CPU(s) : 10 Machine : arm64 Architecture : 64bit RAM : 32.0 GiB Environment : IPython File system : apfs GPU Vendor : Apple GPU Renderer : Apple M1 Max GPU Version : 4.1 Metal - 89.3 MathText Support : True Python 3.11.10 (main, Oct 7 2024, 23:25:27) [Clang 18.1.8 ] pyvista : 0.44.2 vtk : 9.4.0 numpy : 2.2.2 matplotlib : 3.10.0 scooby : 0.10.0 pooch : 1.8.2 pillow : 11.1.0 imageio : 2.36.1 PyQt5 : 5.15.11 IPython : 8.30.0 scipy : 1.14.1 tqdm : 4.67.1 jupyterlab : 4.3.5 nest_asyncio : 1.6.0 --------------------------------------------------------------------------------
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7512/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7512/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7510
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7510/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7510/comments
https://api.github.com/repos/huggingface/datasets/issues/7510/events
https://github.com/huggingface/datasets/issues/7510
2,992,131,117
I_kwDODunzps6yWEwt
7,510
Incompatibile dill version (0.3.9) in datasets 2.18.0 - 3.5.0
{ "login": "JGrel", "id": 98061329, "node_id": "U_kgDOBdhMEQ", "avatar_url": "https://avatars.githubusercontent.com/u/98061329?v=4", "gravatar_id": "", "url": "https://api.github.com/users/JGrel", "html_url": "https://github.com/JGrel", "followers_url": "https://api.github.com/users/JGrel/followers", "following_url": "https://api.github.com/users/JGrel/following{/other_user}", "gists_url": "https://api.github.com/users/JGrel/gists{/gist_id}", "starred_url": "https://api.github.com/users/JGrel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JGrel/subscriptions", "organizations_url": "https://api.github.com/users/JGrel/orgs", "repos_url": "https://api.github.com/users/JGrel/repos", "events_url": "https://api.github.com/users/JGrel/events{/privacy}", "received_events_url": "https://api.github.com/users/JGrel/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
3
2025-04-14T07:22:44
2025-04-16T09:30:16
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug Datasets 2.18.0 - 3.5.0 has a dependency on dill < 0.3.9. This causes errors with dill >= 0.3.9. Could you please take a look into it and make it compatible? ### Steps to reproduce the bug 1. Install setuptools >= 2.18.0 2. Install dill >=0.3.9 3. Run pip check 4. Output: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. datasets 2.18.0 requires dill<0.3.9,>=0.3.0, but you have dill 0.3.9 which is incompatible. ### Expected behavior Pip install both libraries without any errors ### Environment info Datasets version: 2.18 - 3.5 Python: 3.11
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7510/reactions", "total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7510/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7509
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7509/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7509/comments
https://api.github.com/repos/huggingface/datasets/issues/7509/events
https://github.com/huggingface/datasets/issues/7509
2,991,484,542
I_kwDODunzps6yTm5-
7,509
Dataset uses excessive memory when loading files
{ "login": "avishaiElmakies", "id": 36810152, "node_id": "MDQ6VXNlcjM2ODEwMTUy", "avatar_url": "https://avatars.githubusercontent.com/u/36810152?v=4", "gravatar_id": "", "url": "https://api.github.com/users/avishaiElmakies", "html_url": "https://github.com/avishaiElmakies", "followers_url": "https://api.github.com/users/avishaiElmakies/followers", "following_url": "https://api.github.com/users/avishaiElmakies/following{/other_user}", "gists_url": "https://api.github.com/users/avishaiElmakies/gists{/gist_id}", "starred_url": "https://api.github.com/users/avishaiElmakies/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/avishaiElmakies/subscriptions", "organizations_url": "https://api.github.com/users/avishaiElmakies/orgs", "repos_url": "https://api.github.com/users/avishaiElmakies/repos", "events_url": "https://api.github.com/users/avishaiElmakies/events{/privacy}", "received_events_url": "https://api.github.com/users/avishaiElmakies/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
9
2025-04-13T21:09:49
2025-04-16T16:49:10
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug Hi I am having an issue when loading a dataset. I have about 200 json files each about 1GB (total about 215GB). each row has a few features which are a list of ints. I am trying to load the dataset using `load_dataset`. The dataset is about 1.5M samples I use `num_proc=32` and a node with 378GB of memory. About a third of the way there I get an OOM. I also saw an old bug with a similar issue, which says to set `writer_batch_size`. I tried to lower it to 10, but it still crashed. I also tried to lower the `num_proc` to 16 and even 8, but still the same issue. ### Steps to reproduce the bug `dataset = load_dataset("json", data_dir=data_config.train_path, num_proc=data_config.num_proc, writer_batch_size=50)["train"]` ### Expected behavior Loading a dataset with more than 100GB to spare should not cause an OOM error. maybe i am missing something but I would love some help. ### Environment info - `datasets` version: 3.5.0 - Platform: Linux-6.6.20-aufs-1-x86_64-with-glibc2.36 - Python version: 3.11.2 - `huggingface_hub` version: 0.29.1 - PyArrow version: 19.0.1 - Pandas version: 2.2.3 - `fsspec` version: 2024.9.0
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7509/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7509/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7508
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7508/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7508/comments
https://api.github.com/repos/huggingface/datasets/issues/7508/events
https://github.com/huggingface/datasets/issues/7508
2,986,612,934
I_kwDODunzps6yBBjG
7,508
Iterating over Image feature columns is extremely slow
{ "login": "sohamparikh", "id": 11831521, "node_id": "MDQ6VXNlcjExODMxNTIx", "avatar_url": "https://avatars.githubusercontent.com/u/11831521?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sohamparikh", "html_url": "https://github.com/sohamparikh", "followers_url": "https://api.github.com/users/sohamparikh/followers", "following_url": "https://api.github.com/users/sohamparikh/following{/other_user}", "gists_url": "https://api.github.com/users/sohamparikh/gists{/gist_id}", "starred_url": "https://api.github.com/users/sohamparikh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sohamparikh/subscriptions", "organizations_url": "https://api.github.com/users/sohamparikh/orgs", "repos_url": "https://api.github.com/users/sohamparikh/repos", "events_url": "https://api.github.com/users/sohamparikh/events{/privacy}", "received_events_url": "https://api.github.com/users/sohamparikh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
2
2025-04-10T19:00:54
2025-04-15T17:57:08
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
We are trying to load datasets where the image column stores `PIL.PngImagePlugin.PngImageFile` images. However, iterating over these datasets is extremely slow. What I have found: 1. It is the presence of the image column that causes the slowdown. Removing the column from the dataset results in blazingly fast (as expected) times 2. It is ~2x faster to iterate when the column contains a single image as opposed to a list of images i.e., the feature is a Sequence of Image objects. We often need multiple images per sample, so we need to work with a list of images 3. It is ~17x faster to store paths to PNG files and load them using `PIL.Image.open`, as opposed to iterating over a `Dataset` with an Image column, and ~30x faster compared to `Sequence` of `Image`s. See a simple script below with an openly available dataset. It would be great to understand the standard practices for storing and loading multimodal datasets (image + text). https://huggingface.co/docs/datasets/en/image_load seems a bit underdeveloped? (e.g., `dataset.decode` only works with `IterableDataset`, but it's not clear from the doc) Thanks! ```python from datasets import load_dataset, load_from_disk from PIL import Image from pathlib import Path ds = load_dataset("getomni-ai/ocr-benchmark") for idx, sample in enumerate(ds["test"]): image = sample["image"] image.save(f"/tmp/ds_files/images/image_{idx}.png") ds.save_to_disk("/tmp/ds_columns") # Remove the 'image' column ds["test"] = ds["test"].remove_columns(["image"]) # Create image paths for each sample image_paths = [f"images/image_{idx}.png" for idx in range(len(ds["test"]))] # Add the 'image_path' column to the dataset ds["test"] = ds["test"].add_column("image_path", image_paths) # Save the updated dataset ds.save_to_disk("/tmp/ds_files") files_path = Path("/tmp/ds_files") column_path = Path("/tmp/ds_columns") # load and benchmark ds_file = load_from_disk(files_path) ds_column = load_from_disk(column_path) import time images_files = [] start = time.time() for idx in range(len(ds_file["test"])): image_path = files_path / ds_file["test"][idx]["image_path"] image = Image.open(image_path) images_files.append(image) end = time.time() print(f"Time taken to load images from files: {end - start} seconds") # Time taken to load images from files: 1.2364635467529297 seconds images_column = [] start = time.time() for idx in range(len(ds_column["test"])): images_column.append(ds_column["test"][idx]["image"]) end = time.time() print(f"Time taken to load images from columns: {end - start} seconds") # Time taken to load images from columns: 20.49347186088562 seconds ```
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7508/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7508/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7507
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7507/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7507/comments
https://api.github.com/repos/huggingface/datasets/issues/7507/events
https://github.com/huggingface/datasets/issues/7507
2,984,309,806
I_kwDODunzps6x4PQu
7,507
Front-end statistical data quantity deviation
{ "login": "rangehow", "id": 88258534, "node_id": "MDQ6VXNlcjg4MjU4NTM0", "avatar_url": "https://avatars.githubusercontent.com/u/88258534?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rangehow", "html_url": "https://github.com/rangehow", "followers_url": "https://api.github.com/users/rangehow/followers", "following_url": "https://api.github.com/users/rangehow/following{/other_user}", "gists_url": "https://api.github.com/users/rangehow/gists{/gist_id}", "starred_url": "https://api.github.com/users/rangehow/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rangehow/subscriptions", "organizations_url": "https://api.github.com/users/rangehow/orgs", "repos_url": "https://api.github.com/users/rangehow/repos", "events_url": "https://api.github.com/users/rangehow/events{/privacy}", "received_events_url": "https://api.github.com/users/rangehow/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
1
2025-04-10T02:51:38
2025-04-15T12:54:51
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug While browsing the dataset at https://huggingface.co/datasets/NeuML/wikipedia-20250123, I noticed that a dataset with nearly 7M entries was estimated to be only 4M in sizeβ€”almost half the actual amount. According to the post-download loading and the dataset_info (https://huggingface.co/datasets/NeuML/wikipedia-20250123/blob/main/train/dataset_info.json), the true data volume is indeed close to 7M. This significant discrepancy could mislead users when sorting datasets by row count. Why not directly retrieve this information from dataset_info? Not sure if this is the right place to report this bug, but leaving it here for the team's awareness.
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7507/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7507/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7506
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7506/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7506/comments
https://api.github.com/repos/huggingface/datasets/issues/7506/events
https://github.com/huggingface/datasets/issues/7506
2,981,687,450
I_kwDODunzps6xuPCa
7,506
HfHubHTTPError: 429 Client Error: Too Many Requests for URL when trying to access Fineweb-10BT on 4A100 GPUs using SLURM
{ "login": "calvintanama", "id": 66202555, "node_id": "MDQ6VXNlcjY2MjAyNTU1", "avatar_url": "https://avatars.githubusercontent.com/u/66202555?v=4", "gravatar_id": "", "url": "https://api.github.com/users/calvintanama", "html_url": "https://github.com/calvintanama", "followers_url": "https://api.github.com/users/calvintanama/followers", "following_url": "https://api.github.com/users/calvintanama/following{/other_user}", "gists_url": "https://api.github.com/users/calvintanama/gists{/gist_id}", "starred_url": "https://api.github.com/users/calvintanama/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/calvintanama/subscriptions", "organizations_url": "https://api.github.com/users/calvintanama/orgs", "repos_url": "https://api.github.com/users/calvintanama/repos", "events_url": "https://api.github.com/users/calvintanama/events{/privacy}", "received_events_url": "https://api.github.com/users/calvintanama/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
1
2025-04-09T06:32:04
2025-04-15T13:04:31
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug I am trying to run some finetunings on 4 A100 GPUs using SLURM using axolotl training framework which in turn uses Huggingface's Trainer and Accelerate on [Fineweb-10BT](https://huggingface.co/datasets/HuggingFaceFW/fineweb), but I end up running into 429 Client Error: Too Many Requests for URL error when I call next(dataloader_iter). Funny is, that I can run some test fine tuning (for just 200 training steps) in 1 A100 GPU using SLURM. Is there any rate limiter set for querying dataset? I could run the fine tuning with the same settings (4 A100 GPUs in SLURM) last month. ### Steps to reproduce the bug You would need a server installed with SLURM 1. Create conda environment 1.1 conda create -n example_env -c conda-forge gxx=11 python=3.10 1.2 conda activate example_env 1.3 pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124 1.4 conda install nvidia/label/cuda-12.4.0::cuda-toolkit 1.5 Download flash_attn-2.7.4.post1+cu12torch2.5cxx11abiFALSE-cp310-cp310-linux_x86_64.whl 1.6 pip3 install packaging 1.7 pip3 install ninja 1.8 pip3 install mlflow 1.9 Clone https://github.com/calvintanama/axolotl.git 1.10 `cd` to `axolotl` 1.11 pip3 install -e '.[deepspeed]' 2. Run the training 2.1. Create a folder called `config_run` in axolotl directory 2.2. Copy `config/phi3_pruned_extra_pretrain_22_29_bottleneck_residual_8_a100_4.yaml` to `config_run` 2.3. Change yaml file in the `config_run` accordingly 2.4. Change directory and conda environment name in `jobs/train_phi3_22_29_bottleneck_residual_8_a100_4_temp.sh` 2.5. `jobs/train_phi3_22_29_bottleneck_residual_8_a100_4_temp.sh` ### Expected behavior This should not cause any error, but gotten ``` File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/accelerate/data_loader.py", line 552, in __iter__ [rank3]: current_batch = next(dataloader_iter) [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 701, in __next__ [rank3]: data = self._next_data() [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 757, in _next_data [rank3]: data = self._dataset_fetcher.fetch(index) # may raise StopIteration [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 33, in fetch [rank3]: data.append(next(self.dataset_iter)) [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/accelerate/data_loader.py", line 338, in __iter__ [rank3]: for element in self.dataset: [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 2266, in __iter__ [rank3]: for key, example in ex_iterable: [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 1866, in __iter__ [rank3]: for key, example in self.ex_iterable: [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 1084, in __iter__ [rank3]: yield from self._iter() [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 1263, in _iter [rank3]: for key, transformed_example in outputs: [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 1258, in <genexpr> [rank3]: outputs = ( [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 1244, in iter_outputs [rank3]: for i, key_example in inputs_iterator: [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 1106, in iter_batched_inputs [rank3]: for key, example in iterator: [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 1866, in __iter__ [rank3]: for key, example in self.ex_iterable: [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 1535, in __iter__ [rank3]: for x in self.ex_iterable: [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 374, in __iter__ [rank3]: for key, pa_table in self.generate_tables_fn(**gen_kwags): [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 90, in _generate_tables [rank3]: if parquet_fragment.row_groups: [rank3]: File "pyarrow/_dataset_parquet.pyx", line 386, in pyarrow._dataset_parquet.ParquetFileFragment.row_groups.__get__ [rank3]: File "pyarrow/_dataset_parquet.pyx", line 393, in pyarrow._dataset_parquet.ParquetFileFragment.metadata.__get__ [rank3]: File "pyarrow/_dataset_parquet.pyx", line 382, in pyarrow._dataset_parquet.ParquetFileFragment.ensure_complete_metadata [rank3]: File "pyarrow/error.pxi", line 89, in pyarrow.lib.check_status [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 827, in read_with_retries [rank3]: out = read(*args, **kwargs) [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 1013, in read [rank3]: return super().read(length) [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/fsspec/spec.py", line 1941, in read [rank3]: out = self.cache._fetch(self.loc, self.loc + length) [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/fsspec/caching.py", line 234, in _fetch [rank3]: self.cache = self.fetcher(start, end) # new block replaces old [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 976, in _fetch_range [rank3]: hf_raise_for_status(r) [rank3]: File "/home/hk-project-test-p0023745/cd7437/miniconda3/envs/llmpruning_train_temp/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 482, in hf_raise_for_status [rank3]: raise _format(HfHubHTTPError, str(e), response) from e [rank3]: huggingface_hub.errors.HfHubHTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/datasets/HuggingFaceFW/fineweb/resolve/0f039043b23fe1d4eed300b504aa4b4a68f1c7ba/sample/10BT/006_00000.parquet ``` ### Environment info - datasets 3.5.0 - torch 2.5.1 - transformers 4.46.2
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7506/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7506/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7505
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7505/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7505/comments
https://api.github.com/repos/huggingface/datasets/issues/7505/events
https://github.com/huggingface/datasets/issues/7505
2,979,926,156
I_kwDODunzps6xnhCM
7,505
HfHubHTTPError: 403 Forbidden: None. Cannot access content at: https://hf.co/api/s3proxy
{ "login": "hissain", "id": 1412262, "node_id": "MDQ6VXNlcjE0MTIyNjI=", "avatar_url": "https://avatars.githubusercontent.com/u/1412262?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hissain", "html_url": "https://github.com/hissain", "followers_url": "https://api.github.com/users/hissain/followers", "following_url": "https://api.github.com/users/hissain/following{/other_user}", "gists_url": "https://api.github.com/users/hissain/gists{/gist_id}", "starred_url": "https://api.github.com/users/hissain/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hissain/subscriptions", "organizations_url": "https://api.github.com/users/hissain/orgs", "repos_url": "https://api.github.com/users/hissain/repos", "events_url": "https://api.github.com/users/hissain/events{/privacy}", "received_events_url": "https://api.github.com/users/hissain/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
0
2025-04-08T14:08:40
2025-04-08T14:08:40
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
I have already logged in Huggingface using CLI with my valid token. Now trying to download the datasets using following code: from transformers import WhisperProcessor, WhisperForConditionalGeneration, WhisperTokenizer, Trainer, TrainingArguments, DataCollatorForSeq2Seq from datasets import load_dataset, DatasetDict, Audio def load_and_preprocess_dataset(): dataset = load_dataset("mozilla-foundation/common_voice_17_0", "bn") dataset = dataset.remove_columns(["accent", "age", "client_id", "down_votes", "gender", "locale", "segment", "up_votes"]) dataset = dataset.cast_column("audio", Audio(sampling_rate=16000)) dataset = dataset["train"].train_test_split(test_size=0.1) dataset = DatasetDict({ "train": dataset["train"], "test": dataset["test"] }) return dataset load_and_preprocess_dataset() I am getting following error: Downloading data: 100%  25/25 [00:01<00:00, 25.31files/s] --------------------------------------------------------------------------- HTTPError Traceback (most recent call last) File ~/github/bangla-asr/.venv/lib/python3.11/site-packages/huggingface_hub/utils/_http.py:409, in hf_raise_for_status(response, endpoint_name) 408 try: --> 409 response.raise_for_status() 410 except HTTPError as e: File ~/github/bangla-asr/.venv/lib/python3.11/site-packages/requests/models.py:1024, in Response.raise_for_status(self) 1023 if http_error_msg: -> 1024 raise HTTPError(http_error_msg, response=self) HTTPError: 403 Client Error: BlockSIEL for url: https://hf.co/api/s3proxy?GET=https%3A%2F%2Fhf-hub-lfs-us-east-1.s3.us-east-1.amazonaws.com%2Frepos%2Fa3%2F86%2Fa386bf65687d8a6928c1ea57c383aa3faade32f5171150e25af3fc1cfc273db8%2F67f1ac9cabd539bfbff3acbc549b60647833a250dc638866f22bf1b64e68806d%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3DAKIA2JU7TKAQLC2QXPN7%252F20250408%252Fus-east-1%252Fs3%252Faws4_request%26X-Amz-Date%3D20250408T134345Z%26X-Amz-Expires%3D3600%26X-Amz-Signature%3D621e731d4fd6d08afbf568379797746ab8e2b853b6728ff5e1122fef6e56880b%26X-Amz-SignedHeaders%3Dhost%26response-content-disposition%3Dinline%253B%2520filename%252A%253DUTF-8%2527%2527bn_validated_1.tar%253B%2520filename%253D%2522bn_validated_1.tar%2522%253B%26response-content-type%3Dapplication%252Fx-tar%26x-id%3DGetObject&HEAD=https%3A%2F%2Fhf-hub-lfs-us-east-1.s3.us-east-1.amazonaws.com%2Frepos%2Fa3%2F86%2Fa386bf65687d8a6928c1ea57c383aa3faade32f5171150e25af3fc1cfc273db8%2F67f1ac9cabd539bfbff3acbc549b60647833a250dc638866f22bf1b64e68806d%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3DAKIA2JU7TKAQLC2QXPN7%252F20250408%252Fus-east-1%252Fs3%252Faws4_request%26X-Amz-Date%3D20250408T134345Z%26X-Amz-Expires%3D3600%26X-Amz-Signature%3D15254fb79d30b0dc36b94a28138e675e0e00bb475b8a3ae774418500b095a661%26X-Amz-SignedHeaders%3Dhost&sign=eyJhbGciOiJIUzI1NiJ9.eyJyZWRpcmVjdF9kb21haW4iOiJoZi1odWItbGZzLXVzLWVhc3QtMS5zMy51cy1lYXN0LTEuYW1hem9uYXdzLmNvbSIsImlhdCI6MTc0NDExOTgyNSwiZXhwIjoxNzQ0MjA2MjI1LCJpc3MiOiJodHRwczovL2h1Z2dpbmdmYWNlLmNvIn0.5sJzudFDU3SmOdOLlwmQCOfQFf2r7y9590HoX8WBkRk The above exception was the direct cause of the following exception: HfHubHTTPError Traceback (most recent call last) Cell In[16], line 15 9 dataset = DatasetDict({ 10 "train": dataset["train"], 11 "test": dataset["test"] 12 }) 13 return dataset ---> 15 load_and_preprocess_dataset() 17 # def setup_model(): 18 # processor = WhisperProcessor.from_pretrained("openai/whisper-base") ... 475 range_header = response.request.headers.get("Range") HfHubHTTPError: 403 Forbidden: None. Cannot access content at: https://hf.co/api/s3proxy?GET=https%3A%2F%2Fhf-hub-lfs-us-east-1.s3.us-east-1.amazonaws.com%2Frepos%2Fa3%2F86%2Fa386bf6568724a6928c1ea57c383aa3faade32f5171150e25af3fc1cfc273db8%2F67f1ac9cabd539bfbff3acbc549b60647833a250dc638786f22bf1b64e68806d%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3DAKIA2JU7TKAQLC2QXPN7%252F20250408%252Fus-east-1%252Fs3%252Faws4_request%26X-Amz-Date%3D20250408T134345Z%26X-Amz-Expires%3D3600%26X-Amz-Signature%3D621e731d4fd6d08afbf568379797746ab394b853b6728ff5e1122fef6e56880b%26X-Amz-SignedHeaders%3Dhost%26response-content-disposition%3Dinline%253B%2520filename%252A%253DUTF-8%2527%2527bn_validated_1.tar%253B%2520filename%253D%2522bn_validated_1.tar%2522%253B%26response-content-type%3Dapplication%252Fx-tar%26x-id%3DGetObject&HEAD=https%3A%2F%2Fhf-hub-lfs-us-east-1.s3.us-east-1.amazonaws.com%2Frepos%2Fa3%2F86%2Fa386bf65687ab76928c1ea57c383aa3faade32f5171150e25af3fc1cfc273db8%2F67f1ac9cabd539bfbff3acbc549b60647833a250d2338866f222f1b64e68806d%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3DAKIA2JU7TKAQLC2QXPN7%252F20250408%252Fus-east-1%252Fs3%252Faws4_request%26X-Amz-Date%3D20250408T134345Z%26X-Amz-Expires%3D3600%26X-Amz-Signature%3D15254fb79d30b0dc36b94a28138e675e0e00bb475b8a3ae774418500b095a661%26X-Amz-SignedHeaders%3Dhost&sign=eyJhbGciOiJIUzI1NiJ9.eyJyZWRpcmVjds9kb21haW4iOiJoZi1odWItbGZzLXVzLWVhc3QtMS5zMy51cy1lYXN0LTEuYW1hem9uYXdzLmNvbSIsImlhdCI6MTc0NDExOT2yNSwiZXhwIjoxNzQ0MjA2MjI1LCJpc3MiOiJodHRwczovL2h1Z2dpbmdmYWNlLmNvIn0.5sJzudFDU3SmOdOLlwmQdOfQFf2r7y9590HoX8WBkRk. Make sure your token has the correct permissions. **What's wrong with the code?** Please note that the error is happening only when I am running from my office network due to probably proxy. Which URL, I need to take a proxy exception?
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7505/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7505/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7504
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7504/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7504/comments
https://api.github.com/repos/huggingface/datasets/issues/7504/events
https://github.com/huggingface/datasets/issues/7504
2,979,410,641
I_kwDODunzps6xljLR
7,504
BuilderConfig ParquetConfig(...) doesn't have a 'use_auth_token' key.
{ "login": "tteguayco", "id": 20015750, "node_id": "MDQ6VXNlcjIwMDE1NzUw", "avatar_url": "https://avatars.githubusercontent.com/u/20015750?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tteguayco", "html_url": "https://github.com/tteguayco", "followers_url": "https://api.github.com/users/tteguayco/followers", "following_url": "https://api.github.com/users/tteguayco/following{/other_user}", "gists_url": "https://api.github.com/users/tteguayco/gists{/gist_id}", "starred_url": "https://api.github.com/users/tteguayco/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tteguayco/subscriptions", "organizations_url": "https://api.github.com/users/tteguayco/orgs", "repos_url": "https://api.github.com/users/tteguayco/repos", "events_url": "https://api.github.com/users/tteguayco/events{/privacy}", "received_events_url": "https://api.github.com/users/tteguayco/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
2
2025-04-08T10:55:03
2025-04-15T12:36:28
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug Trying to run the following fine-tuning script (based on this page [here](https://github.com/huggingface/instruction-tuned-sd)): ``` ! accelerate launch /content/instruction-tuned-sd/finetune_instruct_pix2pix.py \ --pretrained_model_name_or_path=${MODEL_ID} \ --dataset_name=${DATASET_NAME} \ --use_ema \ --enable_xformers_memory_efficient_attention \ --resolution=512 --random_flip \ --train_batch_size=2 --gradient_accumulation_steps=4 --gradient_checkpointing \ --max_train_steps=500 \ --checkpointing_steps=25 --checkpoints_total_limit=1 \ --learning_rate=5e-05 --max_grad_norm=1 --lr_warmup_steps=20 \ --conditioning_dropout_prob=0.1 \ --mixed_precision=fp16 \ --seed=42 \ --output_dir=${OUTPUT_DIR} \ --original_image_column=before \ --edit_prompt=prompt \ --edited_image=after ``` but I keep getting the following error: ``` Traceback (most recent call last): File "/content/instruction-tuned-sd/finetune_instruct_pix2pix.py", line 1137, in <module> main() File "/content/instruction-tuned-sd/finetune_instruct_pix2pix.py", line 652, in main dataset = load_dataset( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/datasets/load.py", line 2129, in load_dataset builder_instance = load_dataset_builder( ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/datasets/load.py", line 1886, in load_dataset_builder builder_instance: DatasetBuilder = builder_cls( ^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/datasets/builder.py", line 342, in __init__ self.config, self.config_id = self._create_builder_config( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/datasets/builder.py", line 590, in _create_builder_config raise ValueError(f"BuilderConfig {builder_config} doesn't have a '{key}' key.") ValueError: BuilderConfig ParquetConfig(name='default', version=0.0.0, data_dir=None, data_files={'train': ['data/train-*']}, description=None, batch_size=None, columns=None, features=None, filters=None) doesn't have a 'use_auth_token' key. Traceback (most recent call last): File "/usr/local/bin/accelerate", line 10, in <module> sys.exit(main()) ^^^^^^ ``` Any ideas? `datasets` version should be `3.2.0`. ### Steps to reproduce the bug Just running the script above. ### Expected behavior No errors ### Environment info Python 3.11.11 datasets==3.2.0
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7504/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7504/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7503
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7503/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7503/comments
https://api.github.com/repos/huggingface/datasets/issues/7503/events
https://github.com/huggingface/datasets/issues/7503
2,978,512,625
I_kwDODunzps6xiH7x
7,503
Inconsistency between load_dataset and load_from_disk functionality
{ "login": "zzzzzec", "id": 60975422, "node_id": "MDQ6VXNlcjYwOTc1NDIy", "avatar_url": "https://avatars.githubusercontent.com/u/60975422?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zzzzzec", "html_url": "https://github.com/zzzzzec", "followers_url": "https://api.github.com/users/zzzzzec/followers", "following_url": "https://api.github.com/users/zzzzzec/following{/other_user}", "gists_url": "https://api.github.com/users/zzzzzec/gists{/gist_id}", "starred_url": "https://api.github.com/users/zzzzzec/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zzzzzec/subscriptions", "organizations_url": "https://api.github.com/users/zzzzzec/orgs", "repos_url": "https://api.github.com/users/zzzzzec/repos", "events_url": "https://api.github.com/users/zzzzzec/events{/privacy}", "received_events_url": "https://api.github.com/users/zzzzzec/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
1
2025-04-08T03:46:22
2025-04-15T12:39:53
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
## Issue Description I've encountered confusion when using `load_dataset` and `load_from_disk` in the datasets library. Specifically, when working offline with the gsm8k dataset, I can load it using a local path: ```python import datasets ds = datasets.load_dataset('/root/xxx/datasets/gsm8k', 'main') ``` output: ```text DatasetDict({ train: Dataset({ features: ['question', 'answer'], num_rows: 7473 }) test: Dataset({ features: ['question', 'answer'], num_rows: 1319 }) }) ``` This works as expected. However, after processing the dataset (converting answer format from #### to \boxed{}) ```python import datasets ds = datasets.load_dataset('/root/xxx/datasets/gsm8k', 'main') ds_train = ds['train'] ds_test = ds['test'] import re def convert(sample): solution = sample['answer'] solution = re.sub(r'####\s*(\S+)', r'\\boxed{\1}', solution) sample = { 'problem': sample['question'], 'solution': solution } return sample ds_train = ds_train.map(convert, remove_columns=['question', 'answer']) ds_test = ds_test.map(convert,remove_columns=['question', 'answer']) ``` I saved it using save_to_disk: ```python from datasets.dataset_dict import DatasetDict data_dict = DatasetDict({ 'train': ds_train, 'test': ds_test }) data_dict.save_to_disk('/root/xxx/datasets/gsm8k-new') ``` But now I can only load it using load_from_disk: ```python new_ds = load_from_disk('/root/xxx/datasets/gsm8k-new') ``` output: ```text DatasetDict({ train: Dataset({ features: ['problem', 'solution'], num_rows: 7473 }) test: Dataset({ features: ['problem', 'solution'], num_rows: 1319 }) }) ``` Attempting to use load_dataset produces unexpected results: ```python new_ds = load_dataset('/root/xxx/datasets/gsm8k-new') ``` output: ```text DatasetDict({ train: Dataset({ features: ['_data_files', '_fingerprint', '_format_columns', '_format_kwargs', '_format_type', '_output_all_columns', '_split'], num_rows: 1 }) test: Dataset({ features: ['_data_files', '_fingerprint', '_format_columns', '_format_kwargs', '_format_type', '_output_all_columns', '_split'], num_rows: 1 }) }) ``` Questions 1. Why is it designed such that after using `save_to_disk`, the dataset cannot be loaded with `load_dataset`? For small projects with limited code, it might be relatively easy to change all instances of `load_dataset` to `load_from_disk`. However, for complex frameworks like TRL or lighteval, diving into the framework code to change `load_dataset` to `load_from_disk` is extremely tedious and error-prone. Additionally, `load_from_disk` cannot load datasets directly downloaded from the hub, which means that if you need to modify a dataset, you have to choose between using `load_from_disk` or `load_dataset`. This creates an unnecessary dichotomy in the API and complicates workflow when working with modified datasets. 2. What's the recommended approach for this use case? Should I manually process my gsm8k-new dataset to make it compatible with load_dataset? Is there a standard way to convert between these formats? thanks~
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7503/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7503/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7502
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7502/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7502/comments
https://api.github.com/repos/huggingface/datasets/issues/7502/events
https://github.com/huggingface/datasets/issues/7502
2,977,453,814
I_kwDODunzps6xeFb2
7,502
`load_dataset` of size 40GB creates a cache of >720GB
{ "login": "pietrolesci", "id": 61748653, "node_id": "MDQ6VXNlcjYxNzQ4NjUz", "avatar_url": "https://avatars.githubusercontent.com/u/61748653?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pietrolesci", "html_url": "https://github.com/pietrolesci", "followers_url": "https://api.github.com/users/pietrolesci/followers", "following_url": "https://api.github.com/users/pietrolesci/following{/other_user}", "gists_url": "https://api.github.com/users/pietrolesci/gists{/gist_id}", "starred_url": "https://api.github.com/users/pietrolesci/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pietrolesci/subscriptions", "organizations_url": "https://api.github.com/users/pietrolesci/orgs", "repos_url": "https://api.github.com/users/pietrolesci/repos", "events_url": "https://api.github.com/users/pietrolesci/events{/privacy}", "received_events_url": "https://api.github.com/users/pietrolesci/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
2
2025-04-07T16:52:34
2025-04-15T15:22:12
2025-04-15T15:22:11
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
Hi there, I am trying to load a dataset from the Hugging Face Hub and split it into train and validation splits. Somehow, when I try to do it with `load_dataset`, it exhausts my disk quota. So, I tried manually downloading the parquet files from the hub and loading them as follows: ```python ds = DatasetDict( { "train": load_dataset( "parquet", data_dir=f"{local_dir}/{tok}", cache_dir=cache_dir, num_proc=min(12, os.cpu_count()), # type: ignore split=ReadInstruction("train", from_=0, to=NUM_TRAIN, unit="abs"), # type: ignore ), "validation": load_dataset( "parquet", data_dir=f"{local_dir}/{tok}", cache_dir=cache_dir, num_proc=min(12, os.cpu_count()), # type: ignore split=ReadInstruction("train", from_=NUM_TRAIN, unit="abs"), # type: ignore ) } ) ``` which still strangely creates 720GB of cache. In addition, if I remove the raw parquet file folder (`f"{local_dir}/{tok}"` in this example), I am not able to load anything. So, I am left wondering what this cache is doing. Am I missing something? Is there a solution to this problem? Thanks a lot in advance for your help! A related issue: https://github.com/huggingface/transformers/issues/10204#issue-809007443. --- Python: 3.11.11 datasets: 3.5.0
{ "login": "pietrolesci", "id": 61748653, "node_id": "MDQ6VXNlcjYxNzQ4NjUz", "avatar_url": "https://avatars.githubusercontent.com/u/61748653?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pietrolesci", "html_url": "https://github.com/pietrolesci", "followers_url": "https://api.github.com/users/pietrolesci/followers", "following_url": "https://api.github.com/users/pietrolesci/following{/other_user}", "gists_url": "https://api.github.com/users/pietrolesci/gists{/gist_id}", "starred_url": "https://api.github.com/users/pietrolesci/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pietrolesci/subscriptions", "organizations_url": "https://api.github.com/users/pietrolesci/orgs", "repos_url": "https://api.github.com/users/pietrolesci/repos", "events_url": "https://api.github.com/users/pietrolesci/events{/privacy}", "received_events_url": "https://api.github.com/users/pietrolesci/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7502/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7502/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/7501
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7501/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7501/comments
https://api.github.com/repos/huggingface/datasets/issues/7501/events
https://github.com/huggingface/datasets/issues/7501
2,976,721,014
I_kwDODunzps6xbSh2
7,501
Nested Feature raises ArrowNotImplementedError: Unsupported cast using function cast_struct
{ "login": "yaner-here", "id": 26623948, "node_id": "MDQ6VXNlcjI2NjIzOTQ4", "avatar_url": "https://avatars.githubusercontent.com/u/26623948?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yaner-here", "html_url": "https://github.com/yaner-here", "followers_url": "https://api.github.com/users/yaner-here/followers", "following_url": "https://api.github.com/users/yaner-here/following{/other_user}", "gists_url": "https://api.github.com/users/yaner-here/gists{/gist_id}", "starred_url": "https://api.github.com/users/yaner-here/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yaner-here/subscriptions", "organizations_url": "https://api.github.com/users/yaner-here/orgs", "repos_url": "https://api.github.com/users/yaner-here/repos", "events_url": "https://api.github.com/users/yaner-here/events{/privacy}", "received_events_url": "https://api.github.com/users/yaner-here/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-04-07T12:35:39
2025-04-07T12:43:04
2025-04-07T12:43:03
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug `datasets.Features` seems to be unable to handle json file that contains fields of `list[dict]`. ### Steps to reproduce the bug ```json // test.json {"a": 1, "b": [{"c": 2, "d": 3}, {"c": 4, "d": 5}]} {"a": 5, "b": [{"c": 7, "d": 8}, {"c": 9, "d": 10}]} ``` ```python import json from datasets import Dataset, Features, Value, Sequence, load_dataset annotation_feature = Features({ "a": Value("int32"), "b": Sequence({ "c": Value("int32"), "d": Value("int32"), }), }) annotation_dataset = load_dataset( "json", data_files="test.json", features=annotation_feature ) ``` ``` ArrowNotImplementedError: Unsupported cast from list<item: struct<c: int32, d: int32>> to struct using function cast_struct The above exception was the direct cause of the following exception: DatasetGenerationError Traceback (most recent call last) Cell In[46], line 11 2 from datasets import Dataset, Features, Value, Sequence, load_dataset 4 annotation_feature = Features({ 5 "a": Value("int32"), 6 "b": Sequence({ (...) 9 }), 10 }) ---> 11 annotation_dataset = load_dataset( 12 "json", 13 data_files="test.json", 14 features=annotation_feature 15 ) ``` ### Expected behavior A `datasets.Datasets` instance should be initialized. ### Environment info - `datasets` version: 3.5.0 - Platform: Linux-6.11.0-21-generic-x86_64-with-glibc2.39 - Python version: 3.11.11 - `huggingface_hub` version: 0.30.1 - PyArrow version: 19.0.1 - Pandas version: 2.2.3 - `fsspec` version: 2024.12.0
{ "login": "yaner-here", "id": 26623948, "node_id": "MDQ6VXNlcjI2NjIzOTQ4", "avatar_url": "https://avatars.githubusercontent.com/u/26623948?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yaner-here", "html_url": "https://github.com/yaner-here", "followers_url": "https://api.github.com/users/yaner-here/followers", "following_url": "https://api.github.com/users/yaner-here/following{/other_user}", "gists_url": "https://api.github.com/users/yaner-here/gists{/gist_id}", "starred_url": "https://api.github.com/users/yaner-here/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yaner-here/subscriptions", "organizations_url": "https://api.github.com/users/yaner-here/orgs", "repos_url": "https://api.github.com/users/yaner-here/repos", "events_url": "https://api.github.com/users/yaner-here/events{/privacy}", "received_events_url": "https://api.github.com/users/yaner-here/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7501/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7501/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/7500
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7500/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7500/comments
https://api.github.com/repos/huggingface/datasets/issues/7500/events
https://github.com/huggingface/datasets/issues/7500
2,974,841,921
I_kwDODunzps6xUHxB
7,500
Make `with_format` correctly indicate that a `Dataset` is compatible with PyTorch's `Dataset` class
{ "login": "benglewis", "id": 3817460, "node_id": "MDQ6VXNlcjM4MTc0NjA=", "avatar_url": "https://avatars.githubusercontent.com/u/3817460?v=4", "gravatar_id": "", "url": "https://api.github.com/users/benglewis", "html_url": "https://github.com/benglewis", "followers_url": "https://api.github.com/users/benglewis/followers", "following_url": "https://api.github.com/users/benglewis/following{/other_user}", "gists_url": "https://api.github.com/users/benglewis/gists{/gist_id}", "starred_url": "https://api.github.com/users/benglewis/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/benglewis/subscriptions", "organizations_url": "https://api.github.com/users/benglewis/orgs", "repos_url": "https://api.github.com/users/benglewis/repos", "events_url": "https://api.github.com/users/benglewis/events{/privacy}", "received_events_url": "https://api.github.com/users/benglewis/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "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
2025-04-06T09:56:09
2025-04-15T12:57:39
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Feature request Currently `datasets` does not correctly indicate to the Python type-checker (e.g. `pyright` / `Pylance`) that the output of `with_format` is compatible with PyTorch's `Dataloader` since it does not indicate that the HuggingFace `Dataset` is compatible with the PyTorch `Dataset` class. It would be great if we could get the typing to work nicely. ### Motivation To avoid casting types in our Python code. ### Your contribution I would be happy to contribute a PR if this is something that may be accepted and could work with the current approach. This doesn't have to be for just PyTorch, but I imagine that the same thing would be useful for `tensorflow` and such, but we only have a need for PyTorch at this stage.
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7500/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7500/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7499
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7499/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7499/comments
https://api.github.com/repos/huggingface/datasets/issues/7499/events
https://github.com/huggingface/datasets/pull/7499
2,973,489,126
PR_kwDODunzps6Rd4Zp
7,499
Added cache dirs to load and file_utils
{ "login": "gmongaras", "id": 43501738, "node_id": "MDQ6VXNlcjQzNTAxNzM4", "avatar_url": "https://avatars.githubusercontent.com/u/43501738?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gmongaras", "html_url": "https://github.com/gmongaras", "followers_url": "https://api.github.com/users/gmongaras/followers", "following_url": "https://api.github.com/users/gmongaras/following{/other_user}", "gists_url": "https://api.github.com/users/gmongaras/gists{/gist_id}", "starred_url": "https://api.github.com/users/gmongaras/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gmongaras/subscriptions", "organizations_url": "https://api.github.com/users/gmongaras/orgs", "repos_url": "https://api.github.com/users/gmongaras/repos", "events_url": "https://api.github.com/users/gmongaras/events{/privacy}", "received_events_url": "https://api.github.com/users/gmongaras/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
4
2025-04-04T22:36:04
2025-04-15T13:19:15
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7499", "html_url": "https://github.com/huggingface/datasets/pull/7499", "diff_url": "https://github.com/huggingface/datasets/pull/7499.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7499.patch", "merged_at": null }
When adding "cache_dir" to datasets.load_dataset, the cache_dir gets lost in the function calls, changing the cache dir to the default path. This fixes a few of these instances.
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7499/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7499/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7498
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7498/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7498/comments
https://api.github.com/repos/huggingface/datasets/issues/7498/events
https://github.com/huggingface/datasets/issues/7498
2,969,218,273
I_kwDODunzps6w-qzh
7,498
Extreme memory bandwidth.
{ "login": "J0SZ", "id": 185079645, "node_id": "U_kgDOCwgXXQ", "avatar_url": "https://avatars.githubusercontent.com/u/185079645?v=4", "gravatar_id": "", "url": "https://api.github.com/users/J0SZ", "html_url": "https://github.com/J0SZ", "followers_url": "https://api.github.com/users/J0SZ/followers", "following_url": "https://api.github.com/users/J0SZ/following{/other_user}", "gists_url": "https://api.github.com/users/J0SZ/gists{/gist_id}", "starred_url": "https://api.github.com/users/J0SZ/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/J0SZ/subscriptions", "organizations_url": "https://api.github.com/users/J0SZ/orgs", "repos_url": "https://api.github.com/users/J0SZ/repos", "events_url": "https://api.github.com/users/J0SZ/events{/privacy}", "received_events_url": "https://api.github.com/users/J0SZ/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
0
2025-04-03T11:09:08
2025-04-03T11:11:22
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug When I use hf datasets on 4 GPU with 40 workers I get some extreme memory bandwidth of constant ~3GB/s. However, if I wrap the dataset in `IterableDataset`, this issue is gone and the data also loads way faster (4x faster training on 1 worker). It seems like the workers don't share memory and basically duplicate the data 4x40. ### Steps to reproduce the bug Trainer arguments: ``` dataloader_pin_memory=True, dataloader_num_workers=40, dataloader_prefetch_factor=2, dataloader_persistent_workers=True, ``` Call trainer: ``` trainer = Trainer( model=model, args=train_args, train_dataset=load_from_disk('..').with_fromat('torch'), ) ``` The dataset has 600GB and consists of 1225 files. ### Expected behavior The optimal bandwidth should be 100MB/s to keep up with GPU. ### Environment info Linux Python 3.11 datasets==3.2.0
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7498/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7498/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7497
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7497/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7497/comments
https://api.github.com/repos/huggingface/datasets/issues/7497/events
https://github.com/huggingface/datasets/issues/7497
2,968,553,693
I_kwDODunzps6w8Ijd
7,497
How to convert videos to images?
{ "login": "tongvibe", "id": 171649931, "node_id": "U_kgDOCjsriw", "avatar_url": "https://avatars.githubusercontent.com/u/171649931?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tongvibe", "html_url": "https://github.com/tongvibe", "followers_url": "https://api.github.com/users/tongvibe/followers", "following_url": "https://api.github.com/users/tongvibe/following{/other_user}", "gists_url": "https://api.github.com/users/tongvibe/gists{/gist_id}", "starred_url": "https://api.github.com/users/tongvibe/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tongvibe/subscriptions", "organizations_url": "https://api.github.com/users/tongvibe/orgs", "repos_url": "https://api.github.com/users/tongvibe/repos", "events_url": "https://api.github.com/users/tongvibe/events{/privacy}", "received_events_url": "https://api.github.com/users/tongvibe/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "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
2025-04-03T07:08:39
2025-04-15T12:35:15
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Feature request Does someone know how to return the images from videos? ### Motivation I am trying to use openpi(https://github.com/Physical-Intelligence/openpi) to finetune my Lerobot dataset(V2.0 and V2.1). I find that although the codedaset is v2.0, they are different. It seems like Lerobot V2.0 has two version, one is data include images infos and another one is separate to data and videos. Does someone know how to return the images from videos?
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7497/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7497/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7496
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7496/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7496/comments
https://api.github.com/repos/huggingface/datasets/issues/7496/events
https://github.com/huggingface/datasets/issues/7496
2,967,345,522
I_kwDODunzps6w3hly
7,496
Json builder: Allow features to override problematic Arrow types
{ "login": "edmcman", "id": 1017189, "node_id": "MDQ6VXNlcjEwMTcxODk=", "avatar_url": "https://avatars.githubusercontent.com/u/1017189?v=4", "gravatar_id": "", "url": "https://api.github.com/users/edmcman", "html_url": "https://github.com/edmcman", "followers_url": "https://api.github.com/users/edmcman/followers", "following_url": "https://api.github.com/users/edmcman/following{/other_user}", "gists_url": "https://api.github.com/users/edmcman/gists{/gist_id}", "starred_url": "https://api.github.com/users/edmcman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/edmcman/subscriptions", "organizations_url": "https://api.github.com/users/edmcman/orgs", "repos_url": "https://api.github.com/users/edmcman/repos", "events_url": "https://api.github.com/users/edmcman/events{/privacy}", "received_events_url": "https://api.github.com/users/edmcman/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "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
2025-04-02T19:27:16
2025-04-15T13:06:09
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Feature request In the JSON builder, use explicitly requested feature types before or while converting to Arrow. ### Motivation Working with JSON datasets is really hard because of Arrow. At the very least, it seems like it should be possible to work-around these problems by explicitly setting problematic columns's types. But it seems like this is not possible because the features are only used *after* converting to arrow. Here's a simple example where the Arrow error could potentially be avoided by converting the column to a string: https://colab.research.google.com/drive/16QHRdbUwKSrpwVfGwu8V8AHr8v2dv0dt?usp=sharing ### Your contribution Maybe with some guidance. I'm not very familiar with arrow or pandas.
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7496/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7496/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7495
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7495/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7495/comments
https://api.github.com/repos/huggingface/datasets/issues/7495/events
https://github.com/huggingface/datasets/issues/7495
2,967,034,060
I_kwDODunzps6w2VjM
7,495
Columns in the dataset obtained though load_dataset do not correspond to the one in the dataset viewer since 3.4.0
{ "login": "bruno-hays", "id": 48770768, "node_id": "MDQ6VXNlcjQ4NzcwNzY4", "avatar_url": "https://avatars.githubusercontent.com/u/48770768?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bruno-hays", "html_url": "https://github.com/bruno-hays", "followers_url": "https://api.github.com/users/bruno-hays/followers", "following_url": "https://api.github.com/users/bruno-hays/following{/other_user}", "gists_url": "https://api.github.com/users/bruno-hays/gists{/gist_id}", "starred_url": "https://api.github.com/users/bruno-hays/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bruno-hays/subscriptions", "organizations_url": "https://api.github.com/users/bruno-hays/orgs", "repos_url": "https://api.github.com/users/bruno-hays/repos", "events_url": "https://api.github.com/users/bruno-hays/events{/privacy}", "received_events_url": "https://api.github.com/users/bruno-hays/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
0
2025-04-02T17:01:11
2025-04-03T09:54:22
null
CONTRIBUTOR
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug I have noticed that on my dataset named [BrunoHays/Accueil_UBS](https://huggingface.co/datasets/BrunoHays/Accueil_UBS), since the version 3.4.0, every column except audio is missing when I load the dataset. Interestingly, the dataset viewer still shows the correct columns ### Steps to reproduce the bug ```python from datasets import load_dataset ds = load_dataset("BrunoHays/Accueil_UBS", streaming=True) print(next(iter(ds["test"])).keys()) ``` With datasets >= 3.4.0: -> dict_keys(['audio']) With datasets == 3.3.2: -> dict_keys(['audio', 'id', 'speaker', 'sentence', 'raw_sentence', 'start_timestamp', 'end_timestamp', 'overlap']) ### Expected behavior All the columns should be present ### Environment info - `datasets` version: 3.3.2 - Platform: macOS-14.6.1-x86_64-i386-64bit - Python version: 3.10.15 - `huggingface_hub` version: 0.30.1 - PyArrow version: 16.1.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7495/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7495/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7494
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7494/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7494/comments
https://api.github.com/repos/huggingface/datasets/issues/7494/events
https://github.com/huggingface/datasets/issues/7494
2,965,347,685
I_kwDODunzps6wv51l
7,494
Broken links in pdf loading documentation
{ "login": "VyoJ", "id": 75789232, "node_id": "MDQ6VXNlcjc1Nzg5MjMy", "avatar_url": "https://avatars.githubusercontent.com/u/75789232?v=4", "gravatar_id": "", "url": "https://api.github.com/users/VyoJ", "html_url": "https://github.com/VyoJ", "followers_url": "https://api.github.com/users/VyoJ/followers", "following_url": "https://api.github.com/users/VyoJ/following{/other_user}", "gists_url": "https://api.github.com/users/VyoJ/gists{/gist_id}", "starred_url": "https://api.github.com/users/VyoJ/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/VyoJ/subscriptions", "organizations_url": "https://api.github.com/users/VyoJ/orgs", "repos_url": "https://api.github.com/users/VyoJ/repos", "events_url": "https://api.github.com/users/VyoJ/events{/privacy}", "received_events_url": "https://api.github.com/users/VyoJ/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-04-02T06:45:22
2025-04-15T13:36:25
2025-04-15T13:36:04
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug Hi, just a couple of small issues I ran into while reading the docs for [loading pdf data](https://huggingface.co/docs/datasets/main/en/document_load): 1. The link for the [`Create a pdf dataset`](https://huggingface.co/docs/datasets/main/en/document_load#pdffolder) points to https://huggingface.co/docs/datasets/main/en/pdf_dataset instead of https://huggingface.co/docs/datasets/main/en/document_dataset and hence gives a 404 error. 2. At the top of the page, it's mentioned that to work with pdf datasets we need to have the `pdfplumber` package installed but the link to its installation guide points to `pytorch/vision` [installation instructions](https://github.com/pytorch/vision#installation) instead of `pdfplumber`'s [guide](https://github.com/jsvine/pdfplumber#installation) I love the work on enabling pdf dataset support and these small tweaks would help everyone navigate the docs better. Thanks! ### Steps to reproduce the bug The issue is on the [Load Document Data](https://huggingface.co/docs/datasets/main/en/document_load) page of the datasets docs. ### Expected behavior 1. For solving the first issue, I went through the [source .mdx code](https://github.com/huggingface/datasets/blob/main/docs/source/document_load.mdx?plain=1#L188) of the datasets docs and found that the link is pointing to `./pdf_dataset` instead of `./document_dataset` 2. For the second issue, I went through the [source .mdx code](https://github.com/huggingface/datasets/blob/main/docs/source/document_load.mdx?plain=1#L13) of the datasets docs and found that the link is `pytorch/vision` [installation instructions](https://github.com/pytorch/vision#installation) instead of `pdfplumber`'s [guide](https://github.com/jsvine/pdfplumber#installation) Just replacing these two links should fix the bugs ### Environment info datasets v3.5.0 (main at the time of writing)
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7494/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7494/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/7493
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7493/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7493/comments
https://api.github.com/repos/huggingface/datasets/issues/7493/events
https://github.com/huggingface/datasets/issues/7493
2,964,025,179
I_kwDODunzps6wq29b
7,493
push_to_hub does not upload videos
{ "login": "DominikVincent", "id": 9339403, "node_id": "MDQ6VXNlcjkzMzk0MDM=", "avatar_url": "https://avatars.githubusercontent.com/u/9339403?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DominikVincent", "html_url": "https://github.com/DominikVincent", "followers_url": "https://api.github.com/users/DominikVincent/followers", "following_url": "https://api.github.com/users/DominikVincent/following{/other_user}", "gists_url": "https://api.github.com/users/DominikVincent/gists{/gist_id}", "starred_url": "https://api.github.com/users/DominikVincent/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DominikVincent/subscriptions", "organizations_url": "https://api.github.com/users/DominikVincent/orgs", "repos_url": "https://api.github.com/users/DominikVincent/repos", "events_url": "https://api.github.com/users/DominikVincent/events{/privacy}", "received_events_url": "https://api.github.com/users/DominikVincent/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
1
2025-04-01T17:00:20
2025-04-15T12:34:23
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug Hello, I would like to upload a video dataset (some .mp4 files and some segments within them), i.e. rows correspond to subsequences from videos. Videos might be referenced by several rows. I created a dataset locally and it references the videos and the video readers can read them correctly. I use push_to_hub() to upload the dataset to the hub. Expectation: A user uses `load_dataset` and can load the videos. However, the videos seem to be just referenced via paths on the computer and not uploaded to the hub. Therefore a target user cannot load the videos in the dataset. ### Steps to reproduce the bug 1. create a video dataset with paths e.g. { ["videos"]: [path1, path2, ...]} 2. dataset.push_to_hub 3. on a different computer (or same pc if relative paths are used in a different folder): ``` dataset = load_dataset("siplab/egosim", split="train") video = dataset[0]["video_head"] ``` 3. will fail ### Expected behavior Expectation: A user uses `load_dataset` and can load the videos. ### Environment info datasets 3.1.0 Python 3.8.18
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7493/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7493/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7492
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7492/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7492/comments
https://api.github.com/repos/huggingface/datasets/issues/7492/events
https://github.com/huggingface/datasets/pull/7492
2,959,088,568
PR_kwDODunzps6QtCQM
7,492
Closes #7457
{ "login": "Harry-Yang0518", "id": 129883215, "node_id": "U_kgDOB73cTw", "avatar_url": "https://avatars.githubusercontent.com/u/129883215?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Harry-Yang0518", "html_url": "https://github.com/Harry-Yang0518", "followers_url": "https://api.github.com/users/Harry-Yang0518/followers", "following_url": "https://api.github.com/users/Harry-Yang0518/following{/other_user}", "gists_url": "https://api.github.com/users/Harry-Yang0518/gists{/gist_id}", "starred_url": "https://api.github.com/users/Harry-Yang0518/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Harry-Yang0518/subscriptions", "organizations_url": "https://api.github.com/users/Harry-Yang0518/orgs", "repos_url": "https://api.github.com/users/Harry-Yang0518/repos", "events_url": "https://api.github.com/users/Harry-Yang0518/events{/privacy}", "received_events_url": "https://api.github.com/users/Harry-Yang0518/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-30T20:41:20
2025-04-13T22:05:07
2025-04-13T22:05:07
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7492", "html_url": "https://github.com/huggingface/datasets/pull/7492", "diff_url": "https://github.com/huggingface/datasets/pull/7492.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7492.patch", "merged_at": null }
This PR updates the documentation to include the HF_DATASETS_CACHE environment variable, which allows users to customize the cache location for datasetsβ€”similar to HF_HUB_CACHE for models.
{ "login": "Harry-Yang0518", "id": 129883215, "node_id": "U_kgDOB73cTw", "avatar_url": "https://avatars.githubusercontent.com/u/129883215?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Harry-Yang0518", "html_url": "https://github.com/Harry-Yang0518", "followers_url": "https://api.github.com/users/Harry-Yang0518/followers", "following_url": "https://api.github.com/users/Harry-Yang0518/following{/other_user}", "gists_url": "https://api.github.com/users/Harry-Yang0518/gists{/gist_id}", "starred_url": "https://api.github.com/users/Harry-Yang0518/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Harry-Yang0518/subscriptions", "organizations_url": "https://api.github.com/users/Harry-Yang0518/orgs", "repos_url": "https://api.github.com/users/Harry-Yang0518/repos", "events_url": "https://api.github.com/users/Harry-Yang0518/events{/privacy}", "received_events_url": "https://api.github.com/users/Harry-Yang0518/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7492/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7492/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7491
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7491/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7491/comments
https://api.github.com/repos/huggingface/datasets/issues/7491/events
https://github.com/huggingface/datasets/pull/7491
2,959,085,647
PR_kwDODunzps6QtBsD
7,491
docs: update cache.mdx to include HF_DATASETS_CACHE documentation
{ "login": "Harry-Yang0518", "id": 129883215, "node_id": "U_kgDOB73cTw", "avatar_url": "https://avatars.githubusercontent.com/u/129883215?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Harry-Yang0518", "html_url": "https://github.com/Harry-Yang0518", "followers_url": "https://api.github.com/users/Harry-Yang0518/followers", "following_url": "https://api.github.com/users/Harry-Yang0518/following{/other_user}", "gists_url": "https://api.github.com/users/Harry-Yang0518/gists{/gist_id}", "starred_url": "https://api.github.com/users/Harry-Yang0518/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Harry-Yang0518/subscriptions", "organizations_url": "https://api.github.com/users/Harry-Yang0518/orgs", "repos_url": "https://api.github.com/users/Harry-Yang0518/repos", "events_url": "https://api.github.com/users/Harry-Yang0518/events{/privacy}", "received_events_url": "https://api.github.com/users/Harry-Yang0518/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-30T20:35:03
2025-03-30T20:36:40
2025-03-30T20:36:40
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7491", "html_url": "https://github.com/huggingface/datasets/pull/7491", "diff_url": "https://github.com/huggingface/datasets/pull/7491.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7491.patch", "merged_at": null }
null
{ "login": "Harry-Yang0518", "id": 129883215, "node_id": "U_kgDOB73cTw", "avatar_url": "https://avatars.githubusercontent.com/u/129883215?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Harry-Yang0518", "html_url": "https://github.com/Harry-Yang0518", "followers_url": "https://api.github.com/users/Harry-Yang0518/followers", "following_url": "https://api.github.com/users/Harry-Yang0518/following{/other_user}", "gists_url": "https://api.github.com/users/Harry-Yang0518/gists{/gist_id}", "starred_url": "https://api.github.com/users/Harry-Yang0518/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Harry-Yang0518/subscriptions", "organizations_url": "https://api.github.com/users/Harry-Yang0518/orgs", "repos_url": "https://api.github.com/users/Harry-Yang0518/repos", "events_url": "https://api.github.com/users/Harry-Yang0518/events{/privacy}", "received_events_url": "https://api.github.com/users/Harry-Yang0518/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7491/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7491/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7490
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7490/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7490/comments
https://api.github.com/repos/huggingface/datasets/issues/7490/events
https://github.com/huggingface/datasets/pull/7490
2,958,826,222
PR_kwDODunzps6QsPUI
7,490
(refactor) remove redundant logic in _check_valid_index_key
{ "login": "suzyahyah", "id": 2980993, "node_id": "MDQ6VXNlcjI5ODA5OTM=", "avatar_url": "https://avatars.githubusercontent.com/u/2980993?v=4", "gravatar_id": "", "url": "https://api.github.com/users/suzyahyah", "html_url": "https://github.com/suzyahyah", "followers_url": "https://api.github.com/users/suzyahyah/followers", "following_url": "https://api.github.com/users/suzyahyah/following{/other_user}", "gists_url": "https://api.github.com/users/suzyahyah/gists{/gist_id}", "starred_url": "https://api.github.com/users/suzyahyah/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/suzyahyah/subscriptions", "organizations_url": "https://api.github.com/users/suzyahyah/orgs", "repos_url": "https://api.github.com/users/suzyahyah/repos", "events_url": "https://api.github.com/users/suzyahyah/events{/privacy}", "received_events_url": "https://api.github.com/users/suzyahyah/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
0
2025-03-30T11:45:42
2025-03-30T11:50:22
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7490", "html_url": "https://github.com/huggingface/datasets/pull/7490", "diff_url": "https://github.com/huggingface/datasets/pull/7490.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7490.patch", "merged_at": null }
This PR contributes a minor refactor, in a small function in `src/datasets/formatting/formatting.py`. No change in logic. In the original code, there are separate if-conditionals for `isinstance(key, range)` and `isinstance(key, Iterable)`, with essentially the same logic. This PR combines these two using a single if statement. **Considerations** 1. Although range in python is guaranteed to have integers, internally calling `int()` on an object that is already an int is negligible. (In python it returns the original object. It doesn't create a new integer object or perform any actual conversion) 2. Technically a range is already an Iterable, and we could just do `isinstance(key, Iterable)` but I explicitly did `isinstance(key, (range, Iterable))` just to be super obvious and consistent that both cases are handled because I see `slice, range, Iterable` everywhere in this `formatting.py` 3. This PR removes the `if len(key)>0` conditional. I think it is cleaner to have it this way for three reasons. - There was originally no else statement and the code would have failed silently anyway. - The if len(key)>0 should be caught much earlier, rather than in `formatting.py`. - There are actually multiple cases where this would fail, if len(key)>0, if key is non numeric or float, or if key is a list of lists. It's clunky to state all this and the error be thrown during max or indexing. **Previous PR and Issues Checks** 1. No known PR or Issues (both closed or open) in hf datasets repository **Tests** 1. Tested using Dataset (load_dataset("wikitext", "wikitext-103-raw-v1")), Pytorch DataLoader, with a Pytorch BatchSampler (list of indexes returned instead of single index).
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7490/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7490/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7489
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7489/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7489/comments
https://api.github.com/repos/huggingface/datasets/issues/7489/events
https://github.com/huggingface/datasets/pull/7489
2,958,204,763
PR_kwDODunzps6QqSRD
7,489
fix: loading of datasets from Disk(#7373)
{ "login": "sam-hey", "id": 40773225, "node_id": "MDQ6VXNlcjQwNzczMjI1", "avatar_url": "https://avatars.githubusercontent.com/u/40773225?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sam-hey", "html_url": "https://github.com/sam-hey", "followers_url": "https://api.github.com/users/sam-hey/followers", "following_url": "https://api.github.com/users/sam-hey/following{/other_user}", "gists_url": "https://api.github.com/users/sam-hey/gists{/gist_id}", "starred_url": "https://api.github.com/users/sam-hey/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sam-hey/subscriptions", "organizations_url": "https://api.github.com/users/sam-hey/orgs", "repos_url": "https://api.github.com/users/sam-hey/repos", "events_url": "https://api.github.com/users/sam-hey/events{/privacy}", "received_events_url": "https://api.github.com/users/sam-hey/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
4
2025-03-29T16:22:58
2025-04-15T16:38:33
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7489", "html_url": "https://github.com/huggingface/datasets/pull/7489", "diff_url": "https://github.com/huggingface/datasets/pull/7489.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7489.patch", "merged_at": null }
Fixes dataset loading from disk by ensuring that memory maps and streams are properly closed. For more details, see https://github.com/huggingface/datasets/issues/7373.
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7489/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7489/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7488
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7488/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7488/comments
https://api.github.com/repos/huggingface/datasets/issues/7488/events
https://github.com/huggingface/datasets/pull/7488
2,956,559,358
PR_kwDODunzps6QlLmn
7,488
Support underscore int read instruction
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
2
2025-03-28T16:01:15
2025-03-28T16:20:44
2025-03-28T16:20:43
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7488", "html_url": "https://github.com/huggingface/datasets/pull/7488", "diff_url": "https://github.com/huggingface/datasets/pull/7488.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7488.patch", "merged_at": "2025-03-28T16:20:43" }
close https://github.com/huggingface/datasets/issues/7481
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7488/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7488/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7487
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7487/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7487/comments
https://api.github.com/repos/huggingface/datasets/issues/7487/events
https://github.com/huggingface/datasets/pull/7487
2,956,533,448
PR_kwDODunzps6QlF8N
7,487
Write pdf in map
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-28T15:49:25
2025-03-28T17:09:53
2025-03-28T17:09:51
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7487", "html_url": "https://github.com/huggingface/datasets/pull/7487", "diff_url": "https://github.com/huggingface/datasets/pull/7487.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7487.patch", "merged_at": "2025-03-28T17:09:51" }
Fix this error when mapping a PDF dataset ``` pyarrow.lib.ArrowInvalid: Could not convert <pdfplumber.pdf.PDF object at 0x13498ee40> with type PDF: did not recognize Python value type when inferring an Arrow data type ``` and also let map() outputs be lists of images or pdfs
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7487/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7487/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7486
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7486/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7486/comments
https://api.github.com/repos/huggingface/datasets/issues/7486/events
https://github.com/huggingface/datasets/issues/7486
2,954,042,179
I_kwDODunzps6wExtD
7,486
`shared_datadir` fixture is missing
{ "login": "lahwaacz", "id": 1289205, "node_id": "MDQ6VXNlcjEyODkyMDU=", "avatar_url": "https://avatars.githubusercontent.com/u/1289205?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lahwaacz", "html_url": "https://github.com/lahwaacz", "followers_url": "https://api.github.com/users/lahwaacz/followers", "following_url": "https://api.github.com/users/lahwaacz/following{/other_user}", "gists_url": "https://api.github.com/users/lahwaacz/gists{/gist_id}", "starred_url": "https://api.github.com/users/lahwaacz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lahwaacz/subscriptions", "organizations_url": "https://api.github.com/users/lahwaacz/orgs", "repos_url": "https://api.github.com/users/lahwaacz/repos", "events_url": "https://api.github.com/users/lahwaacz/events{/privacy}", "received_events_url": "https://api.github.com/users/lahwaacz/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-27T18:17:12
2025-03-27T19:49:11
2025-03-27T19:49:10
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug Running the tests for the latest release fails due to missing `shared_datadir` fixture. ### Steps to reproduce the bug Running `pytest` while building a package for Arch Linux leads to these errors: ``` ==================================== ERRORS ==================================== _________ ERROR at setup of test_pdf_feature_encode_example[<lambda>1] _________ [gw44] linux -- Python 3.13.2 /build/python-datasets/src/datasets-3.5.0/test-env/bin/python file /build/python-datasets/src/datasets-3.5.0/tests/features/test_pdf.py, line 8 @require_pdfplumber @pytest.mark.parametrize( "build_example", [ lambda pdf_path: pdf_path, lambda pdf_path: open(pdf_path, "rb").read(), lambda pdf_path: {"path": pdf_path}, lambda pdf_path: {"path": pdf_path, "bytes": None}, lambda pdf_path: {"path": pdf_path, "bytes": open(pdf_path, "rb").read()}, lambda pdf_path: {"path": None, "bytes": open(pdf_path, "rb").read()}, lambda pdf_path: {"bytes": open(pdf_path, "rb").read()}, ], ) def test_pdf_feature_encode_example(shared_datadir, build_example): E fixture 'shared_datadir' not found > available fixtures: _hf_gated_dataset_repo_txt_data, arrow_file, arrow_path, audio_file, bz2_csv_path, bz2_file, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, ci_hfh_hf_hub_url, ci_hub_config, cleanup_repo, csv2_path, csv_path, data_dir_with_hidden_files, dataset, dataset_dict, disable_implicit_token, disable_tqdm_output, doctest_namespace, geoparquet_path, gz_file, hf_api, hf_gated_dataset_repo_txt_data, hf_private_dataset_repo_txt_data, hf_private_dataset_repo_txt_data_, hf_private_dataset_repo_zipped_img_data, hf_private_dataset_repo_zipped_img_data_, hf_private_dataset_repo_zipped_txt_data, hf_private_dataset_repo_zipped_txt_data_, hf_token, image_file, json_dict_of_lists_path, json_list_of_dicts_path, jsonl2_path, jsonl_312_path, jsonl_gz_path, jsonl_path, jsonl_str_path, lz4_file, mock_fsspec, mockfs, monkeypatch, parquet_path, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, set_ci_hub_access_token, set_sqlalchemy_silence_uber_warning, set_test_cache_config, set_update_download_counts_to_false, seven_zip_file, sqlite_path, tar_file, tar_jsonl_path, tar_nested_jsonl_path, temporary_repo, tensor_file, testrun_uid, text2_path, text_dir, text_dir_with_unsupported_extension, text_file, text_file_content, text_gz_path, text_path, text_path_with_unicode_new_lines, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpfs, worker_id, xml_file, xz_file, zero_time_out_for_remote_code, zip_csv_path, zip_csv_with_dir_path, zip_file, zip_image_path, zip_jsonl_path, zip_jsonl_with_dir_path, zip_nested_jsonl_path, zip_text_path, zip_text_with_dir_path, zip_unsupported_ext_path, zip_uppercase_csv_path, zstd_file > use 'pytest --fixtures [testpath]' for help on them. /build/python-datasets/src/datasets-3.5.0/tests/features/test_pdf.py:8 _________ ERROR at setup of test_pdf_feature_encode_example[<lambda>2] _________ [gw44] linux -- Python 3.13.2 /build/python-datasets/src/datasets-3.5.0/test-env/bin/python file /build/python-datasets/src/datasets-3.5.0/tests/features/test_pdf.py, line 8 @require_pdfplumber @pytest.mark.parametrize( "build_example", [ lambda pdf_path: pdf_path, lambda pdf_path: open(pdf_path, "rb").read(), lambda pdf_path: {"path": pdf_path}, lambda pdf_path: {"path": pdf_path, "bytes": None}, lambda pdf_path: {"path": pdf_path, "bytes": open(pdf_path, "rb").read()}, lambda pdf_path: {"path": None, "bytes": open(pdf_path, "rb").read()}, lambda pdf_path: {"bytes": open(pdf_path, "rb").read()}, ], ) def test_pdf_feature_encode_example(shared_datadir, build_example): E fixture 'shared_datadir' not found > available fixtures: _hf_gated_dataset_repo_txt_data, arrow_file, arrow_path, audio_file, bz2_csv_path, bz2_file, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, ci_hfh_hf_hub_url, ci_hub_config, cleanup_repo, csv2_path, csv_path, data_dir_with_hidden_files, dataset, dataset_dict, disable_implicit_token, disable_tqdm_output, doctest_namespace, geoparquet_path, gz_file, hf_api, hf_gated_dataset_repo_txt_data, hf_private_dataset_repo_txt_data, hf_private_dataset_repo_txt_data_, hf_private_dataset_repo_zipped_img_data, hf_private_dataset_repo_zipped_img_data_, hf_private_dataset_repo_zipped_txt_data, hf_private_dataset_repo_zipped_txt_data_, hf_token, image_file, json_dict_of_lists_path, json_list_of_dicts_path, jsonl2_path, jsonl_312_path, jsonl_gz_path, jsonl_path, jsonl_str_path, lz4_file, mock_fsspec, mockfs, monkeypatch, parquet_path, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, set_ci_hub_access_token, set_sqlalchemy_silence_uber_warning, set_test_cache_config, set_update_download_counts_to_false, seven_zip_file, sqlite_path, tar_file, tar_jsonl_path, tar_nested_jsonl_path, temporary_repo, tensor_file, testrun_uid, text2_path, text_dir, text_dir_with_unsupported_extension, text_file, text_file_content, text_gz_path, text_path, text_path_with_unicode_new_lines, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpfs, worker_id, xml_file, xz_file, zero_time_out_for_remote_code, zip_csv_path, zip_csv_with_dir_path, zip_file, zip_image_path, zip_jsonl_path, zip_jsonl_with_dir_path, zip_nested_jsonl_path, zip_text_path, zip_text_with_dir_path, zip_unsupported_ext_path, zip_uppercase_csv_path, zstd_file > use 'pytest --fixtures [testpath]' for help on them. /build/python-datasets/src/datasets-3.5.0/tests/features/test_pdf.py:8 _________ ERROR at setup of test_pdf_feature_encode_example[<lambda>3] _________ [gw44] linux -- Python 3.13.2 /build/python-datasets/src/datasets-3.5.0/test-env/bin/python file /build/python-datasets/src/datasets-3.5.0/tests/features/test_pdf.py, line 8 @require_pdfplumber @pytest.mark.parametrize( "build_example", [ lambda pdf_path: pdf_path, lambda pdf_path: open(pdf_path, "rb").read(), lambda pdf_path: {"path": pdf_path}, lambda pdf_path: {"path": pdf_path, "bytes": None}, lambda pdf_path: {"path": pdf_path, "bytes": open(pdf_path, "rb").read()}, lambda pdf_path: {"path": None, "bytes": open(pdf_path, "rb").read()}, lambda pdf_path: {"bytes": open(pdf_path, "rb").read()}, ], ) def test_pdf_feature_encode_example(shared_datadir, build_example): E fixture 'shared_datadir' not found > available fixtures: _hf_gated_dataset_repo_txt_data, arrow_file, arrow_path, audio_file, bz2_csv_path, bz2_file, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, ci_hfh_hf_hub_url, ci_hub_config, cleanup_repo, csv2_path, csv_path, data_dir_with_hidden_files, dataset, dataset_dict, disable_implicit_token, disable_tqdm_output, doctest_namespace, geoparquet_path, gz_file, hf_api, hf_gated_dataset_repo_txt_data, hf_private_dataset_repo_txt_data, hf_private_dataset_repo_txt_data_, hf_private_dataset_repo_zipped_img_data, hf_private_dataset_repo_zipped_img_data_, hf_private_dataset_repo_zipped_txt_data, hf_private_dataset_repo_zipped_txt_data_, hf_token, image_file, json_dict_of_lists_path, json_list_of_dicts_path, jsonl2_path, jsonl_312_path, jsonl_gz_path, jsonl_path, jsonl_str_path, lz4_file, mock_fsspec, mockfs, monkeypatch, parquet_path, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, set_ci_hub_access_token, set_sqlalchemy_silence_uber_warning, set_test_cache_config, set_update_download_counts_to_false, seven_zip_file, sqlite_path, tar_file, tar_jsonl_path, tar_nested_jsonl_path, temporary_repo, tensor_file, testrun_uid, text2_path, text_dir, text_dir_with_unsupported_extension, text_file, text_file_content, text_gz_path, text_path, text_path_with_unicode_new_lines, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpfs, worker_id, xml_file, xz_file, zero_time_out_for_remote_code, zip_csv_path, zip_csv_with_dir_path, zip_file, zip_image_path, zip_jsonl_path, zip_jsonl_with_dir_path, zip_nested_jsonl_path, zip_text_path, zip_text_with_dir_path, zip_unsupported_ext_path, zip_uppercase_csv_path, zstd_file > use 'pytest --fixtures [testpath]' for help on them. /build/python-datasets/src/datasets-3.5.0/tests/features/test_pdf.py:8 _________ ERROR at setup of test_pdf_feature_encode_example[<lambda>4] _________ [gw44] linux -- Python 3.13.2 /build/python-datasets/src/datasets-3.5.0/test-env/bin/python file /build/python-datasets/src/datasets-3.5.0/tests/features/test_pdf.py, line 8 @require_pdfplumber @pytest.mark.parametrize( "build_example", [ lambda pdf_path: pdf_path, lambda pdf_path: open(pdf_path, "rb").read(), lambda pdf_path: {"path": pdf_path}, lambda pdf_path: {"path": pdf_path, "bytes": None}, lambda pdf_path: {"path": pdf_path, "bytes": open(pdf_path, "rb").read()}, lambda pdf_path: {"path": None, "bytes": open(pdf_path, "rb").read()}, lambda pdf_path: {"bytes": open(pdf_path, "rb").read()}, ], ) def test_pdf_feature_encode_example(shared_datadir, build_example): E fixture 'shared_datadir' not found > available fixtures: _hf_gated_dataset_repo_txt_data, arrow_file, arrow_path, audio_file, bz2_csv_path, bz2_file, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, ci_hfh_hf_hub_url, ci_hub_config, cleanup_repo, csv2_path, csv_path, data_dir_with_hidden_files, dataset, dataset_dict, disable_implicit_token, disable_tqdm_output, doctest_namespace, geoparquet_path, gz_file, hf_api, hf_gated_dataset_repo_txt_data, hf_private_dataset_repo_txt_data, hf_private_dataset_repo_txt_data_, hf_private_dataset_repo_zipped_img_data, hf_private_dataset_repo_zipped_img_data_, hf_private_dataset_repo_zipped_txt_data, hf_private_dataset_repo_zipped_txt_data_, hf_token, image_file, json_dict_of_lists_path, json_list_of_dicts_path, jsonl2_path, jsonl_312_path, jsonl_gz_path, jsonl_path, jsonl_str_path, lz4_file, mock_fsspec, mockfs, monkeypatch, parquet_path, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, set_ci_hub_access_token, set_sqlalchemy_silence_uber_warning, set_test_cache_config, set_update_download_counts_to_false, seven_zip_file, sqlite_path, tar_file, tar_jsonl_path, tar_nested_jsonl_path, temporary_repo, tensor_file, testrun_uid, text2_path, text_dir, text_dir_with_unsupported_extension, text_file, text_file_content, text_gz_path, text_path, text_path_with_unicode_new_lines, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpfs, worker_id, xml_file, xz_file, zero_time_out_for_remote_code, zip_csv_path, zip_csv_with_dir_path, zip_file, zip_image_path, zip_jsonl_path, zip_jsonl_with_dir_path, zip_nested_jsonl_path, zip_text_path, zip_text_with_dir_path, zip_unsupported_ext_path, zip_uppercase_csv_path, zstd_file > use 'pytest --fixtures [testpath]' for help on them. /build/python-datasets/src/datasets-3.5.0/tests/features/test_pdf.py:8 _________ ERROR at setup of test_pdf_feature_encode_example[<lambda>5] _________ [gw44] linux -- Python 3.13.2 /build/python-datasets/src/datasets-3.5.0/test-env/bin/python file /build/python-datasets/src/datasets-3.5.0/tests/features/test_pdf.py, line 8 @require_pdfplumber @pytest.mark.parametrize( "build_example", [ lambda pdf_path: pdf_path, lambda pdf_path: open(pdf_path, "rb").read(), lambda pdf_path: {"path": pdf_path}, lambda pdf_path: {"path": pdf_path, "bytes": None}, lambda pdf_path: {"path": pdf_path, "bytes": open(pdf_path, "rb").read()}, lambda pdf_path: {"path": None, "bytes": open(pdf_path, "rb").read()}, lambda pdf_path: {"bytes": open(pdf_path, "rb").read()}, ], ) def test_pdf_feature_encode_example(shared_datadir, build_example): E fixture 'shared_datadir' not found > available fixtures: _hf_gated_dataset_repo_txt_data, arrow_file, arrow_path, audio_file, bz2_csv_path, bz2_file, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, ci_hfh_hf_hub_url, ci_hub_config, cleanup_repo, csv2_path, csv_path, data_dir_with_hidden_files, dataset, dataset_dict, disable_implicit_token, disable_tqdm_output, doctest_namespace, geoparquet_path, gz_file, hf_api, hf_gated_dataset_repo_txt_data, hf_private_dataset_repo_txt_data, hf_private_dataset_repo_txt_data_, hf_private_dataset_repo_zipped_img_data, hf_private_dataset_repo_zipped_img_data_, hf_private_dataset_repo_zipped_txt_data, hf_private_dataset_repo_zipped_txt_data_, hf_token, image_file, json_dict_of_lists_path, json_list_of_dicts_path, jsonl2_path, jsonl_312_path, jsonl_gz_path, jsonl_path, jsonl_str_path, lz4_file, mock_fsspec, mockfs, monkeypatch, parquet_path, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, set_ci_hub_access_token, set_sqlalchemy_silence_uber_warning, set_test_cache_config, set_update_download_counts_to_false, seven_zip_file, sqlite_path, tar_file, tar_jsonl_path, tar_nested_jsonl_path, temporary_repo, tensor_file, testrun_uid, text2_path, text_dir, text_dir_with_unsupported_extension, text_file, text_file_content, text_gz_path, text_path, text_path_with_unicode_new_lines, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpfs, worker_id, xml_file, xz_file, zero_time_out_for_remote_code, zip_csv_path, zip_csv_with_dir_path, zip_file, zip_image_path, zip_jsonl_path, zip_jsonl_with_dir_path, zip_nested_jsonl_path, zip_text_path, zip_text_with_dir_path, zip_unsupported_ext_path, zip_uppercase_csv_path, zstd_file > use 'pytest --fixtures [testpath]' for help on them. /build/python-datasets/src/datasets-3.5.0/tests/features/test_pdf.py:8 _________ ERROR at setup of test_pdf_feature_encode_example[<lambda>6] _________ [gw44] linux -- Python 3.13.2 /build/python-datasets/src/datasets-3.5.0/test-env/bin/python file /build/python-datasets/src/datasets-3.5.0/tests/features/test_pdf.py, line 8 @require_pdfplumber @pytest.mark.parametrize( "build_example", [ lambda pdf_path: pdf_path, lambda pdf_path: open(pdf_path, "rb").read(), lambda pdf_path: {"path": pdf_path}, lambda pdf_path: {"path": pdf_path, "bytes": None}, lambda pdf_path: {"path": pdf_path, "bytes": open(pdf_path, "rb").read()}, lambda pdf_path: {"path": None, "bytes": open(pdf_path, "rb").read()}, lambda pdf_path: {"bytes": open(pdf_path, "rb").read()}, ], ) def test_pdf_feature_encode_example(shared_datadir, build_example): E fixture 'shared_datadir' not found > available fixtures: _hf_gated_dataset_repo_txt_data, arrow_file, arrow_path, audio_file, bz2_csv_path, bz2_file, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, ci_hfh_hf_hub_url, ci_hub_config, cleanup_repo, csv2_path, csv_path, data_dir_with_hidden_files, dataset, dataset_dict, disable_implicit_token, disable_tqdm_output, doctest_namespace, geoparquet_path, gz_file, hf_api, hf_gated_dataset_repo_txt_data, hf_private_dataset_repo_txt_data, hf_private_dataset_repo_txt_data_, hf_private_dataset_repo_zipped_img_data, hf_private_dataset_repo_zipped_img_data_, hf_private_dataset_repo_zipped_txt_data, hf_private_dataset_repo_zipped_txt_data_, hf_token, image_file, json_dict_of_lists_path, json_list_of_dicts_path, jsonl2_path, jsonl_312_path, jsonl_gz_path, jsonl_path, jsonl_str_path, lz4_file, mock_fsspec, mockfs, monkeypatch, parquet_path, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, set_ci_hub_access_token, set_sqlalchemy_silence_uber_warning, set_test_cache_config, set_update_download_counts_to_false, seven_zip_file, sqlite_path, tar_file, tar_jsonl_path, tar_nested_jsonl_path, temporary_repo, tensor_file, testrun_uid, text2_path, text_dir, text_dir_with_unsupported_extension, text_file, text_file_content, text_gz_path, text_path, text_path_with_unicode_new_lines, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpfs, worker_id, xml_file, xz_file, zero_time_out_for_remote_code, zip_csv_path, zip_csv_with_dir_path, zip_file, zip_image_path, zip_jsonl_path, zip_jsonl_with_dir_path, zip_nested_jsonl_path, zip_text_path, zip_text_with_dir_path, zip_unsupported_ext_path, zip_uppercase_csv_path, zstd_file > use 'pytest --fixtures [testpath]' for help on them. /build/python-datasets/src/datasets-3.5.0/tests/features/test_pdf.py:8 _______________ ERROR at setup of test_dataset_with_pdf_feature ________________ [gw44] linux -- Python 3.13.2 /build/python-datasets/src/datasets-3.5.0/test-env/bin/python file /build/python-datasets/src/datasets-3.5.0/tests/features/test_pdf.py, line 34 @require_pdfplumber def test_dataset_with_pdf_feature(shared_datadir): E fixture 'shared_datadir' not found > available fixtures: _hf_gated_dataset_repo_txt_data, arrow_file, arrow_path, audio_file, bz2_csv_path, bz2_file, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, ci_hfh_hf_hub_url, ci_hub_config, cleanup_repo, csv2_path, csv_path, data_dir_with_hidden_files, dataset, dataset_dict, disable_implicit_token, disable_tqdm_output, doctest_namespace, geoparquet_path, gz_file, hf_api, hf_gated_dataset_repo_txt_data, hf_private_dataset_repo_txt_data, hf_private_dataset_repo_txt_data_, hf_private_dataset_repo_zipped_img_data, hf_private_dataset_repo_zipped_img_data_, hf_private_dataset_repo_zipped_txt_data, hf_private_dataset_repo_zipped_txt_data_, hf_token, image_file, json_dict_of_lists_path, json_list_of_dicts_path, jsonl2_path, jsonl_312_path, jsonl_gz_path, jsonl_path, jsonl_str_path, lz4_file, mock_fsspec, mockfs, monkeypatch, parquet_path, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, set_ci_hub_access_token, set_sqlalchemy_silence_uber_warning, set_test_cache_config, set_update_download_counts_to_false, seven_zip_file, sqlite_path, tar_file, tar_jsonl_path, tar_nested_jsonl_path, temporary_repo, tensor_file, testrun_uid, text2_path, text_dir, text_dir_with_unsupported_extension, text_file, text_file_content, text_gz_path, text_path, text_path_with_unicode_new_lines, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpfs, worker_id, xml_file, xz_file, zero_time_out_for_remote_code, zip_csv_path, zip_csv_with_dir_path, zip_file, zip_image_path, zip_jsonl_path, zip_jsonl_with_dir_path, zip_nested_jsonl_path, zip_text_path, zip_text_with_dir_path, zip_unsupported_ext_path, zip_uppercase_csv_path, zstd_file > use 'pytest --fixtures [testpath]' for help on them. /build/python-datasets/src/datasets-3.5.0/tests/features/test_pdf.py:34 _________ ERROR at setup of test_pdf_feature_encode_example[<lambda>0] _________ [gw46] linux -- Python 3.13.2 /build/python-datasets/src/datasets-3.5.0/test-env/bin/python file /build/python-datasets/src/datasets-3.5.0/tests/features/test_pdf.py, line 8 @require_pdfplumber @pytest.mark.parametrize( "build_example", [ lambda pdf_path: pdf_path, lambda pdf_path: open(pdf_path, "rb").read(), lambda pdf_path: {"path": pdf_path}, lambda pdf_path: {"path": pdf_path, "bytes": None}, lambda pdf_path: {"path": pdf_path, "bytes": open(pdf_path, "rb").read()}, lambda pdf_path: {"path": None, "bytes": open(pdf_path, "rb").read()}, lambda pdf_path: {"bytes": open(pdf_path, "rb").read()}, ], ) def test_pdf_feature_encode_example(shared_datadir, build_example): E fixture 'shared_datadir' not found > available fixtures: _hf_gated_dataset_repo_txt_data, arrow_file, arrow_path, audio_file, bz2_csv_path, bz2_file, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, ci_hfh_hf_hub_url, ci_hub_config, cleanup_repo, csv2_path, csv_path, data_dir_with_hidden_files, dataset, dataset_dict, disable_implicit_token, disable_tqdm_output, doctest_namespace, geoparquet_path, gz_file, hf_api, hf_gated_dataset_repo_txt_data, hf_private_dataset_repo_txt_data, hf_private_dataset_repo_txt_data_, hf_private_dataset_repo_zipped_img_data, hf_private_dataset_repo_zipped_img_data_, hf_private_dataset_repo_zipped_txt_data, hf_private_dataset_repo_zipped_txt_data_, hf_token, image_file, json_dict_of_lists_path, json_list_of_dicts_path, jsonl2_path, jsonl_312_path, jsonl_gz_path, jsonl_path, jsonl_str_path, lz4_file, mock_fsspec, mockfs, monkeypatch, parquet_path, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, set_ci_hub_access_token, set_sqlalchemy_silence_uber_warning, set_test_cache_config, set_update_download_counts_to_false, seven_zip_file, sqlite_path, tar_file, tar_jsonl_path, tar_nested_jsonl_path, temporary_repo, tensor_file, testrun_uid, text2_path, text_dir, text_dir_with_unsupported_extension, text_file, text_file_content, text_gz_path, text_path, text_path_with_unicode_new_lines, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpfs, worker_id, xml_file, xz_file, zero_time_out_for_remote_code, zip_csv_path, zip_csv_with_dir_path, zip_file, zip_image_path, zip_jsonl_path, zip_jsonl_with_dir_path, zip_nested_jsonl_path, zip_text_path, zip_text_with_dir_path, zip_unsupported_ext_path, zip_uppercase_csv_path, zstd_file > use 'pytest --fixtures [testpath]' for help on them. /build/python-datasets/src/datasets-3.5.0/tests/features/test_pdf.py:8 ``` ### Expected behavior All fixtures used in tests should be available. ### Environment info Arch Linux build system, building the [python-datasets](https://gitlab.archlinux.org/archlinux/packaging/packages/python-datasets) package. There are actually [many deselected tests](https://gitlab.archlinux.org/archlinux/packaging/packages/python-datasets/-/blob/6f97957f0c326cc7b3da6b7f12326305bcaef374/PKGBUILD#L66-148) which were failing on previous releases, but these errors popped up in 3.5.0.
{ "login": "lahwaacz", "id": 1289205, "node_id": "MDQ6VXNlcjEyODkyMDU=", "avatar_url": "https://avatars.githubusercontent.com/u/1289205?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lahwaacz", "html_url": "https://github.com/lahwaacz", "followers_url": "https://api.github.com/users/lahwaacz/followers", "following_url": "https://api.github.com/users/lahwaacz/following{/other_user}", "gists_url": "https://api.github.com/users/lahwaacz/gists{/gist_id}", "starred_url": "https://api.github.com/users/lahwaacz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lahwaacz/subscriptions", "organizations_url": "https://api.github.com/users/lahwaacz/orgs", "repos_url": "https://api.github.com/users/lahwaacz/repos", "events_url": "https://api.github.com/users/lahwaacz/events{/privacy}", "received_events_url": "https://api.github.com/users/lahwaacz/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7486/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7486/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/7485
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7485/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7485/comments
https://api.github.com/repos/huggingface/datasets/issues/7485/events
https://github.com/huggingface/datasets/pull/7485
2,953,696,519
PR_kwDODunzps6QbjFJ
7,485
set dev version
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-27T16:39:34
2025-03-27T16:41:59
2025-03-27T16:39:42
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7485", "html_url": "https://github.com/huggingface/datasets/pull/7485", "diff_url": "https://github.com/huggingface/datasets/pull/7485.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7485.patch", "merged_at": "2025-03-27T16:39:42" }
null
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7485/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7485/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7484
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7484/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7484/comments
https://api.github.com/repos/huggingface/datasets/issues/7484/events
https://github.com/huggingface/datasets/pull/7484
2,953,677,168
PR_kwDODunzps6Qbevn
7,484
release: 3.5.0
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-27T16:33:27
2025-03-27T16:35:44
2025-03-27T16:34:22
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7484", "html_url": "https://github.com/huggingface/datasets/pull/7484", "diff_url": "https://github.com/huggingface/datasets/pull/7484.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7484.patch", "merged_at": "2025-03-27T16:34:22" }
null
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7484/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7484/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7483
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7483/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7483/comments
https://api.github.com/repos/huggingface/datasets/issues/7483/events
https://github.com/huggingface/datasets/pull/7483
2,951,856,468
PR_kwDODunzps6QVInB
7,483
Support skip_trying_type
{ "login": "yoshitomo-matsubara", "id": 11156001, "node_id": "MDQ6VXNlcjExMTU2MDAx", "avatar_url": "https://avatars.githubusercontent.com/u/11156001?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yoshitomo-matsubara", "html_url": "https://github.com/yoshitomo-matsubara", "followers_url": "https://api.github.com/users/yoshitomo-matsubara/followers", "following_url": "https://api.github.com/users/yoshitomo-matsubara/following{/other_user}", "gists_url": "https://api.github.com/users/yoshitomo-matsubara/gists{/gist_id}", "starred_url": "https://api.github.com/users/yoshitomo-matsubara/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yoshitomo-matsubara/subscriptions", "organizations_url": "https://api.github.com/users/yoshitomo-matsubara/orgs", "repos_url": "https://api.github.com/users/yoshitomo-matsubara/repos", "events_url": "https://api.github.com/users/yoshitomo-matsubara/events{/privacy}", "received_events_url": "https://api.github.com/users/yoshitomo-matsubara/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
6
2025-03-27T07:07:20
2025-04-09T19:46:46
2025-04-09T09:53:10
CONTRIBUTOR
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7483", "html_url": "https://github.com/huggingface/datasets/pull/7483", "diff_url": "https://github.com/huggingface/datasets/pull/7483.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7483.patch", "merged_at": "2025-04-09T09:53:10" }
This PR addresses Issue #7472 cc: @lhoestq
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7483/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7483/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7482
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7482/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7482/comments
https://api.github.com/repos/huggingface/datasets/issues/7482/events
https://github.com/huggingface/datasets/pull/7482
2,950,890,368
PR_kwDODunzps6QRyY6
7,482
Implement capability to restore non-nullability in Features
{ "login": "BramVanroy", "id": 2779410, "node_id": "MDQ6VXNlcjI3Nzk0MTA=", "avatar_url": "https://avatars.githubusercontent.com/u/2779410?v=4", "gravatar_id": "", "url": "https://api.github.com/users/BramVanroy", "html_url": "https://github.com/BramVanroy", "followers_url": "https://api.github.com/users/BramVanroy/followers", "following_url": "https://api.github.com/users/BramVanroy/following{/other_user}", "gists_url": "https://api.github.com/users/BramVanroy/gists{/gist_id}", "starred_url": "https://api.github.com/users/BramVanroy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/BramVanroy/subscriptions", "organizations_url": "https://api.github.com/users/BramVanroy/orgs", "repos_url": "https://api.github.com/users/BramVanroy/repos", "events_url": "https://api.github.com/users/BramVanroy/events{/privacy}", "received_events_url": "https://api.github.com/users/BramVanroy/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
3
2025-03-26T22:16:09
2025-03-27T13:07:50
null
CONTRIBUTOR
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7482", "html_url": "https://github.com/huggingface/datasets/pull/7482", "diff_url": "https://github.com/huggingface/datasets/pull/7482.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7482.patch", "merged_at": null }
This PR attempts to keep track of non_nullable pyarrow fields when converting a `pa.Schema` to `Features`. At the same time, when outputting the `arrow_schema`, the original non-nullable fields are restored. This allows for more consistent behavior and avoids breaking behavior as illustrated in #7479. I am by no means a pyarrow expert so some logic in `find_non_nullable_fields` may not perfect. Not sure if more logic (type checks) are needed for deep-checking a given schema. Maybe there are other pyarrow structures that need to be covered? Tests are added, but again, these may not have sufficient coverage in terms of pyarrow structure types. closes #7479
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7482/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7482/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7481
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7481/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7481/comments
https://api.github.com/repos/huggingface/datasets/issues/7481/events
https://github.com/huggingface/datasets/issues/7481
2,950,692,971
I_kwDODunzps6v4ABr
7,481
deal with python `10_000` legal number in slice syntax
{ "login": "sfc-gh-sbekman", "id": 196988264, "node_id": "U_kgDOC73NaA", "avatar_url": "https://avatars.githubusercontent.com/u/196988264?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sfc-gh-sbekman", "html_url": "https://github.com/sfc-gh-sbekman", "followers_url": "https://api.github.com/users/sfc-gh-sbekman/followers", "following_url": "https://api.github.com/users/sfc-gh-sbekman/following{/other_user}", "gists_url": "https://api.github.com/users/sfc-gh-sbekman/gists{/gist_id}", "starred_url": "https://api.github.com/users/sfc-gh-sbekman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sfc-gh-sbekman/subscriptions", "organizations_url": "https://api.github.com/users/sfc-gh-sbekman/orgs", "repos_url": "https://api.github.com/users/sfc-gh-sbekman/repos", "events_url": "https://api.github.com/users/sfc-gh-sbekman/events{/privacy}", "received_events_url": "https://api.github.com/users/sfc-gh-sbekman/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "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
2025-03-26T20:10:54
2025-03-28T16:20:44
2025-03-28T16:20:44
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Feature request ``` In [6]: ds = datasets.load_dataset("HuggingFaceH4/ultrachat_200k", split="train_sft[:1000]") In [7]: ds = datasets.load_dataset("HuggingFaceH4/ultrachat_200k", split="train_sft[:1_000]") [dozens of frames skipped] File /usr/local/lib/python3.10/dist-packages/datasets/arrow_reader.py:444, in _str_to_read_instruction(spec) 442 res = _SUB_SPEC_RE.match(spec) 443 if not res: --> 444 raise ValueError(f"Unrecognized instruction format: {spec}") ValueError: Unrecognized instruction format: train_sft[:1_000] ``` It took me a while to understand what the problem was. But apparently `pyarrow` doesn't allow python numbers that may include `_` as in `1_000`. The `_` aids readability since `10_000_000` vs `10000000` is obviously easier to grasp of what the actual number is. Feature request: ideally `datasets` being a python module will do the right thing and convert python numbers into whatever pyarrow supports - in this case stripping `_`s. Second best it'd err and tell the user that using numbers with `_` in split slices is not acceptible, so that the user won't have to deal with a huge pyarrow assert they know nothing about. Thank you!
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7481/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7481/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/7480
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7480/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7480/comments
https://api.github.com/repos/huggingface/datasets/issues/7480/events
https://github.com/huggingface/datasets/issues/7480
2,950,315,214
I_kwDODunzps6v2jzO
7,480
HF_DATASETS_CACHE ignored?
{ "login": "stephenroller", "id": 31896, "node_id": "MDQ6VXNlcjMxODk2", "avatar_url": "https://avatars.githubusercontent.com/u/31896?v=4", "gravatar_id": "", "url": "https://api.github.com/users/stephenroller", "html_url": "https://github.com/stephenroller", "followers_url": "https://api.github.com/users/stephenroller/followers", "following_url": "https://api.github.com/users/stephenroller/following{/other_user}", "gists_url": "https://api.github.com/users/stephenroller/gists{/gist_id}", "starred_url": "https://api.github.com/users/stephenroller/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stephenroller/subscriptions", "organizations_url": "https://api.github.com/users/stephenroller/orgs", "repos_url": "https://api.github.com/users/stephenroller/repos", "events_url": "https://api.github.com/users/stephenroller/events{/privacy}", "received_events_url": "https://api.github.com/users/stephenroller/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
4
2025-03-26T17:19:34
2025-04-08T13:04:45
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug I'm struggling to get things to respect HF_DATASETS_CACHE. Rationale: I'm on a system that uses NFS for homedir, so downloading to NFS is expensive, slow, and wastes valuable quota compared to local disk. Instead, it seems to rely mostly on HF_HUB_CACHE. Current version: 3.2.1dev. In the process of testing 3.4.0 ### Steps to reproduce the bug [Currently writing using datasets 3.2.1dev. Will follow up with 3.4.0 results] dump.py: ```python from datasets import load_dataset dataset = load_dataset("HuggingFaceFW/fineweb", name="sample-100BT", split="train") ``` Repro steps ```bash # ensure no cache $ mv ~/.cache/huggingface ~/.cache/huggingface.bak $ export HF_DATASETS_CACHE=/tmp/roller/datasets $ rm -rf ${HF_DATASETS_CACHE} $ env | grep HF | grep -v TOKEN HF_DATASETS_CACHE=/tmp/roller/datasets $ python dump.py # (omitted for brevity) # (while downloading) $ du -hcs ~/.cache/huggingface/hub 18G hub 18G total # (after downloading) $ du -hcs ~/.cache/huggingface/hub ``` It's a shame because datasets supports s3 (which I could really use right now) but hub does not. ### Expected behavior * ~/.cache/huggingface/hub stays empty * /tmp/roller/datasets becomes full of stuff ### Environment info [Currently writing using datasets 3.2.1dev. Will follow up with 3.4.0 results]
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7480/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7480/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7479
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7479/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7479/comments
https://api.github.com/repos/huggingface/datasets/issues/7479/events
https://github.com/huggingface/datasets/issues/7479
2,950,235,396
I_kwDODunzps6v2QUE
7,479
Features.from_arrow_schema is destructive
{ "login": "BramVanroy", "id": 2779410, "node_id": "MDQ6VXNlcjI3Nzk0MTA=", "avatar_url": "https://avatars.githubusercontent.com/u/2779410?v=4", "gravatar_id": "", "url": "https://api.github.com/users/BramVanroy", "html_url": "https://github.com/BramVanroy", "followers_url": "https://api.github.com/users/BramVanroy/followers", "following_url": "https://api.github.com/users/BramVanroy/following{/other_user}", "gists_url": "https://api.github.com/users/BramVanroy/gists{/gist_id}", "starred_url": "https://api.github.com/users/BramVanroy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/BramVanroy/subscriptions", "organizations_url": "https://api.github.com/users/BramVanroy/orgs", "repos_url": "https://api.github.com/users/BramVanroy/repos", "events_url": "https://api.github.com/users/BramVanroy/events{/privacy}", "received_events_url": "https://api.github.com/users/BramVanroy/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
0
2025-03-26T16:46:43
2025-03-26T16:46:58
null
CONTRIBUTOR
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug I came across this, perhaps niche, bug where `Features` does not/cannot account for pyarrow's `nullable=False` option in Fields. Interestingly, I found that in regular "flat" fields this does not necessarily lead to conflicts, but when a non-nullable field is in a struct, an incompatibility arises. It's not easy to explain in words, so the minimal example below should help I hope. Note that I suggest a solution in the comments in the code, simply allowing `Dataset.to_parquet` to allow for a `schema` argument which, when provided, will override the default ds.features.arrow_schema. ### Steps to reproduce the bug ```python import os from datasets import Dataset, Features import pyarrow as pa import pyarrow.parquet as pq # HF datasets is destructive when you call Features.from_arrow_schema(schema) on a schema # because it will not account for nullable and non-nullable fields in structs (it will always allow nullable) # Reloading the same dataset with the original schema will raise an error because the schema is not the same anymore non_nullable_schema = pa.schema( [ pa.field("text", pa.string(), nullable=False), pa.field("meta", pa.struct( [ pa.field("date", pa.list_(pa.string()), nullable=False), ], ), ), ] ) print("ORIGINAL SCHEMA") print(non_nullable_schema) print() feats = Features.from_arrow_schema(non_nullable_schema) print("FEATUR-IZED SCHEMA (nullable-restrictions are gone)") print(feats.arrow_schema) print() ds = Dataset.from_dict( { "text": ["a", "b", "c"], "meta": [{"date": ["2021-01-01"]}, {"date": ["2021-01-02"]}, {"date": ["2021-01-03"]}], }, features=feats, ) fname = "tmp.parquet" # This is not possible: TypeError: pyarrow.parquet.core.ParquetWriter() got multiple values for keyword argument 'schema' # Though I believe this would be the easiest fix: allow schema to be passed to to_parquet and overwrite the schema in the dataset # ds.to_parquet(fname, schema=non_nullable_schema) ds.to_parquet(fname) try: _ = pq.read_table(fname, schema=non_nullable_schema) finally: os.unlink(fname) ``` ### Expected behavior - Non-destructive behavior when converting an arrow schema to Features; or - the ability to override the default arrow schema with a custom one ### Environment info - `datasets` version: 3.2.0 - Platform: Linux-5.14.0-427.20.1.el9_4.x86_64-x86_64-with-glibc2.34 - Python version: 3.11.10 - `huggingface_hub` version: 0.27.1 - PyArrow version: 18.1.0 - Pandas version: 2.2.3 - `fsspec` version: 2024.9.0
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7479/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7479/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7478
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7478/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7478/comments
https://api.github.com/repos/huggingface/datasets/issues/7478/events
https://github.com/huggingface/datasets/pull/7478
2,948,993,461
PR_kwDODunzps6QLPe3
7,478
update fsspec 2025.3.0
{ "login": "peteski22", "id": 487783, "node_id": "MDQ6VXNlcjQ4Nzc4Mw==", "avatar_url": "https://avatars.githubusercontent.com/u/487783?v=4", "gravatar_id": "", "url": "https://api.github.com/users/peteski22", "html_url": "https://github.com/peteski22", "followers_url": "https://api.github.com/users/peteski22/followers", "following_url": "https://api.github.com/users/peteski22/following{/other_user}", "gists_url": "https://api.github.com/users/peteski22/gists{/gist_id}", "starred_url": "https://api.github.com/users/peteski22/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/peteski22/subscriptions", "organizations_url": "https://api.github.com/users/peteski22/orgs", "repos_url": "https://api.github.com/users/peteski22/repos", "events_url": "https://api.github.com/users/peteski22/events{/privacy}", "received_events_url": "https://api.github.com/users/peteski22/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
2
2025-03-26T09:53:05
2025-03-28T19:15:54
2025-03-28T15:51:55
CONTRIBUTOR
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7478", "html_url": "https://github.com/huggingface/datasets/pull/7478", "diff_url": "https://github.com/huggingface/datasets/pull/7478.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7478.patch", "merged_at": "2025-03-28T15:51:54" }
It appears there have been two releases of fsspec since this dependency was last updated, it would be great if Datasets could be updated so that it didn't hold back the usage of newer fsspec versions in consuming projects. PR based on https://github.com/huggingface/datasets/pull/7352
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7478/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7478/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7477
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7477/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7477/comments
https://api.github.com/repos/huggingface/datasets/issues/7477/events
https://github.com/huggingface/datasets/issues/7477
2,947,169,460
I_kwDODunzps6vqjy0
7,477
What is the canonical way to compress a Dataset?
{ "login": "eric-czech", "id": 6130352, "node_id": "MDQ6VXNlcjYxMzAzNTI=", "avatar_url": "https://avatars.githubusercontent.com/u/6130352?v=4", "gravatar_id": "", "url": "https://api.github.com/users/eric-czech", "html_url": "https://github.com/eric-czech", "followers_url": "https://api.github.com/users/eric-czech/followers", "following_url": "https://api.github.com/users/eric-czech/following{/other_user}", "gists_url": "https://api.github.com/users/eric-czech/gists{/gist_id}", "starred_url": "https://api.github.com/users/eric-czech/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/eric-czech/subscriptions", "organizations_url": "https://api.github.com/users/eric-czech/orgs", "repos_url": "https://api.github.com/users/eric-czech/repos", "events_url": "https://api.github.com/users/eric-czech/events{/privacy}", "received_events_url": "https://api.github.com/users/eric-czech/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
4
2025-03-25T16:47:51
2025-04-03T09:13:11
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
Given that Arrow is the preferred backend for a Dataset, what is a user supposed to do if they want concurrent reads, concurrent writes AND on-disk compression for a larger dataset? Parquet would be the obvious answer except that there is no native support for writing sharded, parquet datasets concurrently [[1](https://github.com/huggingface/datasets/issues/7047)]. Am I missing something? And if so, why is this not the standard/default way that `Dataset`'s work as they do in Xarray, Ray Data, Composer, etc.?
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7477/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7477/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7476
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7476/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7476/comments
https://api.github.com/repos/huggingface/datasets/issues/7476/events
https://github.com/huggingface/datasets/pull/7476
2,946,997,924
PR_kwDODunzps6QEbmO
7,476
Priotitize json
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-25T15:44:31
2025-03-25T15:47:00
2025-03-25T15:45:00
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7476", "html_url": "https://github.com/huggingface/datasets/pull/7476", "diff_url": "https://github.com/huggingface/datasets/pull/7476.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7476.patch", "merged_at": "2025-03-25T15:45:00" }
`datasets` should load the JSON data in https://huggingface.co/datasets/facebook/natural_reasoning, not the PDF
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7476/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7476/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7475
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7475/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7475/comments
https://api.github.com/repos/huggingface/datasets/issues/7475/events
https://github.com/huggingface/datasets/issues/7475
2,946,640,570
I_kwDODunzps6voiq6
7,475
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard
{ "login": "bruno-hays", "id": 48770768, "node_id": "MDQ6VXNlcjQ4NzcwNzY4", "avatar_url": "https://avatars.githubusercontent.com/u/48770768?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bruno-hays", "html_url": "https://github.com/bruno-hays", "followers_url": "https://api.github.com/users/bruno-hays/followers", "following_url": "https://api.github.com/users/bruno-hays/following{/other_user}", "gists_url": "https://api.github.com/users/bruno-hays/gists{/gist_id}", "starred_url": "https://api.github.com/users/bruno-hays/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bruno-hays/subscriptions", "organizations_url": "https://api.github.com/users/bruno-hays/orgs", "repos_url": "https://api.github.com/users/bruno-hays/repos", "events_url": "https://api.github.com/users/bruno-hays/events{/privacy}", "received_events_url": "https://api.github.com/users/bruno-hays/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
{ "login": "Harry-Yang0518", "id": 129883215, "node_id": "U_kgDOB73cTw", "avatar_url": "https://avatars.githubusercontent.com/u/129883215?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Harry-Yang0518", "html_url": "https://github.com/Harry-Yang0518", "followers_url": "https://api.github.com/users/Harry-Yang0518/followers", "following_url": "https://api.github.com/users/Harry-Yang0518/following{/other_user}", "gists_url": "https://api.github.com/users/Harry-Yang0518/gists{/gist_id}", "starred_url": "https://api.github.com/users/Harry-Yang0518/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Harry-Yang0518/subscriptions", "organizations_url": "https://api.github.com/users/Harry-Yang0518/orgs", "repos_url": "https://api.github.com/users/Harry-Yang0518/repos", "events_url": "https://api.github.com/users/Harry-Yang0518/events{/privacy}", "received_events_url": "https://api.github.com/users/Harry-Yang0518/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "login": "Harry-Yang0518", "id": 129883215, "node_id": "U_kgDOB73cTw", "avatar_url": "https://avatars.githubusercontent.com/u/129883215?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Harry-Yang0518", "html_url": "https://github.com/Harry-Yang0518", "followers_url": "https://api.github.com/users/Harry-Yang0518/followers", "following_url": "https://api.github.com/users/Harry-Yang0518/following{/other_user}", "gists_url": "https://api.github.com/users/Harry-Yang0518/gists{/gist_id}", "starred_url": "https://api.github.com/users/Harry-Yang0518/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Harry-Yang0518/subscriptions", "organizations_url": "https://api.github.com/users/Harry-Yang0518/orgs", "repos_url": "https://api.github.com/users/Harry-Yang0518/repos", "events_url": "https://api.github.com/users/Harry-Yang0518/events{/privacy}", "received_events_url": "https://api.github.com/users/Harry-Yang0518/received_events", "type": "User", "user_view_type": "public", "site_admin": false } ]
null
5
2025-03-25T13:58:07
2025-04-09T08:20:41
null
CONTRIBUTOR
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the example from the doc ```python from datasets import Dataset ds = Dataset.from_dict({"a": range(6)}).to_iterable_dataset(num_shards=1) state_dict = None # Iterate through the dataset and print examples for idx, example in enumerate(ds): print(example) if idx == 2: state_dict = ds.state_dict() print("checkpoint") break print(state_dict) ``` Returns: ``` {'a': 0} {'a': 1} checkpoint {'examples_iterable': {'shard_idx': 0, 'shard_example_idx': 6, 'type': 'ArrowExamplesIterable'}, 'epoch': 0} ``` ### Expected behavior shard_example_idx should be 2 instead of 6 If we run with num_shards=2, then shard_example_idx is 3 instead of 2 and so on. ### Environment info - `datasets` version: 3.4.1 - Platform: macOS-14.6.1-arm64-arm-64bit - Python version: 3.12.9 - `huggingface_hub` version: 0.29.3 - PyArrow version: 19.0.1 - Pandas version: 2.2.3 - `fsspec` version: 2024.12.0
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7475/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7475/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7474
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7474/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7474/comments
https://api.github.com/repos/huggingface/datasets/issues/7474/events
https://github.com/huggingface/datasets/pull/7474
2,945,066,258
PR_kwDODunzps6P91lM
7,474
Remove conditions for Python < 3.9
{ "login": "cyyever", "id": 17618148, "node_id": "MDQ6VXNlcjE3NjE4MTQ4", "avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cyyever", "html_url": "https://github.com/cyyever", "followers_url": "https://api.github.com/users/cyyever/followers", "following_url": "https://api.github.com/users/cyyever/following{/other_user}", "gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}", "starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cyyever/subscriptions", "organizations_url": "https://api.github.com/users/cyyever/orgs", "repos_url": "https://api.github.com/users/cyyever/repos", "events_url": "https://api.github.com/users/cyyever/events{/privacy}", "received_events_url": "https://api.github.com/users/cyyever/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
3
2025-03-25T03:08:04
2025-04-16T00:11:06
2025-04-15T16:07:55
CONTRIBUTOR
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7474", "html_url": "https://github.com/huggingface/datasets/pull/7474", "diff_url": "https://github.com/huggingface/datasets/pull/7474.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7474.patch", "merged_at": "2025-04-15T16:07:54" }
This PR remove conditions for Python < 3.9.
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7474/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7474/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7473
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7473/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7473/comments
https://api.github.com/repos/huggingface/datasets/issues/7473/events
https://github.com/huggingface/datasets/issues/7473
2,939,034,643
I_kwDODunzps6vLhwT
7,473
Webdataset data format problem
{ "login": "edmcman", "id": 1017189, "node_id": "MDQ6VXNlcjEwMTcxODk=", "avatar_url": "https://avatars.githubusercontent.com/u/1017189?v=4", "gravatar_id": "", "url": "https://api.github.com/users/edmcman", "html_url": "https://github.com/edmcman", "followers_url": "https://api.github.com/users/edmcman/followers", "following_url": "https://api.github.com/users/edmcman/following{/other_user}", "gists_url": "https://api.github.com/users/edmcman/gists{/gist_id}", "starred_url": "https://api.github.com/users/edmcman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/edmcman/subscriptions", "organizations_url": "https://api.github.com/users/edmcman/orgs", "repos_url": "https://api.github.com/users/edmcman/repos", "events_url": "https://api.github.com/users/edmcman/events{/privacy}", "received_events_url": "https://api.github.com/users/edmcman/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-21T17:23:52
2025-03-21T19:19:58
2025-03-21T19:19:58
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug Please see https://huggingface.co/datasets/ejschwartz/idioms/discussions/1 Error code: FileFormatMismatchBetweenSplitsError All three splits, train, test, and validation, use webdataset. But only the train split has more than one file. How can I force the other two splits to also be interpreted as being the webdataset format? (I don't think there is currently a way, but happy to be told that I am wrong.) ### Steps to reproduce the bug ``` import datasets datasets.load_dataset("ejschwartz/idioms") ### Expected behavior The dataset loads. Alternatively, there is a YAML syntax for manually specifying the format. ### Environment info - `datasets` version: 3.2.0 - Platform: Linux-6.8.0-52-generic-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.28.1 - PyArrow version: 19.0.0 - Pandas version: 2.2.3 - `fsspec` version: 2024.9.0
{ "login": "edmcman", "id": 1017189, "node_id": "MDQ6VXNlcjEwMTcxODk=", "avatar_url": "https://avatars.githubusercontent.com/u/1017189?v=4", "gravatar_id": "", "url": "https://api.github.com/users/edmcman", "html_url": "https://github.com/edmcman", "followers_url": "https://api.github.com/users/edmcman/followers", "following_url": "https://api.github.com/users/edmcman/following{/other_user}", "gists_url": "https://api.github.com/users/edmcman/gists{/gist_id}", "starred_url": "https://api.github.com/users/edmcman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/edmcman/subscriptions", "organizations_url": "https://api.github.com/users/edmcman/orgs", "repos_url": "https://api.github.com/users/edmcman/repos", "events_url": "https://api.github.com/users/edmcman/events{/privacy}", "received_events_url": "https://api.github.com/users/edmcman/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7473/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7473/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/7472
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7472/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7472/comments
https://api.github.com/repos/huggingface/datasets/issues/7472/events
https://github.com/huggingface/datasets/issues/7472
2,937,607,272
I_kwDODunzps6vGFRo
7,472
Label casting during `map` process is canceled after the `map` process
{ "login": "yoshitomo-matsubara", "id": 11156001, "node_id": "MDQ6VXNlcjExMTU2MDAx", "avatar_url": "https://avatars.githubusercontent.com/u/11156001?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yoshitomo-matsubara", "html_url": "https://github.com/yoshitomo-matsubara", "followers_url": "https://api.github.com/users/yoshitomo-matsubara/followers", "following_url": "https://api.github.com/users/yoshitomo-matsubara/following{/other_user}", "gists_url": "https://api.github.com/users/yoshitomo-matsubara/gists{/gist_id}", "starred_url": "https://api.github.com/users/yoshitomo-matsubara/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yoshitomo-matsubara/subscriptions", "organizations_url": "https://api.github.com/users/yoshitomo-matsubara/orgs", "repos_url": "https://api.github.com/users/yoshitomo-matsubara/repos", "events_url": "https://api.github.com/users/yoshitomo-matsubara/events{/privacy}", "received_events_url": "https://api.github.com/users/yoshitomo-matsubara/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
6
2025-03-21T07:56:22
2025-04-10T05:11:15
2025-04-10T05:11:14
CONTRIBUTOR
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug When preprocessing a multi-label dataset, I introduced a step to convert int labels to float labels as [BCEWithLogitsLoss](https://pytorch.org/docs/stable/generated/torch.nn.BCEWithLogitsLoss.html) expects float labels and forward function of models in transformers package internally use `BCEWithLogitsLoss` However, the casting was canceled after `.map` process and the label values still use int values, which leads to an error ``` File "/home/yoshitomo/anaconda3/envs/torchdistill/lib/python3.10/site-packages/transformers/models/bert/modeling_bert.py", line 1711, in forward loss = loss_fct(logits, labels) File "/home/yoshitomo/anaconda3/envs/torchdistill/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home/yoshitomo/anaconda3/envs/torchdistill/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl return forward_call(*args, **kwargs) File "/home/yoshitomo/anaconda3/envs/torchdistill/lib/python3.10/site-packages/torch/nn/modules/loss.py", line 819, in forward return F.binary_cross_entropy_with_logits( File "/home/yoshitomo/anaconda3/envs/torchdistill/lib/python3.10/site-packages/torch/nn/functional.py", line 3628, in binary_cross_entropy_with_logits return torch.binary_cross_entropy_with_logits( RuntimeError: result type Float can't be cast to the desired output type Long ``` This seems like happening only when the original labels are int values (see examples below) ### Steps to reproduce the bug If the original dataset uses a list of int labels, it will cancel the int->float casting ```python from datasets import Dataset data = { 'text': ['text1', 'text2', 'text3', 'text4'], 'labels': [[0, 1, 2], [3], [3, 4], [3]] } dataset = Dataset.from_dict(data) label_set = set([label for labels in data['labels'] for label in labels]) label2idx = {label: idx for idx, label in enumerate(sorted(label_set))} def multi_labels_to_ids(labels): ids = [0.0] * len(label2idx) for label in labels: ids[label2idx[label]] = 1.0 return ids def preprocess(examples): result = {'sentence': [[0, 3, 4] for _ in range(len(examples['labels']))]} print('"labels" are int', examples['labels']) result['labels'] = [multi_labels_to_ids(l) for l in examples['labels']] print('"labels" were converted to multi-label format with float values', result['labels']) return result preprocessed_dataset = dataset.map(preprocess, batched=True, remove_columns=['labels', 'text']) print(preprocessed_dataset[0]['labels']) # Output: "[1, 1, 1, 0, 0]" # Expected: "[1.0, 1.0, 1.0, 0.0, 0.0]" ``` If the original dataset uses non-int labels, it works as expected. ```python from datasets import Dataset data = { 'text': ['text1', 'text2', 'text3', 'text4'], 'labels': [['label1', 'label2', 'label3'], ['label4'], ['label4', 'label5'], ['label4']] } dataset = Dataset.from_dict(data) label_set = set([label for labels in data['labels'] for label in labels]) label2idx = {label: idx for idx, label in enumerate(sorted(label_set))} def multi_labels_to_ids(labels): ids = [0.0] * len(label2idx) for label in labels: ids[label2idx[label]] = 1.0 return ids def preprocess(examples): result = {'sentence': [[0, 3, 4] for _ in range(len(examples['labels']))]} print('"labels" are int', examples['labels']) result['labels'] = [multi_labels_to_ids(l) for l in examples['labels']] print('"labels" were converted to multi-label format with float values', result['labels']) return result preprocessed_dataset = dataset.map(preprocess, batched=True, remove_columns=['labels', 'text']) print(preprocessed_dataset[0]['labels']) # Output: "[1.0, 1.0, 1.0, 0.0, 0.0]" # Expected: "[1.0, 1.0, 1.0, 0.0, 0.0]" ``` Note that the only difference between these two examples is > 'labels': [[0, 1, 2], [3], [3, 4], [3]] v.s > 'labels': [['label1', 'label2', 'label3'], ['label4'], ['label4', 'label5'], ['label4']] ### Expected behavior Even if the original dataset uses a list of int labels, the int->float casting during `.map` process should not be canceled as shown in the above example ### Environment info OS Ubuntu 22.04 LTS Python 3.10.11 datasets v3.4.1
{ "login": "yoshitomo-matsubara", "id": 11156001, "node_id": "MDQ6VXNlcjExMTU2MDAx", "avatar_url": "https://avatars.githubusercontent.com/u/11156001?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yoshitomo-matsubara", "html_url": "https://github.com/yoshitomo-matsubara", "followers_url": "https://api.github.com/users/yoshitomo-matsubara/followers", "following_url": "https://api.github.com/users/yoshitomo-matsubara/following{/other_user}", "gists_url": "https://api.github.com/users/yoshitomo-matsubara/gists{/gist_id}", "starred_url": "https://api.github.com/users/yoshitomo-matsubara/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yoshitomo-matsubara/subscriptions", "organizations_url": "https://api.github.com/users/yoshitomo-matsubara/orgs", "repos_url": "https://api.github.com/users/yoshitomo-matsubara/repos", "events_url": "https://api.github.com/users/yoshitomo-matsubara/events{/privacy}", "received_events_url": "https://api.github.com/users/yoshitomo-matsubara/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7472/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7472/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/7471
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7471/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7471/comments
https://api.github.com/repos/huggingface/datasets/issues/7471/events
https://github.com/huggingface/datasets/issues/7471
2,937,530,069
I_kwDODunzps6vFybV
7,471
Adding argument to `_get_data_files_patterns`
{ "login": "SangbumChoi", "id": 34004152, "node_id": "MDQ6VXNlcjM0MDA0MTUy", "avatar_url": "https://avatars.githubusercontent.com/u/34004152?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SangbumChoi", "html_url": "https://github.com/SangbumChoi", "followers_url": "https://api.github.com/users/SangbumChoi/followers", "following_url": "https://api.github.com/users/SangbumChoi/following{/other_user}", "gists_url": "https://api.github.com/users/SangbumChoi/gists{/gist_id}", "starred_url": "https://api.github.com/users/SangbumChoi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SangbumChoi/subscriptions", "organizations_url": "https://api.github.com/users/SangbumChoi/orgs", "repos_url": "https://api.github.com/users/SangbumChoi/repos", "events_url": "https://api.github.com/users/SangbumChoi/events{/privacy}", "received_events_url": "https://api.github.com/users/SangbumChoi/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "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
2025-03-21T07:17:53
2025-03-27T12:30:52
2025-03-26T07:26:27
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Feature request How about adding if the user already know about the pattern? https://github.com/huggingface/datasets/blob/a256b85cbc67aa3f0e75d32d6586afc507cf535b/src/datasets/data_files.py#L252 ### Motivation While using this load_dataset people might use 10M of images for the local files. However, due to searching all the appropriate file pattern in fsspec, purely searching this pattern takes more than 10 hours (real use-case). ### Your contribution Yeah I can make this happen if this seems valid. @lhoestq WDYT? such like ``` def _get_data_files_patterns(pattern_resolver: Callable[[str], list[str]], patterns: PATTERNS) -> dict[str, list[str]]: ```
{ "login": "SangbumChoi", "id": 34004152, "node_id": "MDQ6VXNlcjM0MDA0MTUy", "avatar_url": "https://avatars.githubusercontent.com/u/34004152?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SangbumChoi", "html_url": "https://github.com/SangbumChoi", "followers_url": "https://api.github.com/users/SangbumChoi/followers", "following_url": "https://api.github.com/users/SangbumChoi/following{/other_user}", "gists_url": "https://api.github.com/users/SangbumChoi/gists{/gist_id}", "starred_url": "https://api.github.com/users/SangbumChoi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SangbumChoi/subscriptions", "organizations_url": "https://api.github.com/users/SangbumChoi/orgs", "repos_url": "https://api.github.com/users/SangbumChoi/repos", "events_url": "https://api.github.com/users/SangbumChoi/events{/privacy}", "received_events_url": "https://api.github.com/users/SangbumChoi/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7471/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7471/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/7470
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7470/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7470/comments
https://api.github.com/repos/huggingface/datasets/issues/7470/events
https://github.com/huggingface/datasets/issues/7470
2,937,236,323
I_kwDODunzps6vEqtj
7,470
Is it possible to shard a single-sharded IterableDataset?
{ "login": "jonathanasdf", "id": 511073, "node_id": "MDQ6VXNlcjUxMTA3Mw==", "avatar_url": "https://avatars.githubusercontent.com/u/511073?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jonathanasdf", "html_url": "https://github.com/jonathanasdf", "followers_url": "https://api.github.com/users/jonathanasdf/followers", "following_url": "https://api.github.com/users/jonathanasdf/following{/other_user}", "gists_url": "https://api.github.com/users/jonathanasdf/gists{/gist_id}", "starred_url": "https://api.github.com/users/jonathanasdf/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jonathanasdf/subscriptions", "organizations_url": "https://api.github.com/users/jonathanasdf/orgs", "repos_url": "https://api.github.com/users/jonathanasdf/repos", "events_url": "https://api.github.com/users/jonathanasdf/events{/privacy}", "received_events_url": "https://api.github.com/users/jonathanasdf/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
4
2025-03-21T04:33:37
2025-03-26T09:34:46
2025-03-26T06:49:28
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
I thought https://github.com/huggingface/datasets/pull/7252 might be applicable but looking at it maybe not. Say we have a process, eg. a database query, that can return data in slightly different order each time. So, the initial query needs to be run by a single thread (not to mention running multiple times incurs more cost too). But the results are also big enough that we don't want to materialize it entirely and instead stream it with an IterableDataset. But after we have the results we want to split it up across workers to parallelize processing. Is something like this possible to do? Here's a failed attempt. The end result should be that each of the shards has unique data, but unfortunately with this attempt the generator gets run once in each shard and the results end up with duplicates... ``` import random import datasets def gen(): print('RUNNING GENERATOR!') items = list(range(10)) random.shuffle(items) yield from items ds = datasets.IterableDataset.from_generator(gen) print('dataset contents:') for item in ds: print(item) print() print('dataset contents (2):') for item in ds: print(item) print() num_shards = 3 def sharded(shard_id): for i, example in enumerate(ds): if i % num_shards in shard_id: yield example ds1 = datasets.IterableDataset.from_generator( sharded, gen_kwargs={'shard_id': list(range(num_shards))} ) for shard in range(num_shards): print('shard', shard) for item in ds1.shard(num_shards, shard): print(item) ```
{ "login": "jonathanasdf", "id": 511073, "node_id": "MDQ6VXNlcjUxMTA3Mw==", "avatar_url": "https://avatars.githubusercontent.com/u/511073?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jonathanasdf", "html_url": "https://github.com/jonathanasdf", "followers_url": "https://api.github.com/users/jonathanasdf/followers", "following_url": "https://api.github.com/users/jonathanasdf/following{/other_user}", "gists_url": "https://api.github.com/users/jonathanasdf/gists{/gist_id}", "starred_url": "https://api.github.com/users/jonathanasdf/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jonathanasdf/subscriptions", "organizations_url": "https://api.github.com/users/jonathanasdf/orgs", "repos_url": "https://api.github.com/users/jonathanasdf/repos", "events_url": "https://api.github.com/users/jonathanasdf/events{/privacy}", "received_events_url": "https://api.github.com/users/jonathanasdf/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7470/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7470/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/7469
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7469/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7469/comments
https://api.github.com/repos/huggingface/datasets/issues/7469/events
https://github.com/huggingface/datasets/issues/7469
2,936,606,080
I_kwDODunzps6vCQ2A
7,469
Custom split name with the web interface
{ "login": "vince62s", "id": 15141326, "node_id": "MDQ6VXNlcjE1MTQxMzI2", "avatar_url": "https://avatars.githubusercontent.com/u/15141326?v=4", "gravatar_id": "", "url": "https://api.github.com/users/vince62s", "html_url": "https://github.com/vince62s", "followers_url": "https://api.github.com/users/vince62s/followers", "following_url": "https://api.github.com/users/vince62s/following{/other_user}", "gists_url": "https://api.github.com/users/vince62s/gists{/gist_id}", "starred_url": "https://api.github.com/users/vince62s/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vince62s/subscriptions", "organizations_url": "https://api.github.com/users/vince62s/orgs", "repos_url": "https://api.github.com/users/vince62s/repos", "events_url": "https://api.github.com/users/vince62s/events{/privacy}", "received_events_url": "https://api.github.com/users/vince62s/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
0
2025-03-20T20:45:59
2025-03-21T07:20:37
2025-03-21T07:20:37
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug According the doc here: https://huggingface.co/docs/hub/datasets-file-names-and-splits#custom-split-name it should infer the split name from the subdir of data or the beg of the name of the files in data. When doing this manually through web upload it does not work. it uses "train" as a unique split. example: https://huggingface.co/datasets/eole-nlp/estimator_chatml ### Steps to reproduce the bug follow the link above ### Expected behavior there should be two splits "mlqe" and "1720_da" ### Environment info website
{ "login": "vince62s", "id": 15141326, "node_id": "MDQ6VXNlcjE1MTQxMzI2", "avatar_url": "https://avatars.githubusercontent.com/u/15141326?v=4", "gravatar_id": "", "url": "https://api.github.com/users/vince62s", "html_url": "https://github.com/vince62s", "followers_url": "https://api.github.com/users/vince62s/followers", "following_url": "https://api.github.com/users/vince62s/following{/other_user}", "gists_url": "https://api.github.com/users/vince62s/gists{/gist_id}", "starred_url": "https://api.github.com/users/vince62s/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vince62s/subscriptions", "organizations_url": "https://api.github.com/users/vince62s/orgs", "repos_url": "https://api.github.com/users/vince62s/repos", "events_url": "https://api.github.com/users/vince62s/events{/privacy}", "received_events_url": "https://api.github.com/users/vince62s/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7469/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7469/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/7468
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7468/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7468/comments
https://api.github.com/repos/huggingface/datasets/issues/7468/events
https://github.com/huggingface/datasets/issues/7468
2,934,094,103
I_kwDODunzps6u4rkX
7,468
function `load_dataset` can't solve folder path with regex characters like "[]"
{ "login": "Hpeox", "id": 89294013, "node_id": "MDQ6VXNlcjg5Mjk0MDEz", "avatar_url": "https://avatars.githubusercontent.com/u/89294013?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Hpeox", "html_url": "https://github.com/Hpeox", "followers_url": "https://api.github.com/users/Hpeox/followers", "following_url": "https://api.github.com/users/Hpeox/following{/other_user}", "gists_url": "https://api.github.com/users/Hpeox/gists{/gist_id}", "starred_url": "https://api.github.com/users/Hpeox/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Hpeox/subscriptions", "organizations_url": "https://api.github.com/users/Hpeox/orgs", "repos_url": "https://api.github.com/users/Hpeox/repos", "events_url": "https://api.github.com/users/Hpeox/events{/privacy}", "received_events_url": "https://api.github.com/users/Hpeox/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
1
2025-03-20T05:21:59
2025-03-25T10:18:12
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug When using the `load_dataset` function with a folder path containing regex special characters (such as "[]"), the issue occurs due to how the path is handled in the `resolve_pattern` function. This function passes the unprocessed path directly to `AbstractFileSystem.glob`, which supports regular expressions. As a result, the globbing mechanism interprets these characters as regex patterns, leading to a traversal of the entire disk partition instead of confining the search to the intended directory. ### Steps to reproduce the bug just create a folder like `E:\[D_DATA]\koch_test`, then `load_dataset("parquet", data_dir="E:\[D_DATA]\\test", split="train")` it will keep searching the whole disk. I add two `print` in `glob` and `resolve_pattern` to see the path ### Expected behavior it should load the dataset as in normal folders ### Environment info - `datasets` version: 3.3.2 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.10.16 - `huggingface_hub` version: 0.29.1 - PyArrow version: 19.0.1 - Pandas version: 2.2.3 - `fsspec` version: 2024.12.0
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7468/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7468/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7467
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7467/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7467/comments
https://api.github.com/repos/huggingface/datasets/issues/7467/events
https://github.com/huggingface/datasets/issues/7467
2,930,067,107
I_kwDODunzps6upUaj
7,467
load_dataset with streaming hangs on parquet datasets
{ "login": "The0nix", "id": 10550252, "node_id": "MDQ6VXNlcjEwNTUwMjUy", "avatar_url": "https://avatars.githubusercontent.com/u/10550252?v=4", "gravatar_id": "", "url": "https://api.github.com/users/The0nix", "html_url": "https://github.com/The0nix", "followers_url": "https://api.github.com/users/The0nix/followers", "following_url": "https://api.github.com/users/The0nix/following{/other_user}", "gists_url": "https://api.github.com/users/The0nix/gists{/gist_id}", "starred_url": "https://api.github.com/users/The0nix/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/The0nix/subscriptions", "organizations_url": "https://api.github.com/users/The0nix/orgs", "repos_url": "https://api.github.com/users/The0nix/repos", "events_url": "https://api.github.com/users/The0nix/events{/privacy}", "received_events_url": "https://api.github.com/users/The0nix/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
1
2025-03-18T23:33:54
2025-03-25T10:28:04
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug When I try to load a dataset with parquet files (e.g. "bigcode/the-stack") the dataset loads, but python interpreter can't exit and hangs ### Steps to reproduce the bug ```python3 import datasets print('Start') dataset = datasets.load_dataset("bigcode/the-stack", data_dir="data/yaml", streaming=True, split="train") it = iter(dataset) next(it) print('Finish') ``` The program prints finish but doesn't exit and hangs indefinitely. I tried this on two different machines and several datasets. ### Expected behavior The program exits successfully ### Environment info datasets==3.4.1 Python 3.12.9. MacOS and Ubuntu Linux
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7467/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7467/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7466
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7466/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7466/comments
https://api.github.com/repos/huggingface/datasets/issues/7466/events
https://github.com/huggingface/datasets/pull/7466
2,928,661,327
PR_kwDODunzps6PHQyp
7,466
Fix local pdf loading
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-18T14:09:06
2025-03-18T14:11:52
2025-03-18T14:09:21
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7466", "html_url": "https://github.com/huggingface/datasets/pull/7466", "diff_url": "https://github.com/huggingface/datasets/pull/7466.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7466.patch", "merged_at": "2025-03-18T14:09:21" }
fir this error when accessing a local pdf ``` File ~/.pyenv/versions/3.12.2/envs/hf-datasets/lib/python3.12/site-packages/pdfminer/psparser.py:220, in PSBaseParser.seek(self, pos) 218 """Seeks the parser to the given position.""" 219 log.debug("seek: %r", pos) --> 220 self.fp.seek(pos) 221 # reset the status for nextline() 222 self.bufpos = pos ValueError: seek of closed file ```
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7466/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7466/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7464
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7464/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7464/comments
https://api.github.com/repos/huggingface/datasets/issues/7464/events
https://github.com/huggingface/datasets/pull/7464
2,926,478,838
PR_kwDODunzps6PABJa
7,464
Minor fix for metadata files in extension counter
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-17T21:57:11
2025-03-18T15:21:43
2025-03-18T15:21:41
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7464", "html_url": "https://github.com/huggingface/datasets/pull/7464", "diff_url": "https://github.com/huggingface/datasets/pull/7464.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7464.patch", "merged_at": "2025-03-18T15:21:41" }
null
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7464/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7464/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7463
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7463/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7463/comments
https://api.github.com/repos/huggingface/datasets/issues/7463/events
https://github.com/huggingface/datasets/pull/7463
2,925,924,452
PR_kwDODunzps6O-I6K
7,463
Adds EXR format to store depth images in float32
{ "login": "ducha-aiki", "id": 4803565, "node_id": "MDQ6VXNlcjQ4MDM1NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/4803565?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ducha-aiki", "html_url": "https://github.com/ducha-aiki", "followers_url": "https://api.github.com/users/ducha-aiki/followers", "following_url": "https://api.github.com/users/ducha-aiki/following{/other_user}", "gists_url": "https://api.github.com/users/ducha-aiki/gists{/gist_id}", "starred_url": "https://api.github.com/users/ducha-aiki/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ducha-aiki/subscriptions", "organizations_url": "https://api.github.com/users/ducha-aiki/orgs", "repos_url": "https://api.github.com/users/ducha-aiki/repos", "events_url": "https://api.github.com/users/ducha-aiki/events{/privacy}", "received_events_url": "https://api.github.com/users/ducha-aiki/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
3
2025-03-17T17:42:40
2025-04-02T12:33:39
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7463", "html_url": "https://github.com/huggingface/datasets/pull/7463", "diff_url": "https://github.com/huggingface/datasets/pull/7463.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7463.patch", "merged_at": null }
This PR adds the EXR feature to store depth images (or can be normals, etc) in float32. It relies on [openexr_numpy](https://github.com/martinResearch/openexr_numpy/tree/main) to manipulate EXR images.
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7463/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7463/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7462
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7462/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7462/comments
https://api.github.com/repos/huggingface/datasets/issues/7462/events
https://github.com/huggingface/datasets/pull/7462
2,925,612,945
PR_kwDODunzps6O9EA1
7,462
set dev version
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-17T16:00:53
2025-03-17T16:03:31
2025-03-17T16:01:08
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7462", "html_url": "https://github.com/huggingface/datasets/pull/7462", "diff_url": "https://github.com/huggingface/datasets/pull/7462.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7462.patch", "merged_at": "2025-03-17T16:01:08" }
null
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7462/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7462/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7461
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7461/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7461/comments
https://api.github.com/repos/huggingface/datasets/issues/7461/events
https://github.com/huggingface/datasets/issues/7461
2,925,608,123
I_kwDODunzps6uYTy7
7,461
List of images behave differently on IterableDataset and Dataset
{ "login": "FredrikNoren", "id": 1288009, "node_id": "MDQ6VXNlcjEyODgwMDk=", "avatar_url": "https://avatars.githubusercontent.com/u/1288009?v=4", "gravatar_id": "", "url": "https://api.github.com/users/FredrikNoren", "html_url": "https://github.com/FredrikNoren", "followers_url": "https://api.github.com/users/FredrikNoren/followers", "following_url": "https://api.github.com/users/FredrikNoren/following{/other_user}", "gists_url": "https://api.github.com/users/FredrikNoren/gists{/gist_id}", "starred_url": "https://api.github.com/users/FredrikNoren/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/FredrikNoren/subscriptions", "organizations_url": "https://api.github.com/users/FredrikNoren/orgs", "repos_url": "https://api.github.com/users/FredrikNoren/repos", "events_url": "https://api.github.com/users/FredrikNoren/events{/privacy}", "received_events_url": "https://api.github.com/users/FredrikNoren/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
2
2025-03-17T15:59:23
2025-03-18T08:57:17
2025-03-18T08:57:16
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug This code: ```python def train_iterable_gen(): images = np.array(load_image("https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg").resize((128, 128))) yield { "images": np.expand_dims(images, axis=0), "messages": [ { "role": "user", "content": [{"type": "image", "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" }] }, { "role": "assistant", "content": [{"type": "text", "text": "duck" }] } ] } train_ds = Dataset.from_generator(train_iterable_gen, features=Features({ 'images': [datasets.Image(mode=None, decode=True, id=None)], 'messages': [{'content': [{'text': datasets.Value(dtype='string', id=None), 'type': datasets.Value(dtype='string', id=None) }], 'role': datasets.Value(dtype='string', id=None)}] } ) ) ``` works as I'd expect; if I iterate the dataset then the `images` column returns a `List[PIL.Image.Image]`, i.e. `'images': [<PIL.PngImagePlugin.PngImageFile image mode=RGB size=128x128 at 0x77EFB7EF4680>]`. But if I change `Dataset` to `IterableDataset`, the `images` column changes into `'images': [{'path': None, 'bytes': ..]` ### Steps to reproduce the bug The code above + ```python def load_image(url): response = requests.get(url) image = Image.open(io.BytesIO(response.content)) return image ``` I'm feeding it to SFTTrainer ### Expected behavior Dataset and IterableDataset would behave the same ### Environment info ```yaml requires-python = ">=3.12" dependencies = [ "av>=14.1.0", "boto3>=1.36.7", "datasets>=3.3.2", "docker>=7.1.0", "google-cloud-storage>=2.19.0", "grpcio>=1.70.0", "grpcio-tools>=1.70.0", "moviepy>=2.1.2", "open-clip-torch>=2.31.0", "opencv-python>=4.11.0.86; sys_platform == 'darwin'", "opencv-python-headless>=4.11.0.86; sys_platform == 'linux'", "pandas>=2.2.3", "pillow>=10.4.0", "plotly>=6.0.0", "py-spy>=0.4.0", "pydantic>=2.10.6", "pydantic-settings>=2.7.1", "pymysql>=1.1.1", "ray[data,default,serve,train,tune]>=2.43.0", "torch>=2.6.0", "torchmetrics>=1.6.1", "torchvision>=0.21.0", "transformers[torch]@git+https://github.com/huggingface/transformers", "wandb>=0.19.4", # https://github.com/Dao-AILab/flash-attention/issues/833 "flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.3/flash_attn-2.7.3+cu12torch2.6cxx11abiFALSE-cp312-cp312-linux_x86_64.whl; sys_platform == 'linux'", "trl@https://github.com/huggingface/trl.git", "peft>=0.14.0", ] ```
{ "login": "FredrikNoren", "id": 1288009, "node_id": "MDQ6VXNlcjEyODgwMDk=", "avatar_url": "https://avatars.githubusercontent.com/u/1288009?v=4", "gravatar_id": "", "url": "https://api.github.com/users/FredrikNoren", "html_url": "https://github.com/FredrikNoren", "followers_url": "https://api.github.com/users/FredrikNoren/followers", "following_url": "https://api.github.com/users/FredrikNoren/following{/other_user}", "gists_url": "https://api.github.com/users/FredrikNoren/gists{/gist_id}", "starred_url": "https://api.github.com/users/FredrikNoren/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/FredrikNoren/subscriptions", "organizations_url": "https://api.github.com/users/FredrikNoren/orgs", "repos_url": "https://api.github.com/users/FredrikNoren/repos", "events_url": "https://api.github.com/users/FredrikNoren/events{/privacy}", "received_events_url": "https://api.github.com/users/FredrikNoren/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7461/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7461/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/7460
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7460/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7460/comments
https://api.github.com/repos/huggingface/datasets/issues/7460/events
https://github.com/huggingface/datasets/pull/7460
2,925,605,865
PR_kwDODunzps6O9Ccc
7,460
release: 3.4.1
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-17T15:58:31
2025-03-17T16:01:14
2025-03-17T15:59:19
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7460", "html_url": "https://github.com/huggingface/datasets/pull/7460", "diff_url": "https://github.com/huggingface/datasets/pull/7460.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7460.patch", "merged_at": "2025-03-17T15:59:19" }
null
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7460/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7460/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7459
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7459/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7459/comments
https://api.github.com/repos/huggingface/datasets/issues/7459/events
https://github.com/huggingface/datasets/pull/7459
2,925,491,766
PR_kwDODunzps6O8pWp
7,459
Fix data_files filtering
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-17T15:20:21
2025-03-17T15:25:56
2025-03-17T15:25:54
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7459", "html_url": "https://github.com/huggingface/datasets/pull/7459", "diff_url": "https://github.com/huggingface/datasets/pull/7459.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7459.patch", "merged_at": "2025-03-17T15:25:53" }
close https://github.com/huggingface/datasets/issues/7458
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7459/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7459/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7458
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7458/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7458/comments
https://api.github.com/repos/huggingface/datasets/issues/7458/events
https://github.com/huggingface/datasets/issues/7458
2,925,403,528
I_kwDODunzps6uXh2I
7,458
Loading the `laion/filtered-wit` dataset in streaming mode fails on v3.4.0
{ "login": "nikita-savelyevv", "id": 23343961, "node_id": "MDQ6VXNlcjIzMzQzOTYx", "avatar_url": "https://avatars.githubusercontent.com/u/23343961?v=4", "gravatar_id": "", "url": "https://api.github.com/users/nikita-savelyevv", "html_url": "https://github.com/nikita-savelyevv", "followers_url": "https://api.github.com/users/nikita-savelyevv/followers", "following_url": "https://api.github.com/users/nikita-savelyevv/following{/other_user}", "gists_url": "https://api.github.com/users/nikita-savelyevv/gists{/gist_id}", "starred_url": "https://api.github.com/users/nikita-savelyevv/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nikita-savelyevv/subscriptions", "organizations_url": "https://api.github.com/users/nikita-savelyevv/orgs", "repos_url": "https://api.github.com/users/nikita-savelyevv/repos", "events_url": "https://api.github.com/users/nikita-savelyevv/events{/privacy}", "received_events_url": "https://api.github.com/users/nikita-savelyevv/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false } ]
null
1
2025-03-17T14:54:02
2025-03-17T16:02:04
2025-03-17T15:25:55
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug Loading https://huggingface.co/datasets/laion/filtered-wit in streaming mode fails after update to `datasets==3.4.0`. The dataset loads fine on v3.3.2. ### Steps to reproduce the bug Steps to reproduce: ``` pip install datastes==3.4.0 python -c "from datasets import load_dataset; load_dataset('laion/filtered-wit', split='train', streaming=True)" ``` Results in: ``` $ python -c "from datasets import load_dataset; load_dataset('laion/filtered-wit', split='train', streaming=True)" Repo card metadata block was not found. Setting CardData to empty. Resolving data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 560/560 [00:00<00:00, 2280.24it/s] Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/nsavel/venvs/tmp/lib/python3.9/site-packages/datasets/load.py", line 2080, in load_dataset return builder_instance.as_streaming_dataset(split=split) File "/home/nsavel/venvs/tmp/lib/python3.9/site-packages/datasets/builder.py", line 1265, in as_streaming_dataset splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)} File "/home/nsavel/venvs/tmp/lib/python3.9/site-packages/datasets/packaged_modules/parquet/parquet.py", line 49, in _split_generators data_files = dl_manager.download_and_extract(self.config.data_files) File "/home/nsavel/venvs/tmp/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 169, in download_and_extract return self.extract(self.download(url_or_urls)) File "/home/nsavel/venvs/tmp/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 121, in extract urlpaths = map_nested(self._extract, url_or_urls, map_tuple=True) File "/home/nsavel/venvs/tmp/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 496, in map_nested mapped = [ File "/home/nsavel/venvs/tmp/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 497, in <listcomp> map_nested( File "/home/nsavel/venvs/tmp/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 513, in map_nested mapped = [ File "/home/nsavel/venvs/tmp/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 514, in <listcomp> _single_map_nested((function, obj, batched, batch_size, types, None, True, None)) File "/home/nsavel/venvs/tmp/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 375, in _single_map_nested return function(data_struct) File "/home/nsavel/venvs/tmp/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 131, in _extract raise NotImplementedError( NotImplementedError: Extraction protocol for TAR archives like 'hf://datasets/laion/filtered-wit@c38ca7464e9934d9a49f88b3f60f5ad63b245465/data/00000.tar' is not implemented in streaming mode. Please use `dl_manager.iter_archive` instead. Example usage: url = dl_manager.download(url) tar_archive_iterator = dl_manager.iter_archive(url) for filename, file in tar_archive_iterator: ... ``` ### Expected behavior Dataset loads successfully. ### Environment info Ubuntu 20.04.6. Python 3.9. Datasets 3.4.0. pip freeze: ``` aiohappyeyeballs==2.6.1 aiohttp==3.11.14 aiosignal==1.3.2 async-timeout==5.0.1 attrs==25.3.0 certifi==2025.1.31 charset-normalizer==3.4.1 datasets==3.4.0 dill==0.3.8 filelock==3.18.0 frozenlist==1.5.0 fsspec==2024.12.0 huggingface-hub==0.29.3 idna==3.10 multidict==6.1.0 multiprocess==0.70.16 numpy==2.0.2 packaging==24.2 pandas==2.2.3 propcache==0.3.0 pyarrow==19.0.1 python-dateutil==2.9.0.post0 pytz==2025.1 PyYAML==6.0.2 requests==2.32.3 six==1.17.0 tqdm==4.67.1 typing_extensions==4.12.2 tzdata==2025.1 urllib3==2.3.0 xxhash==3.5.0 yarl==1.18.3 ```
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7458/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7458/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/7457
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7457/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7457/comments
https://api.github.com/repos/huggingface/datasets/issues/7457/events
https://github.com/huggingface/datasets/issues/7457
2,924,886,467
I_kwDODunzps6uVjnD
7,457
Document the HF_DATASETS_CACHE env variable
{ "login": "LSerranoPEReN", "id": 92166725, "node_id": "U_kgDOBX5aRQ", "avatar_url": "https://avatars.githubusercontent.com/u/92166725?v=4", "gravatar_id": "", "url": "https://api.github.com/users/LSerranoPEReN", "html_url": "https://github.com/LSerranoPEReN", "followers_url": "https://api.github.com/users/LSerranoPEReN/followers", "following_url": "https://api.github.com/users/LSerranoPEReN/following{/other_user}", "gists_url": "https://api.github.com/users/LSerranoPEReN/gists{/gist_id}", "starred_url": "https://api.github.com/users/LSerranoPEReN/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/LSerranoPEReN/subscriptions", "organizations_url": "https://api.github.com/users/LSerranoPEReN/orgs", "repos_url": "https://api.github.com/users/LSerranoPEReN/repos", "events_url": "https://api.github.com/users/LSerranoPEReN/events{/privacy}", "received_events_url": "https://api.github.com/users/LSerranoPEReN/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "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
{ "login": "Harry-Yang0518", "id": 129883215, "node_id": "U_kgDOB73cTw", "avatar_url": "https://avatars.githubusercontent.com/u/129883215?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Harry-Yang0518", "html_url": "https://github.com/Harry-Yang0518", "followers_url": "https://api.github.com/users/Harry-Yang0518/followers", "following_url": "https://api.github.com/users/Harry-Yang0518/following{/other_user}", "gists_url": "https://api.github.com/users/Harry-Yang0518/gists{/gist_id}", "starred_url": "https://api.github.com/users/Harry-Yang0518/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Harry-Yang0518/subscriptions", "organizations_url": "https://api.github.com/users/Harry-Yang0518/orgs", "repos_url": "https://api.github.com/users/Harry-Yang0518/repos", "events_url": "https://api.github.com/users/Harry-Yang0518/events{/privacy}", "received_events_url": "https://api.github.com/users/Harry-Yang0518/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "login": "Harry-Yang0518", "id": 129883215, "node_id": "U_kgDOB73cTw", "avatar_url": "https://avatars.githubusercontent.com/u/129883215?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Harry-Yang0518", "html_url": "https://github.com/Harry-Yang0518", "followers_url": "https://api.github.com/users/Harry-Yang0518/followers", "following_url": "https://api.github.com/users/Harry-Yang0518/following{/other_user}", "gists_url": "https://api.github.com/users/Harry-Yang0518/gists{/gist_id}", "starred_url": "https://api.github.com/users/Harry-Yang0518/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Harry-Yang0518/subscriptions", "organizations_url": "https://api.github.com/users/Harry-Yang0518/orgs", "repos_url": "https://api.github.com/users/Harry-Yang0518/repos", "events_url": "https://api.github.com/users/Harry-Yang0518/events{/privacy}", "received_events_url": "https://api.github.com/users/Harry-Yang0518/received_events", "type": "User", "user_view_type": "public", "site_admin": false } ]
null
4
2025-03-17T12:24:50
2025-03-20T10:36:46
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Feature request Hello, I have a use case where my team is sharing models and dataset in shared directory to avoid duplication. I noticed that the [cache documentation for datasets](https://huggingface.co/docs/datasets/main/en/cache) only mention the `HF_HOME` environment variable but never the `HF_DATASETS_CACHE`. It should be nice to add `HF_DATASETS_CACHE` to datasets documentation if it's an intended feature. If it's not, I think a depreciation warning would be appreciated. ### Motivation This variable is fully working and similar to what `HF_HUB_CACHE` does for models, so it's nice to know that this exists. This seems to be a quick change to implement. ### Your contribution I could contribute since this is only affecting a small portion of the documentation
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7457/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7457/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7456
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7456/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7456/comments
https://api.github.com/repos/huggingface/datasets/issues/7456/events
https://github.com/huggingface/datasets/issues/7456
2,922,676,278
I_kwDODunzps6uNIA2
7,456
.add_faiss_index and .add_elasticsearch_index returns ImportError at Google Colab
{ "login": "MapleBloom", "id": 109490785, "node_id": "U_kgDOBoayYQ", "avatar_url": "https://avatars.githubusercontent.com/u/109490785?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MapleBloom", "html_url": "https://github.com/MapleBloom", "followers_url": "https://api.github.com/users/MapleBloom/followers", "following_url": "https://api.github.com/users/MapleBloom/following{/other_user}", "gists_url": "https://api.github.com/users/MapleBloom/gists{/gist_id}", "starred_url": "https://api.github.com/users/MapleBloom/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MapleBloom/subscriptions", "organizations_url": "https://api.github.com/users/MapleBloom/orgs", "repos_url": "https://api.github.com/users/MapleBloom/repos", "events_url": "https://api.github.com/users/MapleBloom/events{/privacy}", "received_events_url": "https://api.github.com/users/MapleBloom/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
6
2025-03-16T00:51:49
2025-03-17T15:57:19
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug At Google Colab ```!pip install faiss-cpu``` works ```import faiss``` no error but ```embeddings_dataset.add_faiss_index(column='embeddings')``` returns ``` [/usr/local/lib/python3.11/dist-packages/datasets/search.py](https://localhost:8080/#) in init(self, device, string_factory, metric_type, custom_index) 247 self.faiss_index = custom_index 248 if not _has_faiss: --> 249 raise ImportError( 250 "You must install Faiss to use FaissIndex. To do so you can run conda install -c pytorch faiss-cpu or conda install -c pytorch faiss-gpu. " 251 "A community supported package is also available on pypi: pip install faiss-cpu or pip install faiss-gpu. " ``` because ```_has_faiss = importlib.util.find_spec("faiss") is not None``` at the beginning of ```datasets/search.py``` returns ```False``` when the same code at colab notebook returns ```ModuleSpec(name='faiss', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7b7851449f50>, origin='/usr/local/lib/python3.11/dist-packages/faiss/init.py', submodule_search_locations=['/usr/local/lib/python3.11/dist-packages/faiss'])``` But ``` import datasets datasets.search._has_faiss ``` at ```colab notebook``` also returns ```False``` The same story with ```_has_elasticsearch``` ### Steps to reproduce the bug 1. Follow https://huggingface.co/learn/nlp-course/chapter5/6?fw=pt at Google Colab 2. till ```embeddings_dataset.add_faiss_index(column='embeddings')``` 3. ```embeddings_dataset.add_elasticsearch_index(column='embeddings')``` 4. https://colab.research.google.com/drive/1h2cjuiClblqzbNQgrcoLYOC8zBqTLLcv#scrollTo=3ddzRp72auOF ### Expected behavior I've only started Tutorial and don't know exactly. But something tells me that ```embeddings_dataset.add_faiss_index(column='embeddings')``` should work without ```Import Error``` ### Environment info Google Colab notebook with default config
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7456/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7456/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7455
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7455/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7455/comments
https://api.github.com/repos/huggingface/datasets/issues/7455/events
https://github.com/huggingface/datasets/issues/7455
2,921,933,250
I_kwDODunzps6uKSnC
7,455
Problems with local dataset after upgrade from 3.3.2 to 3.4.0
{ "login": "andjoer", "id": 60151338, "node_id": "MDQ6VXNlcjYwMTUxMzM4", "avatar_url": "https://avatars.githubusercontent.com/u/60151338?v=4", "gravatar_id": "", "url": "https://api.github.com/users/andjoer", "html_url": "https://github.com/andjoer", "followers_url": "https://api.github.com/users/andjoer/followers", "following_url": "https://api.github.com/users/andjoer/following{/other_user}", "gists_url": "https://api.github.com/users/andjoer/gists{/gist_id}", "starred_url": "https://api.github.com/users/andjoer/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/andjoer/subscriptions", "organizations_url": "https://api.github.com/users/andjoer/orgs", "repos_url": "https://api.github.com/users/andjoer/repos", "events_url": "https://api.github.com/users/andjoer/events{/privacy}", "received_events_url": "https://api.github.com/users/andjoer/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
1
2025-03-15T09:22:50
2025-03-17T16:20:43
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug I was not able to open a local saved dataset anymore that was created using an older datasets version after the upgrade yesterday from datasets 3.3.2 to 3.4.0 The traceback is ``` Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/datasets/packaged_modules/arrow/arrow.py", line 67, in _generate_tables batches = pa.ipc.open_stream(f) File "/usr/local/lib/python3.10/dist-packages/pyarrow/ipc.py", line 190, in open_stream return RecordBatchStreamReader(source, options=options, File "/usr/local/lib/python3.10/dist-packages/pyarrow/ipc.py", line 52, in __init__ self._open(source, options=options, memory_pool=memory_pool) File "pyarrow/ipc.pxi", line 1006, in pyarrow.lib._RecordBatchStreamReader._open File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Expected to read 538970747 metadata bytes, but only read 2126 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/datasets/builder.py", line 1855, in _prepare_split_single for _, table in generator: File "/usr/local/lib/python3.10/dist-packages/datasets/packaged_modules/arrow/arrow.py", line 69, in _generate_tables reader = pa.ipc.open_file(f) File "/usr/local/lib/python3.10/dist-packages/pyarrow/ipc.py", line 234, in open_file return RecordBatchFileReader( File "/usr/local/lib/python3.10/dist-packages/pyarrow/ipc.py", line 110, in __init__ self._open(source, footer_offset=footer_offset, File "pyarrow/ipc.pxi", line 1090, in pyarrow.lib._RecordBatchFileReader._open File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Not an Arrow file ``` ### Steps to reproduce the bug Load a dataset from a local folder with ``` dataset = load_dataset( args.train_data_dir, cache_dir=args.cache_dir, ) ``` as it is done for example in the training script for SD3 controlnet. This is the minimal script to test it: ``` from datasets import load_dataset def main(): dataset = load_dataset( "local_dataset", ) print(dataset) print("Sample data:", dataset["train"][0]) if __name__ == "__main__": main() ```` ### Expected behavior Work in 3.4.0 like in 3.3.2 ### Environment info - `datasets` version: 3.4.0 - Platform: Linux-5.15.0-75-generic-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.29.3 - PyArrow version: 19.0.1 - Pandas version: 2.2.3 - `fsspec` version: 2024.12.0
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7455/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7455/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7454
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7454/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7454/comments
https://api.github.com/repos/huggingface/datasets/issues/7454/events
https://github.com/huggingface/datasets/pull/7454
2,920,760,793
PR_kwDODunzps6Os6bx
7,454
set dev version
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-14T16:48:19
2025-03-14T16:50:31
2025-03-14T16:48:28
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7454", "html_url": "https://github.com/huggingface/datasets/pull/7454", "diff_url": "https://github.com/huggingface/datasets/pull/7454.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7454.patch", "merged_at": "2025-03-14T16:48:28" }
null
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7454/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7454/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7453
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7453/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7453/comments
https://api.github.com/repos/huggingface/datasets/issues/7453/events
https://github.com/huggingface/datasets/pull/7453
2,920,719,503
PR_kwDODunzps6OsxR1
7,453
release: 3.4.0
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-14T16:30:45
2025-03-14T16:38:10
2025-03-14T16:38:08
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7453", "html_url": "https://github.com/huggingface/datasets/pull/7453", "diff_url": "https://github.com/huggingface/datasets/pull/7453.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7453.patch", "merged_at": "2025-03-14T16:38:08" }
null
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7453/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7453/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7452
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7452/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7452/comments
https://api.github.com/repos/huggingface/datasets/issues/7452/events
https://github.com/huggingface/datasets/pull/7452
2,920,354,783
PR_kwDODunzps6Orhw4
7,452
minor docs changes
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-14T14:14:04
2025-03-14T14:16:38
2025-03-14T14:14:20
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7452", "html_url": "https://github.com/huggingface/datasets/pull/7452", "diff_url": "https://github.com/huggingface/datasets/pull/7452.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7452.patch", "merged_at": "2025-03-14T14:14:20" }
before the release
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7452/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7452/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7451
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7451/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7451/comments
https://api.github.com/repos/huggingface/datasets/issues/7451/events
https://github.com/huggingface/datasets/pull/7451
2,919,835,663
PR_kwDODunzps6OpwDz
7,451
Fix resuming after `ds.set_epoch(new_epoch)`
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-14T10:31:25
2025-03-14T10:50:11
2025-03-14T10:50:09
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7451", "html_url": "https://github.com/huggingface/datasets/pull/7451", "diff_url": "https://github.com/huggingface/datasets/pull/7451.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7451.patch", "merged_at": "2025-03-14T10:50:09" }
close https://github.com/huggingface/datasets/issues/7447
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7451/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7451/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7450
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7450/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7450/comments
https://api.github.com/repos/huggingface/datasets/issues/7450/events
https://github.com/huggingface/datasets/pull/7450
2,916,681,414
PR_kwDODunzps6OfMKs
7,450
Add IterableDataset.decode with multithreading
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-13T10:41:35
2025-03-14T10:35:37
2025-03-14T10:35:35
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7450", "html_url": "https://github.com/huggingface/datasets/pull/7450", "diff_url": "https://github.com/huggingface/datasets/pull/7450.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7450.patch", "merged_at": "2025-03-14T10:35:35" }
Useful for dataset streaming for multimodal datasets, and especially for lerobot. It speeds up streaming up to 20 times. When decoding is enabled (default), media types are decoded: * audio -> dict of "array" and "sampling_rate" and "path" * image -> PIL.Image * video -> torchvision.io.VideoReader You can enable multithreading using `num_threads`. This is especially useful to speed up remote data streaming. However it can be slower than `num_threads=0` for local data on fast disks. PS: Disabling decoding is useful if you want to iterate on the paths or bytes of the media files without actually decoding their content. Example: Speed up streaming with multithreading: ```py >>> import os >>> from datasets import load_dataset >>> from tqdm import tqdm >>> ds = load_dataset("sshh12/planet-textures", split="train", streaming=True) >>> num_threads = min(32, (os.cpu_count() or 1) + 4) >>> ds = ds.decode(num_threads=num_threads) >>> for _ in tqdm(ds): # 20 times faster ! ... ... ``` why not multiprocessing ? decoding is done with the GIL released in soundfile/PIL/torchvision so multiprocessing would just use more memory TODO - [x] test - [x] add to docs
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7450/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7450/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7449
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7449/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7449/comments
https://api.github.com/repos/huggingface/datasets/issues/7449/events
https://github.com/huggingface/datasets/issues/7449
2,916,235,092
I_kwDODunzps6t0jdU
7,449
Cannot load data with different schemas from different parquet files
{ "login": "li-plus", "id": 39846316, "node_id": "MDQ6VXNlcjM5ODQ2MzE2", "avatar_url": "https://avatars.githubusercontent.com/u/39846316?v=4", "gravatar_id": "", "url": "https://api.github.com/users/li-plus", "html_url": "https://github.com/li-plus", "followers_url": "https://api.github.com/users/li-plus/followers", "following_url": "https://api.github.com/users/li-plus/following{/other_user}", "gists_url": "https://api.github.com/users/li-plus/gists{/gist_id}", "starred_url": "https://api.github.com/users/li-plus/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/li-plus/subscriptions", "organizations_url": "https://api.github.com/users/li-plus/orgs", "repos_url": "https://api.github.com/users/li-plus/repos", "events_url": "https://api.github.com/users/li-plus/events{/privacy}", "received_events_url": "https://api.github.com/users/li-plus/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
2
2025-03-13T08:14:49
2025-03-17T07:27:48
2025-03-17T07:27:46
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug Cannot load samples with optional fields from different files. The schema cannot be correctly derived. ### Steps to reproduce the bug When I place two samples with an optional field `some_extra_field` within a single parquet file, it can be loaded via `load_dataset`. ```python import pandas as pd from datasets import load_dataset data = [ {'conversations': {'role': 'user', 'content': 'hello'}}, {'conversations': {'role': 'user', 'content': 'hi', 'some_extra_field': 'some_value'}} ] df = pd.DataFrame(data) df.to_parquet('data.parquet') dataset = load_dataset('parquet', data_files='data.parquet', split='train') print(dataset.features) ``` The schema can be derived. `some_extra_field` is set to None for the first row where it is absent. ``` {'conversations': {'content': Value(dtype='string', id=None), 'role': Value(dtype='string', id=None), 'some_extra_field': Value(dtype='string', id=None)}} ``` However, when I separate the samples into different files, it cannot be loaded. ```python import pandas as pd from datasets import load_dataset data1 = [{'conversations': {'role': 'user', 'content': 'hello'}}] pd.DataFrame(data1).to_parquet('data1.parquet') data2 = [{'conversations': {'role': 'user', 'content': 'hi', 'some_extra_field': 'some_value'}}] pd.DataFrame(data2).to_parquet('data2.parquet') dataset = load_dataset('parquet', data_files=['data1.parquet', 'data2.parquet'], split='train') print(dataset.features) ``` Traceback: ``` Traceback (most recent call last): File "/home/tiger/.local/lib/python3.9/site-packages/datasets/builder.py", line 1854, in _prepare_split_single for _, table in generator: File "/home/tiger/.local/lib/python3.9/site-packages/datasets/packaged_modules/parquet/parquet.py", line 106, in _generate_tables yield f"{file_idx}_{batch_idx}", self._cast_table(pa_table) File "/home/tiger/.local/lib/python3.9/site-packages/datasets/packaged_modules/parquet/parquet.py", line 73, in _cast_table pa_table = table_cast(pa_table, self.info.features.arrow_schema) File "/home/tiger/.local/lib/python3.9/site-packages/datasets/table.py", line 2292, in table_cast return cast_table_to_schema(table, schema) File "/home/tiger/.local/lib/python3.9/site-packages/datasets/table.py", line 2245, in cast_table_to_schema arrays = [ File "/home/tiger/.local/lib/python3.9/site-packages/datasets/table.py", line 2246, in <listcomp> cast_array_to_feature( File "/home/tiger/.local/lib/python3.9/site-packages/datasets/table.py", line 1795, in wrapper return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "/home/tiger/.local/lib/python3.9/site-packages/datasets/table.py", line 1795, in <listcomp> return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "/home/tiger/.local/lib/python3.9/site-packages/datasets/table.py", line 2108, in cast_array_to_feature raise TypeError(f"Couldn't cast array of type\n{_short_str(array.type)}\nto\n{_short_str(feature)}") TypeError: Couldn't cast array of type struct<content: string, role: string, some_extra_field: string> to {'content': Value(dtype='string', id=None), 'role': Value(dtype='string', id=None)} ``` ### Expected behavior Correctly load data with optional fields from different parquet files. ### Environment info - `datasets` version: 3.3.2 - Platform: Linux-5.10.135.bsk.4-amd64-x86_64-with-glibc2.31 - Python version: 3.9.2 - `huggingface_hub` version: 0.28.1 - PyArrow version: 17.0.0 - Pandas version: 2.2.2 - `fsspec` version: 2024.3.1
{ "login": "li-plus", "id": 39846316, "node_id": "MDQ6VXNlcjM5ODQ2MzE2", "avatar_url": "https://avatars.githubusercontent.com/u/39846316?v=4", "gravatar_id": "", "url": "https://api.github.com/users/li-plus", "html_url": "https://github.com/li-plus", "followers_url": "https://api.github.com/users/li-plus/followers", "following_url": "https://api.github.com/users/li-plus/following{/other_user}", "gists_url": "https://api.github.com/users/li-plus/gists{/gist_id}", "starred_url": "https://api.github.com/users/li-plus/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/li-plus/subscriptions", "organizations_url": "https://api.github.com/users/li-plus/orgs", "repos_url": "https://api.github.com/users/li-plus/repos", "events_url": "https://api.github.com/users/li-plus/events{/privacy}", "received_events_url": "https://api.github.com/users/li-plus/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7449/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7449/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/7448
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7448/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7448/comments
https://api.github.com/repos/huggingface/datasets/issues/7448/events
https://github.com/huggingface/datasets/issues/7448
2,916,025,762
I_kwDODunzps6tzwWi
7,448
`datasets.disable_caching` doesn't work
{ "login": "UCC-team", "id": 35629974, "node_id": "MDQ6VXNlcjM1NjI5OTc0", "avatar_url": "https://avatars.githubusercontent.com/u/35629974?v=4", "gravatar_id": "", "url": "https://api.github.com/users/UCC-team", "html_url": "https://github.com/UCC-team", "followers_url": "https://api.github.com/users/UCC-team/followers", "following_url": "https://api.github.com/users/UCC-team/following{/other_user}", "gists_url": "https://api.github.com/users/UCC-team/gists{/gist_id}", "starred_url": "https://api.github.com/users/UCC-team/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/UCC-team/subscriptions", "organizations_url": "https://api.github.com/users/UCC-team/orgs", "repos_url": "https://api.github.com/users/UCC-team/repos", "events_url": "https://api.github.com/users/UCC-team/events{/privacy}", "received_events_url": "https://api.github.com/users/UCC-team/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
2
2025-03-13T06:40:12
2025-03-22T04:37:07
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
When I use `Dataset.from_generator(my_gen)` to load my dataset, it simply skips my changes to the generator function. I tried `datasets.disable_caching`, but it doesn't work!
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7448/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7448/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7447
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7447/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7447/comments
https://api.github.com/repos/huggingface/datasets/issues/7447/events
https://github.com/huggingface/datasets/issues/7447
2,915,233,248
I_kwDODunzps6twu3g
7,447
Epochs shortened after resuming mid-epoch with Iterable dataset+StatefulDataloader(persistent_workers=True)
{ "login": "dhruvdcoder", "id": 4356534, "node_id": "MDQ6VXNlcjQzNTY1MzQ=", "avatar_url": "https://avatars.githubusercontent.com/u/4356534?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dhruvdcoder", "html_url": "https://github.com/dhruvdcoder", "followers_url": "https://api.github.com/users/dhruvdcoder/followers", "following_url": "https://api.github.com/users/dhruvdcoder/following{/other_user}", "gists_url": "https://api.github.com/users/dhruvdcoder/gists{/gist_id}", "starred_url": "https://api.github.com/users/dhruvdcoder/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dhruvdcoder/subscriptions", "organizations_url": "https://api.github.com/users/dhruvdcoder/orgs", "repos_url": "https://api.github.com/users/dhruvdcoder/repos", "events_url": "https://api.github.com/users/dhruvdcoder/events{/privacy}", "received_events_url": "https://api.github.com/users/dhruvdcoder/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
5
2025-03-12T21:41:05
2025-03-14T17:26:59
2025-03-14T10:50:10
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug When `torchdata.stateful_dataloader.StatefulDataloader(persistent_workers=True)` the epochs after resuming only iterate through the examples that were left in the epoch when the training was interrupted. For example, in the script below training is interrupted on step 124 (epoch 1) when 3 batches are left. Then after resuming, the rest of epochs (2 and 3) only iterate through these 3 batches. ### Steps to reproduce the bug Run the following script with and with PERSISTENT_WORKERS=true. ```python # !/usr/bin/env python3 # torch==2.5.1 # datasets==3.3.2 # torchdata>=0.9.0 import datasets import pprint from torchdata.stateful_dataloader import StatefulDataLoader import os PERSISTENT_WORKERS = ( os.environ.get("PERSISTENT_WORKERS", "False").lower() == "true" ) # PERSISTENT_WORKERS = True # Incorrect resume # ds = datasets.load_from_disk("dataset").to_iterable_dataset(num_shards=4) def generator(): for i in range(128): yield {"x": i} ds = datasets.Dataset.from_generator( generator, features=datasets.Features({"x": datasets.Value("int32")}) ).to_iterable_dataset(num_shards=4) dl = StatefulDataLoader( ds, batch_size=2, num_workers=2, persistent_workers=PERSISTENT_WORKERS ) global_step = 0 epoch = 0 ds_state_dict = None state_dict = None resumed = False while True: if epoch >= 3: break if state_dict is not None: dl.load_state_dict(state_dict) state_dict = None ds_state_dict = None resumed = True print("resumed") for i, batch in enumerate(dl): print(f"epoch: {epoch}, global_step: {global_step}, batch: {batch}") global_step += 1 # consume datapoint # simulate error if global_step == 124 and not resumed: ds_state_dict = ds.state_dict() state_dict = dl.state_dict() print("checkpoint") print("ds_state_dict") pprint.pprint(ds_state_dict) print("dl_state_dict") pprint.pprint(state_dict) break if state_dict is None: ds.set_epoch(epoch) epoch += 1 ``` The script checkpoints when there are three batches left in the second epoch. After resuming, only the last three batches are repeated in the rest of the epochs. If it helps, following are the two state_dicts for the dataloader save at the same step with the two settings. The left one is for `PERSISTENT_WORKERS=False` ![Image](https://github.com/user-attachments/assets/c97d6502-d7bd-4ef4-ae2d-66fe1a9732b1) ### Expected behavior All the elements in the dataset should be iterated through in the epochs following the one where we resumed. The expected behavior can be seen by setting `PERSISTENT_WORKERS=False`. ### Environment info torch==2.5.1 datasets==3.3.2 torchdata>=0.9.0
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7447/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7447/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/7446
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7446/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7446/comments
https://api.github.com/repos/huggingface/datasets/issues/7446/events
https://github.com/huggingface/datasets/issues/7446
2,913,050,552
I_kwDODunzps6toZ-4
7,446
pyarrow.lib.ArrowTypeError: Expected dict key of type str or bytes, got 'int'
{ "login": "rangehow", "id": 88258534, "node_id": "MDQ6VXNlcjg4MjU4NTM0", "avatar_url": "https://avatars.githubusercontent.com/u/88258534?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rangehow", "html_url": "https://github.com/rangehow", "followers_url": "https://api.github.com/users/rangehow/followers", "following_url": "https://api.github.com/users/rangehow/following{/other_user}", "gists_url": "https://api.github.com/users/rangehow/gists{/gist_id}", "starred_url": "https://api.github.com/users/rangehow/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rangehow/subscriptions", "organizations_url": "https://api.github.com/users/rangehow/orgs", "repos_url": "https://api.github.com/users/rangehow/repos", "events_url": "https://api.github.com/users/rangehow/events{/privacy}", "received_events_url": "https://api.github.com/users/rangehow/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
0
2025-03-12T07:48:37
2025-03-12T07:48:37
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug A dict with its keys are all str but get following error ```python test_data=[{'input_ids':[1,2,3],'labels':[[Counter({2:1})]]}] dataset = datasets.Dataset.from_list(test_data) ``` ```bash pyarrow.lib.ArrowTypeError: Expected dict key of type str or bytes, got 'int' ``` ### Steps to reproduce the bug . ### Expected behavior . ### Environment info datasets 3.3.2
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7446/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7446/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7445
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7445/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7445/comments
https://api.github.com/repos/huggingface/datasets/issues/7445/events
https://github.com/huggingface/datasets/pull/7445
2,911,507,923
PR_kwDODunzps6ONygU
7,445
Fix small bugs with async map
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-11T18:30:57
2025-03-13T10:38:03
2025-03-13T10:37:58
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7445", "html_url": "https://github.com/huggingface/datasets/pull/7445", "diff_url": "https://github.com/huggingface/datasets/pull/7445.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7445.patch", "merged_at": "2025-03-13T10:37:58" }
helpful for the next PR to enable parallel image/audio/video decoding and make multimodal datasets go brr (e.g. for lerobot) - fix with_indices - fix resuming with save_state_dict() / load_state_dict() - omg that wasn't easy - remove unnecessary decoding in map() to enable parallelism in FormattedExampleIterable later small bonus: keeping features in batch()
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7445/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7445/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7444
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7444/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7444/comments
https://api.github.com/repos/huggingface/datasets/issues/7444/events
https://github.com/huggingface/datasets/issues/7444
2,911,202,445
I_kwDODunzps6thWyN
7,444
Excessive warnings when resuming an IterableDataset+buffered shuffle+DDP.
{ "login": "dhruvdcoder", "id": 4356534, "node_id": "MDQ6VXNlcjQzNTY1MzQ=", "avatar_url": "https://avatars.githubusercontent.com/u/4356534?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dhruvdcoder", "html_url": "https://github.com/dhruvdcoder", "followers_url": "https://api.github.com/users/dhruvdcoder/followers", "following_url": "https://api.github.com/users/dhruvdcoder/following{/other_user}", "gists_url": "https://api.github.com/users/dhruvdcoder/gists{/gist_id}", "starred_url": "https://api.github.com/users/dhruvdcoder/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dhruvdcoder/subscriptions", "organizations_url": "https://api.github.com/users/dhruvdcoder/orgs", "repos_url": "https://api.github.com/users/dhruvdcoder/repos", "events_url": "https://api.github.com/users/dhruvdcoder/events{/privacy}", "received_events_url": "https://api.github.com/users/dhruvdcoder/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
0
2025-03-11T16:34:39
2025-03-11T16:36:01
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug I have a large dataset that I shared into 1024 shards and save on the disk during pre-processing. During training, I load the dataset using load_from_disk() and convert it into an iterable dataset, shuffle it and split the shards to different DDP nodes using the recommended method. However, when the training is resumed mid-epoch, I get thousands of identical warning messages: ``` Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. ``` ### Steps to reproduce the bug 1. Run a multi-node training job using the following python script and interrupt the training after a few seconds to save a mid-epoch checkpoint. ```python #!/usr/bin/env python import os import time from typing import Dict, List import torch import lightning as pl from torch.utils.data import DataLoader from datasets import Dataset from datasets.distributed import split_dataset_by_node import datasets from transformers import AutoTokenizer from more_itertools import flatten, chunked from torchdata.stateful_dataloader import StatefulDataLoader from lightning.pytorch.callbacks.on_exception_checkpoint import ( OnExceptionCheckpoint, ) datasets.logging.set_verbosity_debug() def dummy_generator(): # Generate 60 examples: integers from $0$ to $59$ # 64 sequences of different lengths dataset = [ list(range(3, 10)), list(range(10, 15)), list(range(15, 21)), list(range(21, 27)), list(range(27, 31)), list(range(31, 36)), list(range(36, 45)), list(range(45, 50)), ] for i in range(8): for j, ids in enumerate(dataset): yield {"token_ids": [idx + i * 50 for idx in ids]} def group_texts( examples: Dict[str, List[List[int]]], block_size: int, eos_token_id: int, bos_token_id: int, pad_token_id: int, ) -> Dict[str, List[List[int]]]: real_block_size = block_size - 2 # make space for bos and eos # colapse the sequences into a single list of tokens and then create blocks of real_block_size input_ids = [] attention_mask = [] for block in chunked(flatten(examples["token_ids"]), real_block_size): s = [bos_token_id] + list(block) + [eos_token_id] ls = len(s) attn = [True] * ls s += [pad_token_id] * (block_size - ls) attn += [False] * (block_size - ls) input_ids.append(s) attention_mask.append(attn) return {"input_ids": input_ids, "attention_mask": attention_mask} def collate_fn(batch): return { "input_ids": torch.tensor( [item["input_ids"] for item in batch], dtype=torch.long ), "attention_mask": torch.tensor( [item["attention_mask"] for item in batch], dtype=torch.long ), } class DummyModule(pl.LightningModule): def __init__(self): super().__init__() # A dummy linear layer (not used for actual computation) self.layer = torch.nn.Linear(1, 1) self.ds = None self.prepare_data_per_node = False def on_train_start(self): # This hook is called once training begins on each process. print(f"[Rank {self.global_rank}] Training started.", flush=True) self.data_file = open(f"data_{self.global_rank}.txt", "w") def on_train_end(self): self.data_file.close() def training_step(self, batch, batch_idx): # Print batch information to verify data loading. time.sleep(5) # print("batch", batch, flush=True) print( f"\n[Rank {self.global_rank}] Training step, epoch {self.trainer.current_epoch}, batch {batch_idx}: {batch['input_ids']}", flush=True, ) self.data_file.write( f"[Rank {self.global_rank}] Training step, epoch {self.trainer.current_epoch}, batch {batch_idx}: {batch['input_ids']}\n" ) # Compute a dummy loss (here, simply a constant tensor) loss = torch.tensor(0.0, requires_grad=True) return loss def on_train_epoch_start(self): epoch = self.trainer.current_epoch print( f"[Rank {self.global_rank}] Training epoch {epoch} started.", flush=True, ) self.data_file.write( f"[Rank {self.global_rank}] Training epoch {epoch} started.\n" ) def configure_optimizers(self): # Return a dummy optimizer. return torch.optim.SGD(self.parameters(), lr=0.001) class DM(pl.LightningDataModule): def __init__(self): super().__init__() self.ds = None self.prepare_data_per_node = False def set_epoch(self, epoch: int): self.ds.set_epoch(epoch) def prepare_data(self): # download the dataset dataset = Dataset.from_generator(dummy_generator) # save the dataset dataset.save_to_disk("dataset", num_shards=4) def setup(self, stage: str): # load the dataset ds = datasets.load_from_disk("dataset").to_iterable_dataset( num_shards=4 ) ds = ds.map( group_texts, batched=True, batch_size=5, fn_kwargs={ "block_size": 5, "eos_token_id": 1, "bos_token_id": 0, "pad_token_id": 2, }, remove_columns=["token_ids"], ).shuffle(seed=42, buffer_size=8) ds = split_dataset_by_node( ds, rank=self.trainer.global_rank, world_size=self.trainer.world_size, ) self.ds = ds def train_dataloader(self): print( f"[Rank {self.trainer.global_rank}] Preparing train_dataloader...", flush=True, ) rank = self.trainer.global_rank print( f"[Rank {rank}] Global rank: {self.trainer.global_rank}", flush=True, ) world_size = self.trainer.world_size print(f"[Rank {rank}] World size: {world_size}", flush=True) return StatefulDataLoader( self.ds, batch_size=2, num_workers=2, collate_fn=collate_fn, drop_last=True, persistent_workers=True, ) if __name__ == "__main__": print("Starting Lightning training", flush=True) # Optionally, print some SLURM environment info for debugging. print(f"SLURM_NNODES: {os.environ.get('SLURM_NNODES', '1')}", flush=True) # Determine the number of nodes from SLURM (defaulting to 1 if not set) num_nodes = int(os.environ.get("SLURM_NNODES", "1")) model = DummyModule() dm = DM() on_exception = OnExceptionCheckpoint( dirpath="checkpoints", filename="on_exception", ) # Configure the Trainer to use distributed data parallel (DDP). trainer = pl.Trainer( accelerator="gpu" if torch.cuda.is_available() else "cpu", devices=1, strategy=( "ddp" if num_nodes > 1 else "auto" ), # Use DDP strategy for multi-node training. num_nodes=num_nodes, max_epochs=2, logger=False, enable_checkpointing=True, num_sanity_val_steps=0, enable_progress_bar=False, callbacks=[on_exception], ) # resume (uncomment to resume) # trainer.fit(model, datamodule=dm, ckpt_path="checkpoints/on_exception.ckpt") # train trainer.fit(model, datamodule=dm) ``` ```bash #!/bin/bash #SBATCH --job-name=pl_ddp_test #SBATCH --nodes=2 # Adjust number of nodes as needed #SBATCH --ntasks-per-node=1 # One GPU (process) per node #SBATCH --cpus-per-task=3 # At least as many dataloader workers as required #SBATCH --gres=gpu:1 # Request one GPU per node #SBATCH --time=00:10:00 # Job runtime (adjust as needed) #SBATCH --partition=gpu-preempt # Partition or queue name #SBATCH -o script.out # Disable Python output buffering. export PYTHONUNBUFFERED=1 echo "SLURM job starting on $(date)" echo "Running on nodes: $SLURM_NODELIST" echo "Current directory: $(pwd)" ls -l # Launch the script using srun so that each process starts the Lightning module. srun script.py ``` 2. Uncomment the "resume" line (second to last) and comment the original `trainer.fit` call (last line). It will produce the following log. ``` [Rank 0] Preparing train_dataloader... [Rank 0] Global rank: 0 [Rank 0] World size: 2 [Rank 1] Preparing train_dataloader... [Rank 1] Global rank: 1 [Rank 1] World size: 2 Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. Assigning 2 shards (or data sources) of the dataset to each node. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. node#0 dataloader worker#1, ': Starting to iterate over 1/2 shards. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. node#0 dataloader worker#0, ': Starting to iterate over 1/2 shards. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. Set __getitem__(key) output type to arrow for no columns (when key is int or slice) and don't output other (un-formatted) columns. Set __getitem__(key) output type to arrow for no columns (when key is int or slice) and don't output other (un-formatted) columns. node#0 dataloader worker#1, ': Finished iterating over 1/1 shards. node#0 dataloader worker#0, ': Finished iterating over 1/1 shards. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. [Rank 0] Training started. [Rank 0] Training epoch 0 started. [Rank 0] Training epoch 1 started. Assigning 2 shards (or data sources) of the dataset to each node. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. node#0 dataloader worker#1, ': Starting to iterate over 1/2 shards. node#0 dataloader worker#0, ': Starting to iterate over 1/2 shards. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. node#1 dataloader worker#1, ': Starting to iterate over 1/2 shards. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. node#1 dataloader worker#0, ': Starting to iterate over 1/2 shards. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. Set __getitem__(key) output type to arrow for no columns (when key is int or slice) and don't output other (un-formatted) columns. Set __getitem__(key) output type to arrow for no columns (when key is int or slice) and don't output other (un-formatted) columns. node#0 dataloader worker#1, ': Finished iterating over 1/1 shards. node#0 dataloader worker#0, ': Finished iterating over 1/1 shards. `Trainer.fit` stopped: `max_epochs=2` reached. Set __getitem__(key) output type to arrow for no columns (when key is int or slice) and don't output other (un-formatted) columns. Set __getitem__(key) output type to arrow for no columns (when key is int or slice) and don't output other (un-formatted) columns. node#1 dataloader worker#1, ': Finished iterating over 1/1 shards. node#1 dataloader worker#0, ': Finished iterating over 1/1 shards. [Rank 1] Training started. [Rank 1] Training epoch 0 started. [Rank 1] Training epoch 1 started. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. node#1 dataloader worker#1, ': Starting to iterate over 1/2 shards. node#1 dataloader worker#0, ': Starting to iterate over 1/2 shards. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. Loading a state dict of a shuffle buffer of a dataset without the buffer content.The shuffle buffer will be refilled before starting to yield new examples. Set __getitem__(key) output type to arrow for no columns (when key is int or slice) and don't output other (un-formatted) columns. Set __getitem__(key) output type to arrow for no columns (when key is int or slice) and don't output other (un-formatted) columns. node#1 dataloader worker#0, ': Finished iterating over 1/1 shards. node#1 dataloader worker#1, ': Finished iterating over 1/1 shards. ``` I'm also attaching the relevant state_dict to make sure that the state is being checkpointed as expected. ``` {'_iterator_finished': True, '_snapshot': {'_last_yielded_worker_id': 1, '_main_snapshot': {'_IterableDataset_len_called': None, '_base_seed': 3992758080362545099, '_index_sampler_state': {'samples_yielded': 64}, '_num_workers': 2, '_sampler_iter_state': None, '_sampler_iter_yielded': 32, '_shared_seed': None}, '_snapshot_step': 32, '_worker_snapshots': {'worker_0': {'dataset_state': {'ex_iterable': {'shard_example_idx': 0, 'shard_idx': 1}, 'num_examples_since_previous_state': 0, 'previous_state': {'shard_example_idx': 0, 'shard_idx': 1}, 'previous_state_example_idx': 33}, 'fetcher_state': {'dataset_iter_state': None, 'fetcher_ended': False}, 'worker_id': 0}, 'worker_1': {'dataset_state': {'ex_iterable': {'shard_example_idx': 0, 'shard_idx': 1}, 'num_examples_since_previous_state': 0, 'previous_state': {'shard_example_idx': 0, 'shard_idx': 1}, 'previous_state_example_idx': 33}, 'fetcher_state': {'dataset_iter_state': None, 'fetcher_ended': False}, 'worker_id': 1}}}, '_steps_since_snapshot': 0} ``` ### Expected behavior Since I'm following all the recommended steps, I don't expect to see any warning when resuming. Am I doing something wrong? Also, can someone explain why I'm seeing 20 identical messages in the log in this reproduction setting? I'm trying to understand why I see thousands of these messages with the actual dataset. One more surprising thing I noticed in the logs is the change in a number of shards per worker. In the following messages, the denominator changes from 2 to 1. ``` node#1 dataloader worker#1, ': Starting to iterate over 1/2 shards. ... node#1 dataloader worker#1, ': Finished iterating over 1/1 shards. ``` ### Environment info python: 3.11.10 datasets: 3.3.2 lightning: 2.3.1
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7444/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7444/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7443
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7443/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7443/comments
https://api.github.com/repos/huggingface/datasets/issues/7443/events
https://github.com/huggingface/datasets/issues/7443
2,908,585,656
I_kwDODunzps6tXX64
7,443
index error when num_shards > len(dataset)
{ "login": "eminorhan", "id": 17934496, "node_id": "MDQ6VXNlcjE3OTM0NDk2", "avatar_url": "https://avatars.githubusercontent.com/u/17934496?v=4", "gravatar_id": "", "url": "https://api.github.com/users/eminorhan", "html_url": "https://github.com/eminorhan", "followers_url": "https://api.github.com/users/eminorhan/followers", "following_url": "https://api.github.com/users/eminorhan/following{/other_user}", "gists_url": "https://api.github.com/users/eminorhan/gists{/gist_id}", "starred_url": "https://api.github.com/users/eminorhan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/eminorhan/subscriptions", "organizations_url": "https://api.github.com/users/eminorhan/orgs", "repos_url": "https://api.github.com/users/eminorhan/repos", "events_url": "https://api.github.com/users/eminorhan/events{/privacy}", "received_events_url": "https://api.github.com/users/eminorhan/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
1
2025-03-10T22:40:59
2025-03-10T23:43:08
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
In `ds.push_to_hub()` and `ds.save_to_disk()`, `num_shards` must be smaller than or equal to the number of rows in the dataset, but currently this is not checked anywhere inside these functions. Attempting to invoke these functions with `num_shards > len(dataset)` should raise an informative `ValueError`. I frequently work with datasets with a small number of rows where each row is pretty large, so I often encounter this issue, where the function runs until the shard index in `ds.shard(num_shards, indx)` goes out of bounds. Ideally, a `ValueError` should be raised before reaching this point (i.e. as soon as `ds.push_to_hub()` or `ds.save_to_disk()` is invoked with `num_shards > len(dataset)`). It seems that adding something like: ```python if len(self) < num_shards: raise ValueError(f"num_shards ({num_shards}) must be smaller than or equal to the number of rows in the dataset ({len(self)}). Please either reduce num_shards or increase max_shard_size to make sure num_shards <= len(dataset).") ``` to the beginning of the definition of the `ds.shard()` function [here](https://github.com/huggingface/datasets/blob/f693f4e93aabafa878470c80fd42ddb10ec550d6/src/datasets/arrow_dataset.py#L4728) would deal with this issue for both `ds.push_to_hub()` and `ds.save_to_disk()`, but I'm not exactly sure if this is the best place to raise the `ValueError` (it seems that a more correct way to do it would be to write separate checks for `ds.push_to_hub()` and `ds.save_to_disk()`). I'd be happy to submit a PR if you think something along these lines would be acceptable.
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7443/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7443/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7442
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7442/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7442/comments
https://api.github.com/repos/huggingface/datasets/issues/7442/events
https://github.com/huggingface/datasets/issues/7442
2,905,543,017
I_kwDODunzps6tLxFp
7,442
Flexible Loader
{ "login": "dipta007", "id": 13894030, "node_id": "MDQ6VXNlcjEzODk0MDMw", "avatar_url": "https://avatars.githubusercontent.com/u/13894030?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dipta007", "html_url": "https://github.com/dipta007", "followers_url": "https://api.github.com/users/dipta007/followers", "following_url": "https://api.github.com/users/dipta007/following{/other_user}", "gists_url": "https://api.github.com/users/dipta007/gists{/gist_id}", "starred_url": "https://api.github.com/users/dipta007/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dipta007/subscriptions", "organizations_url": "https://api.github.com/users/dipta007/orgs", "repos_url": "https://api.github.com/users/dipta007/repos", "events_url": "https://api.github.com/users/dipta007/events{/privacy}", "received_events_url": "https://api.github.com/users/dipta007/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "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
2025-03-09T16:55:03
2025-03-27T23:58:17
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Feature request Can we have a utility function that will use `load_from_disk` when given the local path and `load_dataset` if given an HF dataset? It can be something as simple as this one: ``` def load_hf_dataset(path_or_name): if os.path.exists(path_or_name): return load_from_disk(path_or_name) else: return load_dataset(path_or_name) ``` ### Motivation This can be done inside the user codebase, too, but in my experience, it becomes repetitive code. ### Your contribution I can open a pull request.
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7442/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7442/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7441
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7441/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7441/comments
https://api.github.com/repos/huggingface/datasets/issues/7441/events
https://github.com/huggingface/datasets/issues/7441
2,904,702,329
I_kwDODunzps6tIj15
7,441
`drop_last_batch` does not drop the last batch using IterableDataset + interleave_datasets + multi_worker
{ "login": "memray", "id": 4197249, "node_id": "MDQ6VXNlcjQxOTcyNDk=", "avatar_url": "https://avatars.githubusercontent.com/u/4197249?v=4", "gravatar_id": "", "url": "https://api.github.com/users/memray", "html_url": "https://github.com/memray", "followers_url": "https://api.github.com/users/memray/followers", "following_url": "https://api.github.com/users/memray/following{/other_user}", "gists_url": "https://api.github.com/users/memray/gists{/gist_id}", "starred_url": "https://api.github.com/users/memray/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/memray/subscriptions", "organizations_url": "https://api.github.com/users/memray/orgs", "repos_url": "https://api.github.com/users/memray/repos", "events_url": "https://api.github.com/users/memray/events{/privacy}", "received_events_url": "https://api.github.com/users/memray/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
2
2025-03-08T10:28:44
2025-03-09T21:27:33
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug See the script below `drop_last_batch=True` is defined using map() for each dataset. The last batch for each dataset is expected to be dropped, id 21-25. The code behaves as expected when num_workers=0 or 1. When using num_workers>1, 'a-11', 'b-11', 'a-12', 'b-12' are gone and instead 21 and 22 are sampled. ### Steps to reproduce the bug ``` from datasets import Dataset from datasets import interleave_datasets from torch.utils.data import DataLoader def convert_to_str(batch, dataset_name): batch['a'] = [f"{dataset_name}-{e}" for e in batch['a']] return batch def gen1(): for ii in range(1, 25): yield {"a": ii} def gen2(): for ii in range(1, 25): yield {"a": ii} # https://github.com/huggingface/datasets/issues/6565 if __name__ == '__main__': dataset1 = Dataset.from_generator(gen1).to_iterable_dataset(num_shards=2) dataset2 = Dataset.from_generator(gen2).to_iterable_dataset(num_shards=2) dataset1 = dataset1.map(lambda x: convert_to_str(x, dataset_name="a"), batched=True, batch_size=10, drop_last_batch=True) dataset2 = dataset2.map(lambda x: convert_to_str(x, dataset_name="b"), batched=True, batch_size=10, drop_last_batch=True) interleaved = interleave_datasets([dataset1, dataset2], stopping_strategy="all_exhausted") print(f"num_workers=0") loader = DataLoader(interleaved, batch_size=5, num_workers=0) i = 0 for b in loader: print(i, b['a']) i += 1 print('=-' * 20) print(f"num_workers=1") loader = DataLoader(interleaved, batch_size=5, num_workers=1) i = 0 for b in loader: print(i, b['a']) i += 1 print('=-' * 20) print(f"num_workers=2") loader = DataLoader(interleaved, batch_size=5, num_workers=2) i = 0 for b in loader: print(i, b['a']) i += 1 print('=-' * 20) print(f"num_workers=3") loader = DataLoader(interleaved, batch_size=5, num_workers=3) i = 0 for b in loader: print(i, b['a']) i += 1 ``` output is: ``` num_workers=0 0 ['a-1', 'b-1', 'a-2', 'b-2', 'a-3'] 1 ['b-3', 'a-4', 'b-4', 'a-5', 'b-5'] 2 ['a-6', 'b-6', 'a-7', 'b-7', 'a-8'] 3 ['b-8', 'a-9', 'b-9', 'a-10', 'b-10'] 4 ['a-11', 'b-11', 'a-12', 'b-12', 'a-13'] 5 ['b-13', 'a-14', 'b-14', 'a-15', 'b-15'] 6 ['a-16', 'b-16', 'a-17', 'b-17', 'a-18'] 7 ['b-18', 'a-19', 'b-19', 'a-20', 'b-20'] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- num_workers=1 0 ['a-1', 'b-1', 'a-2', 'b-2', 'a-3'] 1 ['b-3', 'a-4', 'b-4', 'a-5', 'b-5'] 2 ['a-6', 'b-6', 'a-7', 'b-7', 'a-8'] 3 ['b-8', 'a-9', 'b-9', 'a-10', 'b-10'] 4 ['a-11', 'b-11', 'a-12', 'b-12', 'a-13'] 5 ['b-13', 'a-14', 'b-14', 'a-15', 'b-15'] 6 ['a-16', 'b-16', 'a-17', 'b-17', 'a-18'] 7 ['b-18', 'a-19', 'b-19', 'a-20', 'b-20'] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- num_workers=2 0 ['a-1', 'b-1', 'a-2', 'b-2', 'a-3'] 1 ['a-13', 'b-13', 'a-14', 'b-14', 'a-15'] 2 ['b-3', 'a-4', 'b-4', 'a-5', 'b-5'] 3 ['b-15', 'a-16', 'b-16', 'a-17', 'b-17'] 4 ['a-6', 'b-6', 'a-7', 'b-7', 'a-8'] 5 ['a-18', 'b-18', 'a-19', 'b-19', 'a-20'] 6 ['b-8', 'a-9', 'b-9', 'a-10', 'b-10'] 7 ['b-20', 'a-21', 'b-21', 'a-22', 'b-22'] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- num_workers=3 Too many dataloader workers: 3 (max is dataset.num_shards=2). Stopping 1 dataloader workers. 0 ['a-1', 'b-1', 'a-2', 'b-2', 'a-3'] 1 ['a-13', 'b-13', 'a-14', 'b-14', 'a-15'] 2 ['b-3', 'a-4', 'b-4', 'a-5', 'b-5'] 3 ['b-15', 'a-16', 'b-16', 'a-17', 'b-17'] 4 ['a-6', 'b-6', 'a-7', 'b-7', 'a-8'] 5 ['a-18', 'b-18', 'a-19', 'b-19', 'a-20'] 6 ['b-8', 'a-9', 'b-9', 'a-10', 'b-10'] 7 ['b-20', 'a-21', 'b-21', 'a-22', 'b-22'] ``` ### Expected behavior `'a-21', 'b-21', 'a-22', 'b-22'` should be dropped ### Environment info - `datasets` version: 3.3.2 - Platform: Linux-5.15.0-1056-aws-x86_64-with-glibc2.31 - Python version: 3.10.16 - `huggingface_hub` version: 0.28.0 - PyArrow version: 19.0.0 - Pandas version: 2.2.3 - `fsspec` version: 2024.6.1
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7441/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7441/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7440
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7440/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7440/comments
https://api.github.com/repos/huggingface/datasets/issues/7440/events
https://github.com/huggingface/datasets/issues/7440
2,903,740,662
I_kwDODunzps6tE5D2
7,440
IterableDataset raises FileNotFoundError instead of retrying
{ "login": "bauwenst", "id": 145220868, "node_id": "U_kgDOCKflBA", "avatar_url": "https://avatars.githubusercontent.com/u/145220868?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bauwenst", "html_url": "https://github.com/bauwenst", "followers_url": "https://api.github.com/users/bauwenst/followers", "following_url": "https://api.github.com/users/bauwenst/following{/other_user}", "gists_url": "https://api.github.com/users/bauwenst/gists{/gist_id}", "starred_url": "https://api.github.com/users/bauwenst/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bauwenst/subscriptions", "organizations_url": "https://api.github.com/users/bauwenst/orgs", "repos_url": "https://api.github.com/users/bauwenst/repos", "events_url": "https://api.github.com/users/bauwenst/events{/privacy}", "received_events_url": "https://api.github.com/users/bauwenst/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
5
2025-03-07T19:14:18
2025-03-22T21:48:02
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug In https://github.com/huggingface/datasets/issues/6843 it was noted that the streaming feature of `datasets` is highly susceptible to outages and doesn't back off for long (or even *at all*). I was training a model while streaming SlimPajama and training crashed with a `FileNotFoundError`. I can only assume that this was due to a momentary outage considering the file in question, `train/chunk9/example_train_3889.jsonl.zst`, [exists like all other files in SlimPajama](https://huggingface.co/datasets/cerebras/SlimPajama-627B/blob/main/train/chunk9/example_train_3889.jsonl.zst). ```python ... File "/miniconda3/envs/draft/lib/python3.11/site-packages/datasets/iterable_dataset.py", line 2226, in __iter__ for key, example in ex_iterable: File "/miniconda3/envs/draft/lib/python3.11/site-packages/datasets/iterable_dataset.py", line 1499, in __iter__ for x in self.ex_iterable: File "/miniconda3/envs/draft/lib/python3.11/site-packages/datasets/iterable_dataset.py", line 1067, in __iter__ yield from self._iter() File "/miniconda3/envs/draft/lib/python3.11/site-packages/datasets/iterable_dataset.py", line 1231, in _iter for key, transformed_example in iter_outputs(): File "/miniconda3/envs/draft/lib/python3.11/site-packages/datasets/iterable_dataset.py", line 1207, in iter_outputs for i, key_example in inputs_iterator: File "/miniconda3/envs/draft/lib/python3.11/site-packages/datasets/iterable_dataset.py", line 1111, in iter_inputs for key, example in iterator: File "/miniconda3/envs/draft/lib/python3.11/site-packages/datasets/iterable_dataset.py", line 371, in __iter__ for key, pa_table in self.generate_tables_fn(**gen_kwags): File "/miniconda3/envs/draft/lib/python3.11/site-packages/datasets/packaged_modules/json/json.py", line 99, in _generate_tables for file_idx, file in enumerate(itertools.chain.from_iterable(files)): File "/miniconda3/envs/draft/lib/python3.11/site-packages/datasets/utils/track.py", line 50, in __iter__ for x in self.generator(*self.args): File "/miniconda3/envs/draft/lib/python3.11/site-packages/datasets/utils/file_utils.py", line 1378, in _iter_from_urlpaths raise FileNotFoundError(urlpath) FileNotFoundError: zstd://example_train_3889.jsonl::hf://datasets/cerebras/SlimPajama-627B@2d0accdd58c5d5511943ca1f5ff0e3eb5e293543/train/chunk9/example_train_3889.jsonl.zst ``` That final `raise` is at the bottom of the following snippet: https://github.com/huggingface/datasets/blob/f693f4e93aabafa878470c80fd42ddb10ec550d6/src/datasets/utils/file_utils.py#L1354-L1379 So clearly, something choked up in `xisfile`. ### Steps to reproduce the bug This happens when streaming a dataset and iterating over it. In my case, that iteration is done in Trainer's `inner_training_loop`, but this is not relevant to the iterator. ```python File "/miniconda3/envs/draft/lib/python3.11/site-packages/accelerate/data_loader.py", line 835, in __iter__ next_batch, next_batch_info = self._fetch_batches(main_iterator) ``` ### Expected behavior This bug and the linked issue have one thing in common: *when streaming fails to retrieve an example, the entire program gives up and crashes*. As users, we cannot even protect ourselves from this: when we are iterating over a dataset, we can't make `datasets` skip over a bad example or wait a little longer to retry the iteration, because when a Python generator/iterator raises an error, it loses all its context. In other words: if you have something that looks like `for b in a: for c in b: for d in c:`, errors in the innermost loop can only be caught by a `try ... except` in `c.__iter__()`. There should be such exception handling in `datasets` and it should have a **configurable exponential back-off**: first wait and retry after 1 minute, then 2 minutes, then 4 minutes, then 8 minutes, ... and after a given amount of retries, **skip the bad example**, and **only after** skipping a given amount of examples, give up and crash. This was requested in https://github.com/huggingface/datasets/issues/6843 too, since currently there is only linear backoff *and* it is clearly not applied to `xisfile`. ### Environment info - `datasets` version: 3.3.2 *(the latest version)* - Platform: Linux-4.18.0-513.24.1.el8_9.x86_64-x86_64-with-glibc2.28 - Python version: 3.11.7 - `huggingface_hub` version: 0.26.5 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2024.10.0
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7440/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7440/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7439
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7439/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7439/comments
https://api.github.com/repos/huggingface/datasets/issues/7439/events
https://github.com/huggingface/datasets/pull/7439
2,900,143,289
PR_kwDODunzps6NoCdD
7,439
Fix multi gpu process example
{ "login": "SwayStar123", "id": 46050679, "node_id": "MDQ6VXNlcjQ2MDUwNjc5", "avatar_url": "https://avatars.githubusercontent.com/u/46050679?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SwayStar123", "html_url": "https://github.com/SwayStar123", "followers_url": "https://api.github.com/users/SwayStar123/followers", "following_url": "https://api.github.com/users/SwayStar123/following{/other_user}", "gists_url": "https://api.github.com/users/SwayStar123/gists{/gist_id}", "starred_url": "https://api.github.com/users/SwayStar123/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SwayStar123/subscriptions", "organizations_url": "https://api.github.com/users/SwayStar123/orgs", "repos_url": "https://api.github.com/users/SwayStar123/repos", "events_url": "https://api.github.com/users/SwayStar123/events{/privacy}", "received_events_url": "https://api.github.com/users/SwayStar123/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-03-06T11:29:19
2025-03-06T17:07:28
2025-03-06T17:06:38
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7439", "html_url": "https://github.com/huggingface/datasets/pull/7439", "diff_url": "https://github.com/huggingface/datasets/pull/7439.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7439.patch", "merged_at": null }
to is not an inplace function. But i am not sure about this code anyway, i think this is modifying the global variable `model` everytime the function is called? Which is on every batch? So it is juggling the same model on every gpu right? Isnt that very inefficient?
{ "login": "SwayStar123", "id": 46050679, "node_id": "MDQ6VXNlcjQ2MDUwNjc5", "avatar_url": "https://avatars.githubusercontent.com/u/46050679?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SwayStar123", "html_url": "https://github.com/SwayStar123", "followers_url": "https://api.github.com/users/SwayStar123/followers", "following_url": "https://api.github.com/users/SwayStar123/following{/other_user}", "gists_url": "https://api.github.com/users/SwayStar123/gists{/gist_id}", "starred_url": "https://api.github.com/users/SwayStar123/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SwayStar123/subscriptions", "organizations_url": "https://api.github.com/users/SwayStar123/orgs", "repos_url": "https://api.github.com/users/SwayStar123/repos", "events_url": "https://api.github.com/users/SwayStar123/events{/privacy}", "received_events_url": "https://api.github.com/users/SwayStar123/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7439/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7439/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7438
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7438/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7438/comments
https://api.github.com/repos/huggingface/datasets/issues/7438/events
https://github.com/huggingface/datasets/pull/7438
2,899,209,484
PR_kwDODunzps6Nk37h
7,438
Allow dataset row indexing with np.int types (#7423)
{ "login": "DavidRConnell", "id": 35470740, "node_id": "MDQ6VXNlcjM1NDcwNzQw", "avatar_url": "https://avatars.githubusercontent.com/u/35470740?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DavidRConnell", "html_url": "https://github.com/DavidRConnell", "followers_url": "https://api.github.com/users/DavidRConnell/followers", "following_url": "https://api.github.com/users/DavidRConnell/following{/other_user}", "gists_url": "https://api.github.com/users/DavidRConnell/gists{/gist_id}", "starred_url": "https://api.github.com/users/DavidRConnell/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DavidRConnell/subscriptions", "organizations_url": "https://api.github.com/users/DavidRConnell/orgs", "repos_url": "https://api.github.com/users/DavidRConnell/repos", "events_url": "https://api.github.com/users/DavidRConnell/events{/privacy}", "received_events_url": "https://api.github.com/users/DavidRConnell/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
0
2025-03-06T03:10:43
2025-03-06T03:10:43
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7438", "html_url": "https://github.com/huggingface/datasets/pull/7438", "diff_url": "https://github.com/huggingface/datasets/pull/7438.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7438.patch", "merged_at": null }
@lhoestq Proposed fix for #7423. Added a couple simple tests as requested. I had some test failures related to Java and pyspark even when installing with dev but these don't seem to be related to the changes here and fail for me even on clean main. The typeerror raised when using the wrong type is: "Wrong key type: '{key}' of type '{type(key)}'. Expected one of int, slice, range, str or Iterable." I think that is fine. But I could modify the int part to something more generic (although I'm not sure what) if wanted.
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7438/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7438/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7437
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7437/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7437/comments
https://api.github.com/repos/huggingface/datasets/issues/7437/events
https://github.com/huggingface/datasets/pull/7437
2,899,104,679
PR_kwDODunzps6Nkhla
7,437
Use pyupgrade --py39-plus for remaining files
{ "login": "cyyever", "id": 17618148, "node_id": "MDQ6VXNlcjE3NjE4MTQ4", "avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cyyever", "html_url": "https://github.com/cyyever", "followers_url": "https://api.github.com/users/cyyever/followers", "following_url": "https://api.github.com/users/cyyever/following{/other_user}", "gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}", "starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cyyever/subscriptions", "organizations_url": "https://api.github.com/users/cyyever/orgs", "repos_url": "https://api.github.com/users/cyyever/repos", "events_url": "https://api.github.com/users/cyyever/events{/privacy}", "received_events_url": "https://api.github.com/users/cyyever/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
0
2025-03-06T02:12:25
2025-04-15T14:47:54
null
CONTRIBUTOR
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7437", "html_url": "https://github.com/huggingface/datasets/pull/7437", "diff_url": "https://github.com/huggingface/datasets/pull/7437.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7437.patch", "merged_at": null }
This work follows #7428. And "requires-python" is set in pyproject.toml
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7437/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7437/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7436
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7436/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7436/comments
https://api.github.com/repos/huggingface/datasets/issues/7436/events
https://github.com/huggingface/datasets/pull/7436
2,898,385,725
PR_kwDODunzps6NiArv
7,436
chore: fix typos
{ "login": "afuetterer", "id": 35225576, "node_id": "MDQ6VXNlcjM1MjI1NTc2", "avatar_url": "https://avatars.githubusercontent.com/u/35225576?v=4", "gravatar_id": "", "url": "https://api.github.com/users/afuetterer", "html_url": "https://github.com/afuetterer", "followers_url": "https://api.github.com/users/afuetterer/followers", "following_url": "https://api.github.com/users/afuetterer/following{/other_user}", "gists_url": "https://api.github.com/users/afuetterer/gists{/gist_id}", "starred_url": "https://api.github.com/users/afuetterer/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/afuetterer/subscriptions", "organizations_url": "https://api.github.com/users/afuetterer/orgs", "repos_url": "https://api.github.com/users/afuetterer/repos", "events_url": "https://api.github.com/users/afuetterer/events{/privacy}", "received_events_url": "https://api.github.com/users/afuetterer/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
0
2025-03-05T20:17:54
2025-03-05T20:17:54
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7436", "html_url": "https://github.com/huggingface/datasets/pull/7436", "diff_url": "https://github.com/huggingface/datasets/pull/7436.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7436.patch", "merged_at": null }
null
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7436/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7436/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7435
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7435/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7435/comments
https://api.github.com/repos/huggingface/datasets/issues/7435/events
https://github.com/huggingface/datasets/pull/7435
2,895,536,956
PR_kwDODunzps6NYUnr
7,435
Refactor `string_to_dict` to return `None` if there is no match instead of raising `ValueError`
{ "login": "ringohoffman", "id": 27844407, "node_id": "MDQ6VXNlcjI3ODQ0NDA3", "avatar_url": "https://avatars.githubusercontent.com/u/27844407?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ringohoffman", "html_url": "https://github.com/ringohoffman", "followers_url": "https://api.github.com/users/ringohoffman/followers", "following_url": "https://api.github.com/users/ringohoffman/following{/other_user}", "gists_url": "https://api.github.com/users/ringohoffman/gists{/gist_id}", "starred_url": "https://api.github.com/users/ringohoffman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ringohoffman/subscriptions", "organizations_url": "https://api.github.com/users/ringohoffman/orgs", "repos_url": "https://api.github.com/users/ringohoffman/repos", "events_url": "https://api.github.com/users/ringohoffman/events{/privacy}", "received_events_url": "https://api.github.com/users/ringohoffman/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
8
2025-03-04T22:01:20
2025-03-12T16:52:00
2025-03-12T16:52:00
CONTRIBUTOR
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7435", "html_url": "https://github.com/huggingface/datasets/pull/7435", "diff_url": "https://github.com/huggingface/datasets/pull/7435.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7435.patch", "merged_at": "2025-03-12T16:51:59" }
Making this change, as encouraged here: * https://github.com/huggingface/datasets/pull/7434#discussion_r1979933054 instead of having the pattern of using `try`-`except` to handle when there is no match, we can instead check if the return value is `None`; we can also assert that the return value should not be `None` if we know that should be true
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7435/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7435/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7434
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7434/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7434/comments
https://api.github.com/repos/huggingface/datasets/issues/7434/events
https://github.com/huggingface/datasets/pull/7434
2,893,075,908
PR_kwDODunzps6NP-vn
7,434
Refactor `Dataset.map` to reuse cache files mapped with different `num_proc`
{ "login": "ringohoffman", "id": 27844407, "node_id": "MDQ6VXNlcjI3ODQ0NDA3", "avatar_url": "https://avatars.githubusercontent.com/u/27844407?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ringohoffman", "html_url": "https://github.com/ringohoffman", "followers_url": "https://api.github.com/users/ringohoffman/followers", "following_url": "https://api.github.com/users/ringohoffman/following{/other_user}", "gists_url": "https://api.github.com/users/ringohoffman/gists{/gist_id}", "starred_url": "https://api.github.com/users/ringohoffman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ringohoffman/subscriptions", "organizations_url": "https://api.github.com/users/ringohoffman/orgs", "repos_url": "https://api.github.com/users/ringohoffman/repos", "events_url": "https://api.github.com/users/ringohoffman/events{/privacy}", "received_events_url": "https://api.github.com/users/ringohoffman/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
7
2025-03-04T06:12:37
2025-03-21T12:37:16
null
CONTRIBUTOR
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7434", "html_url": "https://github.com/huggingface/datasets/pull/7434", "diff_url": "https://github.com/huggingface/datasets/pull/7434.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7434.patch", "merged_at": null }
Fixes #7433 This refactor unifies `num_proc is None or num_proc == 1` and `num_proc > 1`; instead of handling them completely separately where one uses a list of kwargs and shards and the other just uses a single set of kwargs and `self`, by wrapping the `num_proc == 1` case in a list and making the difference just whether or not you use a pool, you set up either case to be able to load each other's cache files just by changing `num_shards`; `num_proc == 1` can sequentially load the shards of a dataset mapped `num_shards > 1` and map any missing shards Other than the structural refactor, the main contribution of this PR is `existing_cache_file_map`, which uses a regex of `cache_file_name` and `suffix_template` to find existing cache files, grouped by their `num_shards`; using this data structure, we can reset `num_shards` to an existing set of cache files, and load them accordingly
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7434/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7434/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7433
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7433/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7433/comments
https://api.github.com/repos/huggingface/datasets/issues/7433/events
https://github.com/huggingface/datasets/issues/7433
2,890,240,400
I_kwDODunzps6sRZGQ
7,433
`Dataset.map` ignores existing caches and remaps when ran with different `num_proc`
{ "login": "ringohoffman", "id": 27844407, "node_id": "MDQ6VXNlcjI3ODQ0NDA3", "avatar_url": "https://avatars.githubusercontent.com/u/27844407?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ringohoffman", "html_url": "https://github.com/ringohoffman", "followers_url": "https://api.github.com/users/ringohoffman/followers", "following_url": "https://api.github.com/users/ringohoffman/following{/other_user}", "gists_url": "https://api.github.com/users/ringohoffman/gists{/gist_id}", "starred_url": "https://api.github.com/users/ringohoffman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ringohoffman/subscriptions", "organizations_url": "https://api.github.com/users/ringohoffman/orgs", "repos_url": "https://api.github.com/users/ringohoffman/repos", "events_url": "https://api.github.com/users/ringohoffman/events{/privacy}", "received_events_url": "https://api.github.com/users/ringohoffman/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
2
2025-03-03T05:51:26
2025-03-04T05:55:08
null
CONTRIBUTOR
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug If you `map` a dataset and save it to a specific `cache_file_name` with a specific `num_proc`, and then call map again with that same existing `cache_file_name` but a different `num_proc`, the dataset will be re-mapped. ### Steps to reproduce the bug 1. Download a dataset ```python import datasets dataset = datasets.load_dataset("ylecun/mnist") ``` ``` Generating train split: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 60000/60000 [00:00<00:00, 116429.85 examples/s] Generating test split: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 10000/10000 [00:00<00:00, 103310.27 examples/s] ``` 2. `map` and cache it with a specific `num_proc` ```python cache_file_name="./cache/train.map" dataset["train"].map(lambda x: x, cache_file_name=cache_file_name, num_proc=2) ``` ``` Map (num_proc=2): 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 60000/60000 [00:01<00:00, 53764.03 examples/s] ``` 3. `map` it with a different `num_proc` and the same `cache_file_name` as before ```python dataset["train"].map(lambda x: x, cache_file_name=cache_file_name, num_proc=3) ``` ``` Map (num_proc=3): 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 60000/60000 [00:00<00:00, 65377.12 examples/s] ``` ### Expected behavior If I specify an existing `cache_file_name`, I don't expect using a different `num_proc` than the one that was used to generate it to cause the dataset to have be be re-mapped. ### Environment info ```console $ datasets-cli env - `datasets` version: 3.3.2 - Platform: Linux-5.15.0-131-generic-x86_64-with-glibc2.35 - Python version: 3.10.16 - `huggingface_hub` version: 0.29.1 - PyArrow version: 19.0.1 - Pandas version: 2.2.3 - `fsspec` version: 2024.12.0 ```
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7433/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7433/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7432
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7432/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7432/comments
https://api.github.com/repos/huggingface/datasets/issues/7432/events
https://github.com/huggingface/datasets/pull/7432
2,887,717,289
PR_kwDODunzps6M-DI0
7,432
Fix type annotation
{ "login": "NeilGirdhar", "id": 730137, "node_id": "MDQ6VXNlcjczMDEzNw==", "avatar_url": "https://avatars.githubusercontent.com/u/730137?v=4", "gravatar_id": "", "url": "https://api.github.com/users/NeilGirdhar", "html_url": "https://github.com/NeilGirdhar", "followers_url": "https://api.github.com/users/NeilGirdhar/followers", "following_url": "https://api.github.com/users/NeilGirdhar/following{/other_user}", "gists_url": "https://api.github.com/users/NeilGirdhar/gists{/gist_id}", "starred_url": "https://api.github.com/users/NeilGirdhar/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/NeilGirdhar/subscriptions", "organizations_url": "https://api.github.com/users/NeilGirdhar/orgs", "repos_url": "https://api.github.com/users/NeilGirdhar/repos", "events_url": "https://api.github.com/users/NeilGirdhar/events{/privacy}", "received_events_url": "https://api.github.com/users/NeilGirdhar/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-02-28T17:28:20
2025-03-04T15:53:03
2025-03-04T15:53:03
CONTRIBUTOR
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7432", "html_url": "https://github.com/huggingface/datasets/pull/7432", "diff_url": "https://github.com/huggingface/datasets/pull/7432.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7432.patch", "merged_at": null }
null
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7432/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7432/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7431
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7431/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7431/comments
https://api.github.com/repos/huggingface/datasets/issues/7431/events
https://github.com/huggingface/datasets/issues/7431
2,887,244,074
I_kwDODunzps6sF9kq
7,431
Issues with large Datasets
{ "login": "nikitabelooussovbtis", "id": 106806889, "node_id": "U_kgDOBl2-aQ", "avatar_url": "https://avatars.githubusercontent.com/u/106806889?v=4", "gravatar_id": "", "url": "https://api.github.com/users/nikitabelooussovbtis", "html_url": "https://github.com/nikitabelooussovbtis", "followers_url": "https://api.github.com/users/nikitabelooussovbtis/followers", "following_url": "https://api.github.com/users/nikitabelooussovbtis/following{/other_user}", "gists_url": "https://api.github.com/users/nikitabelooussovbtis/gists{/gist_id}", "starred_url": "https://api.github.com/users/nikitabelooussovbtis/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nikitabelooussovbtis/subscriptions", "organizations_url": "https://api.github.com/users/nikitabelooussovbtis/orgs", "repos_url": "https://api.github.com/users/nikitabelooussovbtis/repos", "events_url": "https://api.github.com/users/nikitabelooussovbtis/events{/privacy}", "received_events_url": "https://api.github.com/users/nikitabelooussovbtis/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
4
2025-02-28T14:05:22
2025-03-04T15:02:26
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug If the coco annotation file is too large the dataset will not be able to load it, not entirely sure were the issue is but I am guessing it is due to the code trying to load it all as one line into a dataframe. This was for object detections. My current work around is the following code but would be nice to be able to do it without worrying about it also probably there is a better way of doing it: ` dataset_dict = json.load(open("./local_data/annotations/train.json")) df = pd.DataFrame(columns=['images', 'annotations', 'categories']) df = df._append({'images': dataset_dict['images'], 'annotations': dataset_dict['annotations'], 'categories': dataset_dict['categories']}, ignore_index=True) train=Dataset.from_pandas(df) dataset_dict = json.load(open("./local_data/annotations/validation.json")) df = pd.DataFrame(columns=['images', 'annotations', 'categories']) df = df._append({'images': dataset_dict['images'], 'annotations': dataset_dict['annotations'], 'categories': dataset_dict['categories']}, ignore_index=True) val = Dataset.from_pandas(df) dataset_dict = json.load(open("./local_data/annotations/test.json")) df = pd.DataFrame(columns=['images', 'annotations', 'categories']) df = df._append({'images': dataset_dict['images'], 'annotations': dataset_dict['annotations'], 'categories': dataset_dict['categories']}, ignore_index=True) test = Dataset.from_pandas(df) dataset = DatasetDict({'train': train, 'validation': val, 'test': test}) ` ### Steps to reproduce the bug 1) step up directory in and have the json files in coco format -local_data |-images |---1.jpg |---2.jpg |---.... |---n.jpg |-annotations |---test.json |---train.json |---validation.json 2) try to load local_data into a dataset if the file is larger than about 300kb it will cause an error. ### Expected behavior That it loads the jsons preferably in the same format as it has done with a smaller size. ### Environment info - `datasets` version: 3.3.3.dev0 - Platform: Linux-6.11.0-17-generic-x86_64-with-glibc2.39 - Python version: 3.12.3 - `huggingface_hub` version: 0.29.0 - PyArrow version: 19.0.1 - Pandas version: 2.2.3 - `fsspec` version: 2024.12.0
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7431/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7431/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7430
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7430/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7430/comments
https://api.github.com/repos/huggingface/datasets/issues/7430/events
https://github.com/huggingface/datasets/issues/7430
2,886,922,573
I_kwDODunzps6sEvFN
7,430
Error in code "Time to slice and dice" from course "NLP Course"
{ "login": "Yurkmez", "id": 122965300, "node_id": "U_kgDOB1RNNA", "avatar_url": "https://avatars.githubusercontent.com/u/122965300?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Yurkmez", "html_url": "https://github.com/Yurkmez", "followers_url": "https://api.github.com/users/Yurkmez/followers", "following_url": "https://api.github.com/users/Yurkmez/following{/other_user}", "gists_url": "https://api.github.com/users/Yurkmez/gists{/gist_id}", "starred_url": "https://api.github.com/users/Yurkmez/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Yurkmez/subscriptions", "organizations_url": "https://api.github.com/users/Yurkmez/orgs", "repos_url": "https://api.github.com/users/Yurkmez/repos", "events_url": "https://api.github.com/users/Yurkmez/events{/privacy}", "received_events_url": "https://api.github.com/users/Yurkmez/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
2
2025-02-28T11:36:10
2025-03-05T11:32:47
2025-03-03T17:52:15
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug When we execute code ``` frequencies = ( train_df["condition"] .value_counts() .to_frame() .reset_index() .rename(columns={"index": "condition", "condition": "frequency"}) ) frequencies.head() ``` answer should be like this condition | frequency birth control | 27655 depression | 8023 acne | 5209 anxiety | 4991 pain | 4744 but he is different frequency | count birth control | 27655 depression | 8023 acne | 5209 anxiety | 4991 pain | 4744 this is not correct, correct code ``` frequencies = ( train_df["condition"] .value_counts() .to_frame() .reset_index() .rename(columns={"index": "condition", "count": "frequency"}) ) ```` ### Steps to reproduce the bug ``` frequencies = ( train_df["condition"] .value_counts() .to_frame() .reset_index() .rename(columns={"index": "condition", "condition": "frequency"}) ) frequencies.head() ``` ### Expected behavior condition | frequency birth control | 27655 depression | 8023 acne | 5209 anxiety | 4991 pain | 4744 ### Environment info Google Colab
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7430/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7430/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/7429
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7429/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7429/comments
https://api.github.com/repos/huggingface/datasets/issues/7429/events
https://github.com/huggingface/datasets/pull/7429
2,886,806,513
PR_kwDODunzps6M67Jd
7,429
Improved type annotation
{ "login": "saiden89", "id": 45285915, "node_id": "MDQ6VXNlcjQ1Mjg1OTE1", "avatar_url": "https://avatars.githubusercontent.com/u/45285915?v=4", "gravatar_id": "", "url": "https://api.github.com/users/saiden89", "html_url": "https://github.com/saiden89", "followers_url": "https://api.github.com/users/saiden89/followers", "following_url": "https://api.github.com/users/saiden89/following{/other_user}", "gists_url": "https://api.github.com/users/saiden89/gists{/gist_id}", "starred_url": "https://api.github.com/users/saiden89/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/saiden89/subscriptions", "organizations_url": "https://api.github.com/users/saiden89/orgs", "repos_url": "https://api.github.com/users/saiden89/repos", "events_url": "https://api.github.com/users/saiden89/events{/privacy}", "received_events_url": "https://api.github.com/users/saiden89/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
0
2025-02-28T10:39:10
2025-03-11T10:13:29
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7429", "html_url": "https://github.com/huggingface/datasets/pull/7429", "diff_url": "https://github.com/huggingface/datasets/pull/7429.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7429.patch", "merged_at": null }
I've refined several type annotations throughout the codebase to align with current best practices and enhance overall clarity. Given the complexity of the code, there may still be areas that need further attention. I welcome any feedback or suggestions to make these improvements even better. - Fixes #7202
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7429/reactions", "total_count": 2, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 2, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7429/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7428
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7428/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7428/comments
https://api.github.com/repos/huggingface/datasets/issues/7428/events
https://github.com/huggingface/datasets/pull/7428
2,886,111,651
PR_kwDODunzps6M4kW8
7,428
Use pyupgrade --py39-plus
{ "login": "cyyever", "id": 17618148, "node_id": "MDQ6VXNlcjE3NjE4MTQ4", "avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cyyever", "html_url": "https://github.com/cyyever", "followers_url": "https://api.github.com/users/cyyever/followers", "following_url": "https://api.github.com/users/cyyever/following{/other_user}", "gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}", "starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cyyever/subscriptions", "organizations_url": "https://api.github.com/users/cyyever/orgs", "repos_url": "https://api.github.com/users/cyyever/repos", "events_url": "https://api.github.com/users/cyyever/events{/privacy}", "received_events_url": "https://api.github.com/users/cyyever/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
3
2025-02-28T03:39:44
2025-03-22T00:51:20
2025-03-05T15:04:16
CONTRIBUTOR
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7428", "html_url": "https://github.com/huggingface/datasets/pull/7428", "diff_url": "https://github.com/huggingface/datasets/pull/7428.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7428.patch", "merged_at": "2025-03-05T15:04:16" }
null
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7428/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7428/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7427
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7427/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7427/comments
https://api.github.com/repos/huggingface/datasets/issues/7427/events
https://github.com/huggingface/datasets/issues/7427
2,886,032,571
I_kwDODunzps6sBVy7
7,427
Error splitting the input into NAL units.
{ "login": "MengHao666", "id": 47114466, "node_id": "MDQ6VXNlcjQ3MTE0NDY2", "avatar_url": "https://avatars.githubusercontent.com/u/47114466?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MengHao666", "html_url": "https://github.com/MengHao666", "followers_url": "https://api.github.com/users/MengHao666/followers", "following_url": "https://api.github.com/users/MengHao666/following{/other_user}", "gists_url": "https://api.github.com/users/MengHao666/gists{/gist_id}", "starred_url": "https://api.github.com/users/MengHao666/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MengHao666/subscriptions", "organizations_url": "https://api.github.com/users/MengHao666/orgs", "repos_url": "https://api.github.com/users/MengHao666/repos", "events_url": "https://api.github.com/users/MengHao666/events{/privacy}", "received_events_url": "https://api.github.com/users/MengHao666/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
2
2025-02-28T02:30:15
2025-03-04T01:40:28
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug I am trying to finetune qwen2.5-vl on 16 * 80G GPUS, and I use `LLaMA-Factory` and set `preprocessing_num_workers=16`. However, I met the following error and the program seem to got crush. It seems that the error come from `datasets` library The error logging is like following: ```text Converting format of dataset (num_proc=16): 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰| 19265/19267 [11:44<00:00, 5.88 examples/s] Converting format of dataset (num_proc=16): 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰| 19266/19267 [11:44<00:00, 5.02 examples/s] Converting format of dataset (num_proc=16): 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 19267/19267 [11:44<00:00, 5.44 examples/s] Converting format of dataset (num_proc=16): 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 19267/19267 [11:44<00:00, 27.34 examples/s] Running tokenizer on dataset (num_proc=16): 0%| | 0/19267 [00:00<?, ? examples/s] Invalid NAL unit size (45405 > 35540). Invalid NAL unit size (86720 > 54856). Invalid NAL unit size (7131 > 3225). missing picture in access unit with size 54860 Invalid NAL unit size (48042 > 33645). missing picture in access unit with size 3229 missing picture in access unit with size 33649 Invalid NAL unit size (86720 > 54856). Invalid NAL unit size (48042 > 33645). Error splitting the input into NAL units. missing picture in access unit with size 35544 Invalid NAL unit size (45405 > 35540). Error splitting the input into NAL units. Error splitting the input into NAL units. Invalid NAL unit size (8187 > 7069). missing picture in access unit with size 7073 Invalid NAL unit size (8187 > 7069). Error splitting the input into NAL units. Invalid NAL unit size (7131 > 3225). Error splitting the input into NAL units. Invalid NAL unit size (14013 > 5998). missing picture in access unit with size 6002 Invalid NAL unit size (14013 > 5998). Error splitting the input into NAL units. Invalid NAL unit size (17173 > 7231). missing picture in access unit with size 7235 Invalid NAL unit size (17173 > 7231). Error splitting the input into NAL units. Invalid NAL unit size (16964 > 6055). missing picture in access unit with size 6059 Invalid NAL unit size (16964 > 6055). Exception in thread Thread-9 (accepter)Error splitting the input into NAL units. : Traceback (most recent call last): File "/opt/conda/envs/python3.10.13/lib/python3.10/threading.py", line 1016, in _bootstrap_inner Running tokenizer on dataset (num_proc=16): 0%| | 0/19267 [13:22<?, ? examples/s] self.run() File "/opt/conda/envs/python3.10.13/lib/python3.10/threading.py", line 953, in run Invalid NAL unit size (7032 > 2927). missing picture in access unit with size 2931 self._target(*self._args, **self._kwargs) File "/opt/conda/envs/python3.10.13/lib/python3.10/site-packages/multiprocess/managers.py", line 194, in accepter Invalid NAL unit size (7032 > 2927). Error splitting the input into NAL units. t.start() File "/opt/conda/envs/python3.10.13/lib/python3.10/threading.py", line 935, in start Invalid NAL unit size (28973 > 6121). missing picture in access unit with size 6125 _start_new_thread(self._bootstrap, ())Invalid NAL unit size (28973 > 6121). RuntimeError: can't start new threadError splitting the input into NAL units. Invalid NAL unit size (4411 > 296). missing picture in access unit with size 300 Invalid NAL unit size (4411 > 296). Error splitting the input into NAL units. Invalid NAL unit size (14414 > 1471). missing picture in access unit with size 1475 Invalid NAL unit size (14414 > 1471). Error splitting the input into NAL units. Invalid NAL unit size (5283 > 1792). missing picture in access unit with size 1796 Invalid NAL unit size (5283 > 1792). Error splitting the input into NAL units. Invalid NAL unit size (79147 > 10042). missing picture in access unit with size 10046 Invalid NAL unit size (79147 > 10042). Error splitting the input into NAL units. Invalid NAL unit size (45405 > 35540). Invalid NAL unit size (86720 > 54856). Invalid NAL unit size (7131 > 3225). missing picture in access unit with size 54860 Invalid NAL unit size (48042 > 33645). missing picture in access unit with size 3229 missing picture in access unit with size 33649 Invalid NAL unit size (86720 > 54856). Invalid NAL unit size (48042 > 33645). Error splitting the input into NAL units. missing picture in access unit with size 35544 Invalid NAL unit size (45405 > 35540). Error splitting the input into NAL units. Error splitting the input into NAL units. Invalid NAL unit size (8187 > 7069). missing picture in access unit with size 7073 Invalid NAL unit size (8187 > 7069). Error splitting the input into NAL units. Invalid NAL unit size (7131 > 3225). Error splitting the input into NAL units. Invalid NAL unit size (14013 > 5998). missing picture in access unit with size 6002 Invalid NAL unit size (14013 > 5998). Error splitting the input into NAL units. Invalid NAL unit size (17173 > 7231). missing picture in access unit with size 7235 Invalid NAL unit size (17173 > 7231). Error splitting the input into NAL units. Invalid NAL unit size (16964 > 6055). missing picture in access unit with size 6059 Invalid NAL unit size (16964 > 6055). Exception in thread Thread-9 (accepter)Error splitting the input into NAL units. : Traceback (most recent call last): File "/opt/conda/envs/python3.10.13/lib/python3.10/threading.py", line 1016, in _bootstrap_inner Running tokenizer on dataset (num_proc=16): 0%| | 0/19267 [13:22<?, ? examples/s] self.run() File "/opt/conda/envs/python3.10.13/lib/python3.10/threading.py", line 953, in run Invalid NAL unit size (7032 > 2927). missing picture in access unit with size 2931 self._target(*self._args, **self._kwargs) File "/opt/conda/envs/python3.10.13/lib/python3.10/site-packages/multiprocess/managers.py", line 194, in accepter Invalid NAL unit size (7032 > 2927). Error splitting the input into NAL units. t.start() File "/opt/conda/envs/python3.10.13/lib/python3.10/threading.py", line 935, in start Invalid NAL unit size (28973 > 6121). missing picture in access unit with size 6125 _start_new_thread(self._bootstrap, ())Invalid NAL unit size (28973 > 6121). RuntimeError: can't start new threadError splitting the input into NAL units. Invalid NAL unit size (4411 > 296). missing picture in access unit with size 300 Invalid NAL unit size (4411 > 296). Error splitting the input into NAL units. Invalid NAL unit size (14414 > 1471). missing picture in access unit with size 1475 Invalid NAL unit size (14414 > 1471). Error splitting the input into NAL units. Invalid NAL unit size (5283 > 1792). missing picture in access unit with size 1796 Invalid NAL unit size (5283 > 1792). Error splitting the input into NAL units. Invalid NAL unit size (79147 > 10042). missing picture in access unit with size 10046 Invalid NAL unit size (79147 > 10042). Error splitting the input into NAL units. Invalid NAL unit size (45405 > 35540). Invalid NAL unit size (86720 > 54856). Invalid NAL unit size (7131 > 3225). missing picture in access unit with size 54860 Invalid NAL unit size (48042 > 33645). missing picture in access unit with size 3229 missing picture in access unit with size 33649 Invalid NAL unit size (86720 > 54856). Invalid NAL unit size (48042 > 33645). Error splitting the input into NAL units. missing picture in access unit with size 35544 Invalid NAL unit size (45405 > 35540). Error splitting the input into NAL units. Error splitting the input into NAL units. Invalid NAL unit size (8187 > 7069). missing picture in access unit with size 7073 Invalid NAL unit size (8187 > 7069). Error splitting the input into NAL units. Invalid NAL unit size (7131 > 3225). Error splitting the input into NAL units. Invalid NAL unit size (14013 > 5998). missing picture in access unit with size 6002 Invalid NAL unit size (14013 > 5998). Error splitting the input into NAL units. Invalid NAL unit size (17173 > 7231). missing picture in access unit with size 7235 Invalid NAL unit size (17173 > 7231). Error splitting the input into NAL units. Invalid NAL unit size (16964 > 6055). missing picture in access unit with size 6059 Invalid NAL unit size (16964 > 6055). Exception in thread Thread-9 (accepter)Error splitting the input into NAL units. : Traceback (most recent call last): File "/opt/conda/envs/python3.10.13/lib/python3.10/threading.py", line 1016, in _bootstrap_inner Running tokenizer on dataset (num_proc=16): 0%| | 0/19267 [13:22<?, ? examples/s] self.run() File "/opt/conda/envs/python3.10.13/lib/python3.10/threading.py", line 953, in run Invalid NAL unit size (7032 > 2927). missing picture in access unit with size 2931 self._target(*self._args, **self._kwargs) File "/opt/conda/envs/python3.10.13/lib/python3.10/site-packages/multiprocess/managers.py", line 194, in accepter Invalid NAL unit size (7032 > 2927). Error splitting the input into NAL units. t.start() File "/opt/conda/envs/python3.10.13/lib/python3.10/threading.py", line 935, in start Invalid NAL unit size (28973 > 6121). missing picture in access unit with size 6125 _start_new_thread(self._bootstrap, ())Invalid NAL unit size (28973 > 6121). RuntimeError: can't start new threadError splitting the input into NAL units. Invalid NAL unit size (4411 > 296). missing picture in access unit with size 300 Invalid NAL unit size (4411 > 296). Error splitting the input into NAL units. Invalid NAL unit size (14414 > 1471). missing picture in access unit with size 1475 Invalid NAL unit size (14414 > 1471). Error splitting the input into NAL units. Invalid NAL unit size (5283 > 1792). missing picture in access unit with size 1796 Invalid NAL unit size (5283 > 1792). Error splitting the input into NAL units. Invalid NAL unit size (79147 > 10042). missing picture in access unit with size 10046 Invalid NAL unit size (79147 > 10042). Error splitting the input into NAL units. Invalid NAL unit size (45405 > 35540). Invalid NAL unit size (86720 > 54856). Invalid NAL unit size (7131 > 3225). missing picture in access unit with size 54860 Invalid NAL unit size (48042 > 33645). missing picture in access unit with size 3229 missing picture in access unit with size 33649 Invalid NAL unit size (86720 > 54856). Invalid NAL unit size (48042 > 33645). Error splitting the input into NAL units. missing picture in access unit with size 35544 Invalid NAL unit size (45405 > 35540). Error splitting the input into NAL units. Error splitting the input into NAL units. Invalid NAL unit size (8187 > 7069). missing picture in access unit with size 7073 Invalid NAL unit size (8187 > 7069). Error splitting the input into NAL units. Invalid NAL unit size (7131 > 3225). Error splitting the input into NAL units. Invalid NAL unit size (14013 > 5998). missing picture in access unit with size 6002 Invalid NAL unit size (14013 > 5998). Error splitting the input into NAL units. Invalid NAL unit size (17173 > 7231). missing picture in access unit with size 7235 Invalid NAL unit size (17173 > 7231). Error splitting the input into NAL units. Invalid NAL unit size (16964 > 6055). missing picture in access unit with size 6059 Invalid NAL unit size (16964 > 6055). Exception in thread Thread-9 (accepter)Error splitting the input into NAL units. : Traceback (most recent call last): File "/opt/conda/envs/python3.10.13/lib/python3.10/threading.py", line 1016, in _bootstrap_inner Running tokenizer on dataset (num_proc=16): 0%| | 0/19267 [13:22<?, ? examples/s] self.run() File "/opt/conda/envs/python3.10.13/lib/python3.10/threading.py", line 953, in run Invalid NAL unit size (7032 > 2927). missing picture in access unit with size 2931 self._target(*self._args, **self._kwargs) File "/opt/conda/envs/python3.10.13/lib/python3.10/site-packages/multiprocess/managers.py", line 194, in accepter Invalid NAL unit size (7032 > 2927). Error splitting the input into NAL units. t.start() File "/opt/conda/envs/python3.10.13/lib/python3.10/threading.py", line 935, in start Invalid NAL unit size (28973 > 6121). missing picture in access unit with size 6125 _start_new_thread(self._bootstrap, ())Invalid NAL unit size (28973 > 6121). RuntimeError: can't start new threadError splitting the input into NAL units. Invalid NAL unit size (4411 > 296). missing picture in access unit with size 300 Invalid NAL unit size (4411 > 296). Error splitting the input into NAL units. Invalid NAL unit size (14414 > 1471). missing picture in access unit with size 1475 Invalid NAL unit size (14414 > 1471). Error splitting the input into NAL units. Invalid NAL unit size (5283 > 1792). missing picture in access unit with size 1796 Invalid NAL unit size (5283 > 1792). Error splitting the input into NAL units. Invalid NAL unit size (79147 > 10042). missing picture in access unit with size 10046 Invalid NAL unit size (79147 > 10042). Error splitting the input into NAL units. ``` ### Others _No response_ ### Steps to reproduce the bug None ### Expected behavior excpect to run successfully ### Environment info ``` transformers==4.49.0 datasets==3.2.0 accelerate==1.2.1 peft==0.12.0 trl==0.9.6 tokenizers==0.21.0 gradio>=4.38.0,<=5.18.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 av librosa tyro<0.9.0 openlm-hub qwen-vl-utils ```
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7427/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7427/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7426
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7426/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7426/comments
https://api.github.com/repos/huggingface/datasets/issues/7426/events
https://github.com/huggingface/datasets/pull/7426
2,883,754,507
PR_kwDODunzps6Mwe6B
7,426
fix: None default with bool type on load creates typing error
{ "login": "stephantul", "id": 8882233, "node_id": "MDQ6VXNlcjg4ODIyMzM=", "avatar_url": "https://avatars.githubusercontent.com/u/8882233?v=4", "gravatar_id": "", "url": "https://api.github.com/users/stephantul", "html_url": "https://github.com/stephantul", "followers_url": "https://api.github.com/users/stephantul/followers", "following_url": "https://api.github.com/users/stephantul/following{/other_user}", "gists_url": "https://api.github.com/users/stephantul/gists{/gist_id}", "starred_url": "https://api.github.com/users/stephantul/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stephantul/subscriptions", "organizations_url": "https://api.github.com/users/stephantul/orgs", "repos_url": "https://api.github.com/users/stephantul/repos", "events_url": "https://api.github.com/users/stephantul/events{/privacy}", "received_events_url": "https://api.github.com/users/stephantul/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
0
2025-02-27T08:11:36
2025-03-04T15:53:40
2025-03-04T15:53:40
CONTRIBUTOR
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7426", "html_url": "https://github.com/huggingface/datasets/pull/7426", "diff_url": "https://github.com/huggingface/datasets/pull/7426.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7426.patch", "merged_at": "2025-03-04T15:53:40" }
Hello! Pyright flags any use of `load_dataset` as an error, because the default for `trust_remote_code` is `None`, but the function is typed as `bool`, not `Optional[bool]`. I changed the type and docstrings to reflect this, but no other code was touched.
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7426/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7426/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7425
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7425/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7425/comments
https://api.github.com/repos/huggingface/datasets/issues/7425/events
https://github.com/huggingface/datasets/issues/7425
2,883,684,686
I_kwDODunzps6r4YlO
7,425
load_dataset("livecodebench/code_generation_lite", version_tag="release_v2") TypeError: 'NoneType' object is not callable
{ "login": "dshwei", "id": 42167236, "node_id": "MDQ6VXNlcjQyMTY3MjM2", "avatar_url": "https://avatars.githubusercontent.com/u/42167236?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dshwei", "html_url": "https://github.com/dshwei", "followers_url": "https://api.github.com/users/dshwei/followers", "following_url": "https://api.github.com/users/dshwei/following{/other_user}", "gists_url": "https://api.github.com/users/dshwei/gists{/gist_id}", "starred_url": "https://api.github.com/users/dshwei/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dshwei/subscriptions", "organizations_url": "https://api.github.com/users/dshwei/orgs", "repos_url": "https://api.github.com/users/dshwei/repos", "events_url": "https://api.github.com/users/dshwei/events{/privacy}", "received_events_url": "https://api.github.com/users/dshwei/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
10
2025-02-27T07:36:02
2025-03-27T05:05:33
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug from datasets import load_dataset lcb_codegen = load_dataset("livecodebench/code_generation_lite", version_tag="release_v2") or configs = get_dataset_config_names("livecodebench/code_generation_lite", trust_remote_code=True) both error: Traceback (most recent call last): File "", line 1, in File "/workspace/miniconda/envs/grpo/lib/python3.10/site-packages/datasets/load.py", line 2131, in load_dataset builder_instance = load_dataset_builder( File "/workspace/miniconda/envs/grpo/lib/python3.10/site-packages/datasets/load.py", line 1888, in load_dataset_builder builder_instance: DatasetBuilder = builder_cls( TypeError: 'NoneType' object is not callable ### Steps to reproduce the bug from datasets import get_dataset_config_names configs = get_dataset_config_names("livecodebench/code_generation_lite", trust_remote_code=True) OR lcb_codegen = load_dataset("livecodebench/code_generation_lite", version_tag="release_v2") ### Expected behavior load datasets livecodebench/code_generation_lite ### Environment info import datasets version '3.3.2'
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7425/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 1 }
https://api.github.com/repos/huggingface/datasets/issues/7425/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7424
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7424/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7424/comments
https://api.github.com/repos/huggingface/datasets/issues/7424/events
https://github.com/huggingface/datasets/pull/7424
2,882,663,621
PR_kwDODunzps6Ms1Qx
7,424
Faster folder based builder + parquet support + allow repeated media + use torchvideo
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
1
2025-02-26T19:55:18
2025-03-05T18:51:00
2025-03-05T17:41:23
MEMBER
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/7424", "html_url": "https://github.com/huggingface/datasets/pull/7424", "diff_url": "https://github.com/huggingface/datasets/pull/7424.diff", "patch_url": "https://github.com/huggingface/datasets/pull/7424.patch", "merged_at": "2025-03-05T17:41:22" }
This will be useful for LeRobotDataset (robotics datasets for [lerobot](https://github.com/huggingface/lerobot) based on videos) Impacted builders: - ImageFolder - AudioFolder - VideoFolder Improvements: - faster to stream (got a 5x speed up on an image dataset) - improved RAM usage - support for metadata.parquet - allow to link to an image/audio/video multiple times - support for pyarrow filters (mostly efficient for parquet) - link to files using fields names `*_file_name` (in addition to the already existing `file_name`) - this allows to have multiple image/audio/video per row - there is also `file_names` and `*_file_names` for lists of image/audio/video Changes: - the builders iterate on the metadata files instead of the media files - the builders iterate on chunks of metadata instead of loading them in RAM completely - metadata files are no longer handled separately in `data_files` - added the `filters` argument to pass to `load_dataset` - either as an [Expression](https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Expression.html) - or as tuples like `filters=[('event_name', '=', 'SomeEvent')]` - small breaking change: you can't add labels to a dataset with`drop_labels=False` if it has a metadata file - small breaking change: you can't use one metadata file for multiple splits anymore Example: `lhoestq/pusht-videofolder` is a video dataset with metadata.parquet where multiple rows can point to the same video ```python In [1]: from datasets import load_dataset In [2]: load_dataset("lhoestq/pusht-videofolder") Resolving data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 207/207 [00:00<00:00, 1087.32it/s] Out[2]: DatasetDict({ train: Dataset({ features: ['video', 'observation.state', 'action', 'episode_index', 'frame_index', 'timestamp', 'next.reward', 'next.done', 'next.success', 'index', 'task_index'], num_rows: 25650 }) }) In [3]: load_dataset("lhoestq/pusht-videofolder", filters=[("next.reward", ">", 0.5)]) Resolving data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 207/207 [00:01<00:00, 183.03it/s] Out[3]: DatasetDict({ train: Dataset({ features: ['video', 'observation.state', 'action', 'episode_index', 'frame_index', 'timestamp', 'next.reward', 'next.done', 'next.success', 'index', 'task_index'], num_rows: 5773 }) }) ``` Additional change for VideoFolder: - decord can't be installed in many setups, I switched the backend to torchvision instead - I also added streaming capability from HF (you can get video frames without downloading the full video from HF) Example: load a robotics dataset ```python In [1]: from datasets import load_dataset ds In [2]: ds = load_dataset("lhoestq/pusht-videofolder") Resolving data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 207/207 [00:00<00:00, 624.81it/s] In [3]: ds["train"][0] Out[3]: {'video': <torchvision.io.video_reader.VideoReader at 0x1145dc290>, 'observation.state': [222.0, 97.0], 'action': [233.0, 71.0], 'episode_index': 0, 'frame_index': 0, 'timestamp': 0.0, 'next.reward': 0.19029748439788818, 'next.done': False, 'next.success': False, 'index': 0, 'task_index': 0} ``` Example: stream frames without downloading full videos ```python In [1]: from datasets import load_dataset In [2]: ds = load_dataset("BrianGuo/Tennis_Data", streaming=True) In [3]: example = next(iter(ds["train"])) In [4]: video = example["video"] In [5]: video.get_metadata() Out[5]: {'audio': {'framerate': [44100.0], 'duration': [2027.35]}, 'video': {'fps': [59.00002712894387], 'duration': [2027.355]}} In [6]: video.seek(1800, keyframes_only=True) # 30min Out[6]: <torchvision.io.video_reader.VideoReader at 0x148d4d010> In [7]: next(video) Out[7]: {'data': tensor([[[ 76, 77, 79, ..., 41, 39, 38], [ 76, 77, 79, ..., 40, 39, 35], [ 76, 77, 79, ..., 34, 30, 26], ..., [127, 127, 127, ..., 125, 125, 125], [125, 126, 126, ..., 125, 125, 125], [122, 124, 126, ..., 125, 125, 125]]], dtype=torch.uint8), 'pts': 1800.0} ``` TODO: - [x] docs - [x] fix tests
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7424/reactions", "total_count": 2, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 2, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7424/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/7423
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7423/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7423/comments
https://api.github.com/repos/huggingface/datasets/issues/7423/events
https://github.com/huggingface/datasets/issues/7423
2,879,271,409
I_kwDODunzps6rnjHx
7,423
Row indexing a dataset with numpy integers
{ "login": "DavidRConnell", "id": 35470740, "node_id": "MDQ6VXNlcjM1NDcwNzQw", "avatar_url": "https://avatars.githubusercontent.com/u/35470740?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DavidRConnell", "html_url": "https://github.com/DavidRConnell", "followers_url": "https://api.github.com/users/DavidRConnell/followers", "following_url": "https://api.github.com/users/DavidRConnell/following{/other_user}", "gists_url": "https://api.github.com/users/DavidRConnell/gists{/gist_id}", "starred_url": "https://api.github.com/users/DavidRConnell/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DavidRConnell/subscriptions", "organizations_url": "https://api.github.com/users/DavidRConnell/orgs", "repos_url": "https://api.github.com/users/DavidRConnell/repos", "events_url": "https://api.github.com/users/DavidRConnell/events{/privacy}", "received_events_url": "https://api.github.com/users/DavidRConnell/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "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
2025-02-25T18:44:45
2025-03-03T17:55:24
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Feature request Allow indexing datasets with a scalar numpy integer type. ### Motivation Indexing a dataset with a scalar numpy.int* object raises a TypeError. This is due to the test in `datasets/formatting/formatting.py:key_to_query_type` ``` python def key_to_query_type(key: Union[int, slice, range, str, Iterable]) -> str: if isinstance(key, int): return "row" elif isinstance(key, str): return "column" elif isinstance(key, (slice, range, Iterable)): return "batch" _raise_bad_key_type(key) ``` In the row case, it checks if key is an int, which returns false when key is integer like but not a builtin python integer type. This is counterintuitive because a numpy array of np.int64s can be used for the batch case. For example: ``` python import numpy as np import datasets dataset = datasets.Dataset.from_dict({"a": [1, 2, 3, 4], "b": [5, 6, 7, 8]}) # Regular indexing dataset[0] dataset[:2] # Indexing with numpy data types (expect same results) idx = np.asarray([0, 1]) dataset[idx] # Succeeds when using an array of np.int64 values dataset[idx[0]] # Fails with TypeError when using scalar np.int64 ``` For the user, this can be solved by wrapping `idx[0]` in `int` but the test could also be changed in `key_to_query_type` to accept a less strict definition of int. ``` diff +import numbers + def key_to_query_type(key: Union[int, slice, range, str, Iterable]) -> str: + if isinstance(key, numbers.Integral): - if isinstance(key, int): return "row" elif isinstance(key, str): return "column" elif isinstance(key, (slice, range, Iterable)): return "batch" _raise_bad_key_type(key) ``` Looking at how others do it, pandas has an `is_integer` definition that it checks which uses `is_integer_object` defined in `pandas/_libs/utils.pxd`: ``` cython cdef inline bint is_integer_object(object obj) noexcept: """ Cython equivalent of `isinstance(val, (int, np.integer)) and not isinstance(val, (bool, np.timedelta64))` Parameters ---------- val : object Returns ------- is_integer : bool Notes ----- This counts np.timedelta64 objects as integers. """ return (not PyBool_Check(obj) and isinstance(obj, (int, cnp.integer)) and not is_timedelta64_object(obj)) ``` This would be less flexible as it explicitly checks for numpy integer, but worth noting that they had the need to ensure the key is not a bool. ### Your contribution I can submit a pull request with the above changes after checking that indexing succeeds with the numpy integer type. Or if there is a different integer check that would be preferred I could add that. If there is a reason not to want this behavior that is fine too.
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7423/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7423/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/7421
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7421/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7421/comments
https://api.github.com/repos/huggingface/datasets/issues/7421/events
https://github.com/huggingface/datasets/issues/7421
2,878,369,052
I_kwDODunzps6rkG0c
7,421
DVC integration broken
{ "login": "maxstrobel", "id": 34747372, "node_id": "MDQ6VXNlcjM0NzQ3Mzcy", "avatar_url": "https://avatars.githubusercontent.com/u/34747372?v=4", "gravatar_id": "", "url": "https://api.github.com/users/maxstrobel", "html_url": "https://github.com/maxstrobel", "followers_url": "https://api.github.com/users/maxstrobel/followers", "following_url": "https://api.github.com/users/maxstrobel/following{/other_user}", "gists_url": "https://api.github.com/users/maxstrobel/gists{/gist_id}", "starred_url": "https://api.github.com/users/maxstrobel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/maxstrobel/subscriptions", "organizations_url": "https://api.github.com/users/maxstrobel/orgs", "repos_url": "https://api.github.com/users/maxstrobel/repos", "events_url": "https://api.github.com/users/maxstrobel/events{/privacy}", "received_events_url": "https://api.github.com/users/maxstrobel/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
1
2025-02-25T13:14:31
2025-03-03T17:42:02
null
NONE
null
{ "total": 0, "completed": 0, "percent_completed": 0 }
null
null
null
### Describe the bug The DVC integration seems to be broken. Followed this guide: https://dvc.org/doc/user-guide/integrations/huggingface ### Steps to reproduce the bug #### Script to reproduce ~~~python from datasets import load_dataset dataset = load_dataset( "csv", data_files="dvc://workshop/satellite-data/jan_train.csv", storage_options={"url": "https://github.com/iterative/dataset-registry.git"}, ) print(dataset) ~~~ #### Error log ~~~ Traceback (most recent call last): File "C:\tmp\test\load.py", line 3, in <module> dataset = load_dataset( ^^^^^^^^^^^^^ File "C:\tmp\test\.venv\Lib\site-packages\datasets\load.py", line 2151, in load_dataset builder_instance.download_and_prepare( File "C:\tmp\test\.venv\Lib\site-packages\datasets\builder.py", line 808, in download_and_prepare fs, output_dir = url_to_fs(output_dir, **(storage_options or {})) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: url_to_fs() got multiple values for argument 'url' ~~~ ### Expected behavior Integration would work and the indicated file is downloaded and opened. ### Environment info #### Python version ~~~ python --version Python 3.11.10 ~~~ #### Venv (pip install datasets dvc): ~~~ Package Version ---------------------- ----------- aiohappyeyeballs 2.4.6 aiohttp 3.11.13 aiohttp-retry 2.9.1 aiosignal 1.3.2 amqp 5.3.1 annotated-types 0.7.0 antlr4-python3-runtime 4.9.3 appdirs 1.4.4 asyncssh 2.20.0 atpublic 5.1 attrs 25.1.0 billiard 4.2.1 celery 5.4.0 certifi 2025.1.31 cffi 1.17.1 charset-normalizer 3.4.1 click 8.1.8 click-didyoumean 0.3.1 click-plugins 1.1.1 click-repl 0.3.0 colorama 0.4.6 configobj 5.0.9 cryptography 44.0.1 datasets 3.3.2 dictdiffer 0.9.0 dill 0.3.8 diskcache 5.6.3 distro 1.9.0 dpath 2.2.0 dulwich 0.22.7 dvc 3.59.1 dvc-data 3.16.9 dvc-http 2.32.0 dvc-objects 5.1.0 dvc-render 1.0.2 dvc-studio-client 0.21.0 dvc-task 0.40.2 entrypoints 0.4 filelock 3.17.0 flatten-dict 0.4.2 flufl-lock 8.1.0 frozenlist 1.5.0 fsspec 2024.12.0 funcy 2.0 gitdb 4.0.12 gitpython 3.1.44 grandalf 0.8 gto 1.7.2 huggingface-hub 0.29.1 hydra-core 1.3.2 idna 3.10 iterative-telemetry 0.0.10 kombu 5.4.2 markdown-it-py 3.0.0 mdurl 0.1.2 multidict 6.1.0 multiprocess 0.70.16 networkx 3.4.2 numpy 2.2.3 omegaconf 2.3.0 orjson 3.10.15 packaging 24.2 pandas 2.2.3 pathspec 0.12.1 platformdirs 4.3.6 prompt-toolkit 3.0.50 propcache 0.3.0 psutil 7.0.0 pyarrow 19.0.1 pycparser 2.22 pydantic 2.10.6 pydantic-core 2.27.2 pydot 3.0.4 pygit2 1.17.0 pygments 2.19.1 pygtrie 2.5.0 pyparsing 3.2.1 python-dateutil 2.9.0.post0 pytz 2025.1 pywin32 308 pyyaml 6.0.2 requests 2.32.3 rich 13.9.4 ruamel-yaml 0.18.10 ruamel-yaml-clib 0.2.12 scmrepo 3.3.10 semver 3.0.4 setuptools 75.8.0 shellingham 1.5.4 shortuuid 1.0.13 shtab 1.7.1 six 1.17.0 smmap 5.0.2 sqltrie 0.11.2 tabulate 0.9.0 tomlkit 0.13.2 tqdm 4.67.1 typer 0.15.1 typing-extensions 4.12.2 tzdata 2025.1 urllib3 2.3.0 vine 5.1.0 voluptuous 0.15.2 wcwidth 0.2.13 xxhash 3.5.0 yarl 1.18.3 zc-lockfile 3.0.post1 ~~~
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/7421/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/7421/timeline
null
null
false