comments_url
stringlengths
70
70
timeline_url
stringlengths
70
70
closed_at
stringlengths
20
20
performed_via_github_app
null
state_reason
stringclasses
3 values
node_id
stringlengths
18
32
state
stringclasses
2 values
assignees
listlengths
0
4
draft
bool
2 classes
number
int64
1.61k
6.73k
user
dict
title
stringlengths
1
290
events_url
stringlengths
68
68
milestone
dict
labels_url
stringlengths
75
75
created_at
stringlengths
20
20
active_lock_reason
null
locked
bool
1 class
assignee
dict
pull_request
dict
id
int64
771M
2.18B
labels
listlengths
0
4
url
stringlengths
61
61
comments
listlengths
0
30
repository_url
stringclasses
1 value
author_association
stringclasses
3 values
body
stringlengths
0
228k
updated_at
stringlengths
20
20
html_url
stringlengths
49
51
reactions
dict
is_pull_request
bool
2 classes
https://api.github.com/repos/huggingface/datasets/issues/5796/comments
https://api.github.com/repos/huggingface/datasets/issues/5796/timeline
2023-04-27T16:34:45Z
null
null
PR_kwDODunzps5PORm-
closed
[]
false
5,796
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
Spark docs
https://api.github.com/repos/huggingface/datasets/issues/5796/events
null
https://api.github.com/repos/huggingface/datasets/issues/5796/labels{/name}
2023-04-26T17:39:43Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5796.diff", "html_url": "https://github.com/huggingface/datasets/pull/5796", "merged_at": "2023-04-27T16:34:45Z", "patch_url": "https://github.com/huggingface/datasets/pull/5796.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5796" }
1,685,451,919
[]
https://api.github.com/repos/huggingface/datasets/issues/5796
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
Added a "Use with Spark" doc page to document `Dataset.from_spark` following https://github.com/huggingface/datasets/pull/5701 cc @maddiedawson
2023-04-27T16:41:50Z
https://github.com/huggingface/datasets/pull/5796
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5796/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5795/comments
https://api.github.com/repos/huggingface/datasets/issues/5795/timeline
2023-04-26T17:39:12Z
null
null
PR_kwDODunzps5POJo8
closed
[]
false
5,795
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
Fix spark imports
https://api.github.com/repos/huggingface/datasets/issues/5795/events
null
https://api.github.com/repos/huggingface/datasets/issues/5795/labels{/name}
2023-04-26T17:09:32Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5795.diff", "html_url": "https://github.com/huggingface/datasets/pull/5795", "merged_at": "2023-04-26T17:39:12Z", "patch_url": "https://github.com/huggingface/datasets/pull/5795.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5795" }
1,685,414,505
[]
https://api.github.com/repos/huggingface/datasets/issues/5795
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
null
2023-04-26T17:49:03Z
https://github.com/huggingface/datasets/pull/5795
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5795/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5794/comments
https://api.github.com/repos/huggingface/datasets/issues/5794/timeline
null
null
null
I_kwDODunzps5kcg0d
open
[]
null
5,794
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
CI ZeroDivisionError
https://api.github.com/repos/huggingface/datasets/issues/5794/events
null
https://api.github.com/repos/huggingface/datasets/issues/5794/labels{/name}
2023-04-26T14:55:23Z
null
false
null
null
1,685,196,061
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
https://api.github.com/repos/huggingface/datasets/issues/5794
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
Sometimes when running our CI on Windows, we get a ZeroDivisionError: ``` FAILED tests/test_metric_common.py::LocalMetricTest::test_load_metric_frugalscore - ZeroDivisionError: float division by zero ``` See for example: - https://github.com/huggingface/datasets/actions/runs/4809358266/jobs/8560513110 - https://github.com/huggingface/datasets/actions/runs/4798359836/jobs/8536573688 ``` _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ split = 'test', start_time = 1682516718.8236516, num_samples = 2, num_steps = 1 def speed_metrics(split, start_time, num_samples=None, num_steps=None): """ Measure and return speed performance metrics. This function requires a time snapshot `start_time` before the operation to be measured starts and this function should be run immediately after the operation to be measured has completed. Args: - split: name to prefix metric (like train, eval, test...) - start_time: operation start time - num_samples: number of samples processed """ runtime = time.time() - start_time result = {f"{split}_runtime": round(runtime, 4)} if num_samples is not None: > samples_per_second = num_samples / runtime E ZeroDivisionError: float division by zero C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\site-packages\transformers\trainer_utils.py:354: ZeroDivisionError ```
2023-04-26T14:55:23Z
https://github.com/huggingface/datasets/issues/5794
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5794/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5793/comments
https://api.github.com/repos/huggingface/datasets/issues/5793/timeline
2023-06-13T15:57:06Z
null
completed
I_kwDODunzps5ka6lo
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" } ]
null
5,793
{ "avatar_url": "https://avatars.githubusercontent.com/u/39762734?v=4", "events_url": "https://api.github.com/users/jiangwangyi/events{/privacy}", "followers_url": "https://api.github.com/users/jiangwangyi/followers", "following_url": "https://api.github.com/users/jiangwangyi/following{/other_user}", "gists_url": "https://api.github.com/users/jiangwangyi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jiangwangyi", "id": 39762734, "login": "jiangwangyi", "node_id": "MDQ6VXNlcjM5NzYyNzM0", "organizations_url": "https://api.github.com/users/jiangwangyi/orgs", "received_events_url": "https://api.github.com/users/jiangwangyi/received_events", "repos_url": "https://api.github.com/users/jiangwangyi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jiangwangyi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jiangwangyi/subscriptions", "type": "User", "url": "https://api.github.com/users/jiangwangyi" }
IterableDataset.with_format("torch") not working
https://api.github.com/repos/huggingface/datasets/issues/5793/events
null
https://api.github.com/repos/huggingface/datasets/issues/5793/labels{/name}
2023-04-26T10:50:23Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
null
1,684,777,320
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" }, { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" }, { "color": "fef2c0", "default": false, "description": "", "id": 3287858981, "name": "streaming", "node_id": "MDU6TGFiZWwzMjg3ODU4OTgx", "url": "https://api.github.com/repos/huggingface/datasets/labels/streaming" } ]
https://api.github.com/repos/huggingface/datasets/issues/5793
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug After calling the with_format("torch") method on an IterableDataset instance, the data format is unchanged. ### Steps to reproduce the bug ```python from datasets import IterableDataset def gen(): for i in range(4): yield {"a": [i] * 4} dataset = IterableDataset.from_generator(gen).with_format("torch") next(iter(dataset)) ``` ### Expected behavior `{"a": torch.tensor([0, 0, 0, 0])}` is expected, but `{"a": [0, 0, 0, 0]}` is observed. ### Environment info ```bash platform==ubuntu 22.04.01 python==3.10.9 datasets==2.11.0 ```
2023-06-13T15:57:06Z
https://github.com/huggingface/datasets/issues/5793
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5793/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5791/comments
https://api.github.com/repos/huggingface/datasets/issues/5791/timeline
2024-01-15T16:40:16Z
null
completed
I_kwDODunzps5kV8YX
closed
[]
null
5,791
{ "avatar_url": "https://avatars.githubusercontent.com/u/31293221?v=4", "events_url": "https://api.github.com/users/sebasmos/events{/privacy}", "followers_url": "https://api.github.com/users/sebasmos/followers", "following_url": "https://api.github.com/users/sebasmos/following{/other_user}", "gists_url": "https://api.github.com/users/sebasmos/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sebasmos", "id": 31293221, "login": "sebasmos", "node_id": "MDQ6VXNlcjMxMjkzMjIx", "organizations_url": "https://api.github.com/users/sebasmos/orgs", "received_events_url": "https://api.github.com/users/sebasmos/received_events", "repos_url": "https://api.github.com/users/sebasmos/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sebasmos/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sebasmos/subscriptions", "type": "User", "url": "https://api.github.com/users/sebasmos" }
TIFF/TIF support
https://api.github.com/repos/huggingface/datasets/issues/5791/events
null
https://api.github.com/repos/huggingface/datasets/issues/5791/labels{/name}
2023-04-25T16:14:18Z
null
false
null
null
1,683,473,943
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
https://api.github.com/repos/huggingface/datasets/issues/5791
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Feature request I currently have a dataset (with tiff and json files) where I have to do this: `wget path_to_data/images.zip && unzip images.zip` `wget path_to_data/annotations.zip && unzip annotations.zip` Would it make sense a contribution that supports these type of files? ### Motivation instead of using `load_dataset` have to use wget as these files are not supported for annotations with JSON and images with TIFF files. Additionally to this, the PIL formatting from datasets does not read correctly the image channels with TIFF format, besides multichannel adaptation might be necessary as well (as my data e.g has more than 3 channels) ### Your contribution 1. Support TIFF images over multi channel format 2. Support JSON annotations
2024-01-15T16:40:33Z
https://github.com/huggingface/datasets/issues/5791
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5791/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5790/comments
https://api.github.com/repos/huggingface/datasets/issues/5790/timeline
2023-04-26T13:35:47Z
null
null
PR_kwDODunzps5PG0mJ
closed
[]
false
5,790
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
Allow to run CI on push to ci-branch
https://api.github.com/repos/huggingface/datasets/issues/5790/events
null
https://api.github.com/repos/huggingface/datasets/issues/5790/labels{/name}
2023-04-25T13:57:26Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5790.diff", "html_url": "https://github.com/huggingface/datasets/pull/5790", "merged_at": "2023-04-26T13:35:47Z", "patch_url": "https://github.com/huggingface/datasets/pull/5790.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5790" }
1,683,229,126
[]
https://api.github.com/repos/huggingface/datasets/issues/5790
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
This PR allows to run the CI on push to a branch named "ci-*", without needing to open a PR. - This will allow to make CI tests without opening a PR, e.g., for future `huggingface-hub` releases, future dependency releases (like `fsspec`, `pandas`,...) Note that to build the documentation, we already allow it on push to a branch named "doc-builder*". See: - #5788 CC: @Wauplin
2023-04-26T13:43:08Z
https://github.com/huggingface/datasets/pull/5790
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5790/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5789/comments
https://api.github.com/repos/huggingface/datasets/issues/5789/timeline
null
null
null
I_kwDODunzps5kSpvr
open
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
5,789
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
Support streaming datasets that use jsonlines
https://api.github.com/repos/huggingface/datasets/issues/5789/events
null
https://api.github.com/repos/huggingface/datasets/issues/5789/labels{/name}
2023-04-25T07:40:02Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
null
1,682,611,179
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
https://api.github.com/repos/huggingface/datasets/issues/5789
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
Extend support for streaming datasets that use `jsonlines.open`. Currently, if `jsonlines` is installed, `datasets` raises a `FileNotFoundError`: ``` FileNotFoundError: [Errno 2] No such file or directory: 'https://...' ``` See: - https://huggingface.co/datasets/masakhane/afriqa/discussions/1
2023-04-25T07:40:03Z
https://github.com/huggingface/datasets/issues/5789
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/5789/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5788/comments
https://api.github.com/repos/huggingface/datasets/issues/5788/timeline
2023-04-25T14:25:30Z
null
null
PR_kwDODunzps5O_v4B
closed
[]
false
5,788
{ "avatar_url": "https://avatars.githubusercontent.com/u/11801849?v=4", "events_url": "https://api.github.com/users/Wauplin/events{/privacy}", "followers_url": "https://api.github.com/users/Wauplin/followers", "following_url": "https://api.github.com/users/Wauplin/following{/other_user}", "gists_url": "https://api.github.com/users/Wauplin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Wauplin", "id": 11801849, "login": "Wauplin", "node_id": "MDQ6VXNlcjExODAxODQ5", "organizations_url": "https://api.github.com/users/Wauplin/orgs", "received_events_url": "https://api.github.com/users/Wauplin/received_events", "repos_url": "https://api.github.com/users/Wauplin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Wauplin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Wauplin/subscriptions", "type": "User", "url": "https://api.github.com/users/Wauplin" }
Prepare tests for hfh 0.14
https://api.github.com/repos/huggingface/datasets/issues/5788/events
null
https://api.github.com/repos/huggingface/datasets/issues/5788/labels{/name}
2023-04-24T12:13:03Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5788.diff", "html_url": "https://github.com/huggingface/datasets/pull/5788", "merged_at": "2023-04-25T14:25:30Z", "patch_url": "https://github.com/huggingface/datasets/pull/5788.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5788" }
1,681,136,256
[]
https://api.github.com/repos/huggingface/datasets/issues/5788
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
Related to the coming release of `huggingface_hub==0.14.0`. It will break some internal tests. The PR fixes these tests. Let's double-check the CI but I expect the fixed tests to be running fine with both `hfh<=0.13.4` and `hfh==0.14`. Worth case scenario, existing PRs will have to be rebased once this fix is merged. See related [discussion](https://huggingface.slack.com/archives/C02V5EA0A95/p1682337463368609?thread_ts=1681994202.635609&cid=C02V5EA0A95) (private slack). cc @lhoestq
2023-04-25T14:32:56Z
https://github.com/huggingface/datasets/pull/5788
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5788/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5787/comments
https://api.github.com/repos/huggingface/datasets/issues/5787/timeline
2023-04-27T12:57:28Z
null
null
PR_kwDODunzps5O_KNU
closed
[]
false
5,787
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
Fix inferring module for unsupported data files
https://api.github.com/repos/huggingface/datasets/issues/5787/events
null
https://api.github.com/repos/huggingface/datasets/issues/5787/labels{/name}
2023-04-24T10:44:50Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5787.diff", "html_url": "https://github.com/huggingface/datasets/pull/5787", "merged_at": "2023-04-27T12:57:28Z", "patch_url": "https://github.com/huggingface/datasets/pull/5787.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5787" }
1,680,965,959
[]
https://api.github.com/repos/huggingface/datasets/issues/5787
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
This PR raises a FileNotFoundError instead: ``` FileNotFoundError: No (supported) data files or dataset script found in <dataset_name> ``` Fix #5785.
2023-04-27T13:06:01Z
https://github.com/huggingface/datasets/pull/5787
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5787/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5786/comments
https://api.github.com/repos/huggingface/datasets/issues/5786/timeline
2023-04-24T10:43:58Z
null
completed
I_kwDODunzps5kMV6O
closed
[]
null
5,786
{ "avatar_url": "https://avatars.githubusercontent.com/u/44556846?v=4", "events_url": "https://api.github.com/users/HugoLaurencon/events{/privacy}", "followers_url": "https://api.github.com/users/HugoLaurencon/followers", "following_url": "https://api.github.com/users/HugoLaurencon/following{/other_user}", "gists_url": "https://api.github.com/users/HugoLaurencon/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/HugoLaurencon", "id": 44556846, "login": "HugoLaurencon", "node_id": "MDQ6VXNlcjQ0NTU2ODQ2", "organizations_url": "https://api.github.com/users/HugoLaurencon/orgs", "received_events_url": "https://api.github.com/users/HugoLaurencon/received_events", "repos_url": "https://api.github.com/users/HugoLaurencon/repos", "site_admin": false, "starred_url": "https://api.github.com/users/HugoLaurencon/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/HugoLaurencon/subscriptions", "type": "User", "url": "https://api.github.com/users/HugoLaurencon" }
Multiprocessing in a `filter` or `map` function with a Pytorch model
https://api.github.com/repos/huggingface/datasets/issues/5786/events
null
https://api.github.com/repos/huggingface/datasets/issues/5786/labels{/name}
2023-04-24T10:38:07Z
null
false
null
null
1,680,957,070
[]
https://api.github.com/repos/huggingface/datasets/issues/5786
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
### Describe the bug I am trying to use a Pytorch model loaded on CPUs with multiple processes with a `.map` or a `.filter` method. Usually, when dealing with models that are non-pickable, creating a class such that the `map` function is the method `__call__`, and adding `reduce` helps to solve the problem. However, here, the command hangs without throwing an error. ### Steps to reproduce the bug ``` from datasets import Dataset import torch from torch import nn from torchvision import models ​ ​ class FilterFunction: #__slots__ = ("path_model", "model") # Doesn't change anything uncommented def __init__(self, path_model): self.path_model = path_model model = models.resnet50() model.fc = nn.Sequential( nn.Linear(2048, 512), nn.ReLU(), nn.Dropout(0.2), nn.Linear(512, 10), nn.LogSoftmax(dim=1) ) model.load_state_dict(torch.load(path_model, map_location=torch.device("cpu"))) model.eval() self.model = model def __call__(self, batch): return [True] * len(batch["id"]) # Comment this to have an error def __reduce__(self): return (self.__class__, (self.path_model,)) ​ ​ dataset = Dataset.from_dict({"id": [0, 1, 2, 4]}) ​ # Download (100 MB) at https://github.com/emiliantolo/pytorch_nsfw_model/raw/master/ResNet50_nsfw_model.pth path_model = "/fsx/hugo/nsfw_image/ResNet50_nsfw_model.pth" ​ filter_function = FilterFunction(path_model=path_model) ​ # Works filtered_dataset = dataset.filter(filter_function, num_proc=1, batched=True, batch_size=2) # Doesn't work filtered_dataset = dataset.filter(filter_function, num_proc=2, batched=True, batch_size=2) ``` ### Expected behavior The command `filtered_dataset = dataset.filter(filter_function, num_proc=2, batched=True, batch_size=2)` should work and not hang. ### Environment info Datasets: 2.11.0 Pyarrow: 11.0.0 Ubuntu
2023-05-30T09:56:30Z
https://github.com/huggingface/datasets/issues/5786
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5786/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5785/comments
https://api.github.com/repos/huggingface/datasets/issues/5785/timeline
2023-04-27T12:57:30Z
null
completed
I_kwDODunzps5kMV4k
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
5,785
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
Unsupported data files raise TypeError: 'NoneType' object is not iterable
https://api.github.com/repos/huggingface/datasets/issues/5785/events
null
https://api.github.com/repos/huggingface/datasets/issues/5785/labels{/name}
2023-04-24T10:38:03Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
null
1,680,956,964
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
https://api.github.com/repos/huggingface/datasets/issues/5785
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
Currently, we raise a TypeError for unsupported data files: ``` TypeError: 'NoneType' object is not iterable ``` See: - https://github.com/huggingface/datasets-server/issues/1073 We should give a more informative error message.
2023-04-27T12:57:30Z
https://github.com/huggingface/datasets/issues/5785
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5785/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5784/comments
https://api.github.com/repos/huggingface/datasets/issues/5784/timeline
2023-04-26T15:54:44Z
null
null
PR_kwDODunzps5O_G9S
closed
[]
false
5,784
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
Raise subprocesses traceback when interrupting
https://api.github.com/repos/huggingface/datasets/issues/5784/events
null
https://api.github.com/repos/huggingface/datasets/issues/5784/labels{/name}
2023-04-24T10:34:03Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5784.diff", "html_url": "https://github.com/huggingface/datasets/pull/5784", "merged_at": "2023-04-26T15:54:44Z", "patch_url": "https://github.com/huggingface/datasets/pull/5784.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5784" }
1,680,950,726
[]
https://api.github.com/repos/huggingface/datasets/issues/5784
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
When a subprocess hangs in `filter` or `map`, one should be able to get the subprocess' traceback when interrupting the main process. Right now it shows nothing. To do so I `.get()` the subprocesses async results even the main process is stopped with e.g. `KeyboardInterrupt`. I added a timeout in case the subprocess is hanging or crashed.
2023-04-26T16:04:42Z
https://github.com/huggingface/datasets/pull/5784
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5784/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5783/comments
https://api.github.com/repos/huggingface/datasets/issues/5783/timeline
null
null
null
I_kwDODunzps5kHaUJ
open
[]
null
5,783
{ "avatar_url": "https://avatars.githubusercontent.com/u/5066268?v=4", "events_url": "https://api.github.com/users/nishanthcgit/events{/privacy}", "followers_url": "https://api.github.com/users/nishanthcgit/followers", "following_url": "https://api.github.com/users/nishanthcgit/following{/other_user}", "gists_url": "https://api.github.com/users/nishanthcgit/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nishanthcgit", "id": 5066268, "login": "nishanthcgit", "node_id": "MDQ6VXNlcjUwNjYyNjg=", "organizations_url": "https://api.github.com/users/nishanthcgit/orgs", "received_events_url": "https://api.github.com/users/nishanthcgit/received_events", "repos_url": "https://api.github.com/users/nishanthcgit/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nishanthcgit/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nishanthcgit/subscriptions", "type": "User", "url": "https://api.github.com/users/nishanthcgit" }
Offset overflow while doing regex on a text column
https://api.github.com/repos/huggingface/datasets/issues/5783/events
null
https://api.github.com/repos/huggingface/datasets/issues/5783/labels{/name}
2023-04-22T19:12:03Z
null
false
null
null
1,679,664,393
[]
https://api.github.com/repos/huggingface/datasets/issues/5783
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug `ArrowInvalid: offset overflow while concatenating arrays` Same error as [here](https://github.com/huggingface/datasets/issues/615) ### Steps to reproduce the bug Steps to reproduce: (dataset is a few GB big so try in colab maybe) ``` import datasets import re ds = datasets.load_dataset('nishanthc/dnd_map_dataset_v0.1', split = 'train') def get_text_caption(example): regex_pattern = r'\s\d+x\d+|,\sLQ|,\sgrid|\.\w+$' example['text_caption'] = re.sub(regex_pattern, '', example['picture_text']) return example ds = ds.map(get_text_caption) ``` I am trying to apply a regex to remove certain patterns from a text column. Not sure why this error is showing up. ### Expected behavior Dataset should have a new column with processed text ### Environment info Datasets version - 2.11.0
2023-09-22T06:44:07Z
https://github.com/huggingface/datasets/issues/5783
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5783/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5782/comments
https://api.github.com/repos/huggingface/datasets/issues/5782/timeline
2023-05-10T20:23:04Z
null
completed
I_kwDODunzps5kHQDf
closed
[]
null
5,782
{ "avatar_url": "https://avatars.githubusercontent.com/u/129098876?v=4", "events_url": "https://api.github.com/users/BoringDonut/events{/privacy}", "followers_url": "https://api.github.com/users/BoringDonut/followers", "following_url": "https://api.github.com/users/BoringDonut/following{/other_user}", "gists_url": "https://api.github.com/users/BoringDonut/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/BoringDonut", "id": 129098876, "login": "BoringDonut", "node_id": "U_kgDOB7HkfA", "organizations_url": "https://api.github.com/users/BoringDonut/orgs", "received_events_url": "https://api.github.com/users/BoringDonut/received_events", "repos_url": "https://api.github.com/users/BoringDonut/repos", "site_admin": false, "starred_url": "https://api.github.com/users/BoringDonut/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/BoringDonut/subscriptions", "type": "User", "url": "https://api.github.com/users/BoringDonut" }
Support for various audio-loading backends instead of always relying on SoundFile
https://api.github.com/repos/huggingface/datasets/issues/5782/events
null
https://api.github.com/repos/huggingface/datasets/issues/5782/labels{/name}
2023-04-22T17:09:25Z
null
false
null
null
1,679,622,367
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
https://api.github.com/repos/huggingface/datasets/issues/5782
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Feature request Introduce an option to select from a variety of audio-loading backends rather than solely relying on the SoundFile library. For instance, if the ffmpeg library is installed, it can serve as a fallback loading option. ### Motivation - The SoundFile library, used in [features/audio.py](https://github.com/huggingface/datasets/blob/649d5a3315f9e7666713b6affe318ee00c7163a0/src/datasets/features/audio.py#L185), supports only a [limited number of audio formats](https://pysoundfile.readthedocs.io/en/latest/index.html?highlight=supported#soundfile.available_formats). - However, current methods for creating audio datasets permit the inclusion of audio files in formats not supported by SoundFile. - As a result, developers may potentially create a dataset they cannot read back. In my most recent project, I dealt with phone call recordings in `.amr` or `.gsm` formats and was genuinely surprised when I couldn't read the dataset I had just packaged a minute prior. Nonetheless, I can still accurately read these files using the librosa library, which employs the audioread library that internally leverages ffmpeg to read such files. Example: ```python audio_dataset_amr = Dataset.from_dict({"audio": ["audio_samples/audio.amr"]}).cast_column("audio", Audio()) audio_dataset_amr.save_to_disk("audio_dataset_amr") audio_dataset_amr = Dataset.load_from_disk("audio_dataset_amr") print(audio_dataset_amr[0]) ``` Results in: ``` Traceback (most recent call last): ... raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name)) soundfile.LibsndfileError: Error opening <_io.BytesIO object at 0x7f316323e4d0>: Format not recognised. ``` While I acknowledge that support for these rare file types may not be a priority, I believe it's quite unfortunate that it's possible to create an unreadable dataset in this manner. ### Your contribution I've created a [simple demo repository](https://github.com/BoringDonut/hf-datasets-ffmpeg-audio) that highlights the mentioned issue. It demonstrates how to create an .amr dataset that results in an error when attempting to read it just a few lines later. Additionally, I've made a [fork with a rudimentary solution](https://github.com/BoringDonut/datasets/blob/fea73a8fbbc8876467c7e6422c9360546c6372d8/src/datasets/features/audio.py#L189) that utilizes ffmpeg to load files not supported by SoundFile. Here you may see github actions fails to read `.amr` dataset using the version of the current dataset, but will work with the patched version: - https://github.com/BoringDonut/hf-datasets-ffmpeg-audio/actions/runs/4773780420/jobs/8487063785 - https://github.com/BoringDonut/hf-datasets-ffmpeg-audio/actions/runs/4773780420/jobs/8487063829 As evident from the GitHub action above, this solution resolves the previously mentioned problem. I'd be happy to create a proper pull request, provide runtime benchmarks and tests if you could offer some guidance on the following: - Where should I incorporate the ffmpeg (or other backends) code? For example, should I create a new file or simply add a function within the Audio class? - Is it feasible to pass the audio-loading function as an argument within the current architecture? This would be useful if I know in advance that I'll be reading files not supported by SoundFile. A few more notes: - In theory, it's possible to load audio using librosa/audioread since librosa is already expected to be installed. However, librosa [will soon discontinue audioread support](https://github.com/librosa/librosa/blob/aacb4c134002903ae56bbd4b4a330519a5abacc0/librosa/core/audio.py#L227). Moreover, using audioread on its own seems inconvenient because it requires a file [path as input](https://github.com/beetbox/audioread/blob/ff9535df934c48038af7be9617fdebb12078cc07/audioread/__init__.py#L108) and cannot work with bytes already loaded into memory or an open file descriptor (as mentioned in [librosa docs](https://librosa.org/doc/main/generated/librosa.load.html#librosa.load), only SoundFile backend supports an open file descriptor as an input).
2023-05-10T20:23:04Z
https://github.com/huggingface/datasets/issues/5782
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 1, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/5782/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5781/comments
https://api.github.com/repos/huggingface/datasets/issues/5781/timeline
2023-05-02T23:41:25Z
null
completed
I_kwDODunzps5kHF0s
closed
[]
null
5,781
{ "avatar_url": "https://avatars.githubusercontent.com/u/61463108?v=4", "events_url": "https://api.github.com/users/gjyoungjr/events{/privacy}", "followers_url": "https://api.github.com/users/gjyoungjr/followers", "following_url": "https://api.github.com/users/gjyoungjr/following{/other_user}", "gists_url": "https://api.github.com/users/gjyoungjr/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gjyoungjr", "id": 61463108, "login": "gjyoungjr", "node_id": "MDQ6VXNlcjYxNDYzMTA4", "organizations_url": "https://api.github.com/users/gjyoungjr/orgs", "received_events_url": "https://api.github.com/users/gjyoungjr/received_events", "repos_url": "https://api.github.com/users/gjyoungjr/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gjyoungjr/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gjyoungjr/subscriptions", "type": "User", "url": "https://api.github.com/users/gjyoungjr" }
Error using `load_datasets`
https://api.github.com/repos/huggingface/datasets/issues/5781/events
null
https://api.github.com/repos/huggingface/datasets/issues/5781/labels{/name}
2023-04-22T15:10:44Z
null
false
null
null
1,679,580,460
[]
https://api.github.com/repos/huggingface/datasets/issues/5781
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug I tried to load a dataset using the `datasets` library in a conda jupyter notebook and got the below error. ``` ImportError: dlopen(/Users/gilbertyoung/miniforge3/envs/review_sense/lib/python3.8/site-packages/scipy/sparse/linalg/_isolve/_iterative.cpython-38-darwin.so, 0x0002): Library not loaded: @rpath/liblapack.3.dylib Referenced from: <65B094A2-59D7-31AC-A966-4DB9E11D2A15> /Users/gilbertyoung/miniforge3/envs/review_sense/lib/python3.8/site-packages/scipy/sparse/linalg/_isolve/_iterative.cpython-38-darwin.so Reason: tried: '/Users/gilbertyoung/miniforge3/envs/review_sense/lib/python3.8/site-packages/scipy/sparse/linalg/_isolve/liblapack.3.dylib' (no such file), '/Users/gilbertyoung/miniforge3/envs/review_sense/lib/python3.8/site-packages/scipy/sparse/linalg/_isolve/../../../../../../liblapack.3.dylib' (no such file), '/Users/gilbertyoung/miniforge3/envs/review_sense/lib/python3.8/site-packages/scipy/sparse/linalg/_isolve/liblapack.3.dylib' (no such file), '/Users/gilbertyoung/miniforge3/envs/review_sense/lib/python3.8/site-packages/scipy/sparse/linalg/_isolve/../../../../../../liblapack.3.dylib' (no such file), '/Users/gilbertyoung/miniforge3/envs/review_sense/bin/../lib/liblapack.3.dylib' (no such file), '/Users/gilbertyoung/miniforge3/envs/review_sense/bin/../lib/liblapack.3.dylib' (no such file), '/usr/local/lib/liblapack.3.dylib' (no such file), '/usr/lib/liblapack.3.dylib' (no such file, not in dyld cache) ``` ### Steps to reproduce the bug Run the `load_datasets` function ### Expected behavior I expected the dataset to be loaded into my notebook. ### Environment info name: review_sense channels: - apple - conda-forge dependencies: - python=3.8 - pip>=19.0 - jupyter - tensorflow-deps #- scikit-learn #- scipy - pandas - pandas-datareader - matplotlib - pillow - tqdm - requests - h5py - pyyaml - flask - boto3 - ipykernel - seaborn - pip: - tensorflow-macos==2.9 - tensorflow-metal==0.5.0 - bayesian-optimization - gym - kaggle - huggingface_hub - datasets - numpy - huggingface
2023-05-02T23:41:25Z
https://github.com/huggingface/datasets/issues/5781
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5781/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5780/comments
https://api.github.com/repos/huggingface/datasets/issues/5780/timeline
2023-04-23T08:49:18Z
null
completed
I_kwDODunzps5kGRvt
closed
[]
null
5,780
{ "avatar_url": "https://avatars.githubusercontent.com/u/38179632?v=4", "events_url": "https://api.github.com/users/v-yunbin/events{/privacy}", "followers_url": "https://api.github.com/users/v-yunbin/followers", "following_url": "https://api.github.com/users/v-yunbin/following{/other_user}", "gists_url": "https://api.github.com/users/v-yunbin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/v-yunbin", "id": 38179632, "login": "v-yunbin", "node_id": "MDQ6VXNlcjM4MTc5NjMy", "organizations_url": "https://api.github.com/users/v-yunbin/orgs", "received_events_url": "https://api.github.com/users/v-yunbin/received_events", "repos_url": "https://api.github.com/users/v-yunbin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/v-yunbin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/v-yunbin/subscriptions", "type": "User", "url": "https://api.github.com/users/v-yunbin" }
TypeError: 'NoneType' object does not support item assignment
https://api.github.com/repos/huggingface/datasets/issues/5780/events
null
https://api.github.com/repos/huggingface/datasets/issues/5780/labels{/name}
2023-04-22T06:22:43Z
null
false
null
null
1,679,367,149
[]
https://api.github.com/repos/huggingface/datasets/issues/5780
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
command: ``` def load_datasets(formats, data_dir=datadir, data_files=datafile): dataset = load_dataset(formats, data_dir=datadir, data_files=datafile, split=split, streaming=True, **kwargs) return dataset raw_datasets = DatasetDict() raw_datasets["train"] = load_datasets(“csv”, args.datadir, "train.csv", split=train_split) raw_datasets["test"] = load_datasets(“csv”, args.datadir, "dev.csv", split=test_split) raw_datasets = raw_datasets.cast_column("audio", Audio(sampling_rate=16000)) ``` error: ``` main() File "peft_adalora_whisper_large_training.py", line 502, in main raw_datasets = raw_datasets.cast_column("audio", Audio(sampling_rate=16000)) File "/home/ybZhang/miniconda3/envs/whister/lib/python3.8/site-packages/datasets/dataset_dict.py", line 2015, in cast_column info.features[column] = feature TypeError: 'NoneType' object does not support item assignment ```
2023-04-23T08:49:18Z
https://github.com/huggingface/datasets/issues/5780
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5780/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5779/comments
https://api.github.com/repos/huggingface/datasets/issues/5779/timeline
2023-04-26T12:11:15Z
null
null
PR_kwDODunzps5O3sHp
closed
[]
false
5,779
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
Call fs.makedirs in save_to_disk
https://api.github.com/repos/huggingface/datasets/issues/5779/events
null
https://api.github.com/repos/huggingface/datasets/issues/5779/labels{/name}
2023-04-21T15:04:28Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5779.diff", "html_url": "https://github.com/huggingface/datasets/pull/5779", "merged_at": "2023-04-26T12:11:15Z", "patch_url": "https://github.com/huggingface/datasets/pull/5779.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5779" }
1,678,669,865
[]
https://api.github.com/repos/huggingface/datasets/issues/5779
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
We need to call `fs.makedirs` when saving a dataset using `save_to_disk`, because some fs implementations have actual directories (S3 and others don't) Close https://github.com/huggingface/datasets/issues/5775
2023-04-26T12:20:01Z
https://github.com/huggingface/datasets/pull/5779
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5779/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5778/comments
https://api.github.com/repos/huggingface/datasets/issues/5778/timeline
2023-07-24T15:15:14Z
null
completed
I_kwDODunzps5kBit_
closed
[]
null
5,778
{ "avatar_url": "https://avatars.githubusercontent.com/u/902005?v=4", "events_url": "https://api.github.com/users/liujuncn/events{/privacy}", "followers_url": "https://api.github.com/users/liujuncn/followers", "following_url": "https://api.github.com/users/liujuncn/following{/other_user}", "gists_url": "https://api.github.com/users/liujuncn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/liujuncn", "id": 902005, "login": "liujuncn", "node_id": "MDQ6VXNlcjkwMjAwNQ==", "organizations_url": "https://api.github.com/users/liujuncn/orgs", "received_events_url": "https://api.github.com/users/liujuncn/received_events", "repos_url": "https://api.github.com/users/liujuncn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/liujuncn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/liujuncn/subscriptions", "type": "User", "url": "https://api.github.com/users/liujuncn" }
Schrödinger's dataset_dict
https://api.github.com/repos/huggingface/datasets/issues/5778/events
null
https://api.github.com/repos/huggingface/datasets/issues/5778/labels{/name}
2023-04-21T08:38:12Z
null
false
null
null
1,678,125,951
[]
https://api.github.com/repos/huggingface/datasets/issues/5778
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug If you use load_dataset('json', data_files="path/test.json"), it will return DatasetDict({train:...}). And if you use load_dataset("path"), it will return DatasetDict({test:...}). Why can't the output behavior be unified? ### Steps to reproduce the bug as description above. ### Expected behavior consistent predictable output. ### Environment info '2.11.0'
2023-07-24T15:15:14Z
https://github.com/huggingface/datasets/issues/5778
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5778/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5777/comments
https://api.github.com/repos/huggingface/datasets/issues/5777/timeline
2023-05-11T11:51:56Z
null
completed
I_kwDODunzps5j_v-h
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
5,777
{ "avatar_url": "https://avatars.githubusercontent.com/u/34688597?v=4", "events_url": "https://api.github.com/users/jason-brian-anderson/events{/privacy}", "followers_url": "https://api.github.com/users/jason-brian-anderson/followers", "following_url": "https://api.github.com/users/jason-brian-anderson/following{/other_user}", "gists_url": "https://api.github.com/users/jason-brian-anderson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jason-brian-anderson", "id": 34688597, "login": "jason-brian-anderson", "node_id": "MDQ6VXNlcjM0Njg4NTk3", "organizations_url": "https://api.github.com/users/jason-brian-anderson/orgs", "received_events_url": "https://api.github.com/users/jason-brian-anderson/received_events", "repos_url": "https://api.github.com/users/jason-brian-anderson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jason-brian-anderson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jason-brian-anderson/subscriptions", "type": "User", "url": "https://api.github.com/users/jason-brian-anderson" }
datasets.load_dataset("code_search_net", "python") : NotADirectoryError: [Errno 20] Not a directory
https://api.github.com/repos/huggingface/datasets/issues/5777/events
null
https://api.github.com/repos/huggingface/datasets/issues/5777/labels{/name}
2023-04-21T02:08:07Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
null
1,677,655,969
[]
https://api.github.com/repos/huggingface/datasets/issues/5777
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug While checking out the [tokenizer tutorial](https://huggingface.co/course/chapter6/2?fw=pt), i noticed getting an error while initially downloading the python dataset used in the examples. The [collab with the error is here](https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/en/chapter6/section2.ipynb#scrollTo=hGb69Yo3eV8S) ``` from datasets import load_dataset import os os.environ["HF_DATASETS_CACHE"] = "/workspace" # This can take a few minutes to load, so grab a coffee or tea while you wait! raw_datasets = load_dataset("code_search_net", "python") ``` yeilds: ``` ile /opt/conda/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:524, in xlistdir(path, use_auth_token) 522 main_hop, *rest_hops = _as_str(path).split("::") 523 if is_local_path(main_hop): --> 524 return os.listdir(path) 525 else: 526 # globbing inside a zip in a private repo requires authentication 527 if not rest_hops and (main_hop.startswith("http://") or main_hop.startswith("https://")): NotADirectoryError: [Errno 20] Not a directory: '/workspace/downloads/25ceeb4c25ab737d688bd56ea92bfbb1f199fe572470456cf2d675479f342ac7/python/final/jsonl/train' ``` I was able to reproduce this erro both in the collab and on my own pytorch/pytorch container pulled from the dockerhub official pytorch image, so i think it may be a server side thing. ### Steps to reproduce the bug Steps to reproduce the issue: 1. run `raw_datasets = load_dataset("code_search_net", "python")` ### Expected behavior expect the code to not exception during dataset pull. ### Environment info i tried both the default HF_DATASETS_CACHE on Collab, and on my local container. i then pointed to the HF_DATASETS_CACHE to a large capacity local storage and the problem was consisten across all 3 scenarios.
2023-06-05T05:49:52Z
https://github.com/huggingface/datasets/issues/5777
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5777/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5776/comments
https://api.github.com/repos/huggingface/datasets/issues/5776/timeline
null
null
null
I_kwDODunzps5j9sLE
open
[ { "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" } ]
null
5,776
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
Use Pandas' `read_json` in the JSON builder
https://api.github.com/repos/huggingface/datasets/issues/5776/events
null
https://api.github.com/repos/huggingface/datasets/issues/5776/labels{/name}
2023-04-20T17:15:49Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
null
1,677,116,100
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
https://api.github.com/repos/huggingface/datasets/issues/5776
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
Instead of PyArrow's `read_json`, we should use `pd.read_json` in the JSON builder for consistency with the CSV and SQL builders (e.g., to address https://github.com/huggingface/datasets/issues/5725). In Pandas2.0, to get the same performance, we can set the `engine` to "pyarrow". The issue is that Colab still doesn't install Pandas 2.0 by default, so I think it's best to wait for this to be resolved on their side to avoid downgrading decoding performance in scenarios when Pandas 2.0 is not installed.
2023-04-20T17:15:49Z
https://github.com/huggingface/datasets/issues/5776
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5776/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5775/comments
https://api.github.com/repos/huggingface/datasets/issues/5775/timeline
2023-04-26T12:11:17Z
null
completed
I_kwDODunzps5j9lxt
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" } ]
null
5,775
{ "avatar_url": "https://avatars.githubusercontent.com/u/29817738?v=4", "events_url": "https://api.github.com/users/Zoupers/events{/privacy}", "followers_url": "https://api.github.com/users/Zoupers/followers", "following_url": "https://api.github.com/users/Zoupers/following{/other_user}", "gists_url": "https://api.github.com/users/Zoupers/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Zoupers", "id": 29817738, "login": "Zoupers", "node_id": "MDQ6VXNlcjI5ODE3NzM4", "organizations_url": "https://api.github.com/users/Zoupers/orgs", "received_events_url": "https://api.github.com/users/Zoupers/received_events", "repos_url": "https://api.github.com/users/Zoupers/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Zoupers/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Zoupers/subscriptions", "type": "User", "url": "https://api.github.com/users/Zoupers" }
ArrowDataset.save_to_disk lost some logic of remote
https://api.github.com/repos/huggingface/datasets/issues/5775/events
null
https://api.github.com/repos/huggingface/datasets/issues/5775/labels{/name}
2023-04-20T16:58:01Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
null
1,677,089,901
[]
https://api.github.com/repos/huggingface/datasets/issues/5775
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug https://github.com/huggingface/datasets/blob/e7ce0ac60c7efc10886471932854903a7c19f172/src/datasets/arrow_dataset.py#L1371 Here is the bug point, when I want to save from a `DatasetDict` class and the items of the instance is like `[('train', Dataset({features: ..., num_rows: ...}))]` , there is no guarantee that there exists a directory name `train` under `dataset_dict_path`. ### Steps to reproduce the bug 1. Mock a DatasetDict with items like what I said. 2. using save_to_disk with storage_options, u can use local sftp. code may like below ```python from datasets import load_dataset dataset = load_dataset(...) dataset.save_to_disk('sftp:///tmp', storage_options={'host': 'localhost', 'username': 'admin'}) ``` I suppose u can reproduce the bug by these steps. ### Expected behavior Should create the folder if it does not exists, just like we do locally. ### Environment info - `datasets` version: 2.11.0 - Platform: Linux-6.2.10-arch1-1-x86_64-with-glibc2.35 - Python version: 3.10.9 - Huggingface_hub version: 0.13.2 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
2023-04-26T12:11:36Z
https://github.com/huggingface/datasets/issues/5775
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5775/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5774/comments
https://api.github.com/repos/huggingface/datasets/issues/5774/timeline
2023-04-20T13:24:28Z
null
null
PR_kwDODunzps5OxIMe
closed
[]
false
5,774
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
Fix style
https://api.github.com/repos/huggingface/datasets/issues/5774/events
null
https://api.github.com/repos/huggingface/datasets/issues/5774/labels{/name}
2023-04-20T13:21:32Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5774.diff", "html_url": "https://github.com/huggingface/datasets/pull/5774", "merged_at": "2023-04-20T13:24:28Z", "patch_url": "https://github.com/huggingface/datasets/pull/5774.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5774" }
1,676,716,662
[]
https://api.github.com/repos/huggingface/datasets/issues/5774
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
Fix C419 issues
2023-04-20T13:34:26Z
https://github.com/huggingface/datasets/pull/5774
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5774/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5773/comments
https://api.github.com/repos/huggingface/datasets/issues/5773/timeline
null
null
null
I_kwDODunzps5j5X75
open
[]
null
5,773
{ "avatar_url": "https://avatars.githubusercontent.com/u/38179632?v=4", "events_url": "https://api.github.com/users/v-yunbin/events{/privacy}", "followers_url": "https://api.github.com/users/v-yunbin/followers", "following_url": "https://api.github.com/users/v-yunbin/following{/other_user}", "gists_url": "https://api.github.com/users/v-yunbin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/v-yunbin", "id": 38179632, "login": "v-yunbin", "node_id": "MDQ6VXNlcjM4MTc5NjMy", "organizations_url": "https://api.github.com/users/v-yunbin/orgs", "received_events_url": "https://api.github.com/users/v-yunbin/received_events", "repos_url": "https://api.github.com/users/v-yunbin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/v-yunbin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/v-yunbin/subscriptions", "type": "User", "url": "https://api.github.com/users/v-yunbin" }
train_dataset does not implement __len__
https://api.github.com/repos/huggingface/datasets/issues/5773/events
null
https://api.github.com/repos/huggingface/datasets/issues/5773/labels{/name}
2023-04-20T04:37:05Z
null
false
null
null
1,675,984,633
[]
https://api.github.com/repos/huggingface/datasets/issues/5773
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
when train using data precessored by the datasets, I get follow warning and it leads to that I can not set epoch numbers: `ValueError: The train_dataset does not implement __len__, max_steps has to be specified. The number of steps needs to be known in advance for the learning rate scheduler.`
2023-07-19T20:33:13Z
https://github.com/huggingface/datasets/issues/5773
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5773/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5772/comments
https://api.github.com/repos/huggingface/datasets/issues/5772/timeline
2023-04-21T06:35:27Z
null
null
PR_kwDODunzps5OreXV
closed
[]
false
5,772
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
Fix JSON builder when missing keys in first row
https://api.github.com/repos/huggingface/datasets/issues/5772/events
null
https://api.github.com/repos/huggingface/datasets/issues/5772/labels{/name}
2023-04-19T14:32:57Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5772.diff", "html_url": "https://github.com/huggingface/datasets/pull/5772", "merged_at": "2023-04-21T06:35:27Z", "patch_url": "https://github.com/huggingface/datasets/pull/5772.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5772" }
1,675,033,510
[]
https://api.github.com/repos/huggingface/datasets/issues/5772
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
Until now, the JSON builder only considered the keys present in the first element of the list: - Either explicitly: by passing index 0 in `dataset[0].keys()` - Or implicitly: `pa.Table.from_pylist(dataset)`, where "schema (default None): If not passed, will be inferred from the first row of the mapping values" This PR fixes the bug by considering the union of the keys present in all the rows. Fix #5726.
2023-04-21T06:45:13Z
https://github.com/huggingface/datasets/pull/5772
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5772/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5771/comments
https://api.github.com/repos/huggingface/datasets/issues/5771/timeline
2023-05-07T17:47:41Z
null
completed
I_kwDODunzps5j09pc
closed
[]
null
5,771
{ "avatar_url": "https://avatars.githubusercontent.com/u/2437102?v=4", "events_url": "https://api.github.com/users/eli-osherovich/events{/privacy}", "followers_url": "https://api.github.com/users/eli-osherovich/followers", "following_url": "https://api.github.com/users/eli-osherovich/following{/other_user}", "gists_url": "https://api.github.com/users/eli-osherovich/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/eli-osherovich", "id": 2437102, "login": "eli-osherovich", "node_id": "MDQ6VXNlcjI0MzcxMDI=", "organizations_url": "https://api.github.com/users/eli-osherovich/orgs", "received_events_url": "https://api.github.com/users/eli-osherovich/received_events", "repos_url": "https://api.github.com/users/eli-osherovich/repos", "site_admin": false, "starred_url": "https://api.github.com/users/eli-osherovich/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/eli-osherovich/subscriptions", "type": "User", "url": "https://api.github.com/users/eli-osherovich" }
Support cloud storage for loading datasets
https://api.github.com/repos/huggingface/datasets/issues/5771/events
null
https://api.github.com/repos/huggingface/datasets/issues/5771/labels{/name}
2023-04-19T12:43:53Z
null
false
null
null
1,674,828,380
[ { "color": "cfd3d7", "default": true, "description": "This issue or pull request already exists", "id": 1935892865, "name": "duplicate", "node_id": "MDU6TGFiZWwxOTM1ODkyODY1", "url": "https://api.github.com/repos/huggingface/datasets/labels/duplicate" }, { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
https://api.github.com/repos/huggingface/datasets/issues/5771
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
### Feature request It seems that the the current implementation supports cloud storage only for `load_from_disk`. It would be nice if a similar functionality existed in `load_dataset`. ### Motivation Motivation is pretty clear -- let users work with datasets located in the cloud. ### Your contribution I can help implementing this.
2023-05-07T17:47:41Z
https://github.com/huggingface/datasets/issues/5771
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5771/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5770/comments
https://api.github.com/repos/huggingface/datasets/issues/5770/timeline
2023-05-17T14:00:38Z
null
null
PR_kwDODunzps5OmntV
closed
[]
false
5,770
{ "avatar_url": "https://avatars.githubusercontent.com/u/106995444?v=4", "events_url": "https://api.github.com/users/maddiedawson/events{/privacy}", "followers_url": "https://api.github.com/users/maddiedawson/followers", "following_url": "https://api.github.com/users/maddiedawson/following{/other_user}", "gists_url": "https://api.github.com/users/maddiedawson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/maddiedawson", "id": 106995444, "login": "maddiedawson", "node_id": "U_kgDOBmCe9A", "organizations_url": "https://api.github.com/users/maddiedawson/orgs", "received_events_url": "https://api.github.com/users/maddiedawson/received_events", "repos_url": "https://api.github.com/users/maddiedawson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/maddiedawson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/maddiedawson/subscriptions", "type": "User", "url": "https://api.github.com/users/maddiedawson" }
Add IterableDataset.from_spark
https://api.github.com/repos/huggingface/datasets/issues/5770/events
null
https://api.github.com/repos/huggingface/datasets/issues/5770/labels{/name}
2023-04-18T17:47:53Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5770.diff", "html_url": "https://github.com/huggingface/datasets/pull/5770", "merged_at": "2023-05-17T14:00:38Z", "patch_url": "https://github.com/huggingface/datasets/pull/5770.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5770" }
1,673,581,555
[]
https://api.github.com/repos/huggingface/datasets/issues/5770
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
Follow-up from https://github.com/huggingface/datasets/pull/5701 Related issue: https://github.com/huggingface/datasets/issues/5678
2023-05-17T14:07:32Z
https://github.com/huggingface/datasets/pull/5770
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5770/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5769/comments
https://api.github.com/repos/huggingface/datasets/issues/5769/timeline
2023-05-04T18:55:57Z
null
completed
I_kwDODunzps5jvq-e
closed
[]
null
5,769
{ "avatar_url": "https://avatars.githubusercontent.com/u/22663468?v=4", "events_url": "https://api.github.com/users/markovalexander/events{/privacy}", "followers_url": "https://api.github.com/users/markovalexander/followers", "following_url": "https://api.github.com/users/markovalexander/following{/other_user}", "gists_url": "https://api.github.com/users/markovalexander/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/markovalexander", "id": 22663468, "login": "markovalexander", "node_id": "MDQ6VXNlcjIyNjYzNDY4", "organizations_url": "https://api.github.com/users/markovalexander/orgs", "received_events_url": "https://api.github.com/users/markovalexander/received_events", "repos_url": "https://api.github.com/users/markovalexander/repos", "site_admin": false, "starred_url": "https://api.github.com/users/markovalexander/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/markovalexander/subscriptions", "type": "User", "url": "https://api.github.com/users/markovalexander" }
Tiktoken tokenizers are not pickable
https://api.github.com/repos/huggingface/datasets/issues/5769/events
null
https://api.github.com/repos/huggingface/datasets/issues/5769/labels{/name}
2023-04-18T16:07:40Z
null
false
null
null
1,673,441,182
[]
https://api.github.com/repos/huggingface/datasets/issues/5769
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug Since tiktoken tokenizer is not pickable, it is not possible to use it inside `dataset.map()` with multiprocessing enabled. However, you [made](https://github.com/huggingface/datasets/issues/5536) tiktoken's tokenizers pickable in `datasets==2.10.0` for caching. For some reason, this logic does not work in dataset processing and raises `TypeError: cannot pickle 'builtins.CoreBPE' object` ### Steps to reproduce the bug ``` from datasets import load_dataset import tiktoken dataset = load_dataset("stas/openwebtext-10k") enc = tiktoken.get_encoding("gpt2") tokenized = dataset.map( process, remove_columns=['text'], desc="tokenizing the OWT splits", num_proc=2, ) def process(example): ids = enc.encode(example['text']) ids.append(enc.eot_token) out = {'ids': ids, 'len': len(ids)} return out ``` ### Expected behavior starts processing dataset ### Environment info - `datasets` version: 2.11.0 - Platform: Linux-5.15.0-1021-oracle-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.13.4 - PyArrow version: 9.0.0 - Pandas version: 2.0.0
2023-05-04T18:55:57Z
https://github.com/huggingface/datasets/issues/5769
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5769/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5768/comments
https://api.github.com/repos/huggingface/datasets/issues/5768/timeline
2023-04-20T10:27:22Z
null
completed
I_kwDODunzps5jsD3h
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
5,768
{ "avatar_url": "https://avatars.githubusercontent.com/u/57412770?v=4", "events_url": "https://api.github.com/users/yaseen157/events{/privacy}", "followers_url": "https://api.github.com/users/yaseen157/followers", "following_url": "https://api.github.com/users/yaseen157/following{/other_user}", "gists_url": "https://api.github.com/users/yaseen157/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/yaseen157", "id": 57412770, "login": "yaseen157", "node_id": "MDQ6VXNlcjU3NDEyNzcw", "organizations_url": "https://api.github.com/users/yaseen157/orgs", "received_events_url": "https://api.github.com/users/yaseen157/received_events", "repos_url": "https://api.github.com/users/yaseen157/repos", "site_admin": false, "starred_url": "https://api.github.com/users/yaseen157/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yaseen157/subscriptions", "type": "User", "url": "https://api.github.com/users/yaseen157" }
load_dataset("squad") doesn't work in 2.7.1 and 2.10.1
https://api.github.com/repos/huggingface/datasets/issues/5768/events
null
https://api.github.com/repos/huggingface/datasets/issues/5768/labels{/name}
2023-04-18T07:10:56Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
null
1,672,494,561
[]
https://api.github.com/repos/huggingface/datasets/issues/5768
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug There is an issue that seems to be unique to the "squad" dataset, in which it cannot be loaded using standard methods. This issue is most quickly reproduced from the command line, using the HF examples to verify a dataset is loaded properly. This is not a problem with "squad_v2" dataset for example. ### Steps to reproduce the bug cmd line > $ python -c "from datasets import load_dataset; print(load_dataset('squad', split='train')[0])" OR Python IDE > from datasets import load_dataset > load_dataset("squad") ### Expected behavior I expected to either see the output described here from running the very same command in command line ([https://huggingface.co/docs/datasets/installation]), or any output that does not raise Python's TypeError. There is some funky behaviour in the dataset builder portion of the codebase that means it is trying to import the squad dataset with an incorrect path, or the squad dataset couldn't be downloaded. I'm not really sure what the problem is beyond that. Messing around with caching I did manage to get it to load the dataset once, and then couldn't repeat this. ### Environment info datasets=2.7.1 **or** 2.10.1, python=3.10.8, Linux 3.10.0-1160.36.2.el7.x86_64 **or** Windows 10-64
2023-04-20T10:27:23Z
https://github.com/huggingface/datasets/issues/5768
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5768/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5767/comments
https://api.github.com/repos/huggingface/datasets/issues/5767/timeline
2023-04-20T16:52:05Z
null
completed
I_kwDODunzps5jr1E7
closed
[]
null
5,767
{ "avatar_url": "https://avatars.githubusercontent.com/u/109907638?v=4", "events_url": "https://api.github.com/users/sauravtii/events{/privacy}", "followers_url": "https://api.github.com/users/sauravtii/followers", "following_url": "https://api.github.com/users/sauravtii/following{/other_user}", "gists_url": "https://api.github.com/users/sauravtii/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sauravtii", "id": 109907638, "login": "sauravtii", "node_id": "U_kgDOBo0Otg", "organizations_url": "https://api.github.com/users/sauravtii/orgs", "received_events_url": "https://api.github.com/users/sauravtii/received_events", "repos_url": "https://api.github.com/users/sauravtii/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sauravtii/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sauravtii/subscriptions", "type": "User", "url": "https://api.github.com/users/sauravtii" }
How to use Distill-BERT with different datasets?
https://api.github.com/repos/huggingface/datasets/issues/5767/events
null
https://api.github.com/repos/huggingface/datasets/issues/5767/labels{/name}
2023-04-18T06:25:12Z
null
false
null
null
1,672,433,979
[]
https://api.github.com/repos/huggingface/datasets/issues/5767
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug - `transformers` version: 4.11.3 - Platform: Linux-5.4.0-58-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyTorch version (GPU?): 1.12.0+cu102 (True) - Tensorflow version (GPU?): 2.10.0 (True) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in> ### Steps to reproduce the bug I recently read [this](https://huggingface.co/docs/transformers/quicktour#train-with-tensorflow:~:text=The%20most%20important%20thing%20to%20remember%20is%20you%20need%20to%20instantiate%20a%20tokenizer%20with%20the%20same%20model%20name%20to%20ensure%20you%E2%80%99re%20using%20the%20same%20tokenization%20rules%20a%20model%20was%20pretrained%20with.) and was wondering how to use distill-BERT (which is pre-trained with imdb dataset) with a different dataset (for eg. [this](https://huggingface.co/datasets/yhavinga/imdb_dutch) dataset)? ### Expected behavior Distill-BERT should work with different datasets. ### Environment info - `datasets` version: 1.12.1 - Platform: Linux-5.4.0-58-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 11.0.0
2023-04-20T16:52:05Z
https://github.com/huggingface/datasets/issues/5767
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5767/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5766/comments
https://api.github.com/repos/huggingface/datasets/issues/5766/timeline
null
null
null
I_kwDODunzps5joNm6
open
[]
null
5,766
{ "avatar_url": "https://avatars.githubusercontent.com/u/37540982?v=4", "events_url": "https://api.github.com/users/jmontalt/events{/privacy}", "followers_url": "https://api.github.com/users/jmontalt/followers", "following_url": "https://api.github.com/users/jmontalt/following{/other_user}", "gists_url": "https://api.github.com/users/jmontalt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jmontalt", "id": 37540982, "login": "jmontalt", "node_id": "MDQ6VXNlcjM3NTQwOTgy", "organizations_url": "https://api.github.com/users/jmontalt/orgs", "received_events_url": "https://api.github.com/users/jmontalt/received_events", "repos_url": "https://api.github.com/users/jmontalt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jmontalt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jmontalt/subscriptions", "type": "User", "url": "https://api.github.com/users/jmontalt" }
Support custom feature types
https://api.github.com/repos/huggingface/datasets/issues/5766/events
null
https://api.github.com/repos/huggingface/datasets/issues/5766/labels{/name}
2023-04-17T15:46:41Z
null
false
null
null
1,671,485,882
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
https://api.github.com/repos/huggingface/datasets/issues/5766
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Feature request I think it would be nice to allow registering custom feature types with the 🤗 Datasets library. For example, allow to do something along the following lines: ``` from datasets.features import register_feature_type # this would be a new function @register_feature_type class CustomFeatureType: def encode_example(self, value): """User-provided logic to encode an example of this feature.""" pass def decode_example(self, value, token_per_repo_id=None): """User-provided logic to decode an example of this feature.""" pass ``` ### Motivation Users of 🤗 Datasets, such as myself, may want to use the library to load datasets with unsupported feature types (i.e., beyond `ClassLabel`, `Image`, or `Audio`). This would be useful for prototyping new feature types and for feature types that aren't used widely enough to warrant inclusion in 🤗 Datasets. At the moment, this is only possible by monkey-patching 🤗 Datasets, which obfuscates the code and is prone to breaking with library updates. It also requires the user to write some custom code which could be easily avoided. ### Your contribution I would be happy to contribute this feature. My proposed solution would involve changing the following call to `globals()` to an explicit feature type registry, which a user-facing `register_feature_type` decorator could update. https://github.com/huggingface/datasets/blob/fd893098627230cc734f6009ad04cf885c979ac4/src/datasets/features/features.py#L1329 I would also provide an abstract base class for custom feature types which users could inherit. This would have at least an `encode_example` method and a `decode_example` method, similar to `Image` or `Audio`. The existing `encode_nested_example` and `decode_nested_example` functions would also need to be updated to correctly call the corresponding functions for the new type.
2024-03-10T11:11:22Z
https://github.com/huggingface/datasets/issues/5766
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5766/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5765/comments
https://api.github.com/repos/huggingface/datasets/issues/5765/timeline
null
null
null
I_kwDODunzps5jn16Y
open
[]
null
5,765
{ "avatar_url": "https://avatars.githubusercontent.com/u/109907638?v=4", "events_url": "https://api.github.com/users/sauravtii/events{/privacy}", "followers_url": "https://api.github.com/users/sauravtii/followers", "following_url": "https://api.github.com/users/sauravtii/following{/other_user}", "gists_url": "https://api.github.com/users/sauravtii/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sauravtii", "id": 109907638, "login": "sauravtii", "node_id": "U_kgDOBo0Otg", "organizations_url": "https://api.github.com/users/sauravtii/orgs", "received_events_url": "https://api.github.com/users/sauravtii/received_events", "repos_url": "https://api.github.com/users/sauravtii/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sauravtii/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sauravtii/subscriptions", "type": "User", "url": "https://api.github.com/users/sauravtii" }
ValueError: You should supply an encoding or a list of encodings to this method that includes input_ids, but you provided ['text']
https://api.github.com/repos/huggingface/datasets/issues/5765/events
null
https://api.github.com/repos/huggingface/datasets/issues/5765/labels{/name}
2023-04-17T15:00:50Z
null
false
null
null
1,671,388,824
[]
https://api.github.com/repos/huggingface/datasets/issues/5765
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug Following is my code that I am trying to run, but facing an error (have attached the whole error below): My code: ``` from collections import OrderedDict import warnings import flwr as fl import torch import numpy as np import random from torch.utils.data import DataLoader from datasets import load_dataset, load_metric from transformers import AutoTokenizer, DataCollatorWithPadding from transformers import AutoModelForSequenceClassification from transformers import AdamW #from transformers import tokenized_datasets warnings.filterwarnings("ignore", category=UserWarning) # DEVICE = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") DEVICE = "cpu" CHECKPOINT = "distilbert-base-uncased" # transformer model checkpoint def load_data(): """Load IMDB data (training and eval)""" raw_datasets = load_dataset("yhavinga/imdb_dutch") raw_datasets = raw_datasets.shuffle(seed=42) # remove unnecessary data split del raw_datasets["unsupervised"] tokenizer = AutoTokenizer.from_pretrained(CHECKPOINT) def tokenize_function(examples): return tokenizer(examples["text"], truncation=True) # random 100 samples population = random.sample(range(len(raw_datasets["train"])), 100) tokenized_datasets = raw_datasets.map(tokenize_function, batched=True) tokenized_datasets["train"] = tokenized_datasets["train"].select(population) tokenized_datasets["test"] = tokenized_datasets["test"].select(population) # tokenized_datasets = tokenized_datasets.remove_columns("text") # tokenized_datasets = tokenized_datasets.rename_column("label", "labels") tokenized_datasets = tokenized_datasets.remove_columns("attention_mask") tokenized_datasets = tokenized_datasets.remove_columns("input_ids") tokenized_datasets = tokenized_datasets.remove_columns("label") tokenized_datasets = tokenized_datasets.remove_columns("text_en") # tokenized_datasets = tokenized_datasets.remove_columns(raw_datasets["train"].column_names) data_collator = DataCollatorWithPadding(tokenizer=tokenizer) trainloader = DataLoader( tokenized_datasets["train"], shuffle=True, batch_size=32, collate_fn=data_collator, ) testloader = DataLoader( tokenized_datasets["test"], batch_size=32, collate_fn=data_collator ) return trainloader, testloader def train(net, trainloader, epochs): optimizer = AdamW(net.parameters(), lr=5e-4) net.train() for _ in range(epochs): for batch in trainloader: batch = {k: v.to(DEVICE) for k, v in batch.items()} outputs = net(**batch) loss = outputs.loss loss.backward() optimizer.step() optimizer.zero_grad() def test(net, testloader): metric = load_metric("accuracy") loss = 0 net.eval() for batch in testloader: batch = {k: v.to(DEVICE) for k, v in batch.items()} with torch.no_grad(): outputs = net(**batch) logits = outputs.logits loss += outputs.loss.item() predictions = torch.argmax(logits, dim=-1) metric.add_batch(predictions=predictions, references=batch["labels"]) loss /= len(testloader.dataset) accuracy = metric.compute()["accuracy"] return loss, accuracy def main(): net = AutoModelForSequenceClassification.from_pretrained( CHECKPOINT, num_labels=2 ).to(DEVICE) trainloader, testloader = load_data() # Flower client class IMDBClient(fl.client.NumPyClient): def get_parameters(self, config): return [val.cpu().numpy() for _, val in net.state_dict().items()] def set_parameters(self, parameters): params_dict = zip(net.state_dict().keys(), parameters) state_dict = OrderedDict({k: torch.Tensor(v) for k, v in params_dict}) net.load_state_dict(state_dict, strict=True) def fit(self, parameters, config): self.set_parameters(parameters) print("Training Started...") train(net, trainloader, epochs=1) print("Training Finished.") return self.get_parameters(config={}), len(trainloader), {} def evaluate(self, parameters, config): self.set_parameters(parameters) loss, accuracy = test(net, testloader) return float(loss), len(testloader), {"accuracy": float(accuracy)} # Start client fl.client.start_numpy_client(server_address="localhost:8080", client=IMDBClient()) if __name__ == "__main__": main() ``` Error: ``` Traceback (most recent call last): File "client_2.py", line 136, in <module> main() File "client_2.py", line 132, in main fl.client.start_numpy_client(server_address="localhost:8080", client=IMDBClient()) File "/home/saurav/.local/lib/python3.8/site-packages/flwr/client/app.py", line 208, in start_numpy_client start_client( File "/home/saurav/.local/lib/python3.8/site-packages/flwr/client/app.py", line 142, in start_client client_message, sleep_duration, keep_going = handle( File "/home/saurav/.local/lib/python3.8/site-packages/flwr/client/grpc_client/message_handler.py", line 68, in handle return _fit(client, server_msg.fit_ins), 0, True File "/home/saurav/.local/lib/python3.8/site-packages/flwr/client/grpc_client/message_handler.py", line 157, in _fit fit_res = client.fit(fit_ins) File "/home/saurav/.local/lib/python3.8/site-packages/flwr/client/app.py", line 252, in _fit results = self.numpy_client.fit(parameters, ins.config) # type: ignore File "client_2.py", line 122, in fit train(net, trainloader, epochs=1) File "client_2.py", line 76, in train for batch in trainloader: File "/home/saurav/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 652, in __next__ data = self._next_data() File "/home/saurav/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 692, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "/home/saurav/.local/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 52, in fetch return self.collate_fn(data) File "/home/saurav/.local/lib/python3.8/site-packages/transformers/data/data_collator.py", line 221, in __call__ batch = self.tokenizer.pad( File "/home/saurav/.local/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 2713, in pad raise ValueError( ValueError: You should supply an encoding or a list of encodings to this method that includes input_ids, but you provided ['text'] ``` ### Steps to reproduce the bug Run the above code. ### Expected behavior Don't know, doing it for the first time. ### Environment info - `datasets` version: 1.12.1 - Platform: Linux-5.4.0-58-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 11.0.0
2023-04-25T13:50:45Z
https://github.com/huggingface/datasets/issues/5765
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5765/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5764/comments
https://api.github.com/repos/huggingface/datasets/issues/5764/timeline
2023-04-18T07:18:20Z
null
completed
I_kwDODunzps5jlXjm
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
5,764
{ "avatar_url": "https://avatars.githubusercontent.com/u/109907638?v=4", "events_url": "https://api.github.com/users/sauravtii/events{/privacy}", "followers_url": "https://api.github.com/users/sauravtii/followers", "following_url": "https://api.github.com/users/sauravtii/following{/other_user}", "gists_url": "https://api.github.com/users/sauravtii/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sauravtii", "id": 109907638, "login": "sauravtii", "node_id": "U_kgDOBo0Otg", "organizations_url": "https://api.github.com/users/sauravtii/orgs", "received_events_url": "https://api.github.com/users/sauravtii/received_events", "repos_url": "https://api.github.com/users/sauravtii/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sauravtii/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sauravtii/subscriptions", "type": "User", "url": "https://api.github.com/users/sauravtii" }
ConnectionError: Couldn't reach https://www.dropbox.com/s/zts98j4vkqtsns6/aclImdb_v2.tar?dl=1
https://api.github.com/repos/huggingface/datasets/issues/5764/events
null
https://api.github.com/repos/huggingface/datasets/issues/5764/labels{/name}
2023-04-17T09:08:18Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
null
1,670,740,198
[]
https://api.github.com/repos/huggingface/datasets/issues/5764
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug I want to use this (https://huggingface.co/datasets/josianem/imdb) dataset therefore I am trying to load it using the following code: ``` dataset = load_dataset("josianem/imdb") ``` The dataset is not getting loaded and gives the error message as the following: ``` Traceback (most recent call last): File "sample.py", line 3, in <module> dataset = load_dataset("josianem/imdb") File "/home/saurav/.local/lib/python3.8/site-packages/datasets/load.py", line 1112, in load_dataset builder_instance.download_and_prepare( File "/home/saurav/.local/lib/python3.8/site-packages/datasets/builder.py", line 636, in download_and_prepare self._download_and_prepare( File "/home/saurav/.local/lib/python3.8/site-packages/datasets/builder.py", line 704, in _download_and_prepare split_generators = self._split_generators(dl_manager, **split_generators_kwargs) File "/home/saurav/.cache/huggingface/modules/datasets_modules/datasets/imdb/cc6ab4acab2799be15d5d217c24548b856156dafdc850165fdc4f2031f27ff2f/imdb.py", line 79, in _split_generators archive = dl_manager.download(_DOWNLOAD_URL) File "/home/saurav/.local/lib/python3.8/site-packages/datasets/utils/download_manager.py", line 196, in download downloaded_path_or_paths = map_nested( File "/home/saurav/.local/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 197, in map_nested return function(data_struct) File "/home/saurav/.local/lib/python3.8/site-packages/datasets/utils/download_manager.py", line 217, in _download return cached_path(url_or_filename, download_config=download_config) File "/home/saurav/.local/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 289, in cached_path output_path = get_from_cache( File "/home/saurav/.local/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 606, in get_from_cache raise ConnectionError("Couldn't reach {}".format(url)) ConnectionError: Couldn't reach https://www.dropbox.com/s/zts98j4vkqtsns6/aclImdb_v2.tar?dl=1 ``` ### Steps to reproduce the bug You can reproduce the error by using the following code: ``` from datasets import load_dataset, load_metric dataset = load_dataset("josianem/imdb") ``` ### Expected behavior The dataset should get loaded (I am using this dataset for the first time so not much aware of the exact behavior). ### Environment info - `datasets` version: 1.12.1 - Platform: Linux-5.4.0-58-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 11.0.0
2023-04-18T07:18:20Z
https://github.com/huggingface/datasets/issues/5764
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5764/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5763/comments
https://api.github.com/repos/huggingface/datasets/issues/5763/timeline
2023-04-17T14:54:46Z
null
null
PR_kwDODunzps5OcMI7
closed
[]
false
5,763
{ "avatar_url": "https://avatars.githubusercontent.com/u/1967608?v=4", "events_url": "https://api.github.com/users/csris/events{/privacy}", "followers_url": "https://api.github.com/users/csris/followers", "following_url": "https://api.github.com/users/csris/following{/other_user}", "gists_url": "https://api.github.com/users/csris/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/csris", "id": 1967608, "login": "csris", "node_id": "MDQ6VXNlcjE5Njc2MDg=", "organizations_url": "https://api.github.com/users/csris/orgs", "received_events_url": "https://api.github.com/users/csris/received_events", "repos_url": "https://api.github.com/users/csris/repos", "site_admin": false, "starred_url": "https://api.github.com/users/csris/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/csris/subscriptions", "type": "User", "url": "https://api.github.com/users/csris" }
fix typo: "mow" -> "now"
https://api.github.com/repos/huggingface/datasets/issues/5763/events
null
https://api.github.com/repos/huggingface/datasets/issues/5763/labels{/name}
2023-04-17T06:03:44Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5763.diff", "html_url": "https://github.com/huggingface/datasets/pull/5763", "merged_at": "2023-04-17T14:54:46Z", "patch_url": "https://github.com/huggingface/datasets/pull/5763.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5763" }
1,670,476,302
[]
https://api.github.com/repos/huggingface/datasets/issues/5763
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
I noticed a typo as I was reading the datasets documentation. This PR contains a trivial fix changing "mow" to "now."
2023-04-17T15:01:53Z
https://github.com/huggingface/datasets/pull/5763
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5763/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5762/comments
https://api.github.com/repos/huggingface/datasets/issues/5762/timeline
2023-04-17T09:37:27Z
null
completed
I_kwDODunzps5jjyjG
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
5,762
{ "avatar_url": "https://avatars.githubusercontent.com/u/17240858?v=4", "events_url": "https://api.github.com/users/surya-narayanan/events{/privacy}", "followers_url": "https://api.github.com/users/surya-narayanan/followers", "following_url": "https://api.github.com/users/surya-narayanan/following{/other_user}", "gists_url": "https://api.github.com/users/surya-narayanan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/surya-narayanan", "id": 17240858, "login": "surya-narayanan", "node_id": "MDQ6VXNlcjE3MjQwODU4", "organizations_url": "https://api.github.com/users/surya-narayanan/orgs", "received_events_url": "https://api.github.com/users/surya-narayanan/received_events", "repos_url": "https://api.github.com/users/surya-narayanan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/surya-narayanan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/surya-narayanan/subscriptions", "type": "User", "url": "https://api.github.com/users/surya-narayanan" }
Not able to load the pile
https://api.github.com/repos/huggingface/datasets/issues/5762/events
null
https://api.github.com/repos/huggingface/datasets/issues/5762/labels{/name}
2023-04-17T03:09:10Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
null
1,670,326,470
[]
https://api.github.com/repos/huggingface/datasets/issues/5762
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug Got this error when I am trying to load the pile dataset ``` TypeError: Couldn't cast array of type struct<file: string, id: string> to {'id': Value(dtype='string', id=None)} ``` ### Steps to reproduce the bug Please visit the following sample notebook https://colab.research.google.com/drive/1JHcjawcHL6QHhi5VcqYd07W2QCEj2nWK#scrollTo=ulJP3eJCI-tB ### Expected behavior The pile should work ### Environment info - `datasets` version: 2.11.0 - Platform: Linux-5.10.147+-x86_64-with-glibc2.31 - Python version: 3.9.16 - Huggingface_hub version: 0.13.4 - PyArrow version: 9.0.0 - Pandas version: 1.5.3
2023-04-17T09:37:27Z
https://github.com/huggingface/datasets/issues/5762
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5762/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5761/comments
https://api.github.com/repos/huggingface/datasets/issues/5761/timeline
null
null
null
I_kwDODunzps5jirSW
open
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
5,761
{ "avatar_url": "https://avatars.githubusercontent.com/u/69686152?v=4", "events_url": "https://api.github.com/users/blghtr/events{/privacy}", "followers_url": "https://api.github.com/users/blghtr/followers", "following_url": "https://api.github.com/users/blghtr/following{/other_user}", "gists_url": "https://api.github.com/users/blghtr/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/blghtr", "id": 69686152, "login": "blghtr", "node_id": "MDQ6VXNlcjY5Njg2MTUy", "organizations_url": "https://api.github.com/users/blghtr/orgs", "received_events_url": "https://api.github.com/users/blghtr/received_events", "repos_url": "https://api.github.com/users/blghtr/repos", "site_admin": false, "starred_url": "https://api.github.com/users/blghtr/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/blghtr/subscriptions", "type": "User", "url": "https://api.github.com/users/blghtr" }
One or several metadata.jsonl were found, but not in the same directory or in a parent directory
https://api.github.com/repos/huggingface/datasets/issues/5761/events
null
https://api.github.com/repos/huggingface/datasets/issues/5761/labels{/name}
2023-04-16T16:21:55Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
null
1,670,034,582
[]
https://api.github.com/repos/huggingface/datasets/issues/5761
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug An attempt to generate a dataset from a zip archive using imagefolder and metadata.jsonl does not lead to the expected result. Tried all possible locations of the json file: the file in the archive is ignored (generated dataset contains only images), the file next to the archive like [here](https://huggingface.co/docs/datasets/image_dataset#imagefolder) leads to an error: ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) File ~\PycharmProjects\testproj\venv\lib\site-packages\datasets\builder.py:1610, in GeneratorBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id) 1609 _time = time.time() -> 1610 for key, record in generator: 1611 if max_shard_size is not None and writer._num_bytes > max_shard_size: File ~\PycharmProjects\testproj\venv\lib\site-packages\datasets\packaged_modules\folder_based_builder\folder_based_builder.py:370, in FolderBasedBuilder._generate_examples(self, files, metadata_files, split_name, add_metadata, add_labels) 369 else: --> 370 raise ValueError( 371 f"One or several metadata.{metadata_ext} were found, but not in the same directory or in a parent directory of {downloaded_dir_file}." 372 ) 373 if metadata_dir is not None and downloaded_metadata_file is not None: ValueError: One or several metadata.jsonl were found, but not in the same directory or in a parent directory of C:\Users\User\.cache\huggingface\datasets\downloads\extracted\f7fb7de25fb28ae63089974524f2d271a39d83888bc456d04aa3b3d45f33e6a6\ff0745a0-a741-4d9e-b228-a93b851adf61.png. The above exception was the direct cause of the following exception: DatasetGenerationError Traceback (most recent call last) Cell In[3], line 1 ----> 1 dataset = load_dataset("imagefolder", data_dir=r'C:\Users\User\data') File ~\PycharmProjects\testproj\venv\lib\site-packages\datasets\load.py:1791, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs) 1788 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES 1790 # Download and prepare data -> 1791 builder_instance.download_and_prepare( 1792 download_config=download_config, 1793 download_mode=download_mode, 1794 verification_mode=verification_mode, 1795 try_from_hf_gcs=try_from_hf_gcs, 1796 num_proc=num_proc, 1797 storage_options=storage_options, 1798 ) 1800 # Build dataset for splits 1801 keep_in_memory = ( 1802 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size) 1803 ) File ~\PycharmProjects\testproj\venv\lib\site-packages\datasets\builder.py:891, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs) 889 if num_proc is not None: 890 prepare_split_kwargs["num_proc"] = num_proc --> 891 self._download_and_prepare( 892 dl_manager=dl_manager, 893 verification_mode=verification_mode, 894 **prepare_split_kwargs, 895 **download_and_prepare_kwargs, 896 ) 897 # Sync info 898 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values()) File ~\PycharmProjects\testproj\venv\lib\site-packages\datasets\builder.py:1651, in GeneratorBasedBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_splits_kwargs) 1650 def _download_and_prepare(self, dl_manager, verification_mode, **prepare_splits_kwargs): -> 1651 super()._download_and_prepare( 1652 dl_manager, 1653 verification_mode, 1654 check_duplicate_keys=verification_mode == VerificationMode.BASIC_CHECKS 1655 or verification_mode == VerificationMode.ALL_CHECKS, 1656 **prepare_splits_kwargs, 1657 ) File ~\PycharmProjects\testproj\venv\lib\site-packages\datasets\builder.py:986, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs) 982 split_dict.add(split_generator.split_info) 984 try: 985 # Prepare split will record examples associated to the split --> 986 self._prepare_split(split_generator, **prepare_split_kwargs) 987 except OSError as e: 988 raise OSError( 989 "Cannot find data file. " 990 + (self.manual_download_instructions or "") 991 + "\nOriginal error:\n" 992 + str(e) 993 ) from None File ~\PycharmProjects\testproj\venv\lib\site-packages\datasets\builder.py:1490, in GeneratorBasedBuilder._prepare_split(self, split_generator, check_duplicate_keys, file_format, num_proc, max_shard_size) 1488 gen_kwargs = split_generator.gen_kwargs 1489 job_id = 0 -> 1490 for job_id, done, content in self._prepare_split_single( 1491 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args 1492 ): 1493 if done: 1494 result = content File ~\PycharmProjects\testproj\venv\lib\site-packages\datasets\builder.py:1646, in GeneratorBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id) 1644 if isinstance(e, SchemaInferenceError) and e.__context__ is not None: 1645 e = e.__context__ -> 1646 raise DatasetGenerationError("An error occurred while generating the dataset") from e 1648 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths) DatasetGenerationError: An error occurred while generating the dataset ``` ### Steps to reproduce the bug 1. Organize directory structure like in the docs: folder/metadata.jsonl folder/train.zip 2. Run load_dataset("imagefolder", data_dir='folder/metadata.jsonl', split='train') ### Expected behavior Dataset generated with all additional features from metadata.jsonl ### Environment info - `datasets` version: 2.11.0 - Platform: Windows-10-10.0.22621-SP0 - Python version: 3.9.0 - Huggingface_hub version: 0.13.4 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
2023-04-19T11:53:24Z
https://github.com/huggingface/datasets/issues/5761
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5761/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5760/comments
https://api.github.com/repos/huggingface/datasets/issues/5760/timeline
null
null
null
I_kwDODunzps5jipso
open
[ { "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" } ]
null
5,760
{ "avatar_url": "https://avatars.githubusercontent.com/u/44398246?v=4", "events_url": "https://api.github.com/users/vvvm23/events{/privacy}", "followers_url": "https://api.github.com/users/vvvm23/followers", "following_url": "https://api.github.com/users/vvvm23/following{/other_user}", "gists_url": "https://api.github.com/users/vvvm23/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/vvvm23", "id": 44398246, "login": "vvvm23", "node_id": "MDQ6VXNlcjQ0Mzk4MjQ2", "organizations_url": "https://api.github.com/users/vvvm23/orgs", "received_events_url": "https://api.github.com/users/vvvm23/received_events", "repos_url": "https://api.github.com/users/vvvm23/repos", "site_admin": false, "starred_url": "https://api.github.com/users/vvvm23/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vvvm23/subscriptions", "type": "User", "url": "https://api.github.com/users/vvvm23" }
Multi-image loading in Imagefolder dataset
https://api.github.com/repos/huggingface/datasets/issues/5760/events
null
https://api.github.com/repos/huggingface/datasets/issues/5760/labels{/name}
2023-04-16T16:01:05Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
null
1,670,028,072
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
https://api.github.com/repos/huggingface/datasets/issues/5760
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Feature request Extend the `imagefolder` dataloading script to support loading multiple images per dataset entry. This only really makes sense if a metadata file is present. Currently you can use the following format (example `metadata.jsonl`: ``` {'file_name': 'path_to_image.png', 'metadata': ...} ... ``` which will return a batch with key `image` and any other metadata. I would propose extending `file_name` to also accept a list of files, which would return a batch with key `images` and any other metadata. ### Motivation This is useful for example in segmentation tasks in computer vision models, or in text-to-image models that also accept conditioning signals such as another image, feature map, or similar. Currently if I want to do this, I would need to write a custom dataset, rather than just use `imagefolder`. ### Your contribution Would be open to doing a PR, but also happy for someone else to take it as I am not familiar with the datasets library.
2023-11-30T12:06:20Z
https://github.com/huggingface/datasets/issues/5760
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5760/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5759/comments
https://api.github.com/repos/huggingface/datasets/issues/5759/timeline
null
null
null
I_kwDODunzps5jidb4
open
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
5,759
{ "avatar_url": "https://avatars.githubusercontent.com/u/72137647?v=4", "events_url": "https://api.github.com/users/LZY-the-boys/events{/privacy}", "followers_url": "https://api.github.com/users/LZY-the-boys/followers", "following_url": "https://api.github.com/users/LZY-the-boys/following{/other_user}", "gists_url": "https://api.github.com/users/LZY-the-boys/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/LZY-the-boys", "id": 72137647, "login": "LZY-the-boys", "node_id": "MDQ6VXNlcjcyMTM3NjQ3", "organizations_url": "https://api.github.com/users/LZY-the-boys/orgs", "received_events_url": "https://api.github.com/users/LZY-the-boys/received_events", "repos_url": "https://api.github.com/users/LZY-the-boys/repos", "site_admin": false, "starred_url": "https://api.github.com/users/LZY-the-boys/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/LZY-the-boys/subscriptions", "type": "User", "url": "https://api.github.com/users/LZY-the-boys" }
Can I load in list of list of dict format?
https://api.github.com/repos/huggingface/datasets/issues/5759/events
null
https://api.github.com/repos/huggingface/datasets/issues/5759/labels{/name}
2023-04-16T13:50:14Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
null
1,669,977,848
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
https://api.github.com/repos/huggingface/datasets/issues/5759
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Feature request my jsonl dataset has following format: ``` [{'input':xxx, 'output':xxx},{'input:xxx,'output':xxx},...] [{'input':xxx, 'output':xxx},{'input:xxx,'output':xxx},...] ``` I try to use `datasets.load_dataset('json', data_files=path)` or `datasets.Dataset.from_json`, it raises ``` File "site-packages/datasets/arrow_dataset.py", line 1078, in from_json ).read() File "site-packages/datasets/io/json.py", line 59, in read self.builder.download_and_prepare( File "site-packages/datasets/builder.py", line 872, in download_and_prepare self._download_and_prepare( File "site-packages/datasets/builder.py", line 967, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "site-packages/datasets/builder.py", line 1749, in _prepare_split for job_id, done, content in self._prepare_split_single( File "site-packages/datasets/builder.py", line 1892, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.builder.DatasetGenerationError: An error occurred while generating the dataset ``` ### Motivation I wanna use features like `Datasets.map` or `Datasets.shuffle`, so i need the dataset in memory to be `arrow_dataset.Datasets` format ### Your contribution PR
2023-04-19T12:04:36Z
https://github.com/huggingface/datasets/issues/5759
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5759/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5758/comments
https://api.github.com/repos/huggingface/datasets/issues/5758/timeline
2023-04-20T15:30:48Z
null
null
PR_kwDODunzps5OaY9S
closed
[]
false
5,758
{ "avatar_url": "https://avatars.githubusercontent.com/u/2437102?v=4", "events_url": "https://api.github.com/users/eli-osherovich/events{/privacy}", "followers_url": "https://api.github.com/users/eli-osherovich/followers", "following_url": "https://api.github.com/users/eli-osherovich/following{/other_user}", "gists_url": "https://api.github.com/users/eli-osherovich/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/eli-osherovich", "id": 2437102, "login": "eli-osherovich", "node_id": "MDQ6VXNlcjI0MzcxMDI=", "organizations_url": "https://api.github.com/users/eli-osherovich/orgs", "received_events_url": "https://api.github.com/users/eli-osherovich/received_events", "repos_url": "https://api.github.com/users/eli-osherovich/repos", "site_admin": false, "starred_url": "https://api.github.com/users/eli-osherovich/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/eli-osherovich/subscriptions", "type": "User", "url": "https://api.github.com/users/eli-osherovich" }
Fixes #5757
https://api.github.com/repos/huggingface/datasets/issues/5758/events
null
https://api.github.com/repos/huggingface/datasets/issues/5758/labels{/name}
2023-04-16T11:56:01Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5758.diff", "html_url": "https://github.com/huggingface/datasets/pull/5758", "merged_at": "2023-04-20T15:30:48Z", "patch_url": "https://github.com/huggingface/datasets/pull/5758.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5758" }
1,669,920,923
[]
https://api.github.com/repos/huggingface/datasets/issues/5758
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
Fixes the bug #5757
2023-04-20T15:37:49Z
https://github.com/huggingface/datasets/pull/5758
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5758/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5757/comments
https://api.github.com/repos/huggingface/datasets/issues/5757/timeline
2023-04-20T15:30:51Z
null
completed
I_kwDODunzps5jiM_n
closed
[]
null
5,757
{ "avatar_url": "https://avatars.githubusercontent.com/u/2437102?v=4", "events_url": "https://api.github.com/users/eli-osherovich/events{/privacy}", "followers_url": "https://api.github.com/users/eli-osherovich/followers", "following_url": "https://api.github.com/users/eli-osherovich/following{/other_user}", "gists_url": "https://api.github.com/users/eli-osherovich/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/eli-osherovich", "id": 2437102, "login": "eli-osherovich", "node_id": "MDQ6VXNlcjI0MzcxMDI=", "organizations_url": "https://api.github.com/users/eli-osherovich/orgs", "received_events_url": "https://api.github.com/users/eli-osherovich/received_events", "repos_url": "https://api.github.com/users/eli-osherovich/repos", "site_admin": false, "starred_url": "https://api.github.com/users/eli-osherovich/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/eli-osherovich/subscriptions", "type": "User", "url": "https://api.github.com/users/eli-osherovich" }
Tilde (~) is not supported
https://api.github.com/repos/huggingface/datasets/issues/5757/events
null
https://api.github.com/repos/huggingface/datasets/issues/5757/labels{/name}
2023-04-16T11:48:10Z
null
false
null
null
1,669,910,503
[]
https://api.github.com/repos/huggingface/datasets/issues/5757
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
### Describe the bug It seems that `~` is not recognized correctly in local paths. Whenever I try to use it I get an exception ### Steps to reproduce the bug ```python load_dataset("imagefolder", data_dir="~/data/my_dataset") ``` Will generate the following error: ``` EmptyDatasetError: The directory at /path/to/cwd/~/data/datasets/clementine_tagged_per_cam doesn't contain any data files ``` ### Expected behavior Load the dataset. ### Environment info datasets==2.11.0
2023-04-20T15:30:51Z
https://github.com/huggingface/datasets/issues/5757
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5757/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5756/comments
https://api.github.com/repos/huggingface/datasets/issues/5756/timeline
2023-04-18T03:40:56Z
null
completed
I_kwDODunzps5jhUQA
closed
[]
null
5,756
{ "avatar_url": "https://avatars.githubusercontent.com/u/21077341?v=4", "events_url": "https://api.github.com/users/rohfle/events{/privacy}", "followers_url": "https://api.github.com/users/rohfle/followers", "following_url": "https://api.github.com/users/rohfle/following{/other_user}", "gists_url": "https://api.github.com/users/rohfle/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rohfle", "id": 21077341, "login": "rohfle", "node_id": "MDQ6VXNlcjIxMDc3MzQx", "organizations_url": "https://api.github.com/users/rohfle/orgs", "received_events_url": "https://api.github.com/users/rohfle/received_events", "repos_url": "https://api.github.com/users/rohfle/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rohfle/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rohfle/subscriptions", "type": "User", "url": "https://api.github.com/users/rohfle" }
Calling shuffle on a IterableDataset with streaming=True, gives "ValueError: cannot reshape array"
https://api.github.com/repos/huggingface/datasets/issues/5756/events
null
https://api.github.com/repos/huggingface/datasets/issues/5756/labels{/name}
2023-04-16T04:59:47Z
null
false
null
null
1,669,678,080
[]
https://api.github.com/repos/huggingface/datasets/issues/5756
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug When calling shuffle on a IterableDataset with streaming=True, I get the following error: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/administrator/Documents/Projects/huggingface/jax-diffusers-sprint-consistency-models/virtualenv/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 937, in __iter__ for key, example in ex_iterable: File "/home/administrator/Documents/Projects/huggingface/jax-diffusers-sprint-consistency-models/virtualenv/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 627, in __iter__ for x in self.ex_iterable: File "/home/administrator/Documents/Projects/huggingface/jax-diffusers-sprint-consistency-models/virtualenv/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 138, in __iter__ yield from self.generate_examples_fn(**kwargs_with_shuffled_shards) File "/home/administrator/.cache/huggingface/modules/datasets_modules/datasets/mnist/fda16c03c4ecfb13f165ba7e29cf38129ce035011519968cdaf74894ce91c9d4/mnist.py", line 111, in _generate_examples images = np.frombuffer(f.read(), dtype=np.uint8).reshape(size, 28, 28) ValueError: cannot reshape array of size 59992 into shape (60000,28,28) ``` Tested with the fashion_mnist and mnist datasets ### Steps to reproduce the bug Code to reproduce ```python from datasets import load_dataset SHUFFLE_SEED = 42 SHUFFLE_BUFFER_SIZE = 10_000 dataset = load_dataset('fashion_mnist', streaming=True).shuffle(seed=SHUFFLE_SEED, buffer_size=SHUFFLE_BUFFER_SIZE) next(iter(dataset['train'])) ``` ### Expected behavior A random item from the dataset and no error ### Environment info - `datasets` version: 2.11.0 - Platform: Linux-5.15.0-69-generic-x86_64-with-glibc2.35 - Python version: 3.10.6 - Huggingface_hub version: 0.13.4 - PyArrow version: 11.0.0 - Pandas version: 2.0.0
2023-04-18T03:40:56Z
https://github.com/huggingface/datasets/issues/5756
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5756/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5755/comments
https://api.github.com/repos/huggingface/datasets/issues/5755/timeline
2023-04-14T23:36:19Z
null
completed
I_kwDODunzps5je6h2
closed
[]
null
5,755
{ "avatar_url": "https://avatars.githubusercontent.com/u/1405491?v=4", "events_url": "https://api.github.com/users/fivejjs/events{/privacy}", "followers_url": "https://api.github.com/users/fivejjs/followers", "following_url": "https://api.github.com/users/fivejjs/following{/other_user}", "gists_url": "https://api.github.com/users/fivejjs/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/fivejjs", "id": 1405491, "login": "fivejjs", "node_id": "MDQ6VXNlcjE0MDU0OTE=", "organizations_url": "https://api.github.com/users/fivejjs/orgs", "received_events_url": "https://api.github.com/users/fivejjs/received_events", "repos_url": "https://api.github.com/users/fivejjs/repos", "site_admin": false, "starred_url": "https://api.github.com/users/fivejjs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fivejjs/subscriptions", "type": "User", "url": "https://api.github.com/users/fivejjs" }
ImportError: cannot import name 'DeprecatedEnum' from 'datasets.utils.deprecation_utils'
https://api.github.com/repos/huggingface/datasets/issues/5755/events
null
https://api.github.com/repos/huggingface/datasets/issues/5755/labels{/name}
2023-04-14T23:28:54Z
null
false
null
null
1,669,048,438
[]
https://api.github.com/repos/huggingface/datasets/issues/5755
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug The module moved to new place? ### Steps to reproduce the bug in the import step, ```python from datasets.utils.deprecation_utils import DeprecatedEnum ``` error: ``` ImportError: cannot import name 'DeprecatedEnum' from 'datasets.utils.deprecation_utils' ``` ### Expected behavior import successfully ### Environment info python==3.9.16 datasets==1.18.3
2023-04-14T23:36:19Z
https://github.com/huggingface/datasets/issues/5755
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5755/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5754/comments
https://api.github.com/repos/huggingface/datasets/issues/5754/timeline
2023-04-20T15:21:00Z
null
null
PR_kwDODunzps5OWozh
closed
[]
false
5,754
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
Minor tqdm fixes
https://api.github.com/repos/huggingface/datasets/issues/5754/events
null
https://api.github.com/repos/huggingface/datasets/issues/5754/labels{/name}
2023-04-14T18:15:14Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5754.diff", "html_url": "https://github.com/huggingface/datasets/pull/5754", "merged_at": "2023-04-20T15:21:00Z", "patch_url": "https://github.com/huggingface/datasets/pull/5754.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5754" }
1,668,755,035
[]
https://api.github.com/repos/huggingface/datasets/issues/5754
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
`GeneratorBasedBuilder`'s TQDM bars were not used as context managers. This PR fixes that (missed these bars in https://github.com/huggingface/datasets/pull/5560). Also, this PR modifies the single-proc `save_to_disk` to fix the issue with the TQDM bar not accumulating the progress in the multi-shard setting (again, this bug was introduced by me in the linked PR 😎)
2023-04-20T15:27:58Z
https://github.com/huggingface/datasets/pull/5754
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5754/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5753/comments
https://api.github.com/repos/huggingface/datasets/issues/5753/timeline
2023-04-14T17:36:37Z
null
completed
I_kwDODunzps5jdblQ
closed
[]
null
5,753
{ "avatar_url": "https://avatars.githubusercontent.com/u/93869735?v=4", "events_url": "https://api.github.com/users/sanchit-gandhi/events{/privacy}", "followers_url": "https://api.github.com/users/sanchit-gandhi/followers", "following_url": "https://api.github.com/users/sanchit-gandhi/following{/other_user}", "gists_url": "https://api.github.com/users/sanchit-gandhi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sanchit-gandhi", "id": 93869735, "login": "sanchit-gandhi", "node_id": "U_kgDOBZhWpw", "organizations_url": "https://api.github.com/users/sanchit-gandhi/orgs", "received_events_url": "https://api.github.com/users/sanchit-gandhi/received_events", "repos_url": "https://api.github.com/users/sanchit-gandhi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sanchit-gandhi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sanchit-gandhi/subscriptions", "type": "User", "url": "https://api.github.com/users/sanchit-gandhi" }
[IterableDatasets] Add column followed by interleave datasets gives bogus outputs
https://api.github.com/repos/huggingface/datasets/issues/5753/events
null
https://api.github.com/repos/huggingface/datasets/issues/5753/labels{/name}
2023-04-14T17:32:31Z
null
false
null
null
1,668,659,536
[]
https://api.github.com/repos/huggingface/datasets/issues/5753
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
### Describe the bug If we add a new column to our iterable dataset using the hack described in #5752, when we then interleave datasets the new column is pinned to one value. ### Steps to reproduce the bug What we're going to do here is: 1. Load an iterable dataset in streaming mode (`original_dataset`) 2. Add a new column to this dataset using the hack in #5752 (`modified_dataset_1`) 3. Create another new dataset by adding a column with the same key but different values (`modified_dataset_2`) 4. Interleave our new datasets (`modified_dataset_1` + `modified_dataset_2`) 5. Check the value of our newly added column (`new_column`) ```python from datasets import load_dataset # load an iterable dataset original_dataset = load_dataset("librispeech_asr", "clean", split="validation", streaming=True) # now add a new column to our streaming dataset using our hack from 5752 name = "new_column" column = [f"new dataset 1, row {i}" for i in range(50)] new_features = original_dataset.features.copy() new_features[name] = new_features["file"] # I know that "file" has the right column type to match our new feature def add_column_fn(example, idx): if name in example: raise ValueError(f"Error when adding {name}: column {name} is already in the dataset.") return {name: column[idx]} modified_dataset_1 = original_dataset.map(add_column_fn, with_indices=True, features=new_features) # now create a second modified dataset using the same trick column = [f"new dataset 2, row {i}" for i in range(50)] def add_column_fn(example, idx): if name in example: raise ValueError(f"Error when adding {name}: column {name} is already in the dataset.") return {name: column[idx]} modified_dataset_2 = original_dataset.map(add_column_fn, with_indices=True, features=new_features) # interleave these datasets interleaved_dataset = interleave_datasets([modified_dataset_1, modified_dataset_2]) # now check what the value of the added column is for i, sample in enumerate(interleaved_dataset): print(sample["new_column"]) if i == 10: break ``` **Print Output:** ``` new dataset 2, row 0 new dataset 2, row 0 new dataset 2, row 1 new dataset 2, row 1 new dataset 2, row 2 new dataset 2, row 2 new dataset 2, row 3 new dataset 2, row 3 new dataset 2, row 4 new dataset 2, row 4 new dataset 2, row 5 ``` We see that we only get outputs from our second dataset. ### Expected behavior We should interleave between dataset 1 and 2 and increase in row value: ``` new dataset 1, row 0 new dataset 2, row 0 new dataset 1, row 1 new dataset 2, row 1 new dataset 1, row 2 new dataset 2, row 2 ... ``` ### Environment info - datasets version: 2.10.2.dev0 - Platform: Linux-4.19.0-23-cloud-amd64-x86_64-with-glibc2.28 - Python version: 3.9.16 - Huggingface_hub version: 0.13.3 - PyArrow version: 10.0.1 - Pandas version: 1.5.2
2023-04-14T17:45:52Z
https://github.com/huggingface/datasets/issues/5753
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5753/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5752/comments
https://api.github.com/repos/huggingface/datasets/issues/5752/timeline
null
null
null
I_kwDODunzps5jdGwB
open
[]
null
5,752
{ "avatar_url": "https://avatars.githubusercontent.com/u/93869735?v=4", "events_url": "https://api.github.com/users/sanchit-gandhi/events{/privacy}", "followers_url": "https://api.github.com/users/sanchit-gandhi/followers", "following_url": "https://api.github.com/users/sanchit-gandhi/following{/other_user}", "gists_url": "https://api.github.com/users/sanchit-gandhi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sanchit-gandhi", "id": 93869735, "login": "sanchit-gandhi", "node_id": "U_kgDOBZhWpw", "organizations_url": "https://api.github.com/users/sanchit-gandhi/orgs", "received_events_url": "https://api.github.com/users/sanchit-gandhi/received_events", "repos_url": "https://api.github.com/users/sanchit-gandhi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sanchit-gandhi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sanchit-gandhi/subscriptions", "type": "User", "url": "https://api.github.com/users/sanchit-gandhi" }
Streaming dataset looses `.feature` method after `.add_column`
https://api.github.com/repos/huggingface/datasets/issues/5752/events
null
https://api.github.com/repos/huggingface/datasets/issues/5752/labels{/name}
2023-04-14T16:39:50Z
null
false
null
null
1,668,574,209
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
https://api.github.com/repos/huggingface/datasets/issues/5752
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
### Describe the bug After appending a new column to a streaming dataset using `.add_column`, we can no longer access the list of dataset features using the `.feature` method. ### Steps to reproduce the bug ```python from datasets import load_dataset original_dataset = load_dataset("librispeech_asr", "clean", split="validation", streaming=True) print(original_dataset.features.keys()) # now add a new column to our streaming dataset modified_dataset = original_dataset.add_column("new_column", ["some random text" for _ in range(50)]) print(modified_dataset.features.keys()) ``` **Print Output:** ``` dict_keys(['file', 'audio', 'text', 'speaker_id', 'chapter_id', 'id']) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 8 6 # now add a new column to our streaming dataset 7 modified_dataset = original_dataset.add_column("new_column", ["some random text" for _ in range(50)]) ----> 8 print(modified_dataset.features.keys()) AttributeError: 'NoneType' object has no attribute 'keys' ``` We see that we get the features for the original dataset, but not the modified one with the added column. ### Expected behavior Features should be persevered after adding a new column, i.e. calling: ```python print(modified_dataset.features.keys()) ``` Should return: ``` dict_keys(['file', 'audio', 'text', 'speaker_id', 'chapter_id', 'id', 'new_column']) ``` ### Environment info - `datasets` version: 2.10.2.dev0 - Platform: Linux-4.19.0-23-cloud-amd64-x86_64-with-glibc2.28 - Python version: 3.9.16 - Huggingface_hub version: 0.13.3 - PyArrow version: 10.0.1 - Pandas version: 1.5.2
2024-01-18T10:15:20Z
https://github.com/huggingface/datasets/issues/5752
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5752/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5751/comments
https://api.github.com/repos/huggingface/datasets/issues/5751/timeline
2023-04-20T14:40:34Z
null
null
PR_kwDODunzps5OVMuT
closed
[]
false
5,751
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
Consistent ArrayXD Python formatting + better NumPy/Pandas formatting
https://api.github.com/repos/huggingface/datasets/issues/5751/events
null
https://api.github.com/repos/huggingface/datasets/issues/5751/labels{/name}
2023-04-14T14:13:59Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5751.diff", "html_url": "https://github.com/huggingface/datasets/pull/5751", "merged_at": "2023-04-20T14:40:34Z", "patch_url": "https://github.com/huggingface/datasets/pull/5751.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5751" }
1,668,333,316
[]
https://api.github.com/repos/huggingface/datasets/issues/5751
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
Return a list of lists instead of a list of NumPy arrays when converting the variable-shaped `ArrayXD` to Python. Additionally, improve the NumPy conversion by returning a numeric NumPy array when the offsets are equal or a NumPy object array when they aren't, and allow converting the variable-shaped `ArrayXD` to Pandas. (Reported in https://github.com/huggingface/datasets/issues/5719#issuecomment-1507579671)
2023-04-20T14:43:20Z
https://github.com/huggingface/datasets/pull/5751
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5751/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5750/comments
https://api.github.com/repos/huggingface/datasets/issues/5750/timeline
2023-04-17T12:20:43Z
null
completed
I_kwDODunzps5jcBIr
closed
[]
null
5,750
{ "avatar_url": "https://avatars.githubusercontent.com/u/895720?v=4", "events_url": "https://api.github.com/users/ivanprado/events{/privacy}", "followers_url": "https://api.github.com/users/ivanprado/followers", "following_url": "https://api.github.com/users/ivanprado/following{/other_user}", "gists_url": "https://api.github.com/users/ivanprado/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ivanprado", "id": 895720, "login": "ivanprado", "node_id": "MDQ6VXNlcjg5NTcyMA==", "organizations_url": "https://api.github.com/users/ivanprado/orgs", "received_events_url": "https://api.github.com/users/ivanprado/received_events", "repos_url": "https://api.github.com/users/ivanprado/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ivanprado/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ivanprado/subscriptions", "type": "User", "url": "https://api.github.com/users/ivanprado" }
Fail to create datasets from a generator when using Google Big Query
https://api.github.com/repos/huggingface/datasets/issues/5750/events
null
https://api.github.com/repos/huggingface/datasets/issues/5750/labels{/name}
2023-04-14T13:50:59Z
null
false
null
null
1,668,289,067
[]
https://api.github.com/repos/huggingface/datasets/issues/5750
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug Creating a dataset from a generator using `Dataset.from_generator()` fails if the generator is the [Google Big Query Python client](https://cloud.google.com/python/docs/reference/bigquery/latest). The problem is that the Big Query client is not pickable. And the function `create_config_id` tries to get a hash of the generator by pickling it. So the following error is generated: ``` _pickle.PicklingError: Pickling client objects is explicitly not supported. Clients have non-trivial state that is local and unpickleable. ``` ### Steps to reproduce the bug 1. Install the big query client and datasets `pip install google-cloud-bigquery datasets` 2. Run the following code: ```py from datasets import Dataset from google.cloud import bigquery client = bigquery.Client() # Perform a query. QUERY = ( 'SELECT name FROM `bigquery-public-data.usa_names.usa_1910_2013` ' 'WHERE state = "TX" ' 'LIMIT 100') query_job = client.query(QUERY) # API request rows = query_job.result() # Waits for query to finish ds = Dataset.from_generator(rows) for r in ds: print(r) ``` ### Expected behavior Two options: 1. Ignore the pickle errors when computing the hash 2. Provide a scape hutch so that we can avoid calculating the hash for the generator. For example, allowing to provide a hash from the user. ### Environment info python 3.9 google-cloud-bigquery 3.9.0 datasets 2.11.0
2023-04-17T12:20:43Z
https://github.com/huggingface/datasets/issues/5750
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5750/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5749/comments
https://api.github.com/repos/huggingface/datasets/issues/5749/timeline
2023-04-18T12:57:08Z
null
completed
I_kwDODunzps5ja-jB
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
5,749
{ "avatar_url": "https://avatars.githubusercontent.com/u/54584290?v=4", "events_url": "https://api.github.com/users/gulnaz-zh/events{/privacy}", "followers_url": "https://api.github.com/users/gulnaz-zh/followers", "following_url": "https://api.github.com/users/gulnaz-zh/following{/other_user}", "gists_url": "https://api.github.com/users/gulnaz-zh/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gulnaz-zh", "id": 54584290, "login": "gulnaz-zh", "node_id": "MDQ6VXNlcjU0NTg0Mjkw", "organizations_url": "https://api.github.com/users/gulnaz-zh/orgs", "received_events_url": "https://api.github.com/users/gulnaz-zh/received_events", "repos_url": "https://api.github.com/users/gulnaz-zh/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gulnaz-zh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gulnaz-zh/subscriptions", "type": "User", "url": "https://api.github.com/users/gulnaz-zh" }
AttributeError: 'Version' object has no attribute 'match'
https://api.github.com/repos/huggingface/datasets/issues/5749/events
null
https://api.github.com/repos/huggingface/datasets/issues/5749/labels{/name}
2023-04-14T10:48:06Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
null
1,668,016,321
[]
https://api.github.com/repos/huggingface/datasets/issues/5749
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug When I run from datasets import load_dataset data = load_dataset("visual_genome", 'region_descriptions_v1.2.0') AttributeError: 'Version' object has no attribute 'match' ### Steps to reproduce the bug from datasets import load_dataset data = load_dataset("visual_genome", 'region_descriptions_v1.2.0') ### Expected behavior This is error trace: Downloading and preparing dataset visual_genome/region_descriptions_v1.2.0 to C:/Users/Acer/.cache/huggingface/datasets/visual_genome/region_descriptions_v1.2.0/1.2.0/136fe5b83f6691884566c5530313288171e053a3b33bfe3ea2e4c8b39abaf7f3... --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[6], line 1 ----> 1 data = load_dataset("visual_genome", 'region_descriptions_v1.2.0') File ~\.conda\envs\aai\Lib\site-packages\datasets\load.py:1791, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs) 1788 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES 1790 # Download and prepare data -> 1791 builder_instance.download_and_prepare( 1792 download_config=download_config, 1793 download_mode=download_mode, 1794 verification_mode=verification_mode, 1795 try_from_hf_gcs=try_from_hf_gcs, 1796 num_proc=num_proc, 1797 storage_options=storage_options, 1798 ) 1800 # Build dataset for splits 1801 keep_in_memory = ( 1802 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size) 1803 ) File ~\.conda\envs\aai\Lib\site-packages\datasets\builder.py:891, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs) 889 if num_proc is not None: 890 prepare_split_kwargs["num_proc"] = num_proc --> 891 self._download_and_prepare( 892 dl_manager=dl_manager, 893 verification_mode=verification_mode, 894 **prepare_split_kwargs, 895 **download_and_prepare_kwargs, 896 ) 897 # Sync info 898 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values()) File ~\.conda\envs\aai\Lib\site-packages\datasets\builder.py:1651, in GeneratorBasedBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_splits_kwargs) 1650 def _download_and_prepare(self, dl_manager, verification_mode, **prepare_splits_kwargs): -> 1651 super()._download_and_prepare( 1652 dl_manager, 1653 verification_mode, 1654 check_duplicate_keys=verification_mode == VerificationMode.BASIC_CHECKS 1655 or verification_mode == VerificationMode.ALL_CHECKS, 1656 **prepare_splits_kwargs, 1657 ) File ~\.conda\envs\aai\Lib\site-packages\datasets\builder.py:964, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs) 962 split_dict = SplitDict(dataset_name=self.name) 963 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) --> 964 split_generators = self._split_generators(dl_manager, **split_generators_kwargs) 966 # Checksums verification 967 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums: File ~\.cache\huggingface\modules\datasets_modules\datasets\visual_genome\136fe5b83f6691884566c5530313288171e053a3b33bfe3ea2e4c8b39abaf7f3\visual_genome.py:377, in VisualGenome._split_generators(self, dl_manager) 375 def _split_generators(self, dl_manager): 376 # Download image meta datas. --> 377 image_metadatas_dir = dl_manager.download_and_extract(self.config.image_metadata_url) 378 image_metadatas_file = os.path.join( 379 image_metadatas_dir, _get_decompressed_filename_from_url(self.config.image_metadata_url) 380 ) 382 # Download annotations File ~\.cache\huggingface\modules\datasets_modules\datasets\visual_genome\136fe5b83f6691884566c5530313288171e053a3b33bfe3ea2e4c8b39abaf7f3\visual_genome.py:328, in VisualGenomeConfig.image_metadata_url(self) 326 @property 327 def image_metadata_url(self): --> 328 if not self.version.match(_LATEST_VERSIONS["image_metadata"]): 329 logger.warning( 330 f"Latest image metadata version is {_LATEST_VERSIONS['image_metadata']}. Trying to generate a dataset of version: {self.version}. Please double check that image data are unchanged between the two versions." 331 ) 332 return f"{_BASE_ANNOTATION_URL}/image_data.json.zip" ### Environment info datasets 2.11.0 python 3.11.3
2023-06-30T11:31:17Z
https://github.com/huggingface/datasets/issues/5749
{ "+1": 3, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 3, "url": "https://api.github.com/repos/huggingface/datasets/issues/5749/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5748/comments
https://api.github.com/repos/huggingface/datasets/issues/5748/timeline
null
null
null
PR_kwDODunzps5OSgNH
open
[]
false
5,748
{ "avatar_url": "https://avatars.githubusercontent.com/u/1772912?v=4", "events_url": "https://api.github.com/users/ericxsun/events{/privacy}", "followers_url": "https://api.github.com/users/ericxsun/followers", "following_url": "https://api.github.com/users/ericxsun/following{/other_user}", "gists_url": "https://api.github.com/users/ericxsun/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ericxsun", "id": 1772912, "login": "ericxsun", "node_id": "MDQ6VXNlcjE3NzI5MTI=", "organizations_url": "https://api.github.com/users/ericxsun/orgs", "received_events_url": "https://api.github.com/users/ericxsun/received_events", "repos_url": "https://api.github.com/users/ericxsun/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ericxsun/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ericxsun/subscriptions", "type": "User", "url": "https://api.github.com/users/ericxsun" }
[BUG FIX] Issue 5739
https://api.github.com/repos/huggingface/datasets/issues/5748/events
null
https://api.github.com/repos/huggingface/datasets/issues/5748/labels{/name}
2023-04-14T05:07:31Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5748.diff", "html_url": "https://github.com/huggingface/datasets/pull/5748", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5748.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5748" }
1,667,517,024
[]
https://api.github.com/repos/huggingface/datasets/issues/5748
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
A fix for https://github.com/huggingface/datasets/issues/5739
2023-04-14T05:07:31Z
https://github.com/huggingface/datasets/pull/5748
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5748/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5747/comments
https://api.github.com/repos/huggingface/datasets/issues/5747/timeline
2024-01-08T18:31:50Z
null
null
PR_kwDODunzps5ORtBF
closed
[]
false
5,747
{ "avatar_url": "https://avatars.githubusercontent.com/u/106995444?v=4", "events_url": "https://api.github.com/users/maddiedawson/events{/privacy}", "followers_url": "https://api.github.com/users/maddiedawson/followers", "following_url": "https://api.github.com/users/maddiedawson/following{/other_user}", "gists_url": "https://api.github.com/users/maddiedawson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/maddiedawson", "id": 106995444, "login": "maddiedawson", "node_id": "U_kgDOBmCe9A", "organizations_url": "https://api.github.com/users/maddiedawson/orgs", "received_events_url": "https://api.github.com/users/maddiedawson/received_events", "repos_url": "https://api.github.com/users/maddiedawson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/maddiedawson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/maddiedawson/subscriptions", "type": "User", "url": "https://api.github.com/users/maddiedawson" }
[WIP] Add Dataset.to_spark
https://api.github.com/repos/huggingface/datasets/issues/5747/events
null
https://api.github.com/repos/huggingface/datasets/issues/5747/labels{/name}
2023-04-13T23:20:03Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5747.diff", "html_url": "https://github.com/huggingface/datasets/pull/5747", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5747.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5747" }
1,667,270,412
[]
https://api.github.com/repos/huggingface/datasets/issues/5747
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
null
2024-01-08T18:31:50Z
https://github.com/huggingface/datasets/pull/5747
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5747/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5746/comments
https://api.github.com/repos/huggingface/datasets/issues/5746/timeline
2023-04-14T13:08:42Z
null
null
PR_kwDODunzps5ORIUU
closed
[]
false
5,746
{ "avatar_url": "https://avatars.githubusercontent.com/u/7485661?v=4", "events_url": "https://api.github.com/users/bbbxyz/events{/privacy}", "followers_url": "https://api.github.com/users/bbbxyz/followers", "following_url": "https://api.github.com/users/bbbxyz/following{/other_user}", "gists_url": "https://api.github.com/users/bbbxyz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bbbxyz", "id": 7485661, "login": "bbbxyz", "node_id": "MDQ6VXNlcjc0ODU2NjE=", "organizations_url": "https://api.github.com/users/bbbxyz/orgs", "received_events_url": "https://api.github.com/users/bbbxyz/received_events", "repos_url": "https://api.github.com/users/bbbxyz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bbbxyz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bbbxyz/subscriptions", "type": "User", "url": "https://api.github.com/users/bbbxyz" }
Fix link in docs
https://api.github.com/repos/huggingface/datasets/issues/5746/events
null
https://api.github.com/repos/huggingface/datasets/issues/5746/labels{/name}
2023-04-13T20:45:19Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5746.diff", "html_url": "https://github.com/huggingface/datasets/pull/5746", "merged_at": "2023-04-14T13:08:42Z", "patch_url": "https://github.com/huggingface/datasets/pull/5746.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5746" }
1,667,102,459
[]
https://api.github.com/repos/huggingface/datasets/issues/5746
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
Fixes a broken link in the use_with_pytorch docs
2023-04-14T13:15:38Z
https://github.com/huggingface/datasets/pull/5746
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5746/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5745/comments
https://api.github.com/repos/huggingface/datasets/issues/5745/timeline
null
null
null
PR_kwDODunzps5ORE2n
open
[]
false
5,745
{ "avatar_url": "https://avatars.githubusercontent.com/u/15572698?v=4", "events_url": "https://api.github.com/users/keyboardAnt/events{/privacy}", "followers_url": "https://api.github.com/users/keyboardAnt/followers", "following_url": "https://api.github.com/users/keyboardAnt/following{/other_user}", "gists_url": "https://api.github.com/users/keyboardAnt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/keyboardAnt", "id": 15572698, "login": "keyboardAnt", "node_id": "MDQ6VXNlcjE1NTcyNjk4", "organizations_url": "https://api.github.com/users/keyboardAnt/orgs", "received_events_url": "https://api.github.com/users/keyboardAnt/received_events", "repos_url": "https://api.github.com/users/keyboardAnt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/keyboardAnt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/keyboardAnt/subscriptions", "type": "User", "url": "https://api.github.com/users/keyboardAnt" }
[BUG FIX] Issue 5744
https://api.github.com/repos/huggingface/datasets/issues/5745/events
null
https://api.github.com/repos/huggingface/datasets/issues/5745/labels{/name}
2023-04-13T20:29:55Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5745.diff", "html_url": "https://github.com/huggingface/datasets/pull/5745", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5745.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5745" }
1,667,086,143
[]
https://api.github.com/repos/huggingface/datasets/issues/5745
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
A temporal fix for https://github.com/huggingface/datasets/issues/5744.
2023-04-21T15:22:43Z
https://github.com/huggingface/datasets/pull/5745
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5745/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5744/comments
https://api.github.com/repos/huggingface/datasets/issues/5744/timeline
2023-07-06T17:01:59Z
null
completed
I_kwDODunzps5jXZIM
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
5,744
{ "avatar_url": "https://avatars.githubusercontent.com/u/15572698?v=4", "events_url": "https://api.github.com/users/keyboardAnt/events{/privacy}", "followers_url": "https://api.github.com/users/keyboardAnt/followers", "following_url": "https://api.github.com/users/keyboardAnt/following{/other_user}", "gists_url": "https://api.github.com/users/keyboardAnt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/keyboardAnt", "id": 15572698, "login": "keyboardAnt", "node_id": "MDQ6VXNlcjE1NTcyNjk4", "organizations_url": "https://api.github.com/users/keyboardAnt/orgs", "received_events_url": "https://api.github.com/users/keyboardAnt/received_events", "repos_url": "https://api.github.com/users/keyboardAnt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/keyboardAnt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/keyboardAnt/subscriptions", "type": "User", "url": "https://api.github.com/users/keyboardAnt" }
[BUG] With Pandas 2.0.0, `load_dataset` raises `TypeError: read_csv() got an unexpected keyword argument 'mangle_dupe_cols'`
https://api.github.com/repos/huggingface/datasets/issues/5744/events
null
https://api.github.com/repos/huggingface/datasets/issues/5744/labels{/name}
2023-04-13T20:21:28Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
null
1,667,076,620
[]
https://api.github.com/repos/huggingface/datasets/issues/5744
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
The `load_dataset` function with Pandas `1.5.3` has no issue (just a FutureWarning) but crashes with Pandas `2.0.0`. For your convenience, I opened a draft Pull Request to fix it quickly: https://github.com/huggingface/datasets/pull/5745 --- * The FutureWarning mentioned above: ``` FutureWarning: the 'mangle_dupe_cols' keyword is deprecated and will be removed in a future version. Please take steps to stop the use of 'mangle_dupe_cols' ```
2024-03-09T11:30:02Z
https://github.com/huggingface/datasets/issues/5744
{ "+1": 3, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 3, "url": "https://api.github.com/repos/huggingface/datasets/issues/5744/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5743/comments
https://api.github.com/repos/huggingface/datasets/issues/5743/timeline
2023-04-17T12:23:18Z
null
completed
I_kwDODunzps5jWgS4
closed
[]
null
5,743
{ "avatar_url": "https://avatars.githubusercontent.com/u/71216295?v=4", "events_url": "https://api.github.com/users/syedabdullahhassan/events{/privacy}", "followers_url": "https://api.github.com/users/syedabdullahhassan/followers", "following_url": "https://api.github.com/users/syedabdullahhassan/following{/other_user}", "gists_url": "https://api.github.com/users/syedabdullahhassan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/syedabdullahhassan", "id": 71216295, "login": "syedabdullahhassan", "node_id": "MDQ6VXNlcjcxMjE2Mjk1", "organizations_url": "https://api.github.com/users/syedabdullahhassan/orgs", "received_events_url": "https://api.github.com/users/syedabdullahhassan/received_events", "repos_url": "https://api.github.com/users/syedabdullahhassan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/syedabdullahhassan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/syedabdullahhassan/subscriptions", "type": "User", "url": "https://api.github.com/users/syedabdullahhassan" }
dataclass.py in virtual environment is overriding the stdlib module "dataclasses"
https://api.github.com/repos/huggingface/datasets/issues/5743/events
null
https://api.github.com/repos/huggingface/datasets/issues/5743/labels{/name}
2023-04-13T17:28:33Z
null
false
null
null
1,666,843,832
[]
https://api.github.com/repos/huggingface/datasets/issues/5743
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug "e:\Krish_naik\FSDSRegression\venv\Lib\dataclasses.py" is overriding the stdlib module "dataclasses" ### Steps to reproduce the bug module issue ### Expected behavior overriding the stdlib module "dataclasses" ### Environment info VS code
2023-04-17T12:23:18Z
https://github.com/huggingface/datasets/issues/5743
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5743/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5742/comments
https://api.github.com/repos/huggingface/datasets/issues/5742/timeline
2023-04-21T13:11:09Z
null
null
PR_kwDODunzps5OOH-W
closed
[]
false
5,742
{ "avatar_url": "https://avatars.githubusercontent.com/u/22614925?v=4", "events_url": "https://api.github.com/users/amyeroberts/events{/privacy}", "followers_url": "https://api.github.com/users/amyeroberts/followers", "following_url": "https://api.github.com/users/amyeroberts/following{/other_user}", "gists_url": "https://api.github.com/users/amyeroberts/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/amyeroberts", "id": 22614925, "login": "amyeroberts", "node_id": "MDQ6VXNlcjIyNjE0OTI1", "organizations_url": "https://api.github.com/users/amyeroberts/orgs", "received_events_url": "https://api.github.com/users/amyeroberts/received_events", "repos_url": "https://api.github.com/users/amyeroberts/repos", "site_admin": false, "starred_url": "https://api.github.com/users/amyeroberts/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/amyeroberts/subscriptions", "type": "User", "url": "https://api.github.com/users/amyeroberts" }
Warning specifying future change in to_tf_dataset behaviour
https://api.github.com/repos/huggingface/datasets/issues/5742/events
null
https://api.github.com/repos/huggingface/datasets/issues/5742/labels{/name}
2023-04-13T11:10:00Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5742.diff", "html_url": "https://github.com/huggingface/datasets/pull/5742", "merged_at": "2023-04-21T13:11:09Z", "patch_url": "https://github.com/huggingface/datasets/pull/5742.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5742" }
1,666,209,738
[]
https://api.github.com/repos/huggingface/datasets/issues/5742
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
Warning specifying future changes happening to `to_tf_dataset` behaviour when #5602 is merged in
2023-04-21T13:18:14Z
https://github.com/huggingface/datasets/pull/5742
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5742/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5741/comments
https://api.github.com/repos/huggingface/datasets/issues/5741/timeline
2023-04-13T09:40:50Z
null
null
PR_kwDODunzps5OM9nZ
closed
[]
false
5,741
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
Fix CI warnings
https://api.github.com/repos/huggingface/datasets/issues/5741/events
null
https://api.github.com/repos/huggingface/datasets/issues/5741/labels{/name}
2023-04-13T07:17:02Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5741.diff", "html_url": "https://github.com/huggingface/datasets/pull/5741", "merged_at": "2023-04-13T09:40:50Z", "patch_url": "https://github.com/huggingface/datasets/pull/5741.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5741" }
1,665,860,919
[]
https://api.github.com/repos/huggingface/datasets/issues/5741
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
Fix warnings in our CI tests.
2023-04-13T09:48:10Z
https://github.com/huggingface/datasets/pull/5741
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5741/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5740/comments
https://api.github.com/repos/huggingface/datasets/issues/5740/timeline
2023-04-13T10:54:13Z
null
null
PR_kwDODunzps5OHI08
closed
[]
false
5,740
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
Fix CI mock filesystem fixtures
https://api.github.com/repos/huggingface/datasets/issues/5740/events
null
https://api.github.com/repos/huggingface/datasets/issues/5740/labels{/name}
2023-04-12T08:52:35Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5740.diff", "html_url": "https://github.com/huggingface/datasets/pull/5740", "merged_at": "2023-04-13T10:54:13Z", "patch_url": "https://github.com/huggingface/datasets/pull/5740.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5740" }
1,664,132,130
[]
https://api.github.com/repos/huggingface/datasets/issues/5740
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
This PR fixes the fixtures of our CI mock filesystems. Before, we had to pass `clobber=True` to `fsspec.register_implementation` to overwrite the still present previously added "mock" filesystem. That meant that the mock filesystem fixture was not working properly, because the previously added "mock" filesystem, should have been deleted by the fixture. This PR fixes the mock filesystem fixtures, so that the "mock" filesystem is properly deleted from the inner `fsspec` registry. Tests were added to check the correct behavior of the mock filesystem fixtures. Related to: - #5733
2023-04-13T11:01:24Z
https://github.com/huggingface/datasets/pull/5740
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5740/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5739/comments
https://api.github.com/repos/huggingface/datasets/issues/5739/timeline
null
null
null
I_kwDODunzps5jKwHV
open
[]
null
5,739
{ "avatar_url": "https://avatars.githubusercontent.com/u/1772912?v=4", "events_url": "https://api.github.com/users/ericxsun/events{/privacy}", "followers_url": "https://api.github.com/users/ericxsun/followers", "following_url": "https://api.github.com/users/ericxsun/following{/other_user}", "gists_url": "https://api.github.com/users/ericxsun/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ericxsun", "id": 1772912, "login": "ericxsun", "node_id": "MDQ6VXNlcjE3NzI5MTI=", "organizations_url": "https://api.github.com/users/ericxsun/orgs", "received_events_url": "https://api.github.com/users/ericxsun/received_events", "repos_url": "https://api.github.com/users/ericxsun/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ericxsun/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ericxsun/subscriptions", "type": "User", "url": "https://api.github.com/users/ericxsun" }
weird result during dataset split when data path starts with `/data`
https://api.github.com/repos/huggingface/datasets/issues/5739/events
null
https://api.github.com/repos/huggingface/datasets/issues/5739/labels{/name}
2023-04-12T04:51:35Z
null
false
null
null
1,663,762,901
[]
https://api.github.com/repos/huggingface/datasets/issues/5739
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug The regex defined here https://github.com/huggingface/datasets/blob/f2607935c4e45c70c44fcb698db0363ca7ba83d4/src/datasets/utils/py_utils.py#L158 will cause a weird result during dataset split when data path starts with `/data` ### Steps to reproduce the bug 1. clone dataset into local path ``` cd /data/train/raw/ git lfs clone https://huggingface.co/datasets/deepmind/code_contests.git ls /data/train/raw/code_contests # README.md data dataset_infos.json ls /data/train/raw/code_contests/data # test-00000-of-00001-9c49eeff30aacaa8.parquet # train-[0-9]+-of-[0-9]+-xx.parquet # valid-00000-of-00001-5e672c5751f060d3.parquet ``` 2. loading data from local ``` from datasets import load_dataset dataset = load_dataset('/data/train/raw/code_contests') FileNotFoundError: Unable to resolve any data file that matches '['data/train/raw/code_contests/data/train-[0-9][0-9][0-9][0-9][0-9]-of-[0-9][0-9][0-9][0-9][0-9]*.*']' at /data/train/raw/code_contests with any supported extension ``` weird path `data/train/raw/code_contests/data/train-[0-9][0-9][0-9][0-9][0-9]-of-[0-9][0-9][0-9][0-9][0-9]*.*` While dive deep into `LocalDatasetModuleFactoryWithoutScript` defined in [load.py](https://github.com/huggingface/datasets/blob/f2607935c4e45c70c44fcb698db0363ca7ba83d4/src/datasets/load.py#L627) and _get_data_files_patterns https://github.com/huggingface/datasets/blob/f2607935c4e45c70c44fcb698db0363ca7ba83d4/src/datasets/data_files.py#L228. I found the weird behavior caused by `string_to_dict` 3. check `string_to_dict` ``` p = '/data/train/raw/code_contests/data/test-00000-of-00001-9c49eeff30aacaa8.parquet' split_pattern = 'data/{split}-[0-9][0-9][0-9][0-9][0-9]-of-[0-9][0-9][0-9][0-9][0-9]*.*' string_to_dict(p, split_pattern) # {'split': 'train/raw/code_contests/data/test'} p = '/data2/train/raw/code_contests/data/test-00000-of-00001-9c49eeff30aacaa8.parquet' string_to_dict(p, split_pattern) {'split': 'test'} ``` go deep into string_to_dict https://github.com/huggingface/datasets/blob/f2607935c4e45c70c44fcb698db0363ca7ba83d4/src/datasets/utils/py_utils.py#L158. 4. test the regex: <img width="680" alt="image" src="https://user-images.githubusercontent.com/1772912/231351129-75179f01-fb9f-4f12-8fa9-0dfcc3d5f3bd.png"> <img width="679" alt="image" src="https://user-images.githubusercontent.com/1772912/231351025-009f3d83-2cf3-4e15-9ed4-6b9663dcb2ee.png"> ### Expected behavior statement in `steps to reproduce the bug` 3. check `string_to_dict` ``` p = '/data/train/raw/code_contests/data/test-00000-of-00001-9c49eeff30aacaa8.parquet' split_pattern = 'data/{split}-[0-9][0-9][0-9][0-9][0-9]-of-[0-9][0-9][0-9][0-9][0-9]*.*' string_to_dict(p, split_pattern) # {'split': 'train/raw/code_contests/data/test'} p = '/data2/train/raw/code_contests/data/test-00000-of-00001-9c49eeff30aacaa8.parquet' string_to_dict(p, split_pattern) {'split': 'test'} ``` ### Environment info - linux(debian) - python 3.7 - datasets 2.8.0
2023-04-21T14:20:59Z
https://github.com/huggingface/datasets/issues/5739
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5739/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5738/comments
https://api.github.com/repos/huggingface/datasets/issues/5738/timeline
2023-04-19T12:08:27Z
null
completed
I_kwDODunzps5jJqe6
closed
[]
null
5,738
{ "avatar_url": "https://avatars.githubusercontent.com/u/41713505?v=4", "events_url": "https://api.github.com/users/Tylersuard/events{/privacy}", "followers_url": "https://api.github.com/users/Tylersuard/followers", "following_url": "https://api.github.com/users/Tylersuard/following{/other_user}", "gists_url": "https://api.github.com/users/Tylersuard/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Tylersuard", "id": 41713505, "login": "Tylersuard", "node_id": "MDQ6VXNlcjQxNzEzNTA1", "organizations_url": "https://api.github.com/users/Tylersuard/orgs", "received_events_url": "https://api.github.com/users/Tylersuard/received_events", "repos_url": "https://api.github.com/users/Tylersuard/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Tylersuard/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Tylersuard/subscriptions", "type": "User", "url": "https://api.github.com/users/Tylersuard" }
load_dataset("text","dataset.txt") loads the wrong dataset!
https://api.github.com/repos/huggingface/datasets/issues/5738/events
null
https://api.github.com/repos/huggingface/datasets/issues/5738/labels{/name}
2023-04-12T01:07:46Z
null
false
null
null
1,663,477,690
[]
https://api.github.com/repos/huggingface/datasets/issues/5738
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug I am trying to load my own custom text dataset using the load_dataset function. My dataset is a bunch of ordered text, think along the lines of shakespeare plays. However, after I load the dataset and I inspect it, the dataset is a table with a bunch of latitude and longitude values! What in the world?? ### Steps to reproduce the bug my_dataset = load_dataset("text","TextFile.txt") my_dataset ### Expected behavior I expected the dataset to contain the actual data from the text document that I used. ### Environment info Google Colab
2023-04-19T12:08:27Z
https://github.com/huggingface/datasets/issues/5738
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5738/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5737/comments
https://api.github.com/repos/huggingface/datasets/issues/5737/timeline
2023-04-13T16:49:57Z
null
completed
I_kwDODunzps5jHiSD
closed
[]
null
5,737
{ "avatar_url": "https://avatars.githubusercontent.com/u/10896776?v=4", "events_url": "https://api.github.com/users/mrcaelumn/events{/privacy}", "followers_url": "https://api.github.com/users/mrcaelumn/followers", "following_url": "https://api.github.com/users/mrcaelumn/following{/other_user}", "gists_url": "https://api.github.com/users/mrcaelumn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mrcaelumn", "id": 10896776, "login": "mrcaelumn", "node_id": "MDQ6VXNlcjEwODk2Nzc2", "organizations_url": "https://api.github.com/users/mrcaelumn/orgs", "received_events_url": "https://api.github.com/users/mrcaelumn/received_events", "repos_url": "https://api.github.com/users/mrcaelumn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mrcaelumn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mrcaelumn/subscriptions", "type": "User", "url": "https://api.github.com/users/mrcaelumn" }
ClassLabel Error
https://api.github.com/repos/huggingface/datasets/issues/5737/events
null
https://api.github.com/repos/huggingface/datasets/issues/5737/labels{/name}
2023-04-11T17:14:13Z
null
false
null
null
1,662,919,811
[]
https://api.github.com/repos/huggingface/datasets/issues/5737
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug I still getting the error "call() takes 1 positional argument but 2 were given" even after ensuring that the value being passed to the label object is a single value and that the ClassLabel object has been created with the correct number of label classes ### Steps to reproduce the bug from datasets import ClassLabel, Dataset 1. Create the ClassLabel object with 3 label values and their corresponding names label_test = ClassLabel(num_classes=3, names=["label_1", "label_2", "label_3"]) 2. Define a dictionary with text and label fields data = { 'text': ['text_1', 'text_2', 'text_3'], 'label': [1, 2, 3], } 3. Create a Hugging Face dataset from the dictionary dataset = Dataset.from_dict(data) print(dataset.features) 4. Map the label values to their corresponding label names using the label object dataset = dataset.map(lambda example: {'text': example['text'], 'label': label_test(example['label'])}) 5. Print the resulting dataset print(dataset) ### Expected behavior I hope my label type is class label instead int. ### Environment info python 3.9 google colab
2023-04-13T16:49:57Z
https://github.com/huggingface/datasets/issues/5737
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5737/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5736/comments
https://api.github.com/repos/huggingface/datasets/issues/5736/timeline
null
null
null
I_kwDODunzps5jFHjt
open
[]
null
5,736
{ "avatar_url": "https://avatars.githubusercontent.com/u/1219084?v=4", "events_url": "https://api.github.com/users/rcasero/events{/privacy}", "followers_url": "https://api.github.com/users/rcasero/followers", "following_url": "https://api.github.com/users/rcasero/following{/other_user}", "gists_url": "https://api.github.com/users/rcasero/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rcasero", "id": 1219084, "login": "rcasero", "node_id": "MDQ6VXNlcjEyMTkwODQ=", "organizations_url": "https://api.github.com/users/rcasero/orgs", "received_events_url": "https://api.github.com/users/rcasero/received_events", "repos_url": "https://api.github.com/users/rcasero/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rcasero/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rcasero/subscriptions", "type": "User", "url": "https://api.github.com/users/rcasero" }
FORCE_REDOWNLOAD raises "Directory not empty" exception on second run
https://api.github.com/repos/huggingface/datasets/issues/5736/events
null
https://api.github.com/repos/huggingface/datasets/issues/5736/labels{/name}
2023-04-11T11:29:15Z
null
false
null
null
1,662,286,061
[]
https://api.github.com/repos/huggingface/datasets/issues/5736
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug Running `load_dataset(..., download_mode=datasets.DownloadMode.FORCE_REDOWNLOAD)` twice raises a `Directory not empty` exception on the second run. ### Steps to reproduce the bug I cannot test this on datasets v2.11.0 due to #5711, but this happens in v2.10.1. 1. Set up a script `my_dataset.py` to generate and load an offline dataset. 2. Load it with ```python ds = datasets.load_dataset(path=/path/to/my_dataset.py, name='toy', data_dir=/path/to/my_dataset.py, cache_dir=cache_dir, download_mode=datasets.DownloadMode.FORCE_REDOWNLOAD, ) ``` It loads fine ``` Dataset my_dataset downloaded and prepared to /path/to/cache/toy-..e05e/1.0.0/...5b4c. Subsequent calls will reuse this data. ``` 3. Try to load it again with the same snippet and the splits are generated, but at the end of the loading process it raises the error ``` 2023-04-11 12:10:19,965: DEBUG: open file: /path/to/cache/toy-..e05e/1.0.0/...5b4c.incomplete/dataset_info.json Traceback (most recent call last): File "<string>", line 2, in <module> File "/path/to/conda/environment/lib/python3.10/site-packages/datasets/load.py", line 1782, in load_dataset builder_instance.download_and_prepare( File "/path/to/conda/environment/lib/python3.10/site-packages/datasets/builder.py", line 852, in download_and_prepare with incomplete_dir(self._output_dir) as tmp_output_dir: File "/path/to/conda/environment/lib/python3.10/contextlib.py", line 142, in __exit__ next(self.gen) File "/path/to/conda/environment/lib/python3.10/site-packages/datasets/builder.py", line 826, in incomplete_dir shutil.rmtree(dirname) File "/path/to/conda/environment/lib/python3.10/shutil.py", line 730, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/path/to/conda/environment/lib/python3.10/shutil.py", line 728, in rmtree os.rmdir(path) OSError: [Errno 39] Directory not empty: '/path/to/cache/toy-..e05e/1.0.0/...5b4c' ``` ### Expected behavior Regenerate the dataset from scratch and reload it. ### Environment info - `datasets` version: 2.10.1 - Platform: Linux-4.18.0-483.el8.x86_64-x86_64-with-glibc2.28 - Python version: 3.10.8 - PyArrow version: 11.0.0 - Pandas version: 1.5.2
2023-11-30T07:16:58Z
https://github.com/huggingface/datasets/issues/5736
{ "+1": 3, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 3, "url": "https://api.github.com/repos/huggingface/datasets/issues/5736/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5735/comments
https://api.github.com/repos/huggingface/datasets/issues/5735/timeline
2023-04-27T16:32:09Z
null
null
PR_kwDODunzps5OAY3A
closed
[]
false
5,735
{ "avatar_url": "https://avatars.githubusercontent.com/u/48770768?v=4", "events_url": "https://api.github.com/users/Hubert-Bonisseur/events{/privacy}", "followers_url": "https://api.github.com/users/Hubert-Bonisseur/followers", "following_url": "https://api.github.com/users/Hubert-Bonisseur/following{/other_user}", "gists_url": "https://api.github.com/users/Hubert-Bonisseur/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Hubert-Bonisseur", "id": 48770768, "login": "Hubert-Bonisseur", "node_id": "MDQ6VXNlcjQ4NzcwNzY4", "organizations_url": "https://api.github.com/users/Hubert-Bonisseur/orgs", "received_events_url": "https://api.github.com/users/Hubert-Bonisseur/received_events", "repos_url": "https://api.github.com/users/Hubert-Bonisseur/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Hubert-Bonisseur/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Hubert-Bonisseur/subscriptions", "type": "User", "url": "https://api.github.com/users/Hubert-Bonisseur" }
Implement sharding on merged iterable datasets
https://api.github.com/repos/huggingface/datasets/issues/5735/events
null
https://api.github.com/repos/huggingface/datasets/issues/5735/labels{/name}
2023-04-11T10:02:25Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5735.diff", "html_url": "https://github.com/huggingface/datasets/pull/5735", "merged_at": "2023-04-27T16:32:09Z", "patch_url": "https://github.com/huggingface/datasets/pull/5735.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5735" }
1,662,150,903
[]
https://api.github.com/repos/huggingface/datasets/issues/5735
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
This PR allows sharding of merged iterable datasets. Merged iterable datasets with for instance the `interleave_datasets` command are comprised of multiple sub-iterable, one for each dataset that has been merged. With this PR, sharding a merged iterable will result in multiple merged datasets each comprised of sharded sub-iterable, ensuring that there is no duplication of data. As a result it is now possible to set any amount of workers in the dataloader as long as it is lower or equal to the lowest amount of shards amongst the datasets. Before it had to be set to 0. I previously talked about this issue on the forum [here](https://discuss.huggingface.co/t/interleaving-iterable-dataset-with-num-workers-0/35801)
2023-04-27T16:39:04Z
https://github.com/huggingface/datasets/pull/5735
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5735/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5734/comments
https://api.github.com/repos/huggingface/datasets/issues/5734/timeline
2023-04-11T11:04:52Z
null
completed
I_kwDODunzps5jEP4s
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
5,734
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
Remove temporary pin of fsspec
https://api.github.com/repos/huggingface/datasets/issues/5734/events
null
https://api.github.com/repos/huggingface/datasets/issues/5734/labels{/name}
2023-04-11T09:04:17Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
null
1,662,058,028
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
https://api.github.com/repos/huggingface/datasets/issues/5734
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
Once root cause is found and fixed, remove the temporary pin introduced by: - #5731
2023-04-11T11:04:52Z
https://github.com/huggingface/datasets/issues/5734
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5734/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5733/comments
https://api.github.com/repos/huggingface/datasets/issues/5733/timeline
2023-04-11T11:04:51Z
null
null
PR_kwDODunzps5OAA04
closed
[]
false
5,733
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
Unpin fsspec
https://api.github.com/repos/huggingface/datasets/issues/5733/events
null
https://api.github.com/repos/huggingface/datasets/issues/5733/labels{/name}
2023-04-11T08:52:12Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5733.diff", "html_url": "https://github.com/huggingface/datasets/pull/5733", "merged_at": "2023-04-11T11:04:51Z", "patch_url": "https://github.com/huggingface/datasets/pull/5733.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5733" }
1,662,039,191
[]
https://api.github.com/repos/huggingface/datasets/issues/5733
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
In `fsspec--2023.4.0` default value for clobber when registering an implementation was changed from True to False. See: - https://github.com/fsspec/filesystem_spec/pull/1237 This PR recovers previous behavior by passing clobber True when registering mock implementations. This PR also removes the temporary pin introduced by: - #5731 Fix #5734.
2023-04-11T11:11:45Z
https://github.com/huggingface/datasets/pull/5733
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5733/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5732/comments
https://api.github.com/repos/huggingface/datasets/issues/5732/timeline
2023-04-11T09:28:16Z
null
completed
I_kwDODunzps5jEGvb
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/10287371?v=4", "events_url": "https://api.github.com/users/lucaslingle/events{/privacy}", "followers_url": "https://api.github.com/users/lucaslingle/followers", "following_url": "https://api.github.com/users/lucaslingle/following{/other_user}", "gists_url": "https://api.github.com/users/lucaslingle/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lucaslingle", "id": 10287371, "login": "lucaslingle", "node_id": "MDQ6VXNlcjEwMjg3Mzcx", "organizations_url": "https://api.github.com/users/lucaslingle/orgs", "received_events_url": "https://api.github.com/users/lucaslingle/received_events", "repos_url": "https://api.github.com/users/lucaslingle/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lucaslingle/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lucaslingle/subscriptions", "type": "User", "url": "https://api.github.com/users/lucaslingle" } ]
null
5,732
{ "avatar_url": "https://avatars.githubusercontent.com/u/10287371?v=4", "events_url": "https://api.github.com/users/lucaslingle/events{/privacy}", "followers_url": "https://api.github.com/users/lucaslingle/followers", "following_url": "https://api.github.com/users/lucaslingle/following{/other_user}", "gists_url": "https://api.github.com/users/lucaslingle/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lucaslingle", "id": 10287371, "login": "lucaslingle", "node_id": "MDQ6VXNlcjEwMjg3Mzcx", "organizations_url": "https://api.github.com/users/lucaslingle/orgs", "received_events_url": "https://api.github.com/users/lucaslingle/received_events", "repos_url": "https://api.github.com/users/lucaslingle/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lucaslingle/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lucaslingle/subscriptions", "type": "User", "url": "https://api.github.com/users/lucaslingle" }
Enwik8 should support the standard split
https://api.github.com/repos/huggingface/datasets/issues/5732/events
null
https://api.github.com/repos/huggingface/datasets/issues/5732/labels{/name}
2023-04-11T08:38:53Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/10287371?v=4", "events_url": "https://api.github.com/users/lucaslingle/events{/privacy}", "followers_url": "https://api.github.com/users/lucaslingle/followers", "following_url": "https://api.github.com/users/lucaslingle/following{/other_user}", "gists_url": "https://api.github.com/users/lucaslingle/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lucaslingle", "id": 10287371, "login": "lucaslingle", "node_id": "MDQ6VXNlcjEwMjg3Mzcx", "organizations_url": "https://api.github.com/users/lucaslingle/orgs", "received_events_url": "https://api.github.com/users/lucaslingle/received_events", "repos_url": "https://api.github.com/users/lucaslingle/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lucaslingle/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lucaslingle/subscriptions", "type": "User", "url": "https://api.github.com/users/lucaslingle" }
null
1,662,020,571
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
https://api.github.com/repos/huggingface/datasets/issues/5732
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Feature request The HuggingFace Datasets library currently supports two BuilderConfigs for Enwik8. One config yields individual lines as examples, while the other config yields the entire dataset as a single example. Both support only a monolithic split: it is all grouped as "train". The HuggingFace Datasets library should include a BuilderConfig for Enwik8 with train, validation, and test sets derived from the first 90 million bytes, next 5 million bytes, and last 5 million bytes, respectively. This Enwik8 split is standard practice in LM papers, as elaborated and motivated below. ### Motivation Enwik8 is commonly split into 90M, 5M, 5M consecutive bytes. This is done in the Transformer-XL [codebase](https://github.com/kimiyoung/transformer-xl/blob/44781ed21dbaec88b280f74d9ae2877f52b492a5/getdata.sh#L34), and is additionally mentioned in the Sparse Transformers [paper](https://arxiv.org/abs/1904.10509) and the Compressive Transformers [paper](https://arxiv.org/abs/1911.05507). This split is pretty much universal among language modeling papers. One may obtain the splits by manual wrangling, using the data yielded by the ```enwik8-raw``` BuilderConfig. However, this undermines the seamless functionality of the library: one must slice the single raw example, extract it into three tensors, and wrap each in a separate dataset. This becomes even more of a nuisance if using the current Enwik8 HuggingFace dataset as a TfdsDataSource with [SeqIO](https://github.com/google/seqio), where a pipeline of preprocessors is typically included in a SeqIO Task definition, to be applied immediately after loading the data with TFDS. ### Your contribution Supporting this functionality in HuggingFace Datasets will only require an additional BuilderConfig for Enwik8 and a few additional lines of code. I will submit a PR.
2023-04-11T09:28:17Z
https://github.com/huggingface/datasets/issues/5732
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5732/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5731/comments
https://api.github.com/repos/huggingface/datasets/issues/5731/timeline
2023-04-11T08:47:55Z
null
null
PR_kwDODunzps5N_7Un
closed
[]
false
5,731
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
Temporarily pin fsspec
https://api.github.com/repos/huggingface/datasets/issues/5731/events
null
https://api.github.com/repos/huggingface/datasets/issues/5731/labels{/name}
2023-04-11T08:33:15Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5731.diff", "html_url": "https://github.com/huggingface/datasets/pull/5731", "merged_at": "2023-04-11T08:47:55Z", "patch_url": "https://github.com/huggingface/datasets/pull/5731.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5731" }
1,662,012,913
[]
https://api.github.com/repos/huggingface/datasets/issues/5731
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
Fix #5730.
2023-04-11T08:57:45Z
https://github.com/huggingface/datasets/pull/5731
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5731/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5730/comments
https://api.github.com/repos/huggingface/datasets/issues/5730/timeline
2023-04-11T08:47:56Z
null
completed
I_kwDODunzps5jEDp2
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
5,730
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
CI is broken: ValueError: Name (mock) already in the registry and clobber is False
https://api.github.com/repos/huggingface/datasets/issues/5730/events
null
https://api.github.com/repos/huggingface/datasets/issues/5730/labels{/name}
2023-04-11T08:29:46Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
null
1,662,007,926
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
https://api.github.com/repos/huggingface/datasets/issues/5730
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
CI is broken for `test_py310`. See: https://github.com/huggingface/datasets/actions/runs/4665326892/jobs/8258580948 ``` =========================== short test summary info ============================ ERROR tests/test_builder.py::test_builder_with_filesystem_download_and_prepare - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_builder.py::test_builder_with_filesystem_download_and_prepare_reload - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_dataset_dict.py::test_dummy_datasetdict_serialize_fs - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_file_utils.py::test_get_from_cache_fsspec - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_filesystem.py::test_is_remote_filesystem - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xexists[tmp_path/file.txt-True] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xexists[tmp_path/file_that_doesnt_exist.txt-False] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xexists[mock://top_level/second_level/date=2019-10-01/a.parquet-True] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xexists[mock://top_level/second_level/date=2019-10-01/file_that_doesnt_exist.parquet-False] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xlistdir[tmp_path-expected_paths0] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xlistdir[mock://-expected_paths1] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xlistdir[mock://top_level-expected_paths2] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xlistdir[mock://top_level/second_level/date=2019-10-01-expected_paths3] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xisdir[tmp_path-True] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xisdir[tmp_path/file.txt-False] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xisdir[mock://-True] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xisdir[mock://top_level-True] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xisdir[mock://dir_that_doesnt_exist-False] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xisfile[tmp_path/file.txt-True] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xisfile[tmp_path/file_that_doesnt_exist.txt-False] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xisfile[mock://-False] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xisfile[mock://top_level/second_level/date=2019-10-01/a.parquet-True] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xgetsize[tmp_path/file.txt-100] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xgetsize[mock://-0] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xgetsize[mock://top_level/second_level/date=2019-10-01/a.parquet-100] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xglob[tmp_path/*.txt-expected_paths0] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xglob[mock://*-expected_paths1] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xglob[mock://top_*-expected_paths2] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xglob[mock://top_level/second_level/date=2019-10-0[1-4]-expected_paths3] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xglob[mock://top_level/second_level/date=2019-10-0[1-4]/*-expected_paths4] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xwalk[tmp_path-expected_outputs0] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::test_xwalk[mock://top_level/second_level-expected_outputs1] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::TestxPath::test_xpath_exists[tmp_path/file.txt-True] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::TestxPath::test_xpath_exists[tmp_path/file_that_doesnt_exist.txt-False] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::TestxPath::test_xpath_exists[mock://top_level/second_level/date=2019-10-01/a.parquet-True] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::TestxPath::test_xpath_exists[mock://top_level/second_level/date=2019-10-01/file_that_doesnt_exist.parquet-False] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::TestxPath::test_xpath_glob[tmp_path-*.txt-expected_paths0] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::TestxPath::test_xpath_glob[mock://-*-expected_paths1] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::TestxPath::test_xpath_glob[mock://-top_*-expected_paths2] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::TestxPath::test_xpath_glob[mock://top_level/second_level-date=2019-10-0[1-4]-expected_paths3] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::TestxPath::test_xpath_glob[mock://top_level/second_level-date=2019-10-0[1-4]/*-expected_paths4] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::TestxPath::test_xpath_rglob[tmp_path-*.txt-expected_paths0] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::TestxPath::test_xpath_rglob[mock://-date=2019-10-0[1-4]-expected_paths1] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::TestxPath::test_xpath_rglob[mock://top_level-date=2019-10-0[1-4]-expected_paths2] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::TestxPath::test_xpath_rglob[mock://-date=2019-10-0[1-4]/*-expected_paths3] - ValueError: Name (mock) already in the registry and clobber is False ERROR tests/test_streaming_download_manager.py::TestxPath::test_xpath_rglob[mock://top_level-date=2019-10-0[1-4]/*-expected_paths4] - ValueError: Name (mock) already in the registry and clobber is False ===== 2105 passed, 18 skipped, 38 warnings, 46 errors in 236.22s (0:03:56) ===== ```
2023-04-11T08:47:56Z
https://github.com/huggingface/datasets/issues/5730
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5730/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5729/comments
https://api.github.com/repos/huggingface/datasets/issues/5729/timeline
2023-04-26T15:05:12Z
null
null
PR_kwDODunzps5N_pvI
closed
[]
false
5,729
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
Fix nondeterministic sharded data split order
https://api.github.com/repos/huggingface/datasets/issues/5729/events
null
https://api.github.com/repos/huggingface/datasets/issues/5729/labels{/name}
2023-04-11T07:34:20Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5729.diff", "html_url": "https://github.com/huggingface/datasets/pull/5729", "merged_at": "2023-04-26T15:05:12Z", "patch_url": "https://github.com/huggingface/datasets/pull/5729.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5729" }
1,661,929,923
[]
https://api.github.com/repos/huggingface/datasets/issues/5729
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
This PR makes the order of the split names deterministic. Before it was nondeterministic because we were iterating over `set` elements. Fix #5728.
2023-04-26T15:12:25Z
https://github.com/huggingface/datasets/pull/5729
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5729/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5728/comments
https://api.github.com/repos/huggingface/datasets/issues/5728/timeline
2023-04-26T15:05:13Z
null
completed
I_kwDODunzps5jDvos
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
5,728
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
The order of data split names is nondeterministic
https://api.github.com/repos/huggingface/datasets/issues/5728/events
null
https://api.github.com/repos/huggingface/datasets/issues/5728/labels{/name}
2023-04-11T07:31:25Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
null
1,661,925,932
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
https://api.github.com/repos/huggingface/datasets/issues/5728
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
After this CI error: https://github.com/huggingface/datasets/actions/runs/4639528358/jobs/8210492953?pr=5718 ``` FAILED tests/test_data_files.py::test_get_data_files_patterns[data_file_per_split4] - AssertionError: assert ['random', 'train'] == ['train', 'random'] At index 0 diff: 'random' != 'train' Full diff: - ['train', 'random'] + ['random', 'train'] ``` I have checked locally and found out that the data split order is nondeterministic. This is caused by the use of `set` for sharded splits.
2023-04-26T15:05:13Z
https://github.com/huggingface/datasets/issues/5728
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5728/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5727/comments
https://api.github.com/repos/huggingface/datasets/issues/5727/timeline
2023-07-21T14:08:19Z
null
completed
I_kwDODunzps5jCQhr
closed
[]
null
5,727
{ "avatar_url": "https://avatars.githubusercontent.com/u/122648572?v=4", "events_url": "https://api.github.com/users/joelkowalewski/events{/privacy}", "followers_url": "https://api.github.com/users/joelkowalewski/followers", "following_url": "https://api.github.com/users/joelkowalewski/following{/other_user}", "gists_url": "https://api.github.com/users/joelkowalewski/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/joelkowalewski", "id": 122648572, "login": "joelkowalewski", "node_id": "U_kgDOB093_A", "organizations_url": "https://api.github.com/users/joelkowalewski/orgs", "received_events_url": "https://api.github.com/users/joelkowalewski/received_events", "repos_url": "https://api.github.com/users/joelkowalewski/repos", "site_admin": false, "starred_url": "https://api.github.com/users/joelkowalewski/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/joelkowalewski/subscriptions", "type": "User", "url": "https://api.github.com/users/joelkowalewski" }
load_dataset fails with FileNotFound error on Windows
https://api.github.com/repos/huggingface/datasets/issues/5727/events
null
https://api.github.com/repos/huggingface/datasets/issues/5727/labels{/name}
2023-04-10T23:21:12Z
null
false
null
null
1,661,536,363
[]
https://api.github.com/repos/huggingface/datasets/issues/5727
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug Although I can import and run the datasets library in a Colab environment, I cannot successfully load any data on my own machine (Windows 10) despite following the install steps: (1) create conda environment (2) activate environment (3) install with: ``conda` install -c huggingface -c conda-forge datasets` Then ``` from datasets import load_dataset # this or any other example from the website fails with the FileNotFoundError glue = load_dataset("glue", "ax") ``` **Below I have pasted the error omitting the full path**: ``` raise FileNotFoundError( FileNotFoundError: Couldn't find a dataset script at C:\Users\...\glue\glue.py or any data file in the same directory. Couldn't find 'glue' on the Hugging Face Hub either: FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\...\\.cache\\huggingface' ``` ### Steps to reproduce the bug On Windows 10 1) create a minimal conda environment (with just Python) (2) activate environment (3) install datasets with: ``conda` install -c huggingface -c conda-forge datasets` (4) import load_dataset and follow example usage from any dataset card. ### Expected behavior The expected behavior is to load the file into the Python session running on my machine without error. ### Environment info ``` # Name Version Build Channel aiohttp 3.8.4 py311ha68e1ae_0 conda-forge aiosignal 1.3.1 pyhd8ed1ab_0 conda-forge arrow-cpp 11.0.0 h57928b3_13_cpu conda-forge async-timeout 4.0.2 pyhd8ed1ab_0 conda-forge attrs 22.2.0 pyh71513ae_0 conda-forge aws-c-auth 0.6.26 h1262f0c_1 conda-forge aws-c-cal 0.5.21 h7cda486_2 conda-forge aws-c-common 0.8.14 hcfcfb64_0 conda-forge aws-c-compression 0.2.16 h8a79959_5 conda-forge aws-c-event-stream 0.2.20 h5f78564_4 conda-forge aws-c-http 0.7.6 h2545be9_0 conda-forge aws-c-io 0.13.19 h0d2781e_3 conda-forge aws-c-mqtt 0.8.6 hd211e0c_12 conda-forge aws-c-s3 0.2.7 h8113e7b_1 conda-forge aws-c-sdkutils 0.1.8 h8a79959_0 conda-forge aws-checksums 0.1.14 h8a79959_5 conda-forge aws-crt-cpp 0.19.8 he6d3b81_12 conda-forge aws-sdk-cpp 1.10.57 h64004b3_8 conda-forge brotlipy 0.7.0 py311ha68e1ae_1005 conda-forge bzip2 1.0.8 h8ffe710_4 conda-forge c-ares 1.19.0 h2bbff1b_0 ca-certificates 2023.01.10 haa95532_0 certifi 2022.12.7 pyhd8ed1ab_0 conda-forge cffi 1.15.1 py311h7d9ee11_3 conda-forge charset-normalizer 2.1.1 pyhd8ed1ab_0 conda-forge colorama 0.4.6 pyhd8ed1ab_0 conda-forge cryptography 40.0.1 py311h28e9c30_0 conda-forge dataclasses 0.8 pyhc8e2a94_3 conda-forge datasets 2.11.0 py_0 huggingface dill 0.3.6 pyhd8ed1ab_1 conda-forge filelock 3.11.0 pyhd8ed1ab_0 conda-forge frozenlist 1.3.3 py311ha68e1ae_0 conda-forge fsspec 2023.4.0 pyh1a96a4e_0 conda-forge gflags 2.2.2 ha925a31_1004 conda-forge glog 0.6.0 h4797de2_0 conda-forge huggingface_hub 0.13.4 py_0 huggingface idna 3.4 pyhd8ed1ab_0 conda-forge importlib-metadata 6.3.0 pyha770c72_0 conda-forge importlib_metadata 6.3.0 hd8ed1ab_0 conda-forge intel-openmp 2023.0.0 h57928b3_25922 conda-forge krb5 1.20.1 heb0366b_0 conda-forge libabseil 20230125.0 cxx17_h63175ca_1 conda-forge libarrow 11.0.0 h04c43f8_13_cpu conda-forge libblas 3.9.0 16_win64_mkl conda-forge libbrotlicommon 1.0.9 hcfcfb64_8 conda-forge libbrotlidec 1.0.9 hcfcfb64_8 conda-forge libbrotlienc 1.0.9 hcfcfb64_8 conda-forge libcblas 3.9.0 16_win64_mkl conda-forge libcrc32c 1.1.2 h0e60522_0 conda-forge libcurl 7.88.1 h68f0423_1 conda-forge libexpat 2.5.0 h63175ca_1 conda-forge libffi 3.4.2 h8ffe710_5 conda-forge libgoogle-cloud 2.8.0 hf2ff781_1 conda-forge libgrpc 1.52.1 h32da247_1 conda-forge libhwloc 2.9.0 h51c2c0f_0 conda-forge libiconv 1.17 h8ffe710_0 conda-forge liblapack 3.9.0 16_win64_mkl conda-forge libprotobuf 3.21.12 h12be248_0 conda-forge libsqlite 3.40.0 hcfcfb64_0 conda-forge libssh2 1.10.0 h9a1e1f7_3 conda-forge libthrift 0.18.1 h9ce19ad_0 conda-forge libutf8proc 2.8.0 h82a8f57_0 conda-forge libxml2 2.10.3 hc3477c8_6 conda-forge libzlib 1.2.13 hcfcfb64_4 conda-forge lz4-c 1.9.4 hcfcfb64_0 conda-forge mkl 2022.1.0 h6a75c08_874 conda-forge multidict 6.0.4 py311ha68e1ae_0 conda-forge multiprocess 0.70.14 py311ha68e1ae_3 conda-forge numpy 1.24.2 py311h0b4df5a_0 conda-forge openssl 3.1.0 hcfcfb64_0 conda-forge orc 1.8.3 hada7b9e_0 conda-forge packaging 23.0 pyhd8ed1ab_0 conda-forge pandas 2.0.0 py311hf63dbb6_0 conda-forge parquet-cpp 1.5.1 2 conda-forge pip 23.0.1 pyhd8ed1ab_0 conda-forge pthreads-win32 2.9.1 hfa6e2cd_3 conda-forge pyarrow 11.0.0 py311h6a6099b_13_cpu conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pyopenssl 23.1.1 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 pyh0701188_6 conda-forge python 3.11.3 h2628c8c_0_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-tzdata 2023.3 pyhd8ed1ab_0 conda-forge python-xxhash 3.2.0 py311ha68e1ae_0 conda-forge python_abi 3.11 3_cp311 conda-forge pytz 2023.3 pyhd8ed1ab_0 conda-forge pyyaml 6.0 py311ha68e1ae_5 conda-forge re2 2023.02.02 h63175ca_0 conda-forge requests 2.28.2 pyhd8ed1ab_1 conda-forge setuptools 67.6.1 pyhd8ed1ab_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge snappy 1.1.10 hfb803bf_0 conda-forge tbb 2021.8.0 h91493d7_0 conda-forge tk 8.6.12 h8ffe710_0 conda-forge tqdm 4.65.0 pyhd8ed1ab_1 conda-forge typing-extensions 4.5.0 hd8ed1ab_0 conda-forge typing_extensions 4.5.0 pyha770c72_0 conda-forge tzdata 2023c h71feb2d_0 conda-forge ucrt 10.0.22621.0 h57928b3_0 conda-forge urllib3 1.26.15 pyhd8ed1ab_0 conda-forge vc 14.3 hb6edc58_10 conda-forge vs2015_runtime 14.34.31931 h4c5c07a_10 conda-forge wheel 0.40.0 pyhd8ed1ab_0 conda-forge win_inet_pton 1.1.0 pyhd8ed1ab_6 conda-forge xxhash 0.8.1 hcfcfb64_0 conda-forge xz 5.2.10 h8cc25b3_1 yaml 0.2.5 h8ffe710_2 conda-forge yarl 1.8.2 py311ha68e1ae_0 conda-forge zipp 3.15.0 pyhd8ed1ab_0 conda-forge zlib 1.2.13 hcfcfb64_4 conda-forge zstd 1.5.4 hd43e919_0 ```
2023-07-21T14:08:20Z
https://github.com/huggingface/datasets/issues/5727
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5727/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5726/comments
https://api.github.com/repos/huggingface/datasets/issues/5726/timeline
2023-04-21T06:35:28Z
null
completed
I_kwDODunzps5jAAGn
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
5,726
{ "avatar_url": "https://avatars.githubusercontent.com/u/3610788?v=4", "events_url": "https://api.github.com/users/myluki2000/events{/privacy}", "followers_url": "https://api.github.com/users/myluki2000/followers", "following_url": "https://api.github.com/users/myluki2000/following{/other_user}", "gists_url": "https://api.github.com/users/myluki2000/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/myluki2000", "id": 3610788, "login": "myluki2000", "node_id": "MDQ6VXNlcjM2MTA3ODg=", "organizations_url": "https://api.github.com/users/myluki2000/orgs", "received_events_url": "https://api.github.com/users/myluki2000/received_events", "repos_url": "https://api.github.com/users/myluki2000/repos", "site_admin": false, "starred_url": "https://api.github.com/users/myluki2000/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/myluki2000/subscriptions", "type": "User", "url": "https://api.github.com/users/myluki2000" }
Fallback JSON Dataset loading does not load all values when features specified manually
https://api.github.com/repos/huggingface/datasets/issues/5726/events
null
https://api.github.com/repos/huggingface/datasets/issues/5726/labels{/name}
2023-04-10T15:22:14Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
null
1,660,944,807
[]
https://api.github.com/repos/huggingface/datasets/issues/5726
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug The fallback JSON dataset loader located here: https://github.com/huggingface/datasets/blob/1c4ec00511868bd881e84a6f7e0333648d833b8e/src/datasets/packaged_modules/json/json.py#L130-L153 does not load the values of features correctly when features are specified manually and not all features have a value in the first entry of the dataset. I'm pretty sure this is not supposed to be expected bahavior? To fix this you'd have to change this line: https://github.com/huggingface/datasets/blob/1c4ec00511868bd881e84a6f7e0333648d833b8e/src/datasets/packaged_modules/json/json.py#L140 To pass a schema to pyarrow which has the same structure as the features argument passed to the load_dataset() method. ### Steps to reproduce the bug Consider a dataset JSON like this: ``` [ { "instruction": "Do stuff", "output": "Answer stuff" }, { "instruction": "Do stuff2", "input": "Additional Input2", "output": "Answer stuff2" } ] ``` Using this code to load the dataset: ``` from datasets import load_dataset, Features, Value features = { "instruction": Value("string"), "input": Value("string"), "output": Value("string") } features = Features(features) ds = load_dataset("json", data_files="./ds.json", features=features) for row in ds["train"]: print(row) ``` we get a dataset that looks like this: | **Instruction** | **Input** | **Output** | |-----------------|--------------------|-----------------| | "Do stuff" | None | "Answer Stuff" | | "Do stuff2" | None | "Answer Stuff2" | ### Expected behavior The input column should contain values other than None for dataset entries that have the "input" attribute set: | **Instruction** | **Input** | **Output** | |-----------------|--------------------|-----------------| | "Do stuff" | None | "Answer Stuff" | | "Do stuff2" | "Additional Input2" | "Answer Stuff2" | ### Environment info Python 3.10.10 Datasets 2.11.0 Windows 10
2023-04-21T06:35:28Z
https://github.com/huggingface/datasets/issues/5726
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5726/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5725/comments
https://api.github.com/repos/huggingface/datasets/issues/5725/timeline
2023-04-21T06:16:24Z
null
completed
I_kwDODunzps5i-Iki
closed
[]
null
5,725
{ "avatar_url": "https://avatars.githubusercontent.com/u/845175?v=4", "events_url": "https://api.github.com/users/ndvbd/events{/privacy}", "followers_url": "https://api.github.com/users/ndvbd/followers", "following_url": "https://api.github.com/users/ndvbd/following{/other_user}", "gists_url": "https://api.github.com/users/ndvbd/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ndvbd", "id": 845175, "login": "ndvbd", "node_id": "MDQ6VXNlcjg0NTE3NQ==", "organizations_url": "https://api.github.com/users/ndvbd/orgs", "received_events_url": "https://api.github.com/users/ndvbd/received_events", "repos_url": "https://api.github.com/users/ndvbd/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ndvbd/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ndvbd/subscriptions", "type": "User", "url": "https://api.github.com/users/ndvbd" }
How to limit the number of examples in dataset, for testing?
https://api.github.com/repos/huggingface/datasets/issues/5725/events
null
https://api.github.com/repos/huggingface/datasets/issues/5725/labels{/name}
2023-04-10T08:41:43Z
null
false
null
null
1,660,455,202
[]
https://api.github.com/repos/huggingface/datasets/issues/5725
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug I am using this command: `data = load_dataset("json", data_files=data_path)` However, I want to add a parameter, to limit the number of loaded examples to be 10, for development purposes, but can't find this simple parameter. ### Steps to reproduce the bug In the description. ### Expected behavior To be able to limit the number of examples ### Environment info Nothing special
2023-04-21T06:16:24Z
https://github.com/huggingface/datasets/issues/5725
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5725/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5724/comments
https://api.github.com/repos/huggingface/datasets/issues/5724/timeline
2023-04-20T20:37:30Z
null
completed
I_kwDODunzps5i8KVX
closed
[]
null
5,724
{ "avatar_url": "https://avatars.githubusercontent.com/u/41177966?v=4", "events_url": "https://api.github.com/users/szxiangjn/events{/privacy}", "followers_url": "https://api.github.com/users/szxiangjn/followers", "following_url": "https://api.github.com/users/szxiangjn/following{/other_user}", "gists_url": "https://api.github.com/users/szxiangjn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/szxiangjn", "id": 41177966, "login": "szxiangjn", "node_id": "MDQ6VXNlcjQxMTc3OTY2", "organizations_url": "https://api.github.com/users/szxiangjn/orgs", "received_events_url": "https://api.github.com/users/szxiangjn/received_events", "repos_url": "https://api.github.com/users/szxiangjn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/szxiangjn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/szxiangjn/subscriptions", "type": "User", "url": "https://api.github.com/users/szxiangjn" }
Error after shuffling streaming IterableDatasets with downloaded dataset
https://api.github.com/repos/huggingface/datasets/issues/5724/events
null
https://api.github.com/repos/huggingface/datasets/issues/5724/labels{/name}
2023-04-09T16:58:44Z
null
false
null
null
1,659,938,135
[]
https://api.github.com/repos/huggingface/datasets/issues/5724
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug I downloaded the C4 dataset, and used streaming IterableDatasets to read it. Everything went normal until I used `dataset = dataset.shuffle(seed=42, buffer_size=10_000)` to shuffle the dataset. Shuffled dataset will throw the following error when it is used by `next(iter(dataset))`: ``` File "/data/miniconda3/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 937, in __iter__ for key, example in ex_iterable: File "/data/miniconda3/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 627, in __iter__ for x in self.ex_iterable: File "/data/miniconda3/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 138, in __iter__ yield from self.generate_examples_fn(**kwargs_with_shuffled_shards) File "/data/miniconda3/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 763, in wrapper for key, table in generate_tables_fn(**kwargs): File "/data/miniconda3/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 101, in _generate_tables batch = f.read(self.config.chunksize) File "/data/miniconda3/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 372, in read_with_retries out = read(*args, **kwargs) File "/data/miniconda3/lib/python3.9/gzip.py", line 300, in read return self._buffer.read(size) File "/data/miniconda3/lib/python3.9/_compression.py", line 68, in readinto data = self.read(len(byte_view)) File "/data/miniconda3/lib/python3.9/gzip.py", line 487, in read if not self._read_gzip_header(): File "/data/miniconda3/lib/python3.9/gzip.py", line 435, in _read_gzip_header raise BadGzipFile('Not a gzipped file (%r)' % magic) gzip.BadGzipFile: Not a gzipped file (b've') ``` I found that there is no problem to use the dataset in this way without shuffling. Also, use `dataset = datasets.load_dataset('c4', 'en', split='train', streaming=True)`, which will download the dataset on-the-fly instead of loading from the local file, will also not have problems even after shuffle. ### Steps to reproduce the bug 1. Download C4 dataset from https://huggingface.co/datasets/allenai/c4 2. ``` import datasets dataset = datasets.load_dataset('/path/to/your/data/dir', 'en', streaming=True, split='train') dataset = dataset.shuffle(buffer_size=10_000, seed=42) next(iter(dataset)) ``` ### Expected behavior `next(iter(dataset))` should give me a sample from the dataset ### Environment info - `datasets` version: 2.11.0 - Platform: Linux-5.4.32-1-tlinux4-0001-x86_64-with-glibc2.28 - Python version: 3.9.16 - Huggingface_hub version: 0.13.1 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
2023-04-20T20:37:30Z
https://github.com/huggingface/datasets/issues/5724
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5724/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5722/comments
https://api.github.com/repos/huggingface/datasets/issues/5722/timeline
2023-07-24T14:50:46Z
null
completed
I_kwDODunzps5i7xxG
closed
[]
null
5,722
{ "avatar_url": "https://avatars.githubusercontent.com/u/16603773?v=4", "events_url": "https://api.github.com/users/wlhgtc/events{/privacy}", "followers_url": "https://api.github.com/users/wlhgtc/followers", "following_url": "https://api.github.com/users/wlhgtc/following{/other_user}", "gists_url": "https://api.github.com/users/wlhgtc/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wlhgtc", "id": 16603773, "login": "wlhgtc", "node_id": "MDQ6VXNlcjE2NjAzNzcz", "organizations_url": "https://api.github.com/users/wlhgtc/orgs", "received_events_url": "https://api.github.com/users/wlhgtc/received_events", "repos_url": "https://api.github.com/users/wlhgtc/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wlhgtc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wlhgtc/subscriptions", "type": "User", "url": "https://api.github.com/users/wlhgtc" }
Distributed Training Error on Customized Dataset
https://api.github.com/repos/huggingface/datasets/issues/5722/events
null
https://api.github.com/repos/huggingface/datasets/issues/5722/labels{/name}
2023-04-09T11:04:59Z
null
false
null
null
1,659,837,510
[]
https://api.github.com/repos/huggingface/datasets/issues/5722
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
Hi guys, recently I tried to use `datasets` to train a dual encoder. I finish my own datasets according to the nice [tutorial](https://huggingface.co/docs/datasets/v2.11.0/en/dataset_script) Here are my code: ```python class RetrivalDataset(datasets.GeneratorBasedBuilder): """CrossEncoder dataset.""" BUILDER_CONFIGS = [RetrivalConfig(name="DuReader")] # DEFAULT_CONFIG_NAME = "DuReader" def _info(self): return datasets.DatasetInfo( features=datasets.Features( { "id": datasets.Value("string"), "question": datasets.Value("string"), "documents": Sequence(datasets.Value("string")), } ), supervised_keys=None, ) def _split_generators(self, dl_manager): """Returns SplitGenerators.""" train_file = self.config.data_dir + self.config.train_file valid_file = self.config.data_dir + self.config.valid_file logger.info(f"Training on {self.config.train_file}") logger.info(f"Evaluating on {self.config.valid_file}") return [ datasets.SplitGenerator( name=datasets.Split.TRAIN, gen_kwargs={"file_path": train_file} ), datasets.SplitGenerator( name=datasets.Split.VALIDATION, gen_kwargs={"file_path": valid_file} ), ] def _generate_examples(self, file_path): with jsonlines.open(file_path, "r") as f: for record in f: label = record["label"] question = record["question"] # dual encoder all_documents = record["all_documents"] positive_paragraph = all_documents.pop(label) all_documents = [positive_paragraph] + all_documents u_id = "{}_#_{}".format( md5_hash(question + "".join(all_documents)), "".join(random.sample(string.ascii_letters + string.digits, 7)), ) item = { "question": question, "documents": all_documents, "id": u_id, } yield u_id, item ``` It works well on single GPU, but got errors as follows when used DDP: ```python Detected mismatch between collectives on ranks. Rank 1 is running collective: CollectiveFingerPrint(OpType=BARRIER), but Rank 0 is running collective: CollectiveFingerPrint(OpType=ALLGATHER_COALESCED) ``` Here are my train script on a two A100 mechine: ```bash export TORCH_DISTRIBUTED_DEBUG=DETAIL export TORCH_SHOW_CPP_STACKTRACES=1 export NCCL_DEBUG=INFO export NCCL_DEBUG_SUBSYS=INIT,COLL,ENV nohup torchrun --nproc_per_node 2 train.py experiments/de-big.json >logs/de-big.log 2>&1& ``` I am not sure if this error below related to my dataset code when use DDP. And I notice the PR(#5369 ), but I don't know when and where should I used the function(`split_dataset_by_node`) . @lhoestq hope you could help me?
2023-07-24T14:50:46Z
https://github.com/huggingface/datasets/issues/5722
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5722/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5721/comments
https://api.github.com/repos/huggingface/datasets/issues/5721/timeline
null
null
null
I_kwDODunzps5i7Leq
open
[]
null
5,721
{ "avatar_url": "https://avatars.githubusercontent.com/u/1841186?v=4", "events_url": "https://api.github.com/users/cyrilzakka/events{/privacy}", "followers_url": "https://api.github.com/users/cyrilzakka/followers", "following_url": "https://api.github.com/users/cyrilzakka/following{/other_user}", "gists_url": "https://api.github.com/users/cyrilzakka/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/cyrilzakka", "id": 1841186, "login": "cyrilzakka", "node_id": "MDQ6VXNlcjE4NDExODY=", "organizations_url": "https://api.github.com/users/cyrilzakka/orgs", "received_events_url": "https://api.github.com/users/cyrilzakka/received_events", "repos_url": "https://api.github.com/users/cyrilzakka/repos", "site_admin": false, "starred_url": "https://api.github.com/users/cyrilzakka/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cyrilzakka/subscriptions", "type": "User", "url": "https://api.github.com/users/cyrilzakka" }
Calling datasets.load_dataset("text" ...) results in a wrong split.
https://api.github.com/repos/huggingface/datasets/issues/5721/events
null
https://api.github.com/repos/huggingface/datasets/issues/5721/labels{/name}
2023-04-08T23:55:12Z
null
false
null
null
1,659,680,682
[]
https://api.github.com/repos/huggingface/datasets/issues/5721
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug When creating a text dataset, the training split should have the bulk of the examples by default. Currently, testing does. ### Steps to reproduce the bug I have a folder with 18K text files in it. Each text file essentially consists in a document or article scraped from online. Calling the following codeL ``` folder_path = "/home/cyril/Downloads/llama_dataset" data = datasets.load_dataset("text", data_dir=folder_path) data.save_to_disk("/home/cyril/Downloads/data.hf") data = datasets.load_from_disk("/home/cyril/Downloads/data.hf") print(data) ``` Results in the following split: ``` DatasetDict({ train: Dataset({ features: ['text'], num_rows: 2114 }) test: Dataset({ features: ['text'], num_rows: 200882 }) validation: Dataset({ features: ['text'], num_rows: 152 }) }) ``` It seems to me like the train/test/validation splits are in the wrong order since test split >>>> train_split ### Expected behavior Train split should have the bulk of the training examples. ### Environment info datasets 2.11.0, python 3.10.6
2023-04-08T23:55:12Z
https://github.com/huggingface/datasets/issues/5721
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5721/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5720/comments
https://api.github.com/repos/huggingface/datasets/issues/5720/timeline
null
null
null
I_kwDODunzps5i66ZR
open
[]
null
5,720
{ "avatar_url": "https://avatars.githubusercontent.com/u/29244648?v=4", "events_url": "https://api.github.com/users/jlehrer1/events{/privacy}", "followers_url": "https://api.github.com/users/jlehrer1/followers", "following_url": "https://api.github.com/users/jlehrer1/following{/other_user}", "gists_url": "https://api.github.com/users/jlehrer1/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jlehrer1", "id": 29244648, "login": "jlehrer1", "node_id": "MDQ6VXNlcjI5MjQ0NjQ4", "organizations_url": "https://api.github.com/users/jlehrer1/orgs", "received_events_url": "https://api.github.com/users/jlehrer1/received_events", "repos_url": "https://api.github.com/users/jlehrer1/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jlehrer1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jlehrer1/subscriptions", "type": "User", "url": "https://api.github.com/users/jlehrer1" }
Streaming IterableDatasets do not work with torch DataLoaders
https://api.github.com/repos/huggingface/datasets/issues/5720/events
null
https://api.github.com/repos/huggingface/datasets/issues/5720/labels{/name}
2023-04-08T18:45:48Z
null
false
null
null
1,659,610,705
[]
https://api.github.com/repos/huggingface/datasets/issues/5720
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug When using streaming datasets set up with train/val split using `.skip()` and `.take()`, the following error occurs when iterating over a torch dataloader: ``` File "/Users/julian/miniconda3/envs/sims/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 363, in __iter__ self._iterator = self._get_iterator() File "/Users/julian/miniconda3/envs/sims/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 314, in _get_iterator return _MultiProcessingDataLoaderIter(self) File "/Users/julian/miniconda3/envs/sims/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 927, in __init__ w.start() File "/Users/julian/miniconda3/envs/sims/lib/python3.9/multiprocessing/process.py", line 121, in start self._popen = self._Popen(self) File "/Users/julian/miniconda3/envs/sims/lib/python3.9/multiprocessing/context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "/Users/julian/miniconda3/envs/sims/lib/python3.9/multiprocessing/context.py", line 284, in _Popen return Popen(process_obj) File "/Users/julian/miniconda3/envs/sims/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in __init__ super().__init__(process_obj) File "/Users/julian/miniconda3/envs/sims/lib/python3.9/multiprocessing/popen_fork.py", line 19, in __init__ self._launch(process_obj) File "/Users/julian/miniconda3/envs/sims/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 47, in _launch reduction.dump(process_obj, fp) File "/Users/julian/miniconda3/envs/sims/lib/python3.9/multiprocessing/reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) AttributeError: Can't pickle local object '_generate_examples_from_tables_wrapper.<locals>.wrapper' ``` To reproduce, run the code ``` from datasets import load_dataset data = load_dataset(args.dataset_name, split="train", streaming=True) train_len = 5000 val_len = 100 train, val = data.take(train_len), data.skip(train_len).take(val_len) traindata = IterableClipDataset(data, context_length=args.max_len, tokenizer=tokenizer, image_key="url", text_key="text") traindata = DataLoader(traindata, batch_size=args.batch_size, num_workers=args.num_workers, persistent_workers=True) ``` Where the class IterableClipDataset is a simple wrapper to cast the dataset to a torch iterabledataset, defined via ``` from torch.utils.data import Dataset, IterableDataset from torchvision.transforms import Compose, Resize, ToTensor from transformers import AutoTokenizer import requests from PIL import Image class IterableClipDataset(IterableDataset): def __init__(self, dataset, context_length: int, image_transform=None, tokenizer=None, image_key="image", text_key="text"): self.dataset = dataset self.context_length = context_length self.image_transform = Compose([Resize((224, 224)), ToTensor()]) if image_transform is None else image_transform self.tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased") if tokenizer is None else tokenizer self.image_key = image_key self.text_key = text_key def read_image(self, url: str): try: # Try to read the image image = Image.open(requests.get(url, stream=True).raw) except: image = Image.new("RGB", (224, 224), (0, 0, 0)) return image def process_sample(self, image, text): if isinstance(image, str): image = self.read_image(image) if self.image_transform is not None: image = self.image_transform(image) text = self.tokenizer.encode( text, add_special_tokens=True, max_length=self.context_length, truncation=True, padding="max_length" ) text = torch.tensor(text, dtype=torch.long) return image, text def __iter__(self): for sample in self.dataset: image, text = sample[self.image_key], sample[self.text_key] yield self.process_sample(image, text) ``` ### Steps to reproduce the bug Steps to reproduce 1. Install `datasets`, `torch`, and `PIL` (if you want to reproduce exactly) 2. Run the code above ### Expected behavior Batched data is produced from the dataloader ### Environment info ``` datasets == 2.9.0 python == 3.9.12 torch == 1.11.0 ```
2023-05-27T12:57:08Z
https://github.com/huggingface/datasets/issues/5720
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5720/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5719/comments
https://api.github.com/repos/huggingface/datasets/issues/5719/timeline
2023-04-20T15:34:41Z
null
completed
I_kwDODunzps5i5W6W
closed
[]
null
5,719
{ "avatar_url": "https://avatars.githubusercontent.com/u/15215732?v=4", "events_url": "https://api.github.com/users/offchan42/events{/privacy}", "followers_url": "https://api.github.com/users/offchan42/followers", "following_url": "https://api.github.com/users/offchan42/following{/other_user}", "gists_url": "https://api.github.com/users/offchan42/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/offchan42", "id": 15215732, "login": "offchan42", "node_id": "MDQ6VXNlcjE1MjE1NzMy", "organizations_url": "https://api.github.com/users/offchan42/orgs", "received_events_url": "https://api.github.com/users/offchan42/received_events", "repos_url": "https://api.github.com/users/offchan42/repos", "site_admin": false, "starred_url": "https://api.github.com/users/offchan42/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/offchan42/subscriptions", "type": "User", "url": "https://api.github.com/users/offchan42" }
Array2D feature creates a list of list instead of a numpy array
https://api.github.com/repos/huggingface/datasets/issues/5719/events
null
https://api.github.com/repos/huggingface/datasets/issues/5719/labels{/name}
2023-04-07T21:04:08Z
null
false
null
null
1,659,203,222
[]
https://api.github.com/repos/huggingface/datasets/issues/5719
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug I'm not sure if this is expected behavior or not. When I create a 2D array using `Array2D`, the data has list type instead of numpy array. I think it should not be the expected behavior especially when I feed a numpy array as input to the data creation function. Why is it converting my array into a list? Also if I change the first dimension of the `Array2D` shape to None, it's returning array correctly. ### Steps to reproduce the bug Run this code: ```py from datasets import Dataset, Features, Array2D import numpy as np # you have to change the first dimension of the shape to None to make it return an array features = Features(dict(seq=Array2D((2,2), 'float32'))) ds = Dataset.from_dict(dict(seq=[np.random.rand(2,2)]), features=features) a = ds[0]['seq'] print(a) print(type(a)) ``` The following will be printed in stdout: ``` [[0.8127174377441406, 0.3760348856449127], [0.7510159611701965, 0.4322739541530609]] <class 'list'> ``` ### Expected behavior Each indexed item should be a list or numpy array. Currently, `Array((2,2))` yields a list but `Array((None,2))` yields an array. ### Environment info - `datasets` version: 2.11.0 - Platform: Windows-10-10.0.19045-SP0 - Python version: 3.9.13 - Huggingface_hub version: 0.13.4 - PyArrow version: 11.0.0 - Pandas version: 1.4.4
2023-04-20T15:34:41Z
https://github.com/huggingface/datasets/issues/5719
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5719/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5718/comments
https://api.github.com/repos/huggingface/datasets/issues/5718/timeline
2023-04-27T14:35:52Z
null
null
PR_kwDODunzps5N2IZC
closed
[]
false
5,718
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
Reorder default data splits to have validation before test
https://api.github.com/repos/huggingface/datasets/issues/5718/events
null
https://api.github.com/repos/huggingface/datasets/issues/5718/labels{/name}
2023-04-07T16:01:26Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5718.diff", "html_url": "https://github.com/huggingface/datasets/pull/5718", "merged_at": "2023-04-27T14:35:52Z", "patch_url": "https://github.com/huggingface/datasets/pull/5718.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5718" }
1,658,958,406
[]
https://api.github.com/repos/huggingface/datasets/issues/5718
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
This PR reorders data splits, so that by default validation appears before test. The default order becomes: [train, validation, test] instead of [train, test, validation].
2023-04-27T14:43:13Z
https://github.com/huggingface/datasets/pull/5718
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5718/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5717/comments
https://api.github.com/repos/huggingface/datasets/issues/5717/timeline
null
null
null
I_kwDODunzps5i3jWK
open
[ { "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" } ]
null
5,717
{ "avatar_url": "https://avatars.githubusercontent.com/u/959590?v=4", "events_url": "https://api.github.com/users/jplu/events{/privacy}", "followers_url": "https://api.github.com/users/jplu/followers", "following_url": "https://api.github.com/users/jplu/following{/other_user}", "gists_url": "https://api.github.com/users/jplu/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jplu", "id": 959590, "login": "jplu", "node_id": "MDQ6VXNlcjk1OTU5MA==", "organizations_url": "https://api.github.com/users/jplu/orgs", "received_events_url": "https://api.github.com/users/jplu/received_events", "repos_url": "https://api.github.com/users/jplu/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jplu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jplu/subscriptions", "type": "User", "url": "https://api.github.com/users/jplu" }
Errror when saving to disk a dataset of images
https://api.github.com/repos/huggingface/datasets/issues/5717/events
null
https://api.github.com/repos/huggingface/datasets/issues/5717/labels{/name}
2023-04-07T11:59:17Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
null
1,658,729,866
[]
https://api.github.com/repos/huggingface/datasets/issues/5717
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
### Describe the bug Hello! I have an issue when I try to save on disk my dataset of images. The error I get is: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 1442, in save_to_disk for job_id, done, content in Dataset._save_to_disk_single(**kwargs): File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 1473, in _save_to_disk_single writer.write_table(pa_table) File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_writer.py", line 570, in write_table pa_table = embed_table_storage(pa_table) File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 2268, in embed_table_storage arrays = [ File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 2269, in <listcomp> embed_array_storage(table[name], feature) if require_storage_embed(feature) else table[name] File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 1817, in wrapper return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 1817, in <listcomp> return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 2142, in embed_array_storage return feature.embed_storage(array) File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/features/image.py", line 269, in embed_storage storage = pa.StructArray.from_arrays([bytes_array, path_array], ["bytes", "path"], mask=bytes_array.is_null()) File "pyarrow/array.pxi", line 2766, in pyarrow.lib.StructArray.from_arrays File "pyarrow/array.pxi", line 2961, in pyarrow.lib.c_mask_inverted_from_obj TypeError: Mask must be a pyarrow.Array of type boolean ``` My dataset is around 50K images, is this error might be due to a bad image? Thanks for the help. ### Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("imagefolder", data_dir="/path/to/dataset") dataset["train"].save_to_disk("./myds", num_shards=40) ``` ### Expected behavior Having my dataset properly saved to disk. ### Environment info - `datasets` version: 2.11.0 - Platform: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 - Python version: 3.10.10 - Huggingface_hub version: 0.13.3 - PyArrow version: 11.0.0 - Pandas version: 2.0.0
2023-11-08T11:08:18Z
https://github.com/huggingface/datasets/issues/5717
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5717/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5716/comments
https://api.github.com/repos/huggingface/datasets/issues/5716/timeline
2023-09-27T17:47:08Z
null
completed
I_kwDODunzps5i3G1k
closed
[]
null
5,716
{ "avatar_url": "https://avatars.githubusercontent.com/u/38179632?v=4", "events_url": "https://api.github.com/users/v-yunbin/events{/privacy}", "followers_url": "https://api.github.com/users/v-yunbin/followers", "following_url": "https://api.github.com/users/v-yunbin/following{/other_user}", "gists_url": "https://api.github.com/users/v-yunbin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/v-yunbin", "id": 38179632, "login": "v-yunbin", "node_id": "MDQ6VXNlcjM4MTc5NjMy", "organizations_url": "https://api.github.com/users/v-yunbin/orgs", "received_events_url": "https://api.github.com/users/v-yunbin/received_events", "repos_url": "https://api.github.com/users/v-yunbin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/v-yunbin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/v-yunbin/subscriptions", "type": "User", "url": "https://api.github.com/users/v-yunbin" }
Handle empty audio
https://api.github.com/repos/huggingface/datasets/issues/5716/events
null
https://api.github.com/repos/huggingface/datasets/issues/5716/labels{/name}
2023-04-07T09:51:40Z
null
false
null
null
1,658,613,092
[]
https://api.github.com/repos/huggingface/datasets/issues/5716
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
Some audio paths exist, but they are empty, and an error will be reported when reading the audio path.How to use the filter function to avoid the empty audio path? when a audio is empty, when do resample , it will break: `array, sampling_rate = sf.read(f) array = librosa.resample(array, orig_sr=sampling_rate, target_sr=self.sampling_rate)`
2023-09-27T17:47:08Z
https://github.com/huggingface/datasets/issues/5716
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5716/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5715/comments
https://api.github.com/repos/huggingface/datasets/issues/5715/timeline
2023-04-20T17:16:26Z
null
completed
I_kwDODunzps5iyyJs
closed
[]
null
5,715
{ "avatar_url": "https://avatars.githubusercontent.com/u/34066771?v=4", "events_url": "https://api.github.com/users/jungbaepark/events{/privacy}", "followers_url": "https://api.github.com/users/jungbaepark/followers", "following_url": "https://api.github.com/users/jungbaepark/following{/other_user}", "gists_url": "https://api.github.com/users/jungbaepark/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jungbaepark", "id": 34066771, "login": "jungbaepark", "node_id": "MDQ6VXNlcjM0MDY2Nzcx", "organizations_url": "https://api.github.com/users/jungbaepark/orgs", "received_events_url": "https://api.github.com/users/jungbaepark/received_events", "repos_url": "https://api.github.com/users/jungbaepark/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jungbaepark/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jungbaepark/subscriptions", "type": "User", "url": "https://api.github.com/users/jungbaepark" }
Return Numpy Array (fixed length) Mode, in __get_item__, Instead of List
https://api.github.com/repos/huggingface/datasets/issues/5715/events
null
https://api.github.com/repos/huggingface/datasets/issues/5715/labels{/name}
2023-04-06T13:57:48Z
null
false
null
null
1,657,479,788
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
https://api.github.com/repos/huggingface/datasets/issues/5715
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Feature request There are old known issues, but they can be easily forgettable problems in multiprocessing with pytorch-dataloader: Too high usage of RAM or shared-memory in pytorch when we set num workers > 1 and returning type of dataset or dataloader is "List" or "Dict". https://github.com/pytorch/pytorch/issues/13246 With huggingface datasets, unfortunately, the default return type is the list, so the problem is raised too often if we do not set anything for the issue. However, this issue can be released when the returning output is fixed in length. Therefore, I request the mode, returning outputs with fixed length (e.g. numpy array) rather than list. The design would be good when we load datasets as ```python load_dataset(..., with_return_as_fixed_tensor=True) ``` ### Motivation The general solution for this issue is already in the comments: https://github.com/pytorch/pytorch/issues/13246#issuecomment-905703662 : Numpy or Pandas seems not to have problems, while both have the string type. (I'm not sure that the sequence of huggingface datasets can solve this problem as well) ### Your contribution I'll read it ! thanks
2023-04-20T17:16:26Z
https://github.com/huggingface/datasets/issues/5715
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5715/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5714/comments
https://api.github.com/repos/huggingface/datasets/issues/5714/timeline
2023-04-07T09:16:57Z
null
null
PR_kwDODunzps5NxIOc
closed
[]
false
5,714
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
Fix xnumpy_load for .npz files
https://api.github.com/repos/huggingface/datasets/issues/5714/events
null
https://api.github.com/repos/huggingface/datasets/issues/5714/labels{/name}
2023-04-06T13:01:45Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5714.diff", "html_url": "https://github.com/huggingface/datasets/pull/5714", "merged_at": "2023-04-07T09:16:57Z", "patch_url": "https://github.com/huggingface/datasets/pull/5714.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5714" }
1,657,388,033
[]
https://api.github.com/repos/huggingface/datasets/issues/5714
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
PR: - #5626 implemented support for streaming `.npy` files by using `numpy.load`. However, it introduced a bug when used with `.npz` files, within a context manager: ``` ValueError: seek of closed file ``` or in streaming mode: ``` ValueError: I/O operation on closed file. ``` This PR fixes the bug and tests for both `.npy` and `.npz` files. Fix #5711.
2023-04-07T09:23:54Z
https://github.com/huggingface/datasets/pull/5714
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5714/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5713/comments
https://api.github.com/repos/huggingface/datasets/issues/5713/timeline
2023-04-06T13:06:21Z
null
completed
I_kwDODunzps5ixfgD
closed
[]
null
5,713
{ "avatar_url": "https://avatars.githubusercontent.com/u/959590?v=4", "events_url": "https://api.github.com/users/jplu/events{/privacy}", "followers_url": "https://api.github.com/users/jplu/followers", "following_url": "https://api.github.com/users/jplu/following{/other_user}", "gists_url": "https://api.github.com/users/jplu/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jplu", "id": 959590, "login": "jplu", "node_id": "MDQ6VXNlcjk1OTU5MA==", "organizations_url": "https://api.github.com/users/jplu/orgs", "received_events_url": "https://api.github.com/users/jplu/received_events", "repos_url": "https://api.github.com/users/jplu/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jplu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jplu/subscriptions", "type": "User", "url": "https://api.github.com/users/jplu" }
ArrowNotImplementedError when loading dataset from the hub
https://api.github.com/repos/huggingface/datasets/issues/5713/events
null
https://api.github.com/repos/huggingface/datasets/issues/5713/labels{/name}
2023-04-06T10:27:22Z
null
false
null
null
1,657,141,251
[]
https://api.github.com/repos/huggingface/datasets/issues/5713
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
### Describe the bug Hello, I have created a dataset by using the image loader. Once the dataset is created I try to download it and I get the error: ``` Traceback (most recent call last): File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 1860, in _prepare_split_single for _, table in generator: File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables for batch_idx, record_batch in enumerate( File "pyarrow/_parquet.pyx", line 1323, in iter_batches File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset builder_instance.download_and_prepare( File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare self._download_and_prepare( File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 986, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 1748, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 1893, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.builder.DatasetGenerationError: An error occurred while generating the dataset ``` ### Steps to reproduce the bug Create the dataset and push it to the hub: ```python from datasets import load_dataset dataset = load_dataset("imagefolder", data_dir="/path/to/dataset") dataset.push_to_hub("org/dataset-name", private=True, max_shard_size="1GB") ``` Then use it: ```python from datasets import load_dataset dataset = load_dataset("org/dataset-name") ``` ### Expected behavior To properly download and use the pushed dataset. Something else to note is that I specified to have shards of 1GB max, but at the end, for the train set, it is an almost 7GB single file that is pushed. ### Environment info - `datasets` version: 2.11.0 - Platform: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 - Python version: 3.10.10 - Huggingface_hub version: 0.13.3 - PyArrow version: 11.0.0 - Pandas version: 2.0.0
2023-04-06T13:06:22Z
https://github.com/huggingface/datasets/issues/5713
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5713/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5712/comments
https://api.github.com/repos/huggingface/datasets/issues/5712/timeline
2023-04-05T17:17:44Z
null
completed
I_kwDODunzps5itCEK
closed
[]
null
5,712
{ "avatar_url": "https://avatars.githubusercontent.com/u/1219084?v=4", "events_url": "https://api.github.com/users/rcasero/events{/privacy}", "followers_url": "https://api.github.com/users/rcasero/followers", "following_url": "https://api.github.com/users/rcasero/following{/other_user}", "gists_url": "https://api.github.com/users/rcasero/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rcasero", "id": 1219084, "login": "rcasero", "node_id": "MDQ6VXNlcjEyMTkwODQ=", "organizations_url": "https://api.github.com/users/rcasero/orgs", "received_events_url": "https://api.github.com/users/rcasero/received_events", "repos_url": "https://api.github.com/users/rcasero/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rcasero/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rcasero/subscriptions", "type": "User", "url": "https://api.github.com/users/rcasero" }
load_dataset in v2.11.0 raises "ValueError: seek of closed file" in np.load()
https://api.github.com/repos/huggingface/datasets/issues/5712/events
null
https://api.github.com/repos/huggingface/datasets/issues/5712/labels{/name}
2023-04-05T16:47:10Z
null
false
null
null
1,655,972,106
[]
https://api.github.com/repos/huggingface/datasets/issues/5712
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug Hi, I have some `dataset_load()` code of a custom offline dataset that works with datasets v2.10.1. ```python ds = datasets.load_dataset(path=dataset_dir, name=configuration, data_dir=dataset_dir, cache_dir=cache_dir, aux_dir=aux_dir, # download_mode=datasets.DownloadMode.FORCE_REDOWNLOAD, num_proc=18) ``` When upgrading datasets to 2.11.0, it fails with error ``` Traceback (most recent call last): File "<string>", line 2, in <module> File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset builder_instance.download_and_prepare( File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare self._download_and_prepare( File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 1651, in _download_and_prepare super()._download_and_prepare( File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 964, in _download_and_prepare split_generators = self._split_generators(dl_manager, **split_generators_kwargs) File "/home/ramon.casero/.cache/huggingface/modules/datasets_modules/datasets/71f67f69e6e00e139903a121f96b71f39b65a6b6aaeb0862e6a5da3a3f565b4c/mydataset.py", line 682, in _split_generators self.some_function() File "/home/ramon.casero/.cache/huggingface/modules/datasets_modules/datasets/71f67f69e6e00e139903a121f96b71f39b65a6b6aaeb0862e6a5da3a3f565b4c/mydataset.py", line 1314, in some_function() x_df = pd.DataFrame({'cell_type_descriptor': fp['x'].tolist()}) File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/numpy/lib/npyio.py", line 248, in __getitem__ bytes = self.zip.open(key) File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/zipfile.py", line 1530, in open fheader = zef_file.read(sizeFileHeader) File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/zipfile.py", line 744, in read self._file.seek(self._pos) ValueError: seek of closed file ``` ### Steps to reproduce the bug Sorry, I cannot share the data or code because they are not mine to share, but the point of failure is a call in `some_function()` ```python with np.load(filename) as fp: x_df = pd.DataFrame({'feature': fp['x'].tolist()}) ``` I'll try to generate a short snippet that reproduces the error. ### Expected behavior I would expect that `load_dataset` works on the custom datasets generation script for v2.11.0 the same way it works for 2.10.1, without making `np.load()` give a `ValueError: seek of closed file` error. ### Environment info - `datasets` version: 2.11.0 - Platform: Linux-4.18.0-483.el8.x86_64-x86_64-with-glibc2.28 - Python version: 3.10.8 - Huggingface_hub version: 0.12.0 - PyArrow version: 11.0.0 - Pandas version: 1.5.2 - numpy: 1.24.2 - This is an offline dataset that uses `datasets.config.HF_DATASETS_OFFLINE = True` in the generation script.
2023-04-06T08:32:37Z
https://github.com/huggingface/datasets/issues/5712
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5712/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5711/comments
https://api.github.com/repos/huggingface/datasets/issues/5711/timeline
2023-04-07T09:16:59Z
null
completed
I_kwDODunzps5itB8_
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
5,711
{ "avatar_url": "https://avatars.githubusercontent.com/u/1219084?v=4", "events_url": "https://api.github.com/users/rcasero/events{/privacy}", "followers_url": "https://api.github.com/users/rcasero/followers", "following_url": "https://api.github.com/users/rcasero/following{/other_user}", "gists_url": "https://api.github.com/users/rcasero/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rcasero", "id": 1219084, "login": "rcasero", "node_id": "MDQ6VXNlcjEyMTkwODQ=", "organizations_url": "https://api.github.com/users/rcasero/orgs", "received_events_url": "https://api.github.com/users/rcasero/received_events", "repos_url": "https://api.github.com/users/rcasero/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rcasero/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rcasero/subscriptions", "type": "User", "url": "https://api.github.com/users/rcasero" }
load_dataset in v2.11.0 raises "ValueError: seek of closed file" in np.load()
https://api.github.com/repos/huggingface/datasets/issues/5711/events
null
https://api.github.com/repos/huggingface/datasets/issues/5711/labels{/name}
2023-04-05T16:46:49Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
null
1,655,971,647
[]
https://api.github.com/repos/huggingface/datasets/issues/5711
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug Hi, I have some `dataset_load()` code of a custom offline dataset that works with datasets v2.10.1. ```python ds = datasets.load_dataset(path=dataset_dir, name=configuration, data_dir=dataset_dir, cache_dir=cache_dir, aux_dir=aux_dir, # download_mode=datasets.DownloadMode.FORCE_REDOWNLOAD, num_proc=18) ``` When upgrading datasets to 2.11.0, it fails with error ``` Traceback (most recent call last): File "<string>", line 2, in <module> File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset builder_instance.download_and_prepare( File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare self._download_and_prepare( File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 1651, in _download_and_prepare super()._download_and_prepare( File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 964, in _download_and_prepare split_generators = self._split_generators(dl_manager, **split_generators_kwargs) File "/home/ramon.casero/.cache/huggingface/modules/datasets_modules/datasets/71f67f69e6e00e139903a121f96b71f39b65a6b6aaeb0862e6a5da3a3f565b4c/mydataset.py", line 682, in _split_generators self.some_function() File "/home/ramon.casero/.cache/huggingface/modules/datasets_modules/datasets/71f67f69e6e00e139903a121f96b71f39b65a6b6aaeb0862e6a5da3a3f565b4c/mydataset.py", line 1314, in some_function() x_df = pd.DataFrame({'cell_type_descriptor': fp['x'].tolist()}) File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/numpy/lib/npyio.py", line 248, in __getitem__ bytes = self.zip.open(key) File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/zipfile.py", line 1530, in open fheader = zef_file.read(sizeFileHeader) File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/zipfile.py", line 744, in read self._file.seek(self._pos) ValueError: seek of closed file ``` ### Steps to reproduce the bug Sorry, I cannot share the data or code because they are not mine to share, but the point of failure is a call in `some_function()` ```python with np.load(embedding_filename) as fp: x_df = pd.DataFrame({'feature': fp['x'].tolist()}) ``` I'll try to generate a short snippet that reproduces the error. ### Expected behavior I would expect that `load_dataset` works on the custom datasets generation script for v2.11.0 the same way it works for 2.10.1, without making `np.load()` give a `ValueError: seek of closed file` error. ### Environment info - `datasets` version: 2.11.0 - Platform: Linux-4.18.0-483.el8.x86_64-x86_64-with-glibc2.28 - Python version: 3.10.8 - Huggingface_hub version: 0.12.0 - PyArrow version: 11.0.0 - Pandas version: 1.5.2 - numpy: 1.24.2 - This is an offline dataset that uses `datasets.config.HF_DATASETS_OFFLINE = True` in the generation script.
2023-04-07T09:16:59Z
https://github.com/huggingface/datasets/issues/5711
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5711/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5710/comments
https://api.github.com/repos/huggingface/datasets/issues/5710/timeline
2023-04-20T17:16:40Z
null
completed
I_kwDODunzps5isAfu
closed
[]
null
5,710
{ "avatar_url": "https://avatars.githubusercontent.com/u/53392976?v=4", "events_url": "https://api.github.com/users/Saibo-creator/events{/privacy}", "followers_url": "https://api.github.com/users/Saibo-creator/followers", "following_url": "https://api.github.com/users/Saibo-creator/following{/other_user}", "gists_url": "https://api.github.com/users/Saibo-creator/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Saibo-creator", "id": 53392976, "login": "Saibo-creator", "node_id": "MDQ6VXNlcjUzMzkyOTc2", "organizations_url": "https://api.github.com/users/Saibo-creator/orgs", "received_events_url": "https://api.github.com/users/Saibo-creator/received_events", "repos_url": "https://api.github.com/users/Saibo-creator/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Saibo-creator/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Saibo-creator/subscriptions", "type": "User", "url": "https://api.github.com/users/Saibo-creator" }
OSError: Memory mapping file failed: Cannot allocate memory
https://api.github.com/repos/huggingface/datasets/issues/5710/events
null
https://api.github.com/repos/huggingface/datasets/issues/5710/labels{/name}
2023-04-05T14:11:26Z
null
false
null
null
1,655,703,534
[]
https://api.github.com/repos/huggingface/datasets/issues/5710
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug Hello, I have a series of datasets each of 5 GB, 600 datasets in total. So together this makes 3TB. When I trying to load all the 600 datasets into memory, I get the above error message. Is this normal because I'm hitting the max size of memory mapping of the OS? Thank you ```terminal 0_21/cache-e9c42499f65b1881.arrow load_hf_datasets_from_disk: 82%|████████████████████████████████████████████████████████████████████████████████████████████████████▍ | 494/600 [07:26<01:35, 1.11it/s] Traceback (most recent call last): File "example_load_genkalm_dataset.py", line 35, in <module> multi_ds.post_process(max_node_num=args.max_node_num,max_seq_length=args.max_seq_length,delay=args.delay) File "/home/geng/GenKaLM/src/dataloader/dataset.py", line 142, in post_process genkalm_dataset = GenKaLM_Dataset.from_hf_dataset(path_or_name=ds_path, max_seq_length=self.max_seq_length, File "/home/geng/GenKaLM/src/dataloader/dataset.py", line 47, in from_hf_dataset hf_ds = load_from_disk(path_or_name) File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/load.py", line 1848, in load_from_disk return Dataset.load_from_disk(dataset_path, keep_in_memory=keep_in_memory, storage_options=storage_options) File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1549, in load_from_disk arrow_table = concat_tables( File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/table.py", line 1805, in concat_tables tables = list(tables) File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1550, in <genexpr> table_cls.from_file(Path(dataset_path, data_file["filename"]).as_posix()) File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/table.py", line 1065, in from_file table = _memory_mapped_arrow_table_from_file(filename) File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/table.py", line 50, in _memory_mapped_arrow_table_from_file memory_mapped_stream = pa.memory_map(filename) File "pyarrow/io.pxi", line 950, in pyarrow.lib.memory_map File "pyarrow/io.pxi", line 911, in pyarrow.lib.MemoryMappedFile._open File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 115, in pyarrow.lib.check_status OSError: Memory mapping file failed: Cannot allocate memory ``` ### Steps to reproduce the bug Sorry I can not provide a reproducible code as the data is stored on my server and it's too large to share. ### Expected behavior I expect the 3TB of data can be fully mapped to memory ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-4.15.0-204-generic-x86_64-with-debian-buster-sid - Python version: 3.7.6 - PyArrow version: 11.0.0 - Pandas version: 1.0.1
2023-04-20T17:16:40Z
https://github.com/huggingface/datasets/issues/5710
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/5710/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5709/comments
https://api.github.com/repos/huggingface/datasets/issues/5709/timeline
2023-04-06T08:52:19Z
null
completed
I_kwDODunzps5iq8IP
closed
[]
null
5,709
{ "avatar_url": "https://avatars.githubusercontent.com/u/959590?v=4", "events_url": "https://api.github.com/users/jplu/events{/privacy}", "followers_url": "https://api.github.com/users/jplu/followers", "following_url": "https://api.github.com/users/jplu/following{/other_user}", "gists_url": "https://api.github.com/users/jplu/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jplu", "id": 959590, "login": "jplu", "node_id": "MDQ6VXNlcjk1OTU5MA==", "organizations_url": "https://api.github.com/users/jplu/orgs", "received_events_url": "https://api.github.com/users/jplu/received_events", "repos_url": "https://api.github.com/users/jplu/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jplu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jplu/subscriptions", "type": "User", "url": "https://api.github.com/users/jplu" }
Manually dataset info made not taken into account
https://api.github.com/repos/huggingface/datasets/issues/5709/events
null
https://api.github.com/repos/huggingface/datasets/issues/5709/labels{/name}
2023-04-05T11:15:17Z
null
false
null
null
1,655,423,503
[]
https://api.github.com/repos/huggingface/datasets/issues/5709
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
### Describe the bug Hello, I'm manually building an image dataset with the `from_dict` approach. I also build the features with the `cast_features` methods. Once the dataset is created I push it on the hub, and a default `dataset_infos.json` file seems to have been automatically added to the repo in same time. Hence I update it manually with all the missing info, but when I download the dataset the info are never updated. Former `dataset_infos.json` file: ``` {"default": { "description": "", "citation": "", "homepage": "", "license": "", "features": { "image": { "_type": "Image" }, "labels": { "names": [ "Fake", "Real" ], "_type": "ClassLabel" } }, "splits": { "validation": { "name": "validation", "num_bytes": 901010094.0, "num_examples": 3200, "dataset_name": null }, "train": { "name": "train", "num_bytes": 901010094.0, "num_examples": 3200, "dataset_name": null } }, "download_size": 1802008414, "dataset_size": 1802020188.0, "size_in_bytes": 3604028602.0 }} ``` After I update it manually it looks like: ``` { "bstrai--deepfake-detection":{ "description":"", "citation":"", "homepage":"", "license":"", "features":{ "image":{ "decode":true, "id":null, "_type":"Image" }, "labels":{ "num_classes":2, "names":[ "Fake", "Real" ], "id":null, "_type":"ClassLabel" } }, "supervised_keys":{ "input":"image", "output":"labels" }, "task_templates":[ { "task":"image-classification", "image_column":"image", "label_column":"labels" } ], "config_name":null, "splits":{ "validation":{ "name":"validation", "num_bytes":36627822, "num_examples":123, "dataset_name":"deepfake-detection" }, "train":{ "name":"train", "num_bytes":901023694, "num_examples":3200, "dataset_name":"deepfake-detection" } }, "download_checksums":null, "download_size":937562209, "dataset_size":937651516, "size_in_bytes":1875213725 } } ``` Anything I should do to have the new infos in the `dataset_infos.json` to be taken into account? Or it is not possible yet? Thanks! ### Steps to reproduce the bug - ### Expected behavior - ### Environment info - `datasets` version: 2.11.0 - Platform: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 - Python version: 3.10.10 - Huggingface_hub version: 0.13.3 - PyArrow version: 11.0.0 - Pandas version: 2.0.0
2023-04-06T08:52:20Z
https://github.com/huggingface/datasets/issues/5709
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5709/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5708/comments
https://api.github.com/repos/huggingface/datasets/issues/5708/timeline
2023-12-21T10:20:27Z
null
completed
I_kwDODunzps5ipaga
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
5,708
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
Dataset sizes are in MiB instead of MB in dataset cards
https://api.github.com/repos/huggingface/datasets/issues/5708/events
null
https://api.github.com/repos/huggingface/datasets/issues/5708/labels{/name}
2023-04-05T06:36:03Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
null
1,655,023,642
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" }, { "color": "E5583E", "default": false, "description": "Related to the dataset viewer on huggingface.co", "id": 3470211881, "name": "dataset-viewer", "node_id": "LA_kwDODunzps7O1zsp", "url": "https://api.github.com/repos/huggingface/datasets/labels/dataset-viewer" } ]
https://api.github.com/repos/huggingface/datasets/issues/5708
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
As @severo reported in an internal discussion (https://github.com/huggingface/moon-landing/issues/5929): Now we show the dataset size: - from the dataset card (in the side column) - from the datasets-server (in the viewer) But, even if the size is the same, we see a mismatch because the viewer shows MB, while the info from the README generally shows MiB (even if it's written MB -> https://huggingface.co/datasets/blimp/blob/main/README.md?code=true#L1932) <img width="664" alt="Capture d’écran 2023-04-04 à 10 16 01" src="https://user-images.githubusercontent.com/1676121/229730887-0bd8fa6e-9462-46c6-bd4e-4d2c5784cabb.png"> TODO: Values to be fixed in: `Size of downloaded dataset files:`, `Size of the generated dataset:` and `Total amount of disk used:` - [x] Bulk edit on the Hub to fix this in all canonical datasets - [x] Bulk PR on the Hub to fix ancient canonical datasets that were moved to organizations
2023-12-21T10:20:28Z
https://github.com/huggingface/datasets/issues/5708
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5708/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5706/comments
https://api.github.com/repos/huggingface/datasets/issues/5706/timeline
null
null
null
I_kwDODunzps5ijxtr
open
[ { "avatar_url": "https://avatars.githubusercontent.com/u/22622299?v=4", "events_url": "https://api.github.com/users/mhattingpete/events{/privacy}", "followers_url": "https://api.github.com/users/mhattingpete/followers", "following_url": "https://api.github.com/users/mhattingpete/following{/other_user}", "gists_url": "https://api.github.com/users/mhattingpete/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mhattingpete", "id": 22622299, "login": "mhattingpete", "node_id": "MDQ6VXNlcjIyNjIyMjk5", "organizations_url": "https://api.github.com/users/mhattingpete/orgs", "received_events_url": "https://api.github.com/users/mhattingpete/received_events", "repos_url": "https://api.github.com/users/mhattingpete/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mhattingpete/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mhattingpete/subscriptions", "type": "User", "url": "https://api.github.com/users/mhattingpete" } ]
null
5,706
{ "avatar_url": "https://avatars.githubusercontent.com/u/1430243?v=4", "events_url": "https://api.github.com/users/kklemon/events{/privacy}", "followers_url": "https://api.github.com/users/kklemon/followers", "following_url": "https://api.github.com/users/kklemon/following{/other_user}", "gists_url": "https://api.github.com/users/kklemon/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kklemon", "id": 1430243, "login": "kklemon", "node_id": "MDQ6VXNlcjE0MzAyNDM=", "organizations_url": "https://api.github.com/users/kklemon/orgs", "received_events_url": "https://api.github.com/users/kklemon/received_events", "repos_url": "https://api.github.com/users/kklemon/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kklemon/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kklemon/subscriptions", "type": "User", "url": "https://api.github.com/users/kklemon" }
Support categorical data types for Parquet
https://api.github.com/repos/huggingface/datasets/issues/5706/events
null
https://api.github.com/repos/huggingface/datasets/issues/5706/labels{/name}
2023-04-04T09:45:35Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/22622299?v=4", "events_url": "https://api.github.com/users/mhattingpete/events{/privacy}", "followers_url": "https://api.github.com/users/mhattingpete/followers", "following_url": "https://api.github.com/users/mhattingpete/following{/other_user}", "gists_url": "https://api.github.com/users/mhattingpete/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mhattingpete", "id": 22622299, "login": "mhattingpete", "node_id": "MDQ6VXNlcjIyNjIyMjk5", "organizations_url": "https://api.github.com/users/mhattingpete/orgs", "received_events_url": "https://api.github.com/users/mhattingpete/received_events", "repos_url": "https://api.github.com/users/mhattingpete/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mhattingpete/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mhattingpete/subscriptions", "type": "User", "url": "https://api.github.com/users/mhattingpete" }
null
1,653,545,835
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
https://api.github.com/repos/huggingface/datasets/issues/5706
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Feature request Huggingface datasets does not seem to support categorical / dictionary data types for Parquet as of now. There seems to be a `TODO` in the code for this feature but no implementation yet. Below you can find sample code to reproduce the error that is currently thrown when attempting to read a Parquet file with categorical columns: ```python import pandas as pd import pyarrow.parquet as pq from datasets import load_dataset # Create categorical sample DataFrame df = pd.DataFrame({'type': ['foo', 'bar']}).astype('category') df.to_parquet('data.parquet') # Read back as pyarrow table table = pq.read_table('data.parquet') print(table.schema) # type: dictionary<values=string, indices=int32, ordered=0> # Load with huggingface datasets load_dataset('parquet', data_files='data.parquet') ``` Error: ``` Traceback (most recent call last): File ".venv/lib/python3.10/site-packages/datasets/builder.py", line 1875, in _prepare_split_single writer.write_table(table) File ".venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 566, in write_table self._build_writer(inferred_schema=pa_table.schema) File ".venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 379, in _build_writer inferred_features = Features.from_arrow_schema(inferred_schema) File ".venv/lib/python3.10/site-packages/datasets/features/features.py", line 1622, in from_arrow_schema obj = {field.name: generate_from_arrow_type(field.type) for field in pa_schema} File ".venv/lib/python3.10/site-packages/datasets/features/features.py", line 1622, in <dictcomp> obj = {field.name: generate_from_arrow_type(field.type) for field in pa_schema} File ".venv/lib/python3.10/site-packages/datasets/features/features.py", line 1361, in generate_from_arrow_type raise NotImplementedError # TODO(thom) this will need access to the dictionary as well (for labels). I.e. to the py_table NotImplementedError ``` ### Motivation Categorical data types, as offered by Pandas and implemented with the `DictionaryType` dtype in `pyarrow` can significantly reduce dataset size and are a handy way to turn textual features into numerical representations and back. Lack of support in Huggingface datasets greatly reduces compatibility with a common Pandas / Parquet feature. ### Your contribution I could provide a PR. However, it would be nice to have an initial complexity estimate from one of the core developers first.
2023-09-22T16:53:37Z
https://github.com/huggingface/datasets/issues/5706
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5706/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5705/comments
https://api.github.com/repos/huggingface/datasets/issues/5705/timeline
2023-04-05T23:35:41Z
null
completed
I_kwDODunzps5ijmnf
closed
[]
null
5,705
{ "avatar_url": "https://avatars.githubusercontent.com/u/16588434?v=4", "events_url": "https://api.github.com/users/HongtaoYang/events{/privacy}", "followers_url": "https://api.github.com/users/HongtaoYang/followers", "following_url": "https://api.github.com/users/HongtaoYang/following{/other_user}", "gists_url": "https://api.github.com/users/HongtaoYang/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/HongtaoYang", "id": 16588434, "login": "HongtaoYang", "node_id": "MDQ6VXNlcjE2NTg4NDM0", "organizations_url": "https://api.github.com/users/HongtaoYang/orgs", "received_events_url": "https://api.github.com/users/HongtaoYang/received_events", "repos_url": "https://api.github.com/users/HongtaoYang/repos", "site_admin": false, "starred_url": "https://api.github.com/users/HongtaoYang/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/HongtaoYang/subscriptions", "type": "User", "url": "https://api.github.com/users/HongtaoYang" }
Getting next item from IterableDataset took forever.
https://api.github.com/repos/huggingface/datasets/issues/5705/events
null
https://api.github.com/repos/huggingface/datasets/issues/5705/labels{/name}
2023-04-04T09:16:17Z
null
false
null
null
1,653,500,383
[]
https://api.github.com/repos/huggingface/datasets/issues/5705
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug I have a large dataset, about 500GB. The format of the dataset is parquet. I then load the dataset and try to get the first item ```python def get_one_item(): dataset = load_dataset("path/to/datafiles", split="train", cache_dir=".", streaming=True) dataset = dataset.filter(lambda example: example['text'].startswith('Ar')) print(next(iter(dataset))) ``` However, this function never finish. I waited ~10mins, the function was still running so I killed the process. I'm now using `line_profiler` to profile how long it would take to return one item. I'll be patient and wait for as long as it needs. I suspect the filter operation is the reason why it took so long. Can I get some possible reasons behind this? ### Steps to reproduce the bug Unfortunately without my data files, there is no way to reproduce this bug. ### Expected behavior With `IteralbeDataset`, I expect the first item to be returned instantly. ### Environment info - datasets version: 2.11.0 - python: 3.7.12
2023-04-05T23:35:41Z
https://github.com/huggingface/datasets/issues/5705
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5705/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5704/comments
https://api.github.com/repos/huggingface/datasets/issues/5704/timeline
null
null
null
PR_kwDODunzps5NkEvJ
open
[]
false
5,704
{ "avatar_url": "https://avatars.githubusercontent.com/u/35013374?v=4", "events_url": "https://api.github.com/users/semajyllek/events{/privacy}", "followers_url": "https://api.github.com/users/semajyllek/followers", "following_url": "https://api.github.com/users/semajyllek/following{/other_user}", "gists_url": "https://api.github.com/users/semajyllek/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/semajyllek", "id": 35013374, "login": "semajyllek", "node_id": "MDQ6VXNlcjM1MDEzMzc0", "organizations_url": "https://api.github.com/users/semajyllek/orgs", "received_events_url": "https://api.github.com/users/semajyllek/received_events", "repos_url": "https://api.github.com/users/semajyllek/repos", "site_admin": false, "starred_url": "https://api.github.com/users/semajyllek/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/semajyllek/subscriptions", "type": "User", "url": "https://api.github.com/users/semajyllek" }
5537 speedup load
https://api.github.com/repos/huggingface/datasets/issues/5704/events
null
https://api.github.com/repos/huggingface/datasets/issues/5704/labels{/name}
2023-04-04T08:58:14Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5704.diff", "html_url": "https://github.com/huggingface/datasets/pull/5704", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5704.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5704" }
1,653,471,356
[]
https://api.github.com/repos/huggingface/datasets/issues/5704
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
I reimplemented fsspec.spec.glob() in `hffilesystem.py` as `_glob`, used it in `_resolve_single_pattern_in_dataset_repository` only, and saw a 20% speedup in times to load the config, on average. That's not much when usually this step takes only 2-3 seconds for most datasets, but in this particular case, `bigcode/the-stack-dedup` , the loading time to get the config (not download the entire 6tb dataset, of course), went from ~170 secs to ~20 secs. What makes this work is this code in `_glob`: ``` if self.dir_cache is not None: allpaths = self.dir_cache else: allpaths = self.find(root, maxdepth=depth, withdirs=True, detail=True, **kwargs) ``` I also had to `import glob.has_magic( )` for `_glob()` (confusing, I know). I hope there is no issue with copying most of the code from `fsspec.spec.glob`, as it is a BSD 3-Clause License, and I left a comment about this in the docstring of` _glob()`, that we may want to delete. As mentioned, I evaluated the speedup across a random selection of about 1000 datasets (not all 27k+), and verified that old_config.eq(new_method_config) with the build in method, but deleted this test and related code changes on the subsequent commit. It's in the commit history if anyone wants to see it. (Note this does not include the outlier of `bigcode/the-stack-dedup` | | old_time | new _time | diff | pct_diff | | -- | -- | -- | -- | -- | | mean | 3.340 | 2.642 | 0.698 | 18.404 | | min | 2.024 | 1.976 | -0.840 | -37.634 | | max | 66.582 | 41.517 | 30.927 | 85.538 |
2023-04-07T16:10:55Z
https://github.com/huggingface/datasets/pull/5704
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5704/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5703/comments
https://api.github.com/repos/huggingface/datasets/issues/5703/timeline
2023-04-20T03:17:32Z
null
null
PR_kwDODunzps5NjCCV
closed
[]
true
5,703
{ "avatar_url": "https://avatars.githubusercontent.com/u/1535968?v=4", "events_url": "https://api.github.com/users/hvaara/events{/privacy}", "followers_url": "https://api.github.com/users/hvaara/followers", "following_url": "https://api.github.com/users/hvaara/following{/other_user}", "gists_url": "https://api.github.com/users/hvaara/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hvaara", "id": 1535968, "login": "hvaara", "node_id": "MDQ6VXNlcjE1MzU5Njg=", "organizations_url": "https://api.github.com/users/hvaara/orgs", "received_events_url": "https://api.github.com/users/hvaara/received_events", "repos_url": "https://api.github.com/users/hvaara/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hvaara/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hvaara/subscriptions", "type": "User", "url": "https://api.github.com/users/hvaara" }
[WIP][Test, Please ignore] Investigate performance impact of using multiprocessing only
https://api.github.com/repos/huggingface/datasets/issues/5703/events
null
https://api.github.com/repos/huggingface/datasets/issues/5703/labels{/name}
2023-04-04T04:37:49Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5703.diff", "html_url": "https://github.com/huggingface/datasets/pull/5703", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5703.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5703" }
1,653,158,955
[]
https://api.github.com/repos/huggingface/datasets/issues/5703
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
null
2023-04-20T03:17:37Z
https://github.com/huggingface/datasets/pull/5703
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5703/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5702/comments
https://api.github.com/repos/huggingface/datasets/issues/5702/timeline
2023-04-05T14:15:17Z
null
completed
I_kwDODunzps5iiGBQ
closed
[]
null
5,702
{ "avatar_url": "https://avatars.githubusercontent.com/u/10508116?v=4", "events_url": "https://api.github.com/users/gitforziio/events{/privacy}", "followers_url": "https://api.github.com/users/gitforziio/followers", "following_url": "https://api.github.com/users/gitforziio/following{/other_user}", "gists_url": "https://api.github.com/users/gitforziio/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gitforziio", "id": 10508116, "login": "gitforziio", "node_id": "MDQ6VXNlcjEwNTA4MTE2", "organizations_url": "https://api.github.com/users/gitforziio/orgs", "received_events_url": "https://api.github.com/users/gitforziio/received_events", "repos_url": "https://api.github.com/users/gitforziio/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gitforziio/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gitforziio/subscriptions", "type": "User", "url": "https://api.github.com/users/gitforziio" }
Is it possible or how to define a `datasets.Sequence` that could potentially be either a dict, a str, or None?
https://api.github.com/repos/huggingface/datasets/issues/5702/events
null
https://api.github.com/repos/huggingface/datasets/issues/5702/labels{/name}
2023-04-04T03:20:43Z
null
false
null
null
1,653,104,720
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
https://api.github.com/repos/huggingface/datasets/issues/5702
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Feature request Hello! Apologies if my question sounds naive: I was wondering if it’s possible, or how one would go about defining a 'datasets.Sequence' element in datasets.Features that could potentially be either a dict, a str, or None? Specifically, I’d like to define a feature for a list that contains 18 elements, each of which has been pre-defined as either a `dict or None` or `str or None` - as demonstrated in the slightly misaligned data provided below: ```json [ [ {"text":"老妇人","idxes":[0,1,2]},null,{"text":"跪","idxes":[3]},null,null,null,null,{"text":"在那坑里","idxes":[4,5,6,7]},null,null,null,null,null,null,null,null,null,null], [ {"text":"那些水","idxes":[13,14,15]},null,{"text":"舀","idxes":[11]},null,null,null,null,null,{"text":"在那坑里","idxes":[4,5,6,7]},null,{"text":"出","idxes":[12]},null,null,null,null,null,null,null], [ {"text":"水","idxes":[38]}, null, {"text":"舀","idxes":[40]}, "假", // note this is just a standalone string null,null,null,{"text":"坑里","idxes":[35,36]},null,null,null,null,null,null,null,null,null,null]] ``` ### Motivation I'm currently working with a dataset of the following structure and I couldn't find a solution in the [documentation](https://huggingface.co/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features). ```json {"qid":"3-train-1058","context":"桑桑害怕了。从玉米地里走到田埂上,他遥望着他家那幢草房子里的灯光,知道母亲没有让他回家的意思,很伤感,有点想哭。但没哭,转身朝阿恕家走去。","corefs":[[{"text":"桑桑","idxes":[0,1]},{"text":"他","idxes":[17]}]],"non_corefs":[],"outputs":[[{"text":"他","idxes":[17]},null,{"text":"走","idxes":[11]},null,null,null,null,null,{"text":"从玉米地里","idxes":[6,7,8,9,10]},{"text":"到田埂上","idxes":[12,13,14,15]},null,null,null,null,null,null,null,null],[{"text":"他","idxes":[17]},null,{"text":"走","idxes":[66]},null,null,null,null,null,null,null,{"text":"转身朝阿恕家去","idxes":[60,61,62,63,64,65,67]},null,null,null,null,null,null,null],[{"text":"灯光","idxes":[30,31]},null,null,null,null,null,null,{"text":"草房子里","idxes":[25,26,27,28]},null,null,null,null,null,null,null,null,null,null],[{"text":"他","idxes":[17]},{"text":"他家那幢草房子","idxes":[21,22,23,24,25,26,27]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"远"],[{"text":"他","idxes":[17]},{"text":"阿恕家","idxes":[63,64,65]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"变近"]]} ``` ### Your contribution I'm going to provide the dataset at https://huggingface.co/datasets/2030NLP/SpaCE2022 .
2023-04-05T14:15:18Z
https://github.com/huggingface/datasets/issues/5702
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5702/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5701/comments
https://api.github.com/repos/huggingface/datasets/issues/5701/timeline
2023-04-26T15:43:39Z
null
null
PR_kwDODunzps5NiSCy
closed
[]
false
5,701
{ "avatar_url": "https://avatars.githubusercontent.com/u/106995444?v=4", "events_url": "https://api.github.com/users/maddiedawson/events{/privacy}", "followers_url": "https://api.github.com/users/maddiedawson/followers", "following_url": "https://api.github.com/users/maddiedawson/following{/other_user}", "gists_url": "https://api.github.com/users/maddiedawson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/maddiedawson", "id": 106995444, "login": "maddiedawson", "node_id": "U_kgDOBmCe9A", "organizations_url": "https://api.github.com/users/maddiedawson/orgs", "received_events_url": "https://api.github.com/users/maddiedawson/received_events", "repos_url": "https://api.github.com/users/maddiedawson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/maddiedawson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/maddiedawson/subscriptions", "type": "User", "url": "https://api.github.com/users/maddiedawson" }
Add Dataset.from_spark
https://api.github.com/repos/huggingface/datasets/issues/5701/events
null
https://api.github.com/repos/huggingface/datasets/issues/5701/labels{/name}
2023-04-03T23:51:29Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5701.diff", "html_url": "https://github.com/huggingface/datasets/pull/5701", "merged_at": "2023-04-26T15:43:39Z", "patch_url": "https://github.com/huggingface/datasets/pull/5701.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5701" }
1,652,931,399
[]
https://api.github.com/repos/huggingface/datasets/issues/5701
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
Adds static method Dataset.from_spark to create datasets from Spark DataFrames. This approach alleviates users of the need to materialize their dataframe---a common use case is that the user loads their dataset into a dataframe, uses Spark to apply some transformation to some of the columns, and then wants to train on the dataset. Related issue: https://github.com/huggingface/datasets/issues/5678
2023-06-16T16:39:32Z
https://github.com/huggingface/datasets/pull/5701
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 2, "hooray": 4, "laugh": 0, "rocket": 0, "total_count": 6, "url": "https://api.github.com/repos/huggingface/datasets/issues/5701/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5700/comments
https://api.github.com/repos/huggingface/datasets/issues/5700/timeline
null
null
null
PR_kwDODunzps5Ng6g_
open
[]
false
5,700
{ "avatar_url": "https://avatars.githubusercontent.com/u/47528215?v=4", "events_url": "https://api.github.com/users/FrancoisNoyez/events{/privacy}", "followers_url": "https://api.github.com/users/FrancoisNoyez/followers", "following_url": "https://api.github.com/users/FrancoisNoyez/following{/other_user}", "gists_url": "https://api.github.com/users/FrancoisNoyez/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/FrancoisNoyez", "id": 47528215, "login": "FrancoisNoyez", "node_id": "MDQ6VXNlcjQ3NTI4MjE1", "organizations_url": "https://api.github.com/users/FrancoisNoyez/orgs", "received_events_url": "https://api.github.com/users/FrancoisNoyez/received_events", "repos_url": "https://api.github.com/users/FrancoisNoyez/repos", "site_admin": false, "starred_url": "https://api.github.com/users/FrancoisNoyez/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/FrancoisNoyez/subscriptions", "type": "User", "url": "https://api.github.com/users/FrancoisNoyez" }
fix: fix wrong modification of the 'cache_file_name' -related paramet…
https://api.github.com/repos/huggingface/datasets/issues/5700/events
null
https://api.github.com/repos/huggingface/datasets/issues/5700/labels{/name}
2023-04-03T18:05:26Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5700.diff", "html_url": "https://github.com/huggingface/datasets/pull/5700", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5700.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5700" }
1,652,527,530
[]
https://api.github.com/repos/huggingface/datasets/issues/5700
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
…ers values in 'train_test_split' + fix bad interaction between 'keep_in_memory' and 'cache_file_name' -related parameters (#5699)
2023-04-06T17:17:27Z
https://github.com/huggingface/datasets/pull/5700
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5700/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5699/comments
https://api.github.com/repos/huggingface/datasets/issues/5699/timeline
null
null
null
I_kwDODunzps5ifjGr
open
[]
null
5,699
{ "avatar_url": "https://avatars.githubusercontent.com/u/47528215?v=4", "events_url": "https://api.github.com/users/FrancoisNoyez/events{/privacy}", "followers_url": "https://api.github.com/users/FrancoisNoyez/followers", "following_url": "https://api.github.com/users/FrancoisNoyez/following{/other_user}", "gists_url": "https://api.github.com/users/FrancoisNoyez/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/FrancoisNoyez", "id": 47528215, "login": "FrancoisNoyez", "node_id": "MDQ6VXNlcjQ3NTI4MjE1", "organizations_url": "https://api.github.com/users/FrancoisNoyez/orgs", "received_events_url": "https://api.github.com/users/FrancoisNoyez/received_events", "repos_url": "https://api.github.com/users/FrancoisNoyez/repos", "site_admin": false, "starred_url": "https://api.github.com/users/FrancoisNoyez/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/FrancoisNoyez/subscriptions", "type": "User", "url": "https://api.github.com/users/FrancoisNoyez" }
Issue when wanting to split in memory a cached dataset
https://api.github.com/repos/huggingface/datasets/issues/5699/events
null
https://api.github.com/repos/huggingface/datasets/issues/5699/labels{/name}
2023-04-03T17:00:07Z
null
false
null
null
1,652,437,419
[]
https://api.github.com/repos/huggingface/datasets/issues/5699
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug **In the 'train_test_split' method of the Dataset class** (defined datasets/arrow_dataset.py), **if 'self.cache_files' is not empty**, then, **regarding the input parameters 'train_indices_cache_file_name' and 'test_indices_cache_file_name', if they are None**, we modify them to make them not None, to see if we can just provide back / work from cached data. But if we can't provide cached data, we move on with the call to the method, except those two values are not None anymore, which will conflict with the use of the 'keep_in_memory' parameter down the line. Indeed, at some point we end up calling the 'select' method, **and if 'keep_in_memory' is True**, since the value of this method's parameter 'indices_cache_file_name' is now not None anymore, **an exception is raised, whose message is "Please use either 'keep_in_memory' or 'indices_cache_file_name' but not both.".** Because of that, it's impossible to perform a train / test split of a cached dataset while requesting that the result not be cached. Which is inconvenient when one is just performing experiments, with no intention of caching the result. Aside from this being inconvenient, **the code which lead up to that situation seems simply wrong** to me: the input variable should not be modified so as to change the user's intention just to perform a test, if that test can fail and respecting the user's intention is necessary to proceed in that case. To fix this, I suggest to use other variables / other variable names, in order to host the value(s) needed to perform the test, so as not to change the originally input values needed by the rest of the method's code. Also, **I don't see why an exception should be raised when the 'select' method is called with both 'keep_in_memory'=True and 'indices_cache_file_name'!=None**: should the use of 'keep_in_memory' not prevail anyway, specifying that the user does not want to perform caching, and so making irrelevant the value of 'indices_cache_file_name'? This is indeed what happens when we look further in the code, in the '\_select_with_indices_mapping' method: when 'keep_in_memory' is True, then the value of indices_cache_file_name does not matter, the data will be written to a stream buffer anyway. Hence I suggest to remove the raising of exception in those circumstances. Notably, to remove the raising of it in the 'select', '\_select_with_indices_mapping', 'shuffle' and 'map' methods. ### Steps to reproduce the bug ```python import datasets def generate_examples(): for i in range(10): yield {"id": i} dataset_ = datasets.Dataset.from_generator( generate_examples, keep_in_memory=False, ) dataset_.train_test_split( test_size=3, shuffle=False, keep_in_memory=True, train_indices_cache_file_name=None, test_indices_cache_file_name=None, ) ``` ### Expected behavior The result of the above code should be a DatasetDict instance. Instead, we get the following exception stack: ```python --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[3], line 1 ----> 1 dataset_.train_test_split( 2 test_size=3, 3 shuffle=False, 4 keep_in_memory=True, 5 train_indices_cache_file_name=None, 6 test_indices_cache_file_name=None, 7 ) File ~/Work/Developments/datasets/src/datasets/arrow_dataset.py:528, in transmit_format.<locals>.wrapper(*args, **kwargs) 521 self_format = { 522 "type": self._format_type, 523 "format_kwargs": self._format_kwargs, 524 "columns": self._format_columns, 525 "output_all_columns": self._output_all_columns, 526 } 527 # apply actual function --> 528 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 529 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 530 # re-apply format to the output File ~/Work/Developments/datasets/src/datasets/fingerprint.py:511, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 507 validate_fingerprint(kwargs[fingerprint_name]) 509 # Call actual function --> 511 out = func(dataset, *args, **kwargs) 513 # Update fingerprint of in-place transforms + update in-place history of transforms 515 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File ~/Work/Developments/datasets/src/datasets/arrow_dataset.py:4428, in Dataset.train_test_split(self, test_size, train_size, shuffle, stratify_by_column, seed, generator, keep_in_memory, load_from_cache_file, train_indices_cache_file_name, test_indices_cache_file_name, writer_batch_size, train_new_fingerprint, test_new_fingerprint) 4425 test_indices = permutation[:n_test] 4426 train_indices = permutation[n_test : (n_test + n_train)] -> 4428 train_split = self.select( 4429 indices=train_indices, 4430 keep_in_memory=keep_in_memory, 4431 indices_cache_file_name=train_indices_cache_file_name, 4432 writer_batch_size=writer_batch_size, 4433 new_fingerprint=train_new_fingerprint, 4434 ) 4435 test_split = self.select( 4436 indices=test_indices, 4437 keep_in_memory=keep_in_memory, (...) 4440 new_fingerprint=test_new_fingerprint, 4441 ) 4443 return DatasetDict({"train": train_split, "test": test_split}) File ~/Work/Developments/datasets/src/datasets/arrow_dataset.py:528, in transmit_format.<locals>.wrapper(*args, **kwargs) 521 self_format = { 522 "type": self._format_type, 523 "format_kwargs": self._format_kwargs, 524 "columns": self._format_columns, 525 "output_all_columns": self._output_all_columns, 526 } 527 # apply actual function --> 528 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 529 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 530 # re-apply format to the output File ~/Work/Developments/datasets/src/datasets/fingerprint.py:511, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 507 validate_fingerprint(kwargs[fingerprint_name]) 509 # Call actual function --> 511 out = func(dataset, *args, **kwargs) 513 # Update fingerprint of in-place transforms + update in-place history of transforms 515 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File ~/Work/Developments/datasets/src/datasets/arrow_dataset.py:3679, in Dataset.select(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3645 """Create a new dataset with rows selected following the list/array of indices. 3646 3647 Args: (...) 3676 ``` 3677 """ 3678 if keep_in_memory and indices_cache_file_name is not None: -> 3679 raise ValueError("Please use either `keep_in_memory` or `indices_cache_file_name` but not both.") 3681 if len(self.list_indexes()) > 0: 3682 raise DatasetTransformationNotAllowedError( 3683 "Using `.select` on a dataset with attached indexes is not allowed. You can first run `.drop_index() to remove your index and then re-add it." 3684 ) ValueError: Please use either `keep_in_memory` or `indices_cache_file_name` but not both. ``` ### Environment info - `datasets` version: 2.11.1.dev0 - Platform: Linux-5.4.236-1-MANJARO-x86_64-with-glibc2.2.5 - Python version: 3.8.12 - Huggingface_hub version: 0.13.3 - PyArrow version: 11.0.0 - Pandas version: 2.0.0 *** *** EDIT: Now with a pull request to fix this [here](https://github.com/huggingface/datasets/pull/5700)
2023-04-04T16:52:42Z
https://github.com/huggingface/datasets/issues/5699
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5699/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5698/comments
https://api.github.com/repos/huggingface/datasets/issues/5698/timeline
null
null
null
I_kwDODunzps5ielI7
open
[]
null
5,698
{ "avatar_url": "https://avatars.githubusercontent.com/u/2649301?v=4", "events_url": "https://api.github.com/users/kacperlukawski/events{/privacy}", "followers_url": "https://api.github.com/users/kacperlukawski/followers", "following_url": "https://api.github.com/users/kacperlukawski/following{/other_user}", "gists_url": "https://api.github.com/users/kacperlukawski/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kacperlukawski", "id": 2649301, "login": "kacperlukawski", "node_id": "MDQ6VXNlcjI2NDkzMDE=", "organizations_url": "https://api.github.com/users/kacperlukawski/orgs", "received_events_url": "https://api.github.com/users/kacperlukawski/received_events", "repos_url": "https://api.github.com/users/kacperlukawski/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kacperlukawski/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kacperlukawski/subscriptions", "type": "User", "url": "https://api.github.com/users/kacperlukawski" }
Add Qdrant as another search index
https://api.github.com/repos/huggingface/datasets/issues/5698/events
null
https://api.github.com/repos/huggingface/datasets/issues/5698/labels{/name}
2023-04-03T14:25:19Z
null
false
null
null
1,652,183,611
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
https://api.github.com/repos/huggingface/datasets/issues/5698
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
CONTRIBUTOR
### Feature request I'd suggest adding Qdrant (https://qdrant.tech) as another search index available, so users can directly build an index from a dataset. Currently, FAISS and ElasticSearch are only supported: https://huggingface.co/docs/datasets/faiss_es ### Motivation ElasticSearch is a keyword-based search system, while FAISS is a vector search library. Vector database, such as Qdrant, is a different tool based on similarity (like FAISS) but is not limited to a single machine. It makes the vector database well-suited for bigger datasets and collaboration if several people want to access a particular dataset. ### Your contribution I can provide a PR implementing that functionality on my own.
2023-04-11T10:28:40Z
https://github.com/huggingface/datasets/issues/5698
{ "+1": 6, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 6, "url": "https://api.github.com/repos/huggingface/datasets/issues/5698/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5697/comments
https://api.github.com/repos/huggingface/datasets/issues/5697/timeline
2023-04-04T14:58:16Z
null
null
PR_kwDODunzps5NefxZ
closed
[]
false
5,697
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
Raise an error on missing distributed seed
https://api.github.com/repos/huggingface/datasets/issues/5697/events
null
https://api.github.com/repos/huggingface/datasets/issues/5697/labels{/name}
2023-04-03T10:44:58Z
null
false
null
{ "diff_url": "https://github.com/huggingface/datasets/pull/5697.diff", "html_url": "https://github.com/huggingface/datasets/pull/5697", "merged_at": "2023-04-04T14:58:16Z", "patch_url": "https://github.com/huggingface/datasets/pull/5697.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5697" }
1,651,812,614
[]
https://api.github.com/repos/huggingface/datasets/issues/5697
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
close https://github.com/huggingface/datasets/issues/5696
2023-04-04T15:05:24Z
https://github.com/huggingface/datasets/pull/5697
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5697/reactions" }
true
https://api.github.com/repos/huggingface/datasets/issues/5696/comments
https://api.github.com/repos/huggingface/datasets/issues/5696/timeline
2023-04-04T14:58:18Z
null
completed
I_kwDODunzps5icwyA
closed
[ { "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" } ]
null
5,696
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
Shuffle a sharded iterable dataset without seed can lead to duplicate data
https://api.github.com/repos/huggingface/datasets/issues/5696/events
null
https://api.github.com/repos/huggingface/datasets/issues/5696/labels{/name}
2023-04-03T09:40:03Z
null
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
null
1,651,707,008
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
https://api.github.com/repos/huggingface/datasets/issues/5696
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
As reported in https://github.com/huggingface/datasets/issues/5360 If `seed=None` in `.shuffle()`, shuffled datasets don't use the same shuffling seed across nodes. Because of that, the lists of shards is not shuffled the same way across nodes, and therefore some shards may be assigned to multiple nodes instead of exactly one. This can happen only when you have a number of shards that is a factor of the number of nodes. The current workaround is to always set a `seed` in `.shuffle()`
2023-04-04T14:58:18Z
https://github.com/huggingface/datasets/issues/5696
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5696/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5695/comments
https://api.github.com/repos/huggingface/datasets/issues/5695/timeline
2023-04-10T08:04:04Z
null
completed
I_kwDODunzps5iZ93M
closed
[]
null
5,695
{ "avatar_url": "https://avatars.githubusercontent.com/u/32778667?v=4", "events_url": "https://api.github.com/users/amariucaitheodor/events{/privacy}", "followers_url": "https://api.github.com/users/amariucaitheodor/followers", "following_url": "https://api.github.com/users/amariucaitheodor/following{/other_user}", "gists_url": "https://api.github.com/users/amariucaitheodor/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/amariucaitheodor", "id": 32778667, "login": "amariucaitheodor", "node_id": "MDQ6VXNlcjMyNzc4NjY3", "organizations_url": "https://api.github.com/users/amariucaitheodor/orgs", "received_events_url": "https://api.github.com/users/amariucaitheodor/received_events", "repos_url": "https://api.github.com/users/amariucaitheodor/repos", "site_admin": false, "starred_url": "https://api.github.com/users/amariucaitheodor/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/amariucaitheodor/subscriptions", "type": "User", "url": "https://api.github.com/users/amariucaitheodor" }
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError
https://api.github.com/repos/huggingface/datasets/issues/5695/events
null
https://api.github.com/repos/huggingface/datasets/issues/5695/labels{/name}
2023-04-02T14:42:44Z
null
false
null
null
1,650,974,156
[]
https://api.github.com/repos/huggingface/datasets/issues/5695
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
NONE
### Describe the bug Calling `datasets.load_dataset` to load the (publicly available) dataset `theodor1289/wit` fails with `pyarrow.lib.ArrowNotImplementedError`. ### Steps to reproduce the bug Steps to reproduce this behavior: 1. `!pip install datasets` 2. `!huggingface-cli login` 3. This step will throw the error (it might take a while as the dataset has ~170GB): ```python from datasets import load_dataset dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True) ``` Stack trace: ``` (torch-multimodal) bash-4.2$ python test.py Downloading and preparing dataset None/None to /cluster/work/cotterell/tamariucai/HuggingfaceDatasets/theodor1289___parquet/theodor1289--wit-7a3e984414a86a0f/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec... Downloading data files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 491.68it/s] Extracting data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 16.93it/s] Traceback (most recent call last): File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1860, in _prepare_split_single for _, table in generator: File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables for batch_idx, record_batch in enumerate( File "pyarrow/_parquet.pyx", line 1323, in iter_batches File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/cluster/work/cotterell/tamariucai/multimodal-mirror/examples/test.py", line 2, in <module> dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True) File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset builder_instance.download_and_prepare( File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare self._download_and_prepare( File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 986, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1748, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1893, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.builder.DatasetGenerationError: An error occurred while generating the dataset ``` ### Expected behavior The dataset is loaded in variable `dataset`. ### Environment info - `datasets` version: 2.11.0 - Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-glibc2.17 - Python version: 3.10.4 - Huggingface_hub version: 0.13.3 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
2023-04-11T09:17:54Z
https://github.com/huggingface/datasets/issues/5695
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5695/reactions" }
false
https://api.github.com/repos/huggingface/datasets/issues/5694/comments
https://api.github.com/repos/huggingface/datasets/issues/5694/timeline
null
null
null
I_kwDODunzps5iYCPR
open
[]
null
5,694
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
Dataset configuration
https://api.github.com/repos/huggingface/datasets/issues/5694/events
null
https://api.github.com/repos/huggingface/datasets/issues/5694/labels{/name}
2023-04-01T13:08:05Z
null
false
null
null
1,650,467,793
[ { "color": "c5def5", "default": false, "description": "Generic discussion on the library", "id": 2067400324, "name": "generic discussion", "node_id": "MDU6TGFiZWwyMDY3NDAwMzI0", "url": "https://api.github.com/repos/huggingface/datasets/labels/generic%20discussion" } ]
https://api.github.com/repos/huggingface/datasets/issues/5694
[ "", "" ]
https://api.github.com/repos/huggingface/datasets
MEMBER
Following discussions from https://github.com/huggingface/datasets/pull/5331 We could have something like `config.json` to define the configuration of a dataset. ```json { "data_dir": "data" "data_files": { "train": "train-[0-9][0-9][0-9][0-9]-of-[0-9][0-9][0-9][0-9][0-9]*.*" } } ``` we could also support a list for several configs with a 'config_name' field. The alternative was to use YAML in the README.md. I think it could also support a `dataset_type` field to specify which dataset builder class to use, and the other parameters would be the builder's parameters. Some parameters exist for all builders like `data_files` and `data_dir`, but some parameters are builder specific like `sep` for csv. This format would be used in `push_to_hub` to be able to push multiple configs. cc @huggingface/datasets EDIT: actually we're going for the YAML approach in README.md
2023-04-04T14:54:37Z
https://github.com/huggingface/datasets/issues/5694
{ "+1": 2, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/huggingface/datasets/issues/5694/reactions" }
false