url
stringlengths
61
61
repository_url
stringclasses
1 value
labels_url
stringlengths
75
75
comments_url
stringlengths
70
70
events_url
stringlengths
68
68
html_url
stringlengths
49
51
id
int64
1.23B
2.21B
node_id
stringlengths
18
19
number
int64
4.29k
6.76k
title
stringlengths
1
290
user
dict
labels
listlengths
0
4
state
stringclasses
2 values
locked
bool
1 class
assignee
dict
assignees
listlengths
0
3
milestone
dict
comments
int64
0
48
created_at
unknown
updated_at
unknown
closed_at
unknown
author_association
stringclasses
3 values
active_lock_reason
null
body
stringlengths
2
33.9k
reactions
dict
timeline_url
stringlengths
70
70
performed_via_github_app
null
state_reason
stringclasses
3 values
draft
bool
2 classes
pull_request
dict
is_pull_request
bool
2 classes
comments_body
sequencelengths
0
30
https://api.github.com/repos/huggingface/datasets/issues/6759
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6759/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6759/comments
https://api.github.com/repos/huggingface/datasets/issues/6759/events
https://github.com/huggingface/datasets/issues/6759
2,208,892,891
I_kwDODunzps6DqQfb
6,759
Persistent multi-process Pool
{ "login": "fostiropoulos", "id": 4337024, "node_id": "MDQ6VXNlcjQzMzcwMjQ=", "avatar_url": "https://avatars.githubusercontent.com/u/4337024?v=4", "gravatar_id": "", "url": "https://api.github.com/users/fostiropoulos", "html_url": "https://github.com/fostiropoulos", "followers_url": "https://api.github.com/users/fostiropoulos/followers", "following_url": "https://api.github.com/users/fostiropoulos/following{/other_user}", "gists_url": "https://api.github.com/users/fostiropoulos/gists{/gist_id}", "starred_url": "https://api.github.com/users/fostiropoulos/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fostiropoulos/subscriptions", "organizations_url": "https://api.github.com/users/fostiropoulos/orgs", "repos_url": "https://api.github.com/users/fostiropoulos/repos", "events_url": "https://api.github.com/users/fostiropoulos/events{/privacy}", "received_events_url": "https://api.github.com/users/fostiropoulos/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
0
"2024-03-26T17:35:25"
"2024-03-26T17:35:25"
null
NONE
null
### Feature request Running .map and filter functions with `num_procs` consecutively instantiates several multiprocessing pools iteratively. As instantiating a Pool is very resource intensive it can be a bottleneck to performing iteratively filtering. My ideas: 1. There should be an option to declare `persistent_workers` similar to pytorch DataLoader. Downside would be that would be complex to determine the correct resource allocation and deallocation of the pool. i.e. the dataset can outlive the utility of the pool. 2. Provide a pool as an argument. Downside would be the expertise required by the user. Upside, is that there is better resource management. ### Motivation Is really slow to iteratively perform map and filter operations on a dataset. ### Your contribution If approved I could integrate it. I would need to know what method would be most suitable to implement from the two options above.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6759/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6759/timeline
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/6758
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6758/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6758/comments
https://api.github.com/repos/huggingface/datasets/issues/6758/events
https://github.com/huggingface/datasets/issues/6758
2,208,494,302
I_kwDODunzps6DovLe
6,758
Passing `sample_by` to `load_dataset` when loading text data does not work
{ "login": "ntoxeg", "id": 823693, "node_id": "MDQ6VXNlcjgyMzY5Mw==", "avatar_url": "https://avatars.githubusercontent.com/u/823693?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ntoxeg", "html_url": "https://github.com/ntoxeg", "followers_url": "https://api.github.com/users/ntoxeg/followers", "following_url": "https://api.github.com/users/ntoxeg/following{/other_user}", "gists_url": "https://api.github.com/users/ntoxeg/gists{/gist_id}", "starred_url": "https://api.github.com/users/ntoxeg/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ntoxeg/subscriptions", "organizations_url": "https://api.github.com/users/ntoxeg/orgs", "repos_url": "https://api.github.com/users/ntoxeg/repos", "events_url": "https://api.github.com/users/ntoxeg/events{/privacy}", "received_events_url": "https://api.github.com/users/ntoxeg/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
1
"2024-03-26T14:55:33"
"2024-03-26T17:44:32"
null
NONE
null
### Describe the bug I have a dataset that consists of a bunch of text files, each representing an example. There is an undocumented `sample_by` argument for the `TextConfig` class that is used by `Text` to decide whether to split files into lines, paragraphs or take them whole. Passing `sample_by=“document”` to `load_dataset` results in files getting split into lines regardless. I have edited `src/datasets/packaged_modules/text/text.py` for myself to switch the default and it works fine. As a side note, the `if-else` for `sample_by` will silently load an empty dataset if someone makes a typo in the argument, which is not ideal. ### Steps to reproduce the bug 1. Prepare data as a bunch of files in a directory. 2. Load that data via `load_dataset(“text”, data_files=<data_dir>/<files_glob>, …, sample_by=“document”)`. 3. Inspect the resultant dataset — every item should have the form of `{“text”: <a line from a file>}`. ### Expected behavior `load_dataset(“text”, data_files=<data_dir>/<files_glob>, …, sample_by=“document”)` should result in a dataset with items of the form `{“text”: <one document>}`. ### Environment info - `datasets` version: 2.18.0 - Platform: Linux-5.15.0-1046-nvidia-x86_64-with-glibc2.35 - Python version: 3.11.8 - `huggingface_hub` version: 0.21.4 - PyArrow version: 15.0.2 - Pandas version: 2.2.1 - `fsspec` version: 2024.2.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6758/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6758/timeline
null
null
null
null
false
[ "Thanks for reporting! We are working on a fix." ]
https://api.github.com/repos/huggingface/datasets/issues/6757
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6757/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6757/comments
https://api.github.com/repos/huggingface/datasets/issues/6757/events
https://github.com/huggingface/datasets/pull/6757
2,206,280,340
PR_kwDODunzps5qr7Li
6,757
Test disabling transformers containers in docs CI
{ "login": "Wauplin", "id": 11801849, "node_id": "MDQ6VXNlcjExODAxODQ5", "avatar_url": "https://avatars.githubusercontent.com/u/11801849?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Wauplin", "html_url": "https://github.com/Wauplin", "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}", "starred_url": "https://api.github.com/users/Wauplin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Wauplin/subscriptions", "organizations_url": "https://api.github.com/users/Wauplin/orgs", "repos_url": "https://api.github.com/users/Wauplin/repos", "events_url": "https://api.github.com/users/Wauplin/events{/privacy}", "received_events_url": "https://api.github.com/users/Wauplin/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
3
"2024-03-25T17:16:11"
"2024-03-26T13:33:36"
null
CONTRIBUTOR
null
Related to https://github.com/huggingface/doc-builder/pull/487 and [internal slack thread](https://huggingface.slack.com/archives/C04F8N7FQNL/p1711384899462349?thread_ts=1711041424.720769&cid=C04F8N7FQNL). There is now a `custom_container` option when building docs in CI. When set to `""` (instead of `"huggingface/transformers-doc-builder"` by default), we don't run the CI inside a container, therefore saving ~2min of download time. The plan is to test disabling the transformers container on a few "big" repo and if everything works correctly, we will stop making it the default container. More details on https://github.com/huggingface/doc-builder/pull/487. cc @mishig25
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6757/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 1, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6757/timeline
null
null
true
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6757", "html_url": "https://github.com/huggingface/datasets/pull/6757", "diff_url": "https://github.com/huggingface/datasets/pull/6757.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6757.patch", "merged_at": null }
true
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6757). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.", "On slack it was mentioned that it was actually slower for `datasets`, should we close this one or am I missing something ?", "@lhoestq I converted to draft. Want to make some more tests and will let you know" ]
https://api.github.com/repos/huggingface/datasets/issues/6756
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6756/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6756/comments
https://api.github.com/repos/huggingface/datasets/issues/6756/events
https://github.com/huggingface/datasets/issues/6756
2,205,557,725
I_kwDODunzps6DdiPd
6,756
Support SQLite files?
{ "login": "severo", "id": 1676121, "node_id": "MDQ6VXNlcjE2NzYxMjE=", "avatar_url": "https://avatars.githubusercontent.com/u/1676121?v=4", "gravatar_id": "", "url": "https://api.github.com/users/severo", "html_url": "https://github.com/severo", "followers_url": "https://api.github.com/users/severo/followers", "following_url": "https://api.github.com/users/severo/following{/other_user}", "gists_url": "https://api.github.com/users/severo/gists{/gist_id}", "starred_url": "https://api.github.com/users/severo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/severo/subscriptions", "organizations_url": "https://api.github.com/users/severo/orgs", "repos_url": "https://api.github.com/users/severo/repos", "events_url": "https://api.github.com/users/severo/events{/privacy}", "received_events_url": "https://api.github.com/users/severo/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
closed
false
null
[]
null
3
"2024-03-25T11:48:05"
"2024-03-26T16:09:32"
"2024-03-26T16:09:32"
CONTRIBUTOR
null
### Feature request Support loading a dataset from a SQLite file https://huggingface.co/datasets/severo/test_iris_sqlite/tree/main ### Motivation SQLite is a popular file format. ### Your contribution See discussion on slack: https://huggingface.slack.com/archives/C04L6P8KNQ5/p1702481859117909 (internal) In particular: a SQLite file can contain multiple tables, which might be matched to multiple configs. Maybe the detail of splits and configs should be defined in the README YAML, or use the same format as for ZIP files: `Iris.sqlite::Iris`. See dataset here: https://huggingface.co/datasets/severo/test_iris_sqlite Note: should we also support DuckDB files?
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6756/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6756/timeline
null
completed
null
null
false
[ "You can use `Dataset.from_sql(path_to_sql_file)` already. Though we haven't added the Sql dataset builder to the `_PACKAGED_DATASETS_MODULES` list or in `_EXTENSION_TO_MODULE` to map `.sqlite` to the Sql dataset builder\r\n\r\nThis would allow to load a dataset repository with a `.sqlite` file using `load_dataset` and enable the Dataset Viewer", "Considering `Dataset.from_sql`'s (extremely) low usage, I don't think many users are interested in using this format for their datasets. Also, SQLite files are hard/impossible to stream efficiently and require custom logic to define splits/subsets, so IMO we shouldn't encourage people to use SQLite on the Hub.\r\n\r\n@severo Do you have some real-world examples of datasets published in this format?", "No. Indeed, it seems better to explicitly not support sqlite" ]
https://api.github.com/repos/huggingface/datasets/issues/6755
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6755/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6755/comments
https://api.github.com/repos/huggingface/datasets/issues/6755/events
https://github.com/huggingface/datasets/issues/6755
2,204,573,289
I_kwDODunzps6DZx5p
6,755
Small typo on the documentation
{ "login": "fostiropoulos", "id": 4337024, "node_id": "MDQ6VXNlcjQzMzcwMjQ=", "avatar_url": "https://avatars.githubusercontent.com/u/4337024?v=4", "gravatar_id": "", "url": "https://api.github.com/users/fostiropoulos", "html_url": "https://github.com/fostiropoulos", "followers_url": "https://api.github.com/users/fostiropoulos/followers", "following_url": "https://api.github.com/users/fostiropoulos/following{/other_user}", "gists_url": "https://api.github.com/users/fostiropoulos/gists{/gist_id}", "starred_url": "https://api.github.com/users/fostiropoulos/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fostiropoulos/subscriptions", "organizations_url": "https://api.github.com/users/fostiropoulos/orgs", "repos_url": "https://api.github.com/users/fostiropoulos/repos", "events_url": "https://api.github.com/users/fostiropoulos/events{/privacy}", "received_events_url": "https://api.github.com/users/fostiropoulos/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892877, "node_id": "MDU6TGFiZWwxOTM1ODkyODc3", "url": "https://api.github.com/repos/huggingface/datasets/labels/good%20first%20issue", "name": "good first issue", "color": "7057ff", "default": true, "description": "Good for newcomers" } ]
open
false
null
[]
null
1
"2024-03-24T21:47:52"
"2024-03-26T15:35:29"
null
NONE
null
### Describe the bug There is a small typo on https://github.com/huggingface/datasets/blob/d5468836fe94e8be1ae093397dd43d4a2503b926/src/datasets/dataset_dict.py#L938 It should be `caching is enabled`. ### Steps to reproduce the bug Please visit https://github.com/huggingface/datasets/blob/d5468836fe94e8be1ae093397dd43d4a2503b926/src/datasets/dataset_dict.py#L938 ### Expected behavior `caching is enabled` ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-5.15.0-101-generic-x86_64-with-glibc2.35 - Python version: 3.11.7 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.10.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6755/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6755/timeline
null
null
null
null
false
[ "Thanks for reporting @fostiropoulos! I've edited your comment to fix the link to the problematic line.\r\n" ]
https://api.github.com/repos/huggingface/datasets/issues/6754
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6754/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6754/comments
https://api.github.com/repos/huggingface/datasets/issues/6754/events
https://github.com/huggingface/datasets/pull/6754
2,204,214,595
PR_kwDODunzps5qk-nr
6,754
Fix cache path to snakecase for `CachedDatasetModuleFactory` and `Cache`
{ "login": "izhx", "id": 26690193, "node_id": "MDQ6VXNlcjI2NjkwMTkz", "avatar_url": "https://avatars.githubusercontent.com/u/26690193?v=4", "gravatar_id": "", "url": "https://api.github.com/users/izhx", "html_url": "https://github.com/izhx", "followers_url": "https://api.github.com/users/izhx/followers", "following_url": "https://api.github.com/users/izhx/following{/other_user}", "gists_url": "https://api.github.com/users/izhx/gists{/gist_id}", "starred_url": "https://api.github.com/users/izhx/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/izhx/subscriptions", "organizations_url": "https://api.github.com/users/izhx/orgs", "repos_url": "https://api.github.com/users/izhx/repos", "events_url": "https://api.github.com/users/izhx/events{/privacy}", "received_events_url": "https://api.github.com/users/izhx/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
0
"2024-03-24T06:59:15"
"2024-03-24T06:59:15"
null
NONE
null
Fix https://github.com/huggingface/datasets/issues/6750#issuecomment-2016678729 I didn't find a guideline on how to run the tests, so i just run the following steps to make sure that this bug is fixed. 1. `python test.py`, 2. then `HF_DATASETS_OFFLINE=1 python test.py` The `test.py` is ``` import datasets datasets.utils.logging.set_verbosity_info() ds = datasets.load_dataset('izhx/STS17-debug') print(ds) ds = datasets.load_dataset('C-MTEB/AFQMC', revision='b44c3b011063adb25877c13823db83bb193913c4') print(ds) ```
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6754/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6754/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6754", "html_url": "https://github.com/huggingface/datasets/pull/6754", "diff_url": "https://github.com/huggingface/datasets/pull/6754.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6754.patch", "merged_at": null }
true
[]
https://api.github.com/repos/huggingface/datasets/issues/6753
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6753/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6753/comments
https://api.github.com/repos/huggingface/datasets/issues/6753/events
https://github.com/huggingface/datasets/issues/6753
2,204,155,091
I_kwDODunzps6DYLzT
6,753
Type error when importing datasets on Kaggle
{ "login": "jtv199", "id": 18300717, "node_id": "MDQ6VXNlcjE4MzAwNzE3", "avatar_url": "https://avatars.githubusercontent.com/u/18300717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jtv199", "html_url": "https://github.com/jtv199", "followers_url": "https://api.github.com/users/jtv199/followers", "following_url": "https://api.github.com/users/jtv199/following{/other_user}", "gists_url": "https://api.github.com/users/jtv199/gists{/gist_id}", "starred_url": "https://api.github.com/users/jtv199/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jtv199/subscriptions", "organizations_url": "https://api.github.com/users/jtv199/orgs", "repos_url": "https://api.github.com/users/jtv199/repos", "events_url": "https://api.github.com/users/jtv199/events{/privacy}", "received_events_url": "https://api.github.com/users/jtv199/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
2
"2024-03-24T03:01:30"
"2024-03-27T00:55:31"
null
NONE
null
### Describe the bug When trying to run ``` import datasets print(datasets.__version__) ``` It generates the following error ``` TypeError: expected string or bytes-like object ``` It looks like It cannot find the valid versions of `fsspec` though fsspec version is fine when I checked Via command ``` import fsspec print(fsspec.__version__) ​ # output: 2024.3.1 ``` Detailed crash report ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import datasets 2 print(datasets.__version__) File /opt/conda/lib/python3.10/site-packages/datasets/__init__.py:18 1 # ruff: noqa 2 # Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. 3 # (...) 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 16 __version__ = "2.18.0" ---> 18 from .arrow_dataset import Dataset 19 from .arrow_reader import ReadInstruction 20 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:66 63 from multiprocess import Pool 64 from tqdm.contrib.concurrent import thread_map ---> 66 from . import config 67 from .arrow_reader import ArrowReader 68 from .arrow_writer import ArrowWriter, OptimizedTypedSequence File /opt/conda/lib/python3.10/site-packages/datasets/config.py:41 39 # Imports 40 DILL_VERSION = version.parse(importlib.metadata.version("dill")) ---> 41 FSSPEC_VERSION = version.parse(importlib.metadata.version("fsspec")) 42 PANDAS_VERSION = version.parse(importlib.metadata.version("pandas")) 43 PYARROW_VERSION = version.parse(importlib.metadata.version("pyarrow")) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:49, in parse(version) 43 """ 44 Parse the given version string and return either a :class:`Version` object 45 or a :class:`LegacyVersion` object depending on if the given version is 46 a valid PEP 440 version or a legacy version. 47 """ 48 try: ---> 49 return Version(version) 50 except InvalidVersion: 51 return LegacyVersion(version) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:264, in Version.__init__(self, version) 261 def __init__(self, version: str) -> None: 262 263 # Validate the version and parse it into pieces --> 264 match = self._regex.search(version) 265 if not match: 266 raise InvalidVersion(f"Invalid version: '{version}'") TypeError: expected string or bytes-like object ``` ### Steps to reproduce the bug 1. run `!pip install -U datasets` on kaggle 2. check datasets is installed via ``` import datasets print(datasets.__version__) ``` ### Expected behavior Expected to print datasets version, like `2.18.0` ### Environment info Running on Kaggle, latest enviornment , here is the notebook https://www.kaggle.com/code/jtv199/mistrial-7b-part2
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6753/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6753/timeline
null
null
null
null
false
[ "I have the same problem \r\nIt seems that it only appears when you are using GPU \r\nIt seems to work fine with the 2.17 version though", "Same here." ]
https://api.github.com/repos/huggingface/datasets/issues/6752
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6752/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6752/comments
https://api.github.com/repos/huggingface/datasets/issues/6752/events
https://github.com/huggingface/datasets/issues/6752
2,204,043,839
I_kwDODunzps6DXwo_
6,752
Precision being changed from float16 to float32 unexpectedly
{ "login": "gcervantes8", "id": 21228908, "node_id": "MDQ6VXNlcjIxMjI4OTA4", "avatar_url": "https://avatars.githubusercontent.com/u/21228908?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gcervantes8", "html_url": "https://github.com/gcervantes8", "followers_url": "https://api.github.com/users/gcervantes8/followers", "following_url": "https://api.github.com/users/gcervantes8/following{/other_user}", "gists_url": "https://api.github.com/users/gcervantes8/gists{/gist_id}", "starred_url": "https://api.github.com/users/gcervantes8/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gcervantes8/subscriptions", "organizations_url": "https://api.github.com/users/gcervantes8/orgs", "repos_url": "https://api.github.com/users/gcervantes8/repos", "events_url": "https://api.github.com/users/gcervantes8/events{/privacy}", "received_events_url": "https://api.github.com/users/gcervantes8/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
0
"2024-03-23T20:53:56"
"2024-03-23T20:53:56"
null
NONE
null
### Describe the bug I'm loading a HuggingFace Dataset for images. I'm running a preprocessing (map operation) step that runs a few operations, one of them being conversion to float16. The Dataset features also say that the 'img' is of type float16. Whenever I take an image from that HuggingFace Dataset instance, the type turns out to be float32. ### Steps to reproduce the bug ```python import torchvision.transforms.v2 as transforms from datasets import load_dataset dataset = load_dataset('cifar10', split='test') dataset = dataset.with_format("torch") data_transform = transforms.Compose([transforms.Resize((32, 32)), transforms.ToDtype(torch.float16, scale=True), transforms.Normalize([0.5, 0.5, 0.5], [0.5, 0.5, 0.5]), ]) def _preprocess(examples): # Permutes from (BS x H x W x C) to (BS x C x H x W) images = torch.permute(examples['img'], (0, 3, 2, 1)) examples['img'] = data_transform(images) return examples dataset = dataset.map(_preprocess, batched=True, batch_size=8) ``` Now at this point the dataset.features are showing float16 which is great because that's what I want. ```python print(data_loader.features['img']) Sequence(feature=Sequence(feature=Sequence(feature=Value(dtype='float16', id=None), length=-1, id=None), length=-1, id=None), length=-1, id=None) ``` But when I try to sample an image from this dataloader; I'm getting a float32 image, when I'm expecting float16: ```python print(next(iter(data_loader))['img'].dtype) torch.float32 ``` ### Expected behavior I'm expecting the images loaded after the transformation to stay in float16. ### Environment info - `datasets` version: 2.18.0 - Platform: Linux-5.15.146.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.9 - `huggingface_hub` version: 0.21.4 - PyArrow version: 14.0.2 - Pandas version: 2.0.3 - `fsspec` version: 2023.10.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6752/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6752/timeline
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/6751
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6751/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6751/comments
https://api.github.com/repos/huggingface/datasets/issues/6751/events
https://github.com/huggingface/datasets/pull/6751
2,203,951,501
PR_kwDODunzps5qkKLH
6,751
Use 'with' operator for some download functions
{ "login": "Moisan", "id": 31669, "node_id": "MDQ6VXNlcjMxNjY5", "avatar_url": "https://avatars.githubusercontent.com/u/31669?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Moisan", "html_url": "https://github.com/Moisan", "followers_url": "https://api.github.com/users/Moisan/followers", "following_url": "https://api.github.com/users/Moisan/following{/other_user}", "gists_url": "https://api.github.com/users/Moisan/gists{/gist_id}", "starred_url": "https://api.github.com/users/Moisan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Moisan/subscriptions", "organizations_url": "https://api.github.com/users/Moisan/orgs", "repos_url": "https://api.github.com/users/Moisan/repos", "events_url": "https://api.github.com/users/Moisan/events{/privacy}", "received_events_url": "https://api.github.com/users/Moisan/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
2
"2024-03-23T16:32:08"
"2024-03-26T00:40:57"
"2024-03-26T00:40:57"
NONE
null
Some functions in `streaming_download_manager.py` are not closing the file they open which lead to `Unclosed file` warnings in our code. This fixes a few of them.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6751/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6751/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6751", "html_url": "https://github.com/huggingface/datasets/pull/6751", "diff_url": "https://github.com/huggingface/datasets/pull/6751.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6751.patch", "merged_at": null }
true
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6751). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.", "I was mistaken on the intent of those functions, closing the PR." ]
https://api.github.com/repos/huggingface/datasets/issues/6750
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6750/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6750/comments
https://api.github.com/repos/huggingface/datasets/issues/6750/events
https://github.com/huggingface/datasets/issues/6750
2,203,590,658
I_kwDODunzps6DWCAC
6,750
`load_dataset` requires a network connection for local download?
{ "login": "MiroFurtado", "id": 6306695, "node_id": "MDQ6VXNlcjYzMDY2OTU=", "avatar_url": "https://avatars.githubusercontent.com/u/6306695?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MiroFurtado", "html_url": "https://github.com/MiroFurtado", "followers_url": "https://api.github.com/users/MiroFurtado/followers", "following_url": "https://api.github.com/users/MiroFurtado/following{/other_user}", "gists_url": "https://api.github.com/users/MiroFurtado/gists{/gist_id}", "starred_url": "https://api.github.com/users/MiroFurtado/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MiroFurtado/subscriptions", "organizations_url": "https://api.github.com/users/MiroFurtado/orgs", "repos_url": "https://api.github.com/users/MiroFurtado/repos", "events_url": "https://api.github.com/users/MiroFurtado/events{/privacy}", "received_events_url": "https://api.github.com/users/MiroFurtado/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
2
"2024-03-23T01:06:32"
"2024-03-24T04:04:43"
null
NONE
null
### Describe the bug Hi all - I see that in the past a network dependency has been mistakenly introduced into `load_dataset` even for local loads. Is it possible this has happened again? ### Steps to reproduce the bug ``` >>> import datasets >>> datasets.load_dataset("hh-rlhf") Repo card metadata block was not found. Setting CardData to empty. *hangs bc i'm firewalled* ```` stack trace from ctrl-c: ``` ^CTraceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/load.py", line 2582, in load_dataset builder_instance.download_and_prepare( output_path = get_from_cache( [0/122] File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 532, in get_from_cache response = http_head( File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 419, in http_head response = _request_with_retry( File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 304, in _request_with_retry response = requests.request(method=method.upper(), url=url, timeout=timeout, **params) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/adapters.py", line 487, in send resp = conn.urlopen( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn conn.connect() File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connection.py", line 363, in connect self.sock = conn = self._new_conn() File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) KeyboardInterrupt ``` ### Expected behavior loads the dataset ### Environment info ``` > pip show datasets Name: datasets Version: 2.18.0 ``` Python 3.10.2
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6750/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6750/timeline
null
null
null
null
false
[ "Are you using `HF_DATASETS_OFFLINE=1` ?", "> Are you using `HF_DATASETS_OFFLINE=1` ?\r\n\r\nThis doesn't work for me. `datasets=2.18.0`\r\n\r\n`test.py`:\r\n```\r\nimport datasets\r\n\r\ndatasets.utils.logging.set_verbosity_info()\r\n\r\nds = datasets.load_dataset('C-MTEB/AFQMC', revision='b44c3b011063adb25877c13823db83bb193913c4')\r\n\r\nprint(ds)\r\n```\r\n\r\nrun `python test.py`\r\n```\r\nGenerating dataset afqmc (/home/data/.cache/huggingface/datasets/C-MTEB___afqmc/default/0.0.0/b44c3b011063adb25877c13823db83bb193913c4)\r\nDownloading and preparing dataset afqmc/default to /home/data/.cache/huggingface/datasets/C-MTEB___afqmc/default/0.0.0/b44c3b011063adb25877c13823db83bb193913c4...\r\nDataset not on Hf google storage. Downloading and preparing it from source\r\nhf://datasets/C-MTEB/AFQMC@b44c3b011063adb25877c13823db83bb193913c4/data/validation-00000-of-00001-b8fc393b5ddedac7.parquet not found in cache or force_download set to True, downloading to /home/data/.cache/huggingface/datasets/downloads/78949f93104662359f4f3d5a2f7ec1ae37af5a5af44420a51212ea08c0be966b.incomplete\r\nDownloading data: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 240k/240k [00:01<00:00, 178kB/s]\r\nstoring hf://datasets/C-MTEB/AFQMC@b44c3b011063adb25877c13823db83bb193913c4/data/validation-00000-of-00001-b8fc393b5ddedac7.parquet in cache at /home/data/.cache/huggingface/datasets/downloads/78949f93104662359f4f3d5a2f7ec1ae37af5a5af44420a51212ea08c0be966b\r\ncreating metadata file for /home/data/.cache/huggingface/datasets/downloads/78949f93104662359f4f3d5a2f7ec1ae37af5a5af44420a51212ea08c0be966b\r\nDownloading took 0.0 min\r\nChecksum Computation took 0.0 min\r\nGenerating test split\r\nGenerating test split: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3861/3861 [00:00<00:00, 3972.00 examples/s]\r\nGenerating train split\r\nGenerating train split: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34334/34334 [00:00<00:00, 34355.50 examples/s]\r\nGenerating validation split\r\nGenerating validation split: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4316/4316 [00:00<00:00, 4477.00 examples/s]\r\nAll the splits matched successfully.\r\nDataset afqmc downloaded and prepared to /home/data/.cache/huggingface/datasets/C-MTEB___afqmc/default/0.0.0/b44c3b011063adb25877c13823db83bb193913c4. Subsequent calls will reuse this data.\r\nDatasetDict({\r\n test: Dataset({\r\n features: ['sentence1', 'sentence2', 'score', 'idx'],\r\n num_rows: 3861\r\n })\r\n train: Dataset({\r\n features: ['sentence1', 'sentence2', 'score', 'idx'],\r\n num_rows: 34334\r\n })\r\n validation: Dataset({\r\n features: ['sentence1', 'sentence2', 'score', 'idx'],\r\n num_rows: 4316\r\n })\r\n})\r\n```\r\n\r\nThen run `HF_DATASETS_OFFLINE=1 python test.py`\r\n```\r\nTraceback (most recent call last):\r\n File \"test.py\", line 9, in <module>\r\n ds = datasets.load_dataset('C-MTEB/AFQMC', revision='b44c3b011063adb25877c13823db83bb193913c4')\r\n File \"/dev/shm/tmp_env/lib/python3.10/site-packages/datasets/load.py\", line 2556, in load_dataset\r\n builder_instance = load_dataset_builder(\r\n File \"/dev/shm/tmp_env/lib/python3.10/site-packages/datasets/load.py\", line 2228, in load_dataset_builder\r\n dataset_module = dataset_module_factory(\r\n File \"/dev/shm/tmp_env/lib/python3.10/site-packages/datasets/load.py\", line 1871, in dataset_module_factory\r\n raise ConnectionError(f\"Couldn't reach the Hugging Face Hub for dataset '{path}': {e1}\") from None\r\nConnectionError: Couldn't reach the Hugging Face Hub for dataset 'C-MTEB/AFQMC': Offline mode is enabled.\r\n```\r\n\r\n" ]
https://api.github.com/repos/huggingface/datasets/issues/6749
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6749/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6749/comments
https://api.github.com/repos/huggingface/datasets/issues/6749/events
https://github.com/huggingface/datasets/pull/6749
2,202,310,116
PR_kwDODunzps5qeoSk
6,749
Fix fsspec tqdm callback
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
2
"2024-03-22T11:44:11"
"2024-03-22T14:51:45"
"2024-03-22T14:45:39"
MEMBER
null
Following changes at https://github.com/fsspec/filesystem_spec/pull/1497 for `fsspec>=2024.2.0`
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6749/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6749/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6749", "html_url": "https://github.com/huggingface/datasets/pull/6749", "diff_url": "https://github.com/huggingface/datasets/pull/6749.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6749.patch", "merged_at": "2024-03-22T14:45:39" }
true
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6749). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.005017 / 0.011353 (-0.006336) | 0.002958 / 0.011008 (-0.008050) | 0.063455 / 0.038508 (0.024946) | 0.028206 / 0.023109 (0.005096) | 0.230884 / 0.275898 (-0.045014) | 0.252688 / 0.323480 (-0.070792) | 0.002995 / 0.007986 (-0.004991) | 0.002613 / 0.004328 (-0.001716) | 0.046477 / 0.004250 (0.042226) | 0.040662 / 0.037052 (0.003609) | 0.241824 / 0.258489 (-0.016665) | 0.269063 / 0.293841 (-0.024778) | 0.027336 / 0.128546 (-0.101210) | 0.010614 / 0.075646 (-0.065032) | 0.216087 / 0.419271 (-0.203184) | 0.035667 / 0.043533 (-0.007866) | 0.238657 / 0.255139 (-0.016482) | 0.253433 / 0.283200 (-0.029767) | 0.017433 / 0.141683 (-0.124250) | 1.120856 / 1.452155 (-0.331299) | 1.157415 / 1.492716 (-0.335302) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.088028 / 0.018006 (0.070022) | 0.277368 / 0.000490 (0.276878) | 0.000204 / 0.000200 (0.000004) | 0.000049 / 0.000054 (-0.000005) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.017956 / 0.037411 (-0.019455) | 0.061061 / 0.014526 (0.046535) | 0.073323 / 0.176557 (-0.103234) | 0.119254 / 0.737135 (-0.617881) | 0.074308 / 0.296338 (-0.222031) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.285118 / 0.215209 (0.069908) | 2.785796 / 2.077655 (0.708142) | 1.476436 / 1.504120 (-0.027684) | 1.356505 / 1.541195 (-0.184690) | 1.362505 / 1.468490 (-0.105985) | 0.554064 / 4.584777 (-4.030713) | 2.395774 / 3.745712 (-1.349938) | 2.713703 / 5.269862 (-2.556159) | 1.701020 / 4.565676 (-2.864657) | 0.062370 / 0.424275 (-0.361905) | 0.004944 / 0.007607 (-0.002663) | 0.327948 / 0.226044 (0.101904) | 3.243739 / 2.268929 (0.974811) | 1.803881 / 55.444624 (-53.640743) | 1.551635 / 6.876477 (-5.324841) | 1.560627 / 2.142072 (-0.581446) | 0.628187 / 4.805227 (-4.177040) | 0.115824 / 6.500664 (-6.384840) | 0.041655 / 0.075469 (-0.033814) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.968797 / 1.841788 (-0.872991) | 11.220905 / 8.074308 (3.146597) | 9.322584 / 10.191392 (-0.868808) | 0.139629 / 0.680424 (-0.540795) | 0.013823 / 0.534201 (-0.520378) | 0.286700 / 0.579283 (-0.292583) | 0.263517 / 0.434364 (-0.170847) | 0.341264 / 0.540337 (-0.199074) | 0.418834 / 1.386936 (-0.968102) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.005404 / 0.011353 (-0.005949) | 0.003630 / 0.011008 (-0.007378) | 0.048977 / 0.038508 (0.010469) | 0.029980 / 0.023109 (0.006871) | 0.274671 / 0.275898 (-0.001227) | 0.295671 / 0.323480 (-0.027808) | 0.004230 / 0.007986 (-0.003756) | 0.002656 / 0.004328 (-0.001672) | 0.048603 / 0.004250 (0.044353) | 0.044323 / 0.037052 (0.007271) | 0.286499 / 0.258489 (0.028010) | 0.313199 / 0.293841 (0.019358) | 0.030079 / 0.128546 (-0.098468) | 0.010480 / 0.075646 (-0.065166) | 0.058226 / 0.419271 (-0.361045) | 0.054920 / 0.043533 (0.011387) | 0.274921 / 0.255139 (0.019783) | 0.296559 / 0.283200 (0.013360) | 0.019164 / 0.141683 (-0.122519) | 1.154703 / 1.452155 (-0.297452) | 1.207015 / 1.492716 (-0.285701) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.089368 / 0.018006 (0.071362) | 0.301196 / 0.000490 (0.300706) | 0.000208 / 0.000200 (0.000008) | 0.000047 / 0.000054 (-0.000008) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.021355 / 0.037411 (-0.016056) | 0.074688 / 0.014526 (0.060162) | 0.085840 / 0.176557 (-0.090716) | 0.125784 / 0.737135 (-0.611351) | 0.087103 / 0.296338 (-0.209235) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.296727 / 0.215209 (0.081518) | 2.884922 / 2.077655 (0.807267) | 1.586515 / 1.504120 (0.082395) | 1.474417 / 1.541195 (-0.066777) | 1.492105 / 1.468490 (0.023615) | 0.570016 / 4.584777 (-4.014761) | 2.435760 / 3.745712 (-1.309952) | 2.657999 / 5.269862 (-2.611863) | 1.740160 / 4.565676 (-2.825516) | 0.063743 / 0.424275 (-0.360532) | 0.005048 / 0.007607 (-0.002559) | 0.341279 / 0.226044 (0.115235) | 3.396185 / 2.268929 (1.127256) | 1.952825 / 55.444624 (-53.491800) | 1.676669 / 6.876477 (-5.199808) | 1.773158 / 2.142072 (-0.368915) | 0.650664 / 4.805227 (-4.154563) | 0.116815 / 6.500664 (-6.383849) | 0.040813 / 0.075469 (-0.034656) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.999836 / 1.841788 (-0.841952) | 11.854540 / 8.074308 (3.780232) | 10.245516 / 10.191392 (0.054124) | 0.141235 / 0.680424 (-0.539189) | 0.015562 / 0.534201 (-0.518639) | 0.287556 / 0.579283 (-0.291727) | 0.274946 / 0.434364 (-0.159418) | 0.324652 / 0.540337 (-0.215685) | 0.449204 / 1.386936 (-0.937733) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#ed2b406d045349dad16738985c947fe743260710 \"CML watermark\")\n" ]
https://api.github.com/repos/huggingface/datasets/issues/6748
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6748/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6748/comments
https://api.github.com/repos/huggingface/datasets/issues/6748/events
https://github.com/huggingface/datasets/issues/6748
2,201,517,348
I_kwDODunzps6DOH0k
6,748
Strange slicing behavior
{ "login": "Luciennnnnnn", "id": 20135317, "node_id": "MDQ6VXNlcjIwMTM1MzE3", "avatar_url": "https://avatars.githubusercontent.com/u/20135317?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Luciennnnnnn", "html_url": "https://github.com/Luciennnnnnn", "followers_url": "https://api.github.com/users/Luciennnnnnn/followers", "following_url": "https://api.github.com/users/Luciennnnnnn/following{/other_user}", "gists_url": "https://api.github.com/users/Luciennnnnnn/gists{/gist_id}", "starred_url": "https://api.github.com/users/Luciennnnnnn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Luciennnnnnn/subscriptions", "organizations_url": "https://api.github.com/users/Luciennnnnnn/orgs", "repos_url": "https://api.github.com/users/Luciennnnnnn/repos", "events_url": "https://api.github.com/users/Luciennnnnnn/events{/privacy}", "received_events_url": "https://api.github.com/users/Luciennnnnnn/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
1
"2024-03-22T01:49:13"
"2024-03-22T16:43:57"
null
NONE
null
### Describe the bug I have loaded a dataset, and then slice first 300 samples using `:` ops, however, the resulting dataset is not expected, as the output below: ```bash len(dataset)=1050324 len(dataset[:300])=2 len(dataset[0:300])=2 len(dataset.select(range(300)))=300 ``` ### Steps to reproduce the bug load a dataset then: ```bash dataset = load_from_disk(args.train_data_dir) print(f"{len(dataset)=}", flush=True) print(f"{len(dataset[:300])=}", flush=True) print(f"{len(dataset[0:300])=}", flush=True) print(f"{len(dataset.select(range(300)))=}", flush=True) ``` ### Expected behavior ```bash len(dataset)=1050324 len(dataset[:300])=300 len(dataset[0:300])=300 len(dataset.select(range(300)))=300 ``` ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35 - Python version: 3.10.11 - `huggingface_hub` version: 0.20.2 - PyArrow version: 10.0.1 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6748/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6748/timeline
null
null
null
null
false
[ "As explained in the [docs](https://huggingface.co/docs/datasets/v2.18.0/en/access#slicing), slicing a `Dataset` returns a dictionary that maps its column names to their values. So, `len(dataset[:300])=2` is expected, assuming your dataset has 2 columns (the returned dict has 2 keys, but each value in the dict has 300 items).\r\n` " ]
https://api.github.com/repos/huggingface/datasets/issues/6747
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6747/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6747/comments
https://api.github.com/repos/huggingface/datasets/issues/6747/events
https://github.com/huggingface/datasets/pull/6747
2,201,219,384
PR_kwDODunzps5qa5L-
6,747
chore(deps): bump fsspec
{ "login": "shcheklein", "id": 3659196, "node_id": "MDQ6VXNlcjM2NTkxOTY=", "avatar_url": "https://avatars.githubusercontent.com/u/3659196?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shcheklein", "html_url": "https://github.com/shcheklein", "followers_url": "https://api.github.com/users/shcheklein/followers", "following_url": "https://api.github.com/users/shcheklein/following{/other_user}", "gists_url": "https://api.github.com/users/shcheklein/gists{/gist_id}", "starred_url": "https://api.github.com/users/shcheklein/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shcheklein/subscriptions", "organizations_url": "https://api.github.com/users/shcheklein/orgs", "repos_url": "https://api.github.com/users/shcheklein/repos", "events_url": "https://api.github.com/users/shcheklein/events{/privacy}", "received_events_url": "https://api.github.com/users/shcheklein/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
2
"2024-03-21T21:25:49"
"2024-03-22T16:40:15"
"2024-03-22T16:28:40"
CONTRIBUTOR
null
There were a few fixes released recently, some DVC ecosystem packages require newer version of `fsspec`.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6747/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6747/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6747", "html_url": "https://github.com/huggingface/datasets/pull/6747", "diff_url": "https://github.com/huggingface/datasets/pull/6747.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6747.patch", "merged_at": "2024-03-22T16:28:40" }
true
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6747). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.005129 / 0.011353 (-0.006224) | 0.003788 / 0.011008 (-0.007220) | 0.063456 / 0.038508 (0.024948) | 0.029079 / 0.023109 (0.005969) | 0.237228 / 0.275898 (-0.038670) | 0.260554 / 0.323480 (-0.062926) | 0.003090 / 0.007986 (-0.004895) | 0.002730 / 0.004328 (-0.001599) | 0.049040 / 0.004250 (0.044789) | 0.042432 / 0.037052 (0.005380) | 0.256954 / 0.258489 (-0.001535) | 0.285912 / 0.293841 (-0.007929) | 0.027568 / 0.128546 (-0.100978) | 0.010402 / 0.075646 (-0.065245) | 0.206773 / 0.419271 (-0.212499) | 0.035381 / 0.043533 (-0.008152) | 0.243147 / 0.255139 (-0.011992) | 0.259419 / 0.283200 (-0.023781) | 0.019503 / 0.141683 (-0.122180) | 1.145537 / 1.452155 (-0.306618) | 1.204070 / 1.492716 (-0.288646) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.092298 / 0.018006 (0.074291) | 0.300042 / 0.000490 (0.299553) | 0.000236 / 0.000200 (0.000036) | 0.000052 / 0.000054 (-0.000002) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.018624 / 0.037411 (-0.018788) | 0.063832 / 0.014526 (0.049306) | 0.075849 / 0.176557 (-0.100707) | 0.120919 / 0.737135 (-0.616216) | 0.075878 / 0.296338 (-0.220461) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.275545 / 0.215209 (0.060336) | 2.706004 / 2.077655 (0.628349) | 1.406398 / 1.504120 (-0.097722) | 1.287154 / 1.541195 (-0.254041) | 1.298278 / 1.468490 (-0.170212) | 0.559763 / 4.584777 (-4.025014) | 2.434104 / 3.745712 (-1.311608) | 2.786338 / 5.269862 (-2.483523) | 1.720951 / 4.565676 (-2.844726) | 0.062082 / 0.424275 (-0.362193) | 0.004931 / 0.007607 (-0.002676) | 0.329998 / 0.226044 (0.103954) | 3.222105 / 2.268929 (0.953176) | 1.777539 / 55.444624 (-53.667085) | 1.533845 / 6.876477 (-5.342632) | 1.520357 / 2.142072 (-0.621715) | 0.638850 / 4.805227 (-4.166377) | 0.116718 / 6.500664 (-6.383946) | 0.042215 / 0.075469 (-0.033254) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.962791 / 1.841788 (-0.878997) | 11.509889 / 8.074308 (3.435581) | 9.507676 / 10.191392 (-0.683716) | 0.140780 / 0.680424 (-0.539644) | 0.014187 / 0.534201 (-0.520014) | 0.286363 / 0.579283 (-0.292920) | 0.263316 / 0.434364 (-0.171048) | 0.322099 / 0.540337 (-0.218239) | 0.415602 / 1.386936 (-0.971334) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.005175 / 0.011353 (-0.006178) | 0.003631 / 0.011008 (-0.007377) | 0.050277 / 0.038508 (0.011769) | 0.031879 / 0.023109 (0.008770) | 0.269966 / 0.275898 (-0.005933) | 0.297229 / 0.323480 (-0.026251) | 0.004278 / 0.007986 (-0.003707) | 0.002936 / 0.004328 (-0.001393) | 0.048686 / 0.004250 (0.044436) | 0.044262 / 0.037052 (0.007209) | 0.284578 / 0.258489 (0.026089) | 0.313681 / 0.293841 (0.019840) | 0.029064 / 0.128546 (-0.099482) | 0.010700 / 0.075646 (-0.064946) | 0.058366 / 0.419271 (-0.360905) | 0.051341 / 0.043533 (0.007809) | 0.271262 / 0.255139 (0.016123) | 0.290791 / 0.283200 (0.007591) | 0.019044 / 0.141683 (-0.122639) | 1.149514 / 1.452155 (-0.302641) | 1.209277 / 1.492716 (-0.283439) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.094879 / 0.018006 (0.076872) | 0.302196 / 0.000490 (0.301707) | 0.000217 / 0.000200 (0.000018) | 0.000052 / 0.000054 (-0.000002) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.021715 / 0.037411 (-0.015696) | 0.075122 / 0.014526 (0.060596) | 0.087393 / 0.176557 (-0.089164) | 0.125583 / 0.737135 (-0.611553) | 0.088722 / 0.296338 (-0.207617) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.295158 / 0.215209 (0.079949) | 2.930208 / 2.077655 (0.852553) | 1.590197 / 1.504120 (0.086077) | 1.459038 / 1.541195 (-0.082156) | 1.471690 / 1.468490 (0.003200) | 0.570279 / 4.584777 (-4.014498) | 2.456971 / 3.745712 (-1.288741) | 2.675315 / 5.269862 (-2.594547) | 1.750122 / 4.565676 (-2.815554) | 0.062905 / 0.424275 (-0.361370) | 0.005118 / 0.007607 (-0.002489) | 0.344263 / 0.226044 (0.118219) | 3.472460 / 2.268929 (1.203532) | 1.931707 / 55.444624 (-53.512917) | 1.658537 / 6.876477 (-5.217939) | 1.785794 / 2.142072 (-0.356278) | 0.637149 / 4.805227 (-4.168078) | 0.115838 / 6.500664 (-6.384826) | 0.040771 / 0.075469 (-0.034698) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.002869 / 1.841788 (-0.838919) | 12.048825 / 8.074308 (3.974517) | 10.407979 / 10.191392 (0.216587) | 0.150300 / 0.680424 (-0.530124) | 0.015299 / 0.534201 (-0.518902) | 0.286277 / 0.579283 (-0.293006) | 0.312186 / 0.434364 (-0.122178) | 0.322633 / 0.540337 (-0.217704) | 0.438431 / 1.386936 (-0.948505) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#d5468836fe94e8be1ae093397dd43d4a2503b926 \"CML watermark\")\n" ]
https://api.github.com/repos/huggingface/datasets/issues/6746
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6746/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6746/comments
https://api.github.com/repos/huggingface/datasets/issues/6746/events
https://github.com/huggingface/datasets/issues/6746
2,198,993,949
I_kwDODunzps6DEfwd
6,746
ExpectedMoreSplits error when loading C4 dataset
{ "login": "billwang485", "id": 65165345, "node_id": "MDQ6VXNlcjY1MTY1MzQ1", "avatar_url": "https://avatars.githubusercontent.com/u/65165345?v=4", "gravatar_id": "", "url": "https://api.github.com/users/billwang485", "html_url": "https://github.com/billwang485", "followers_url": "https://api.github.com/users/billwang485/followers", "following_url": "https://api.github.com/users/billwang485/following{/other_user}", "gists_url": "https://api.github.com/users/billwang485/gists{/gist_id}", "starred_url": "https://api.github.com/users/billwang485/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/billwang485/subscriptions", "organizations_url": "https://api.github.com/users/billwang485/orgs", "repos_url": "https://api.github.com/users/billwang485/repos", "events_url": "https://api.github.com/users/billwang485/events{/privacy}", "received_events_url": "https://api.github.com/users/billwang485/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
1
"2024-03-21T02:53:04"
"2024-03-21T14:06:08"
null
NONE
null
### Describe the bug I encounter bug when running the example command line ```python python main.py \ --model decapoda-research/llama-7b-hf \ --prune_method wanda \ --sparsity_ratio 0.5 \ --sparsity_type unstructured \ --save out/llama_7b/unstructured/wanda/ ``` The bug occurred at these lines of code (when loading c4 dataset) ```python traindata = load_dataset('allenai/c4', 'allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train') valdata = load_dataset('allenai/c4', 'allenai--c4', data_files={'validation': 'en/c4-validation.00000-of-00008.json.gz'}, split='validation') ``` The error message states: ``` raise ExpectedMoreSplits(str(set(expected_splits) - set(recorded_splits))) datasets.utils.info_utils.ExpectedMoreSplits: {'validation'} ``` ### Steps to reproduce the bug 1. I encounter bug when running the example command line ### Expected behavior The error message states: ``` raise ExpectedMoreSplits(str(set(expected_splits) - set(recorded_splits))) datasets.utils.info_utils.ExpectedMoreSplits: {'validation'} ``` ### Environment info I'm using cuda 12.4, so I use ```pip install pytorch``` instead of conda provided in install.md Also, I've tried another environment using the same commands in install.md, but the same bug occured
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6746/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6746/timeline
null
null
null
null
false
[ "Hi ! We updated the `allenai/c4` repository to allow people to specify which language to load easily (the the [c4 dataset page](https://huggingface.co/datasets/allenai/c4))\r\n\r\nTo fix this issue you can update `datasets` and remove the mention of the legacy configuration name \"allenai--c4\":\r\n\r\n```python\r\ntraindata = load_dataset('allenai/c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train')\r\nvaldata = load_dataset('allenai/c4', data_files={'validation': 'en/c4-validation.00000-of-00008.json.gz'}, split='validation')\r\n```" ]
https://api.github.com/repos/huggingface/datasets/issues/6745
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6745/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6745/comments
https://api.github.com/repos/huggingface/datasets/issues/6745/events
https://github.com/huggingface/datasets/issues/6745
2,198,541,732
I_kwDODunzps6DCxWk
6,745
Scraping the whole of github including private repos is bad; kindly stop
{ "login": "ghost", "id": 10137, "node_id": "MDQ6VXNlcjEwMTM3", "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ghost", "html_url": "https://github.com/ghost", "followers_url": "https://api.github.com/users/ghost/followers", "following_url": "https://api.github.com/users/ghost/following{/other_user}", "gists_url": "https://api.github.com/users/ghost/gists{/gist_id}", "starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ghost/subscriptions", "organizations_url": "https://api.github.com/users/ghost/orgs", "repos_url": "https://api.github.com/users/ghost/repos", "events_url": "https://api.github.com/users/ghost/events{/privacy}", "received_events_url": "https://api.github.com/users/ghost/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
closed
false
null
[]
null
1
"2024-03-20T20:54:06"
"2024-03-21T12:28:04"
"2024-03-21T10:24:56"
NONE
null
### Feature request https://github.com/bigcode-project/opt-out-v2 - opt out is not consent. kindly quit this ridiculous nonsense. ### Motivation [EDITED: insults not tolerated] ### Your contribution [EDITED: insults not tolerated]
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6745/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6745/timeline
null
completed
null
null
false
[ "It's not twitter here" ]
https://api.github.com/repos/huggingface/datasets/issues/6744
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6744/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6744/comments
https://api.github.com/repos/huggingface/datasets/issues/6744/events
https://github.com/huggingface/datasets/issues/6744
2,197,910,168
I_kwDODunzps6DAXKY
6,744
Option to disable file locking
{ "login": "VRehnberg", "id": 35767167, "node_id": "MDQ6VXNlcjM1NzY3MTY3", "avatar_url": "https://avatars.githubusercontent.com/u/35767167?v=4", "gravatar_id": "", "url": "https://api.github.com/users/VRehnberg", "html_url": "https://github.com/VRehnberg", "followers_url": "https://api.github.com/users/VRehnberg/followers", "following_url": "https://api.github.com/users/VRehnberg/following{/other_user}", "gists_url": "https://api.github.com/users/VRehnberg/gists{/gist_id}", "starred_url": "https://api.github.com/users/VRehnberg/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/VRehnberg/subscriptions", "organizations_url": "https://api.github.com/users/VRehnberg/orgs", "repos_url": "https://api.github.com/users/VRehnberg/repos", "events_url": "https://api.github.com/users/VRehnberg/events{/privacy}", "received_events_url": "https://api.github.com/users/VRehnberg/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
0
"2024-03-20T15:59:45"
"2024-03-20T15:59:45"
null
NONE
null
### Feature request Commands such as `load_dataset` creates file locks with `filelock.FileLock`. It would be good if there was a way to disable this. ### Motivation File locking doesn't work on all file-systems (in my case NFS mounted Weka). If the `cache_dir` only had small files then it would be possible to point to local disk and the problem would be solved. However, as cache_dir is both where the small info files are written and the processed datasets are put this isn't a feasible solution. Considering https://github.com/huggingface/datasets/issues/6395 I still do think this is something that belongs in HuggingFace. The possibility to control packages separately is valuable. It might be that a user has their dataset on a file-system that doesn't support file-locking while they are using file locking on local disk to control some other type of access. ### Your contribution My suggested solution: ``` diff --git a/src/datasets/utils/_filelock.py b/src/datasets/utils/_filelock.py index 19620e6e..58f41a02 100644 --- a/src/datasets/utils/_filelock.py +++ b/src/datasets/utils/_filelock.py @@ -18,11 +18,15 @@ import os from filelock import FileLock as FileLock_ -from filelock import UnixFileLock +from filelock import SoftFileLock, UnixFileLock from filelock import __version__ as _filelock_version from packaging import version +if os.getenv('HF_USE_SOFTFILELOCK', 'false').lower() in ('true', '1'): + FileLock_ = SoftFileLock + + class FileLock(FileLock_): """ A `filelock.FileLock` initializer that handles long paths. ```
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6744/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6744/timeline
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/6743
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6743/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6743/comments
https://api.github.com/repos/huggingface/datasets/issues/6743/events
https://github.com/huggingface/datasets/pull/6743
2,195,481,697
PR_kwDODunzps5qHeMZ
6,743
Allow null values in dict columns
{ "login": "mariosasko", "id": 47462742, "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mariosasko", "html_url": "https://github.com/mariosasko", "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}", "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "repos_url": "https://api.github.com/users/mariosasko/repos", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
2
"2024-03-19T16:54:22"
"2024-03-19T20:11:29"
"2024-03-19T20:05:19"
CONTRIBUTOR
null
Fix #6738
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6743/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6743/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6743", "html_url": "https://github.com/huggingface/datasets/pull/6743", "diff_url": "https://github.com/huggingface/datasets/pull/6743.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6743.patch", "merged_at": "2024-03-19T20:05:19" }
true
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6743). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.005013 / 0.011353 (-0.006340) | 0.003228 / 0.011008 (-0.007780) | 0.062763 / 0.038508 (0.024255) | 0.028937 / 0.023109 (0.005828) | 0.240777 / 0.275898 (-0.035121) | 0.266972 / 0.323480 (-0.056508) | 0.003073 / 0.007986 (-0.004913) | 0.002769 / 0.004328 (-0.001560) | 0.049265 / 0.004250 (0.045015) | 0.042061 / 0.037052 (0.005009) | 0.261714 / 0.258489 (0.003225) | 0.284896 / 0.293841 (-0.008944) | 0.027717 / 0.128546 (-0.100829) | 0.010430 / 0.075646 (-0.065216) | 0.209022 / 0.419271 (-0.210249) | 0.035941 / 0.043533 (-0.007591) | 0.246849 / 0.255139 (-0.008290) | 0.263205 / 0.283200 (-0.019994) | 0.019489 / 0.141683 (-0.122193) | 1.102595 / 1.452155 (-0.349559) | 1.170493 / 1.492716 (-0.322223) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.093611 / 0.018006 (0.075604) | 0.302041 / 0.000490 (0.301551) | 0.000223 / 0.000200 (0.000023) | 0.000052 / 0.000054 (-0.000003) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.018720 / 0.037411 (-0.018692) | 0.062199 / 0.014526 (0.047673) | 0.074888 / 0.176557 (-0.101669) | 0.120184 / 0.737135 (-0.616951) | 0.076756 / 0.296338 (-0.219583) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.287484 / 0.215209 (0.072275) | 2.787777 / 2.077655 (0.710123) | 1.488957 / 1.504120 (-0.015163) | 1.362678 / 1.541195 (-0.178517) | 1.364571 / 1.468490 (-0.103919) | 0.563139 / 4.584777 (-4.021638) | 2.422224 / 3.745712 (-1.323488) | 2.798011 / 5.269862 (-2.471850) | 1.751159 / 4.565676 (-2.814517) | 0.062740 / 0.424275 (-0.361536) | 0.004918 / 0.007607 (-0.002689) | 0.338285 / 0.226044 (0.112240) | 3.316012 / 2.268929 (1.047083) | 1.845975 / 55.444624 (-53.598650) | 1.553187 / 6.876477 (-5.323290) | 1.564582 / 2.142072 (-0.577490) | 0.645987 / 4.805227 (-4.159240) | 0.118216 / 6.500664 (-6.382448) | 0.041243 / 0.075469 (-0.034226) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.970265 / 1.841788 (-0.871522) | 11.783152 / 8.074308 (3.708844) | 9.516584 / 10.191392 (-0.674808) | 0.148086 / 0.680424 (-0.532338) | 0.013689 / 0.534201 (-0.520512) | 0.289657 / 0.579283 (-0.289626) | 0.265966 / 0.434364 (-0.168398) | 0.328483 / 0.540337 (-0.211854) | 0.433544 / 1.386936 (-0.953392) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.005235 / 0.011353 (-0.006118) | 0.003515 / 0.011008 (-0.007493) | 0.049484 / 0.038508 (0.010976) | 0.029264 / 0.023109 (0.006154) | 0.278518 / 0.275898 (0.002620) | 0.298948 / 0.323480 (-0.024532) | 0.004308 / 0.007986 (-0.003678) | 0.002751 / 0.004328 (-0.001577) | 0.048952 / 0.004250 (0.044701) | 0.045379 / 0.037052 (0.008327) | 0.292633 / 0.258489 (0.034144) | 0.319405 / 0.293841 (0.025564) | 0.030201 / 0.128546 (-0.098345) | 0.010657 / 0.075646 (-0.064990) | 0.057842 / 0.419271 (-0.361430) | 0.053359 / 0.043533 (0.009826) | 0.281136 / 0.255139 (0.025997) | 0.295388 / 0.283200 (0.012188) | 0.018786 / 0.141683 (-0.122897) | 1.187181 / 1.452155 (-0.264974) | 1.198394 / 1.492716 (-0.294323) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.093861 / 0.018006 (0.075855) | 0.304019 / 0.000490 (0.303529) | 0.000220 / 0.000200 (0.000020) | 0.000053 / 0.000054 (-0.000002) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.021582 / 0.037411 (-0.015829) | 0.075381 / 0.014526 (0.060855) | 0.087886 / 0.176557 (-0.088671) | 0.125078 / 0.737135 (-0.612057) | 0.089339 / 0.296338 (-0.206999) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.295797 / 0.215209 (0.080588) | 2.912021 / 2.077655 (0.834367) | 1.592191 / 1.504120 (0.088071) | 1.471270 / 1.541195 (-0.069925) | 1.475535 / 1.468490 (0.007045) | 0.564114 / 4.584777 (-4.020663) | 2.442882 / 3.745712 (-1.302830) | 2.679433 / 5.269862 (-2.590428) | 1.752097 / 4.565676 (-2.813579) | 0.062748 / 0.424275 (-0.361527) | 0.005068 / 0.007607 (-0.002539) | 0.345554 / 0.226044 (0.119509) | 3.456929 / 2.268929 (1.188000) | 1.962781 / 55.444624 (-53.481844) | 1.688313 / 6.876477 (-5.188164) | 1.817392 / 2.142072 (-0.324681) | 0.639588 / 4.805227 (-4.165639) | 0.116148 / 6.500664 (-6.384516) | 0.040851 / 0.075469 (-0.034618) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.009852 / 1.841788 (-0.831936) | 12.031749 / 8.074308 (3.957440) | 10.305107 / 10.191392 (0.113715) | 0.132960 / 0.680424 (-0.547464) | 0.014779 / 0.534201 (-0.519422) | 0.288903 / 0.579283 (-0.290381) | 0.275417 / 0.434364 (-0.158947) | 0.322628 / 0.540337 (-0.217709) | 0.445060 / 1.386936 (-0.941876) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#f234fce40d5ffc96fac5198d8cc89817970d87ee \"CML watermark\")\n" ]
https://api.github.com/repos/huggingface/datasets/issues/6742
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6742/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6742/comments
https://api.github.com/repos/huggingface/datasets/issues/6742/events
https://github.com/huggingface/datasets/pull/6742
2,195,134,854
PR_kwDODunzps5qGSfG
6,742
Fix missing download_config in get_data_patterns
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
2
"2024-03-19T14:29:25"
"2024-03-19T18:24:39"
"2024-03-19T18:15:13"
MEMBER
null
Reported in https://github.com/huggingface/datasets-server/issues/2607
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6742/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6742/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6742", "html_url": "https://github.com/huggingface/datasets/pull/6742", "diff_url": "https://github.com/huggingface/datasets/pull/6742.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6742.patch", "merged_at": "2024-03-19T18:15:13" }
true
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6742). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.005394 / 0.011353 (-0.005959) | 0.003780 / 0.011008 (-0.007228) | 0.063459 / 0.038508 (0.024951) | 0.028883 / 0.023109 (0.005774) | 0.239159 / 0.275898 (-0.036739) | 0.258123 / 0.323480 (-0.065357) | 0.003134 / 0.007986 (-0.004851) | 0.003452 / 0.004328 (-0.000876) | 0.049255 / 0.004250 (0.045005) | 0.042727 / 0.037052 (0.005675) | 0.257387 / 0.258489 (-0.001102) | 0.280762 / 0.293841 (-0.013079) | 0.027921 / 0.128546 (-0.100625) | 0.010867 / 0.075646 (-0.064779) | 0.207878 / 0.419271 (-0.211393) | 0.036003 / 0.043533 (-0.007530) | 0.247457 / 0.255139 (-0.007682) | 0.260231 / 0.283200 (-0.022969) | 0.019741 / 0.141683 (-0.121942) | 1.143645 / 1.452155 (-0.308510) | 1.188789 / 1.492716 (-0.303927) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.092065 / 0.018006 (0.074059) | 0.286021 / 0.000490 (0.285531) | 0.000220 / 0.000200 (0.000020) | 0.000048 / 0.000054 (-0.000006) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.018934 / 0.037411 (-0.018477) | 0.062474 / 0.014526 (0.047949) | 0.073384 / 0.176557 (-0.103172) | 0.121276 / 0.737135 (-0.615860) | 0.077792 / 0.296338 (-0.218546) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.285352 / 0.215209 (0.070143) | 2.783110 / 2.077655 (0.705456) | 1.487983 / 1.504120 (-0.016137) | 1.364264 / 1.541195 (-0.176930) | 1.388757 / 1.468490 (-0.079733) | 0.568347 / 4.584777 (-4.016430) | 2.402451 / 3.745712 (-1.343261) | 2.835577 / 5.269862 (-2.434285) | 1.754853 / 4.565676 (-2.810824) | 0.063355 / 0.424275 (-0.360920) | 0.005010 / 0.007607 (-0.002598) | 0.332061 / 0.226044 (0.106016) | 3.287121 / 2.268929 (1.018193) | 1.829520 / 55.444624 (-53.615104) | 1.542669 / 6.876477 (-5.333808) | 1.560679 / 2.142072 (-0.581393) | 0.642371 / 4.805227 (-4.162856) | 0.118636 / 6.500664 (-6.382028) | 0.042262 / 0.075469 (-0.033207) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.984803 / 1.841788 (-0.856985) | 11.578044 / 8.074308 (3.503735) | 9.383428 / 10.191392 (-0.807964) | 0.141367 / 0.680424 (-0.539057) | 0.014047 / 0.534201 (-0.520154) | 0.291505 / 0.579283 (-0.287778) | 0.270199 / 0.434364 (-0.164165) | 0.329874 / 0.540337 (-0.210463) | 0.429386 / 1.386936 (-0.957550) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.005322 / 0.011353 (-0.006031) | 0.004023 / 0.011008 (-0.006986) | 0.050126 / 0.038508 (0.011618) | 0.029937 / 0.023109 (0.006828) | 0.275985 / 0.275898 (0.000087) | 0.297965 / 0.323480 (-0.025515) | 0.004429 / 0.007986 (-0.003557) | 0.002729 / 0.004328 (-0.001599) | 0.048995 / 0.004250 (0.044744) | 0.044940 / 0.037052 (0.007888) | 0.288397 / 0.258489 (0.029908) | 0.317716 / 0.293841 (0.023875) | 0.029705 / 0.128546 (-0.098841) | 0.010972 / 0.075646 (-0.064674) | 0.058592 / 0.419271 (-0.360680) | 0.054640 / 0.043533 (0.011108) | 0.276456 / 0.255139 (0.021317) | 0.295119 / 0.283200 (0.011919) | 0.020032 / 0.141683 (-0.121651) | 1.175740 / 1.452155 (-0.276415) | 1.227246 / 1.492716 (-0.265471) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.092204 / 0.018006 (0.074197) | 0.300344 / 0.000490 (0.299855) | 0.000213 / 0.000200 (0.000013) | 0.000050 / 0.000054 (-0.000004) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.021540 / 0.037411 (-0.015871) | 0.076252 / 0.014526 (0.061726) | 0.087582 / 0.176557 (-0.088975) | 0.125977 / 0.737135 (-0.611159) | 0.090649 / 0.296338 (-0.205689) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.294544 / 0.215209 (0.079335) | 2.883736 / 2.077655 (0.806082) | 1.570932 / 1.504120 (0.066812) | 1.449082 / 1.541195 (-0.092113) | 1.463262 / 1.468490 (-0.005228) | 0.559625 / 4.584777 (-4.025152) | 2.448593 / 3.745712 (-1.297119) | 2.663857 / 5.269862 (-2.606005) | 1.757812 / 4.565676 (-2.807865) | 0.061999 / 0.424275 (-0.362276) | 0.005100 / 0.007607 (-0.002507) | 0.343620 / 0.226044 (0.117575) | 3.487059 / 2.268929 (1.218130) | 1.963078 / 55.444624 (-53.481546) | 1.661758 / 6.876477 (-5.214719) | 1.799130 / 2.142072 (-0.342942) | 0.650194 / 4.805227 (-4.155034) | 0.117375 / 6.500664 (-6.383289) | 0.040957 / 0.075469 (-0.034512) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.037882 / 1.841788 (-0.803906) | 12.239784 / 8.074308 (4.165476) | 10.478186 / 10.191392 (0.286794) | 0.164446 / 0.680424 (-0.515978) | 0.014901 / 0.534201 (-0.519300) | 0.302485 / 0.579283 (-0.276798) | 0.283994 / 0.434364 (-0.150370) | 0.338473 / 0.540337 (-0.201864) | 0.468901 / 1.386936 (-0.918035) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#5fa934e275d240d9b1228b2f598bc96390299339 \"CML watermark\")\n" ]
https://api.github.com/repos/huggingface/datasets/issues/6741
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6741/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6741/comments
https://api.github.com/repos/huggingface/datasets/issues/6741/events
https://github.com/huggingface/datasets/pull/6741
2,194,626,108
PR_kwDODunzps5qEiu3
6,741
Fix offline mode with single config
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
2
"2024-03-19T10:48:32"
"2024-03-25T16:35:21"
"2024-03-25T16:23:59"
MEMBER
null
Reported in https://github.com/huggingface/datasets/issues/4760 The cache was not able to reload a dataset with a single config form the cache if the config name is not specificed For example ```python from datasets import load_dataset, config config.HF_DATASETS_OFFLINE = True load_dataset("openai_humaneval") ``` This was due to a regression in https://github.com/huggingface/datasets/pull/6632
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6741/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6741/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6741", "html_url": "https://github.com/huggingface/datasets/pull/6741", "diff_url": "https://github.com/huggingface/datasets/pull/6741.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6741.patch", "merged_at": "2024-03-25T16:23:59" }
true
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6741). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.005093 / 0.011353 (-0.006260) | 0.003317 / 0.011008 (-0.007692) | 0.064795 / 0.038508 (0.026287) | 0.030373 / 0.023109 (0.007263) | 0.258776 / 0.275898 (-0.017122) | 0.269768 / 0.323480 (-0.053711) | 0.004186 / 0.007986 (-0.003799) | 0.002630 / 0.004328 (-0.001699) | 0.048643 / 0.004250 (0.044392) | 0.044220 / 0.037052 (0.007168) | 0.265113 / 0.258489 (0.006624) | 0.292202 / 0.293841 (-0.001639) | 0.027468 / 0.128546 (-0.101079) | 0.010123 / 0.075646 (-0.065523) | 0.226869 / 0.419271 (-0.192402) | 0.035739 / 0.043533 (-0.007794) | 0.253193 / 0.255139 (-0.001946) | 0.271002 / 0.283200 (-0.012198) | 0.017201 / 0.141683 (-0.124482) | 1.105836 / 1.452155 (-0.346318) | 1.161559 / 1.492716 (-0.331158) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.090481 / 0.018006 (0.072475) | 0.299013 / 0.000490 (0.298524) | 0.000220 / 0.000200 (0.000020) | 0.000047 / 0.000054 (-0.000007) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.017684 / 0.037411 (-0.019727) | 0.061580 / 0.014526 (0.047054) | 0.074370 / 0.176557 (-0.102186) | 0.119468 / 0.737135 (-0.617667) | 0.074671 / 0.296338 (-0.221668) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.284778 / 0.215209 (0.069569) | 2.780241 / 2.077655 (0.702586) | 1.504025 / 1.504120 (-0.000095) | 1.386644 / 1.541195 (-0.154550) | 1.402038 / 1.468490 (-0.066452) | 0.555180 / 4.584777 (-4.029597) | 2.410973 / 3.745712 (-1.334740) | 2.773252 / 5.269862 (-2.496610) | 1.722784 / 4.565676 (-2.842892) | 0.062773 / 0.424275 (-0.361502) | 0.004959 / 0.007607 (-0.002648) | 0.337163 / 0.226044 (0.111119) | 3.356947 / 2.268929 (1.088019) | 1.880953 / 55.444624 (-53.563671) | 1.556049 / 6.876477 (-5.320427) | 1.578589 / 2.142072 (-0.563483) | 0.641993 / 4.805227 (-4.163234) | 0.118624 / 6.500664 (-6.382040) | 0.042202 / 0.075469 (-0.033268) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.995321 / 1.841788 (-0.846467) | 12.257597 / 8.074308 (4.183289) | 9.646214 / 10.191392 (-0.545178) | 0.131124 / 0.680424 (-0.549300) | 0.014119 / 0.534201 (-0.520082) | 0.287597 / 0.579283 (-0.291686) | 0.266983 / 0.434364 (-0.167381) | 0.328165 / 0.540337 (-0.212173) | 0.422405 / 1.386936 (-0.964531) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.005091 / 0.011353 (-0.006262) | 0.003358 / 0.011008 (-0.007650) | 0.049136 / 0.038508 (0.010628) | 0.031075 / 0.023109 (0.007966) | 0.275047 / 0.275898 (-0.000851) | 0.296845 / 0.323480 (-0.026635) | 0.004949 / 0.007986 (-0.003037) | 0.002586 / 0.004328 (-0.001743) | 0.048164 / 0.004250 (0.043913) | 0.040754 / 0.037052 (0.003702) | 0.288715 / 0.258489 (0.030226) | 0.312383 / 0.293841 (0.018542) | 0.029372 / 0.128546 (-0.099174) | 0.010097 / 0.075646 (-0.065549) | 0.056752 / 0.419271 (-0.362520) | 0.033128 / 0.043533 (-0.010405) | 0.274986 / 0.255139 (0.019847) | 0.292692 / 0.283200 (0.009493) | 0.018309 / 0.141683 (-0.123374) | 1.190320 / 1.452155 (-0.261834) | 1.222529 / 1.492716 (-0.270188) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.091717 / 0.018006 (0.073711) | 0.300278 / 0.000490 (0.299788) | 0.000217 / 0.000200 (0.000017) | 0.000065 / 0.000054 (0.000011) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.021394 / 0.037411 (-0.016018) | 0.074918 / 0.014526 (0.060392) | 0.087461 / 0.176557 (-0.089095) | 0.125499 / 0.737135 (-0.611636) | 0.087484 / 0.296338 (-0.208854) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.296557 / 0.215209 (0.081348) | 2.905527 / 2.077655 (0.827872) | 1.624640 / 1.504120 (0.120520) | 1.505495 / 1.541195 (-0.035700) | 1.514066 / 1.468490 (0.045576) | 0.569376 / 4.584777 (-4.015401) | 2.448575 / 3.745712 (-1.297137) | 2.772805 / 5.269862 (-2.497057) | 1.757287 / 4.565676 (-2.808390) | 0.064209 / 0.424275 (-0.360066) | 0.005688 / 0.007607 (-0.001919) | 0.353175 / 0.226044 (0.127131) | 3.481591 / 2.268929 (1.212662) | 1.995384 / 55.444624 (-53.449240) | 1.684623 / 6.876477 (-5.191854) | 1.675750 / 2.142072 (-0.466323) | 0.644463 / 4.805227 (-4.160764) | 0.115393 / 6.500664 (-6.385271) | 0.040671 / 0.075469 (-0.034799) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.037487 / 1.841788 (-0.804301) | 11.902194 / 8.074308 (3.827886) | 10.148579 / 10.191392 (-0.042813) | 0.150261 / 0.680424 (-0.530163) | 0.015001 / 0.534201 (-0.519200) | 0.291008 / 0.579283 (-0.288275) | 0.278758 / 0.434364 (-0.155606) | 0.334037 / 0.540337 (-0.206301) | 0.419942 / 1.386936 (-0.966994) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#dcd01046388fc052d37acc5a450bea69e3c57afc \"CML watermark\")\n" ]
https://api.github.com/repos/huggingface/datasets/issues/6740
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6740/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6740/comments
https://api.github.com/repos/huggingface/datasets/issues/6740/events
https://github.com/huggingface/datasets/issues/6740
2,193,172,074
I_kwDODunzps6CuSZq
6,740
Support for loading geotiff files as a part of the ImageFolder
{ "login": "sunny1401", "id": 31362090, "node_id": "MDQ6VXNlcjMxMzYyMDkw", "avatar_url": "https://avatars.githubusercontent.com/u/31362090?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sunny1401", "html_url": "https://github.com/sunny1401", "followers_url": "https://api.github.com/users/sunny1401/followers", "following_url": "https://api.github.com/users/sunny1401/following{/other_user}", "gists_url": "https://api.github.com/users/sunny1401/gists{/gist_id}", "starred_url": "https://api.github.com/users/sunny1401/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sunny1401/subscriptions", "organizations_url": "https://api.github.com/users/sunny1401/orgs", "repos_url": "https://api.github.com/users/sunny1401/repos", "events_url": "https://api.github.com/users/sunny1401/events{/privacy}", "received_events_url": "https://api.github.com/users/sunny1401/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
0
"2024-03-18T20:00:39"
"2024-03-18T20:00:39"
null
NONE
null
### Feature request Request for adding rasterio support to load geotiff as a part of ImageFolder, instead of using PIL ### Motivation As of now, there are many datasets in HuggingFace Hub which are predominantly focussed towards RemoteSensing or are from RemoteSensing. The current ImageFolder (if I have understood correctly) uses PIL. This is not really optimized because mostly these datasets have images with many channels and additional metadata. Using PIL makes one loose it unless we provide a custom script. Hence, maybe an API could be added to have this in common? ### Your contribution If the issue is accepted - i can contribute the code, because I would like to have it automated and generalised.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6740/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6740/timeline
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/6739
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6739/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6739/comments
https://api.github.com/repos/huggingface/datasets/issues/6739/events
https://github.com/huggingface/datasets/pull/6739
2,192,730,134
PR_kwDODunzps5p-Bwe
6,739
Transpose images with EXIF Orientation tag
{ "login": "mariosasko", "id": 47462742, "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mariosasko", "html_url": "https://github.com/mariosasko", "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}", "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "repos_url": "https://api.github.com/users/mariosasko/repos", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
2
"2024-03-18T16:43:06"
"2024-03-19T15:35:57"
"2024-03-19T15:29:42"
CONTRIBUTOR
null
Closes https://github.com/huggingface/datasets/issues/6252
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6739/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6739/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6739", "html_url": "https://github.com/huggingface/datasets/pull/6739", "diff_url": "https://github.com/huggingface/datasets/pull/6739.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6739.patch", "merged_at": "2024-03-19T15:29:41" }
true
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6739). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.005295 / 0.011353 (-0.006058) | 0.003402 / 0.011008 (-0.007606) | 0.062860 / 0.038508 (0.024352) | 0.029627 / 0.023109 (0.006518) | 0.238359 / 0.275898 (-0.037539) | 0.262940 / 0.323480 (-0.060540) | 0.003077 / 0.007986 (-0.004909) | 0.002676 / 0.004328 (-0.001652) | 0.048731 / 0.004250 (0.044480) | 0.043989 / 0.037052 (0.006936) | 0.255702 / 0.258489 (-0.002787) | 0.282667 / 0.293841 (-0.011174) | 0.028019 / 0.128546 (-0.100527) | 0.010195 / 0.075646 (-0.065451) | 0.205472 / 0.419271 (-0.213800) | 0.036551 / 0.043533 (-0.006982) | 0.243282 / 0.255139 (-0.011857) | 0.261925 / 0.283200 (-0.021274) | 0.020506 / 0.141683 (-0.121177) | 1.137228 / 1.452155 (-0.314927) | 1.183935 / 1.492716 (-0.308782) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.100290 / 0.018006 (0.082284) | 0.316279 / 0.000490 (0.315790) | 0.000239 / 0.000200 (0.000039) | 0.000043 / 0.000054 (-0.000011) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.017979 / 0.037411 (-0.019432) | 0.061616 / 0.014526 (0.047090) | 0.072989 / 0.176557 (-0.103568) | 0.118667 / 0.737135 (-0.618468) | 0.074266 / 0.296338 (-0.222072) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.287971 / 0.215209 (0.072762) | 2.845235 / 2.077655 (0.767581) | 1.501983 / 1.504120 (-0.002137) | 1.389824 / 1.541195 (-0.151370) | 1.415616 / 1.468490 (-0.052874) | 0.568727 / 4.584777 (-4.016050) | 2.368330 / 3.745712 (-1.377382) | 2.844329 / 5.269862 (-2.425532) | 1.809038 / 4.565676 (-2.756639) | 0.063699 / 0.424275 (-0.360576) | 0.004972 / 0.007607 (-0.002635) | 0.340092 / 0.226044 (0.114048) | 3.369146 / 2.268929 (1.100217) | 1.863423 / 55.444624 (-53.581201) | 1.608334 / 6.876477 (-5.268142) | 1.624479 / 2.142072 (-0.517594) | 0.632439 / 4.805227 (-4.172788) | 0.116862 / 6.500664 (-6.383802) | 0.042558 / 0.075469 (-0.032911) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.967922 / 1.841788 (-0.873866) | 11.730612 / 8.074308 (3.656304) | 9.321333 / 10.191392 (-0.870059) | 0.142604 / 0.680424 (-0.537819) | 0.013934 / 0.534201 (-0.520267) | 0.285992 / 0.579283 (-0.293292) | 0.267639 / 0.434364 (-0.166724) | 0.324972 / 0.540337 (-0.215365) | 0.427077 / 1.386936 (-0.959859) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.005806 / 0.011353 (-0.005547) | 0.003771 / 0.011008 (-0.007237) | 0.049542 / 0.038508 (0.011034) | 0.030182 / 0.023109 (0.007073) | 0.303923 / 0.275898 (0.028025) | 0.325623 / 0.323480 (0.002143) | 0.004327 / 0.007986 (-0.003659) | 0.002818 / 0.004328 (-0.001510) | 0.048237 / 0.004250 (0.043987) | 0.047490 / 0.037052 (0.010437) | 0.316556 / 0.258489 (0.058067) | 0.348352 / 0.293841 (0.054512) | 0.029444 / 0.128546 (-0.099102) | 0.010544 / 0.075646 (-0.065102) | 0.057382 / 0.419271 (-0.361890) | 0.056210 / 0.043533 (0.012677) | 0.305495 / 0.255139 (0.050356) | 0.321570 / 0.283200 (0.038370) | 0.019546 / 0.141683 (-0.122137) | 1.141732 / 1.452155 (-0.310423) | 1.223626 / 1.492716 (-0.269091) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.093864 / 0.018006 (0.075858) | 0.309715 / 0.000490 (0.309226) | 0.000217 / 0.000200 (0.000017) | 0.000053 / 0.000054 (-0.000002) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.022047 / 0.037411 (-0.015364) | 0.074885 / 0.014526 (0.060359) | 0.088440 / 0.176557 (-0.088117) | 0.127033 / 0.737135 (-0.610103) | 0.089048 / 0.296338 (-0.207290) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.292624 / 0.215209 (0.077415) | 2.877592 / 2.077655 (0.799937) | 1.607036 / 1.504120 (0.102916) | 1.487819 / 1.541195 (-0.053376) | 1.517318 / 1.468490 (0.048828) | 0.553321 / 4.584777 (-4.031456) | 2.415577 / 3.745712 (-1.330135) | 2.691411 / 5.269862 (-2.578450) | 1.743395 / 4.565676 (-2.822282) | 0.062187 / 0.424275 (-0.362088) | 0.005073 / 0.007607 (-0.002534) | 0.342907 / 0.226044 (0.116863) | 3.402054 / 2.268929 (1.133126) | 1.979481 / 55.444624 (-53.465143) | 1.702885 / 6.876477 (-5.173592) | 1.868279 / 2.142072 (-0.273794) | 0.640095 / 4.805227 (-4.165132) | 0.117138 / 6.500664 (-6.383526) | 0.042197 / 0.075469 (-0.033272) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.007495 / 1.841788 (-0.834292) | 12.037309 / 8.074308 (3.963001) | 10.227670 / 10.191392 (0.036278) | 0.149533 / 0.680424 (-0.530891) | 0.015282 / 0.534201 (-0.518919) | 0.287357 / 0.579283 (-0.291926) | 0.285109 / 0.434364 (-0.149255) | 0.324027 / 0.540337 (-0.216311) | 0.442482 / 1.386936 (-0.944454) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#19b40860acf3b3ba8db727fcf3b1b99ebb8d7e33 \"CML watermark\")\n" ]
https://api.github.com/repos/huggingface/datasets/issues/6738
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6738/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6738/comments
https://api.github.com/repos/huggingface/datasets/issues/6738/events
https://github.com/huggingface/datasets/issues/6738
2,192,386,536
I_kwDODunzps6CrSno
6,738
Dict feature is non-nullable while nested dict feature is
{ "login": "polinaeterna", "id": 16348744, "node_id": "MDQ6VXNlcjE2MzQ4NzQ0", "avatar_url": "https://avatars.githubusercontent.com/u/16348744?v=4", "gravatar_id": "", "url": "https://api.github.com/users/polinaeterna", "html_url": "https://github.com/polinaeterna", "followers_url": "https://api.github.com/users/polinaeterna/followers", "following_url": "https://api.github.com/users/polinaeterna/following{/other_user}", "gists_url": "https://api.github.com/users/polinaeterna/gists{/gist_id}", "starred_url": "https://api.github.com/users/polinaeterna/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/polinaeterna/subscriptions", "organizations_url": "https://api.github.com/users/polinaeterna/orgs", "repos_url": "https://api.github.com/users/polinaeterna/repos", "events_url": "https://api.github.com/users/polinaeterna/events{/privacy}", "received_events_url": "https://api.github.com/users/polinaeterna/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892857, "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": "Something isn't working" } ]
closed
false
null
[]
null
3
"2024-03-18T14:31:47"
"2024-03-20T10:24:15"
"2024-03-19T20:05:20"
CONTRIBUTOR
null
When i try to create a `Dataset` object with None values inside a dict column, like this: ```python from datasets import Dataset, Features, Value Dataset.from_dict( { "dict": [{"a": 0, "b": 0}, None], }, features=Features( {"dict": {"a": Value("int16"), "b": Value("int16")}} ) ) ``` i get `ValueError: Got None but expected a dictionary instead`. At the same time, having None in _nested_ dict feature works, for example, this doesn't throw any errors: ```python from datasets import Dataset, Features, Value, Sequence dataset = Dataset.from_dict( { "list_dict": [[{"a": 0, "b": 0}], None], "sequence_dict": [[{"a": 0, "b": 0}], None], }, features=Features({ "list_dict": [{"a": Value("int16"), "b": Value("int16")}], "sequence_dict": Sequence({"a": Value("int16"), "b": Value("int16")}), }) ) ``` Other types of features also seem to be nullable (but I haven't checked all of them). Version of `datasets` is the latest atm (2.18.0) Is this an expected behavior or a bug?
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6738/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6738/timeline
null
completed
null
null
false
[ "It looks like a bug, by default every feature should be nullable.", "I've linked a PR with a fix :)", "@mariosasko awesome thank you!" ]
https://api.github.com/repos/huggingface/datasets/issues/6737
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6737/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6737/comments
https://api.github.com/repos/huggingface/datasets/issues/6737/events
https://github.com/huggingface/datasets/issues/6737
2,190,198,425
I_kwDODunzps6Ci8aZ
6,737
Invalid pattern: '**' can only be an entire path component
{ "login": "JPonsa", "id": 28976175, "node_id": "MDQ6VXNlcjI4OTc2MTc1", "avatar_url": "https://avatars.githubusercontent.com/u/28976175?v=4", "gravatar_id": "", "url": "https://api.github.com/users/JPonsa", "html_url": "https://github.com/JPonsa", "followers_url": "https://api.github.com/users/JPonsa/followers", "following_url": "https://api.github.com/users/JPonsa/following{/other_user}", "gists_url": "https://api.github.com/users/JPonsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/JPonsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JPonsa/subscriptions", "organizations_url": "https://api.github.com/users/JPonsa/orgs", "repos_url": "https://api.github.com/users/JPonsa/repos", "events_url": "https://api.github.com/users/JPonsa/events{/privacy}", "received_events_url": "https://api.github.com/users/JPonsa/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
1
"2024-03-16T19:28:46"
"2024-03-18T11:49:26"
null
NONE
null
### Describe the bug ValueError: Invalid pattern: '**' can only be an entire path component when loading any dataset ### Steps to reproduce the bug import datasets ds = datasets.load_dataset("TokenBender/code_instructions_122k_alpaca_style") ### Expected behavior loading the dataset successfully ### Environment info - `datasets` version: 2.18.0 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.7 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.12.2
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6737/reactions", "total_count": 6, "+1": 6, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6737/timeline
null
null
null
null
false
[ "I couldn't reproduce the issue on my side on MacOS, I guess the issue comes from the recent `fsspec` on Windows.\r\n\r\nCan you try downgrading to `fsspec==2023.9.2` for now ? It would also be great to investigate this and see if we need a fix in `datasets` or `fsspec`" ]
https://api.github.com/repos/huggingface/datasets/issues/6736
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6736/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6736/comments
https://api.github.com/repos/huggingface/datasets/issues/6736/events
https://github.com/huggingface/datasets/issues/6736
2,190,181,422
I_kwDODunzps6Ci4Qu
6,736
Mosaic Streaming (MDS) Support
{ "login": "siddk", "id": 2498509, "node_id": "MDQ6VXNlcjI0OTg1MDk=", "avatar_url": "https://avatars.githubusercontent.com/u/2498509?v=4", "gravatar_id": "", "url": "https://api.github.com/users/siddk", "html_url": "https://github.com/siddk", "followers_url": "https://api.github.com/users/siddk/followers", "following_url": "https://api.github.com/users/siddk/following{/other_user}", "gists_url": "https://api.github.com/users/siddk/gists{/gist_id}", "starred_url": "https://api.github.com/users/siddk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/siddk/subscriptions", "organizations_url": "https://api.github.com/users/siddk/orgs", "repos_url": "https://api.github.com/users/siddk/repos", "events_url": "https://api.github.com/users/siddk/events{/privacy}", "received_events_url": "https://api.github.com/users/siddk/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
1
"2024-03-16T18:42:04"
"2024-03-18T15:13:34"
null
NONE
null
### Feature request I'm a huge fan of the current HF Datasets `webdataset` integration (especially the built-in streaming support). However, I'd love to upload some robotics and multimodal datasets I've processed for use with [Mosaic Streaming](https://docs.mosaicml.com/projects/streaming/en/stable/), specifically their [MDS Format](https://docs.mosaicml.com/projects/streaming/en/stable/fundamentals/dataset_format.html#mds). Because the shard files have similar semantics to WebDataset, I'm hoping that adding such support won't be too much trouble? ### Motivation One of the downsides with WebDataset is a lack of out-of-the-box determinism (especially for large-scale training and reproducibility), easy job resumption, and the ability to quickly debug / visualize individual examples. Mosaic Streaming provides a [great interface for this out of the box](https://docs.mosaicml.com/projects/streaming/en/stable/#key-features), so I'd love to see it supported in HF Datasets. ### Your contribution Happy to help test things / provide example data. Can potentially submit a PR if maintainers could point me to the necessary WebDataset logic / steps for adding a new streaming format!
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6736/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6736/timeline
null
null
null
null
false
[ "Hi ! that would be great :) Though note that `datasets` doesn't implement format-specific resuming when streaming, so in general I think it's better if users can use the mosaic-streaming library to read their MDS datasets. I wonder if they support `hf://` paths though...\r\n\r\nAnyway for those interested, the code for WebDataset is a single file here: https://github.com/huggingface/datasets/blob/main/src/datasets/packaged_modules/webdataset/webdataset.py.\r\n\r\nIt implements `_split_generators` that downloads files and returns the lists of splits (train/validation/test) and `_split_generators` to generate examples (dicts) from the downloaded files. Streaming is automatically supported by making download steps lazy and by extending `open()` to work with remote URLs." ]
https://api.github.com/repos/huggingface/datasets/issues/6735
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6735/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6735/comments
https://api.github.com/repos/huggingface/datasets/issues/6735/events
https://github.com/huggingface/datasets/pull/6735
2,189,132,932
PR_kwDODunzps5px84g
6,735
Add `mode` parameter to `Image` feature
{ "login": "mariosasko", "id": 47462742, "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mariosasko", "html_url": "https://github.com/mariosasko", "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}", "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "repos_url": "https://api.github.com/users/mariosasko/repos", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
2
"2024-03-15T17:21:12"
"2024-03-18T15:47:48"
"2024-03-18T15:41:33"
CONTRIBUTOR
null
Fix https://github.com/huggingface/datasets/issues/6675
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6735/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6735/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6735", "html_url": "https://github.com/huggingface/datasets/pull/6735", "diff_url": "https://github.com/huggingface/datasets/pull/6735.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6735.patch", "merged_at": "2024-03-18T15:41:33" }
true
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6735). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.005009 / 0.011353 (-0.006344) | 0.003547 / 0.011008 (-0.007461) | 0.063014 / 0.038508 (0.024506) | 0.027699 / 0.023109 (0.004589) | 0.247140 / 0.275898 (-0.028758) | 0.273610 / 0.323480 (-0.049870) | 0.003115 / 0.007986 (-0.004871) | 0.002712 / 0.004328 (-0.001616) | 0.049134 / 0.004250 (0.044883) | 0.041582 / 0.037052 (0.004530) | 0.269992 / 0.258489 (0.011503) | 0.294516 / 0.293841 (0.000675) | 0.027818 / 0.128546 (-0.100728) | 0.010568 / 0.075646 (-0.065078) | 0.207710 / 0.419271 (-0.211561) | 0.035767 / 0.043533 (-0.007766) | 0.260058 / 0.255139 (0.004919) | 0.277615 / 0.283200 (-0.005585) | 0.020192 / 0.141683 (-0.121491) | 1.116863 / 1.452155 (-0.335292) | 1.156868 / 1.492716 (-0.335848) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.095087 / 0.018006 (0.077081) | 0.303249 / 0.000490 (0.302759) | 0.000215 / 0.000200 (0.000015) | 0.000053 / 0.000054 (-0.000001) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.018866 / 0.037411 (-0.018545) | 0.063853 / 0.014526 (0.049328) | 0.073863 / 0.176557 (-0.102693) | 0.121399 / 0.737135 (-0.615737) | 0.076014 / 0.296338 (-0.220325) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.289843 / 0.215209 (0.074634) | 2.844085 / 2.077655 (0.766431) | 1.528022 / 1.504120 (0.023902) | 1.397352 / 1.541195 (-0.143843) | 1.394676 / 1.468490 (-0.073814) | 0.555899 / 4.584777 (-4.028878) | 2.354010 / 3.745712 (-1.391702) | 2.737715 / 5.269862 (-2.532146) | 1.731260 / 4.565676 (-2.834416) | 0.062315 / 0.424275 (-0.361960) | 0.004920 / 0.007607 (-0.002687) | 0.342921 / 0.226044 (0.116877) | 3.416529 / 2.268929 (1.147600) | 1.862941 / 55.444624 (-53.581684) | 1.599661 / 6.876477 (-5.276816) | 1.617200 / 2.142072 (-0.524873) | 0.635129 / 4.805227 (-4.170099) | 0.121651 / 6.500664 (-6.379013) | 0.041867 / 0.075469 (-0.033602) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.990825 / 1.841788 (-0.850962) | 11.435576 / 8.074308 (3.361268) | 9.490194 / 10.191392 (-0.701198) | 0.133295 / 0.680424 (-0.547129) | 0.014061 / 0.534201 (-0.520140) | 0.288648 / 0.579283 (-0.290635) | 0.268874 / 0.434364 (-0.165490) | 0.323288 / 0.540337 (-0.217049) | 0.426090 / 1.386936 (-0.960846) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.006712 / 0.011353 (-0.004641) | 0.003723 / 0.011008 (-0.007285) | 0.049814 / 0.038508 (0.011306) | 0.039323 / 0.023109 (0.016213) | 0.279244 / 0.275898 (0.003346) | 0.297139 / 0.323480 (-0.026341) | 0.004197 / 0.007986 (-0.003788) | 0.002753 / 0.004328 (-0.001576) | 0.048820 / 0.004250 (0.044569) | 0.049593 / 0.037052 (0.012541) | 0.287247 / 0.258489 (0.028758) | 0.338078 / 0.293841 (0.044237) | 0.029303 / 0.128546 (-0.099243) | 0.010292 / 0.075646 (-0.065354) | 0.057852 / 0.419271 (-0.361419) | 0.053390 / 0.043533 (0.009857) | 0.275155 / 0.255139 (0.020016) | 0.292891 / 0.283200 (0.009692) | 0.020007 / 0.141683 (-0.121676) | 1.161731 / 1.452155 (-0.290424) | 1.232162 / 1.492716 (-0.260555) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.092848 / 0.018006 (0.074842) | 0.301180 / 0.000490 (0.300690) | 0.000236 / 0.000200 (0.000036) | 0.000050 / 0.000054 (-0.000005) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.022477 / 0.037411 (-0.014934) | 0.077012 / 0.014526 (0.062486) | 0.087335 / 0.176557 (-0.089222) | 0.126761 / 0.737135 (-0.610374) | 0.089249 / 0.296338 (-0.207090) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.290722 / 0.215209 (0.075513) | 2.884485 / 2.077655 (0.806830) | 1.565775 / 1.504120 (0.061656) | 1.442369 / 1.541195 (-0.098825) | 1.453995 / 1.468490 (-0.014495) | 0.563193 / 4.584777 (-4.021584) | 2.413610 / 3.745712 (-1.332102) | 2.684567 / 5.269862 (-2.585295) | 1.753322 / 4.565676 (-2.812354) | 0.061879 / 0.424275 (-0.362396) | 0.005080 / 0.007607 (-0.002527) | 0.347274 / 0.226044 (0.121229) | 3.435836 / 2.268929 (1.166907) | 1.937893 / 55.444624 (-53.506731) | 1.657824 / 6.876477 (-5.218653) | 1.777767 / 2.142072 (-0.364305) | 0.656757 / 4.805227 (-4.148471) | 0.117144 / 6.500664 (-6.383520) | 0.040691 / 0.075469 (-0.034778) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.012435 / 1.841788 (-0.829353) | 12.038001 / 8.074308 (3.963693) | 10.363947 / 10.191392 (0.172555) | 0.140711 / 0.680424 (-0.539713) | 0.014937 / 0.534201 (-0.519264) | 0.291070 / 0.579283 (-0.288213) | 0.277180 / 0.434364 (-0.157184) | 0.327433 / 0.540337 (-0.212904) | 0.439767 / 1.386936 (-0.947169) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#0b55ec53e980855d71ae22f8b3d12b2a0d476a51 \"CML watermark\")\n" ]
https://api.github.com/repos/huggingface/datasets/issues/6734
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6734/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6734/comments
https://api.github.com/repos/huggingface/datasets/issues/6734/events
https://github.com/huggingface/datasets/issues/6734
2,187,646,694
I_kwDODunzps6CZNbm
6,734
Tokenization slows towards end of dataset
{ "login": "ethansmith2000", "id": 98723285, "node_id": "U_kgDOBeJl1Q", "avatar_url": "https://avatars.githubusercontent.com/u/98723285?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ethansmith2000", "html_url": "https://github.com/ethansmith2000", "followers_url": "https://api.github.com/users/ethansmith2000/followers", "following_url": "https://api.github.com/users/ethansmith2000/following{/other_user}", "gists_url": "https://api.github.com/users/ethansmith2000/gists{/gist_id}", "starred_url": "https://api.github.com/users/ethansmith2000/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ethansmith2000/subscriptions", "organizations_url": "https://api.github.com/users/ethansmith2000/orgs", "repos_url": "https://api.github.com/users/ethansmith2000/repos", "events_url": "https://api.github.com/users/ethansmith2000/events{/privacy}", "received_events_url": "https://api.github.com/users/ethansmith2000/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
2
"2024-03-15T03:27:36"
"2024-03-15T15:27:59"
null
NONE
null
### Describe the bug Mapped tokenization slows down substantially towards end of dataset. train set started off very slow, caught up to 20k then tapered off til the end. what's particularly strange is that the tokenization crashed a few times before due to errors with invalid tokens somewhere or corrupted downloads, and the speed ups/downs consistently happened the same times ```bash Running tokenizer on dataset (num_proc=48): 0%| | 847000/881416735 [12:18<252:45:45, 967.72 examples/s] Running tokenizer on dataset (num_proc=48): 0%| | 848000/881416735 [12:19<224:16:10, 1090.66 examples/s] Running tokenizer on dataset (num_proc=48): 10%|▉ | 84964000/881416735 [3:48:00<11:21:34, 19476.01 examples/s] Running tokenizer on dataset (num_proc=48): 10%|▉ | 84967000/881416735 [3:48:00<12:04:01, 18333.79 examples/s] Running tokenizer on dataset (num_proc=48): 61%|██████ | 538631977/881416735 [13:46:40<27:50:04, 3420.84 examples/s] Running tokenizer on dataset (num_proc=48): 61%|██████ | 538632977/881416735 [13:46:40<23:48:20, 3999.77 examples/s] Running tokenizer on dataset (num_proc=48): 100%|█████████▉| 881365886/881416735 [38:30:19<04:34, 185.10 examples/s] Running tokenizer on dataset (num_proc=48): 100%|█████████▉| 881366886/881416735 [38:30:25<04:36, 180.57 examples/s] ``` and validation set as well ```bash Running tokenizer on dataset (num_proc=48): 90%|████████▉ | 41544000/46390354 [28:44<02:37, 30798.76 examples/s] Running tokenizer on dataset (num_proc=48): 90%|████████▉ | 41550000/46390354 [28:44<02:08, 37698.08 examples/s] Running tokenizer on dataset (num_proc=48): 96%|█████████▋| 44747422/46390354 [2:15:48<12:22:44, 36.87 examples/s] Running tokenizer on dataset (num_proc=48): 96%|█████████▋| 44747422/46390354 [2:16:00<12:22:44, 36.87 examples/s] ``` ### Steps to reproduce the bug using the following kwargs ```python with accelerator.main_process_first(): lm_datasets = tokenized_datasets.map( group_texts, batched=True, num_proc=48 load_from_cache_file=True, desc=f"Grouping texts in chunks of {block_size}", ) ``` running through slurm script ```bash #SBATCH --partition=gpu-nvidia-a100 #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --gpus-per-task=8 #SBATCH --cpus-per-task=96 ``` using this dataset https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T ### Expected behavior Constant speed throughout ### Environment info - `datasets` version: 2.15.0 - Platform: Linux-5.15.0-1049-aws-x86_64-with-glibc2.10 - Python version: 3.8.18 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.0.3 - `fsspec` version: 2023.10.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6734/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6734/timeline
null
null
null
null
false
[ "Hi ! First note that if the dataset is not heterogeneous / shuffled, there might be places in the data with shorter texts that are faster to tokenize.\r\n\r\nMoreover, the way `num_proc` works is by slicing the dataset and passing each slice to a process to run the `map()` function. So at the very end of `map()`, some processes might have finished transforming their slice of data while others are still running, causing the throughput to become lower.", "I did see some comments about how num_proc=None could help and outputting numpy arrays can also help in the docs, but this seems quite odd now dropping down to 1it/s\r\n\r\n```bash\r\nRunning tokenizer on dataset (num_proc=48): 99%|█████████▉| 46048888/46390354 [12:33:30<4:20:32, 21.84 examples/s]\r\nRunning tokenizer on dataset (num_proc=48): 99%|█████████▉| 46049888/46390354 [12:36:11<8:37:59, 10.95 examples/s]\r\nRunning tokenizer on dataset (num_proc=48): 99%|█████████▉| 46050888/46390354 [12:46:35<24:56:56, 3.78 examples/s]\r\nRunning tokenizer on dataset (num_proc=48): 99%|█████████▉| 46051888/46390354 [12:56:43<35:08:10, 2.68 examples/s]\r\nRunning tokenizer on dataset (num_proc=48): 99%|█████████▉| 46052888/46390354 [13:06:58<42:05:41, 2.23 examples/s]\r\nRunning tokenizer on dataset (num_proc=48): 99%|█████████▉| 46053888/46390354 [13:16:01<44:40:18, 2.09 examples/s]\r\nRunning tokenizer on dataset (num_proc=48): 99%|█████████▉| 46054888/46390354 [13:25:11<46:35:28, 2.00 examples/s]\r\nRunning tokenizer on dataset (num_proc=48): 99%|█████████▉| 46055888/46390354 [13:34:23<47:55:34, 1.94 examples/s]\r\n```\r\n\r\n" ]
https://api.github.com/repos/huggingface/datasets/issues/6733
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6733/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6733/comments
https://api.github.com/repos/huggingface/datasets/issues/6733/events
https://github.com/huggingface/datasets/issues/6733
2,186,811,724
I_kwDODunzps6CWBlM
6,733
EmptyDatasetError when loading dataset downloaded with HuggingFace cli
{ "login": "StwayneXG", "id": 77196999, "node_id": "MDQ6VXNlcjc3MTk2OTk5", "avatar_url": "https://avatars.githubusercontent.com/u/77196999?v=4", "gravatar_id": "", "url": "https://api.github.com/users/StwayneXG", "html_url": "https://github.com/StwayneXG", "followers_url": "https://api.github.com/users/StwayneXG/followers", "following_url": "https://api.github.com/users/StwayneXG/following{/other_user}", "gists_url": "https://api.github.com/users/StwayneXG/gists{/gist_id}", "starred_url": "https://api.github.com/users/StwayneXG/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/StwayneXG/subscriptions", "organizations_url": "https://api.github.com/users/StwayneXG/orgs", "repos_url": "https://api.github.com/users/StwayneXG/repos", "events_url": "https://api.github.com/users/StwayneXG/events{/privacy}", "received_events_url": "https://api.github.com/users/StwayneXG/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
1
"2024-03-14T16:41:27"
"2024-03-15T18:09:02"
null
NONE
null
### Describe the bug I am using a cluster that does not have access to the internet when given a job. I tried downloading the dataset using the huggingface-cli command and then loading it with load_dataset but I get an error: ```raise EmptyDatasetError(f"The directory at {base_path} doesn't contain any data files") from None``` The dataset I'm using is "lmsys/chatbot_arena_conversations". The folder structure is - README.md - data - train-00000-of-00001-cced8514c7ed782a.parquet ### Steps to reproduce the bug 1. Download dataset using HuggingFace CLI: ```huggingface-cli download lmsys/chatbot_arena_conversations --local-dir ./lmsys/chatbot_arena_conversations``` 2. In Python ``` from datasets import load_dataset load_dataset("lmsys/chatbot_arena_conversations") ``` ### Expected behavior Should return a Dataset Dict in the form of ``` DatasetDict({ train: Dataset({ features: [...], num_rows: 33,000 }) }) ``` ### Environment info Python 3.11.5 Datasets 2.18.0 Transformers 4.38.2 Pytorch 2.2.0 Pyarrow 15.0.1 Rocky Linux release 8.9 (Green Obsidian)
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6733/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6733/timeline
null
null
null
null
false
[ "Hi! `datasets` is not compatible with `huggingface_hub`'s cache structure, hence the error.\r\n\r\nYou can track https://github.com/huggingface/datasets/issues/5080 to get notified when this is implemented." ]
https://api.github.com/repos/huggingface/datasets/issues/6731
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6731/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6731/comments
https://api.github.com/repos/huggingface/datasets/issues/6731/events
https://github.com/huggingface/datasets/issues/6731
2,182,844,673
I_kwDODunzps6CG5EB
6,731
Unexpected behavior when using load_dataset with streaming=True in a for loop
{ "login": "uApiv", "id": 42908296, "node_id": "MDQ6VXNlcjQyOTA4Mjk2", "avatar_url": "https://avatars.githubusercontent.com/u/42908296?v=4", "gravatar_id": "", "url": "https://api.github.com/users/uApiv", "html_url": "https://github.com/uApiv", "followers_url": "https://api.github.com/users/uApiv/followers", "following_url": "https://api.github.com/users/uApiv/following{/other_user}", "gists_url": "https://api.github.com/users/uApiv/gists{/gist_id}", "starred_url": "https://api.github.com/users/uApiv/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/uApiv/subscriptions", "organizations_url": "https://api.github.com/users/uApiv/orgs", "repos_url": "https://api.github.com/users/uApiv/repos", "events_url": "https://api.github.com/users/uApiv/events{/privacy}", "received_events_url": "https://api.github.com/users/uApiv/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
1
"2024-03-12T23:26:43"
"2024-03-14T15:27:02"
null
NONE
null
### Describe the bug ### My Code ``` from datasets import load_dataset res=[] for i in [0,1]: di=load_dataset( "json", data_files='path_to.json', split='train', streaming=True, ).map(lambda x: {"source": i}) res.append(di) for e in res[0]: print(e) ``` ### Unexpected Behavior Data in `res[0]` has `source=1`. However the expected value is 0. ### FYI I further switch `streaming` to `False`. And the output value is as expected (0). So there may exist bugs in setting `streaming=True` in a for loop. ### Environment Python 3.8.0 datasets==2.18.0 transformers==4.28.1 ### Steps to reproduce the bug 1. Create a Json file with any content. 2. Run the provided code. 3. Switch `streaming` to `False` and run again to see the expected behavior. ### Expected behavior The expected behavior is the data are mapped with its corresponding value in the for loop. ### Environment info Python 3.8.0 datasets==2.18.0 transformers==4.28.1 Ubuntu 20.04
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6731/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6731/timeline
null
null
null
null
false
[ "This is normal behavior in python when using `lambda`: the `i` defined in your `lambda` refers to the global variable `i` in your loop, and `i` equals to `1` when you run your `for e in res[0]` line.\r\n\r\nYou should pass `fn_kwargs` that will be passed to your `lambda` instead of using the global variable:\r\n\r\n```python\r\nfrom datasets import load_dataset\r\n\r\nres=[]\r\nfor i in [0,1]:\r\n di = load_dataset(\r\n \"json\", \r\n data_files='path_to.json', \r\n split='train',\r\n streaming=True, \r\n ).map(lambda x, source: {\"source\": source}, fn_kwargs={\"source\": i})\r\n\r\n res.append(di)\r\n\r\nfor e in res[0]:\r\n print(e)\r\n```\r\n\r\nThis doesn't happen in non-streaming since in that case `map` is executed while the variable `i` has the right value. In streaming mode, `map` is executed on-the-fly when you iterate on the dataset." ]
https://api.github.com/repos/huggingface/datasets/issues/6730
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6730/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6730/comments
https://api.github.com/repos/huggingface/datasets/issues/6730/events
https://github.com/huggingface/datasets/pull/6730
2,181,881,499
PR_kwDODunzps5pZDsB
6,730
Deprecate Pandas builder
{ "login": "mariosasko", "id": 47462742, "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mariosasko", "html_url": "https://github.com/mariosasko", "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}", "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "repos_url": "https://api.github.com/users/mariosasko/repos", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
2
"2024-03-12T15:12:13"
"2024-03-12T17:42:33"
"2024-03-12T17:36:24"
CONTRIBUTOR
null
The Pandas packaged builder is undocumented and relies on `pickle` to read the data, making it **unsafe**. Moreover, I haven't seen a single instance of this builder being used (not even using the GH/Hub search), so we should deprecate it.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6730/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6730/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6730", "html_url": "https://github.com/huggingface/datasets/pull/6730", "diff_url": "https://github.com/huggingface/datasets/pull/6730.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6730.patch", "merged_at": "2024-03-12T17:36:24" }
true
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6730). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.005301 / 0.011353 (-0.006052) | 0.003701 / 0.011008 (-0.007307) | 0.065830 / 0.038508 (0.027322) | 0.029791 / 0.023109 (0.006682) | 0.251676 / 0.275898 (-0.024222) | 0.283824 / 0.323480 (-0.039655) | 0.003083 / 0.007986 (-0.004903) | 0.004144 / 0.004328 (-0.000185) | 0.053670 / 0.004250 (0.049419) | 0.042020 / 0.037052 (0.004968) | 0.266389 / 0.258489 (0.007899) | 0.296740 / 0.293841 (0.002900) | 0.028320 / 0.128546 (-0.100226) | 0.010604 / 0.075646 (-0.065042) | 0.219881 / 0.419271 (-0.199390) | 0.036216 / 0.043533 (-0.007317) | 0.255718 / 0.255139 (0.000579) | 0.275808 / 0.283200 (-0.007392) | 0.018407 / 0.141683 (-0.123276) | 1.140007 / 1.452155 (-0.312148) | 1.174005 / 1.492716 (-0.318711) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.091230 / 0.018006 (0.073224) | 0.300704 / 0.000490 (0.300215) | 0.000207 / 0.000200 (0.000007) | 0.000043 / 0.000054 (-0.000011) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.018950 / 0.037411 (-0.018461) | 0.062177 / 0.014526 (0.047651) | 0.073968 / 0.176557 (-0.102589) | 0.122161 / 0.737135 (-0.614974) | 0.075001 / 0.296338 (-0.221338) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.285675 / 0.215209 (0.070466) | 2.794176 / 2.077655 (0.716522) | 1.478666 / 1.504120 (-0.025454) | 1.361843 / 1.541195 (-0.179351) | 1.383847 / 1.468490 (-0.084643) | 0.568610 / 4.584777 (-4.016167) | 2.402351 / 3.745712 (-1.343361) | 2.860772 / 5.269862 (-2.409089) | 1.768588 / 4.565676 (-2.797089) | 0.063257 / 0.424275 (-0.361018) | 0.004998 / 0.007607 (-0.002609) | 0.340897 / 0.226044 (0.114853) | 3.340238 / 2.268929 (1.071310) | 1.836434 / 55.444624 (-53.608190) | 1.556844 / 6.876477 (-5.319633) | 1.610685 / 2.142072 (-0.531388) | 0.644941 / 4.805227 (-4.160286) | 0.117593 / 6.500664 (-6.383072) | 0.042803 / 0.075469 (-0.032666) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.979181 / 1.841788 (-0.862607) | 11.901365 / 8.074308 (3.827057) | 9.587943 / 10.191392 (-0.603449) | 0.139648 / 0.680424 (-0.540776) | 0.013904 / 0.534201 (-0.520297) | 0.291249 / 0.579283 (-0.288034) | 0.260737 / 0.434364 (-0.173627) | 0.326000 / 0.540337 (-0.214338) | 0.433459 / 1.386936 (-0.953477) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.005503 / 0.011353 (-0.005850) | 0.003738 / 0.011008 (-0.007270) | 0.049137 / 0.038508 (0.010629) | 0.031484 / 0.023109 (0.008374) | 0.265783 / 0.275898 (-0.010115) | 0.295125 / 0.323480 (-0.028354) | 0.004074 / 0.007986 (-0.003911) | 0.002707 / 0.004328 (-0.001622) | 0.048340 / 0.004250 (0.044089) | 0.045453 / 0.037052 (0.008401) | 0.276500 / 0.258489 (0.018011) | 0.312002 / 0.293841 (0.018162) | 0.029139 / 0.128546 (-0.099408) | 0.010445 / 0.075646 (-0.065201) | 0.057486 / 0.419271 (-0.361785) | 0.052386 / 0.043533 (0.008853) | 0.267099 / 0.255139 (0.011960) | 0.283193 / 0.283200 (-0.000007) | 0.018368 / 0.141683 (-0.123315) | 1.136207 / 1.452155 (-0.315948) | 1.178418 / 1.492716 (-0.314298) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.089270 / 0.018006 (0.071264) | 0.301087 / 0.000490 (0.300598) | 0.000208 / 0.000200 (0.000008) | 0.000050 / 0.000054 (-0.000005) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.021991 / 0.037411 (-0.015421) | 0.075357 / 0.014526 (0.060831) | 0.087781 / 0.176557 (-0.088775) | 0.126923 / 0.737135 (-0.610212) | 0.088491 / 0.296338 (-0.207847) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.293653 / 0.215209 (0.078444) | 2.872156 / 2.077655 (0.794501) | 1.559229 / 1.504120 (0.055109) | 1.441201 / 1.541195 (-0.099993) | 1.472642 / 1.468490 (0.004152) | 0.588463 / 4.584777 (-3.996314) | 2.447685 / 3.745712 (-1.298028) | 2.755752 / 5.269862 (-2.514110) | 1.796591 / 4.565676 (-2.769086) | 0.068024 / 0.424275 (-0.356252) | 0.005148 / 0.007607 (-0.002459) | 0.343572 / 0.226044 (0.117528) | 3.347856 / 2.268929 (1.078927) | 1.945977 / 55.444624 (-53.498647) | 1.648953 / 6.876477 (-5.227524) | 1.804468 / 2.142072 (-0.337604) | 0.651034 / 4.805227 (-4.154193) | 0.118130 / 6.500664 (-6.382534) | 0.041019 / 0.075469 (-0.034450) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.020461 / 1.841788 (-0.821327) | 12.514237 / 8.074308 (4.439929) | 10.696276 / 10.191392 (0.504884) | 0.154549 / 0.680424 (-0.525874) | 0.015964 / 0.534201 (-0.518237) | 0.290392 / 0.579283 (-0.288891) | 0.276074 / 0.434364 (-0.158290) | 0.326253 / 0.540337 (-0.214085) | 0.440383 / 1.386936 (-0.946553) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#29ffc270da34de70cf8e28b2ebeadba1c06d8730 \"CML watermark\")\n" ]

Dataset Card for github-issues

This dataset comes from github-issues of Hugging Face Datasets.

Dataset Details

Dataset Description

This dataset comes from github-issues of Hugging Face Datasets. Its url is https://github.com/huggingface/datasets/issues.

  • **Language(s) (NLP): en

Dataset Structure

[More Information Needed]

Dataset Creation

Curation Rationale

[More Information Needed]

Source Data

Data Collection and Processing

[More Information Needed]

Who are the source data producers?

[More Information Needed]

Annotations [optional]

Annotation process

[More Information Needed]

Who are the annotators?

[More Information Needed]

Personal and Sensitive Information

[More Information Needed]

Bias, Risks, and Limitations

[More Information Needed]

Recommendations

Users should be made aware of the risks, biases and limitations of the dataset. More information needed for further recommendations.

Citation [optional]

BibTeX:

[More Information Needed]

APA:

[More Information Needed]

Glossary [optional]

[More Information Needed]

More Information [optional]

[More Information Needed]

Dataset Card Authors [optional]

[More Information Needed]

Dataset Card Contact

[More Information Needed]

Downloads last month
0
Edit dataset card