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.47B
1.91B
| node_id
stringlengths 18
19
| number
int64 5.33k
6.26k
| title
stringlengths 1
290
| user
dict | labels
list | state
stringclasses 2
values | locked
bool 1
class | assignee
dict | assignees
list | milestone
dict | comments
sequence | created_at
unknown | updated_at
unknown | closed_at
unknown | author_association
stringclasses 3
values | active_lock_reason
null | body
stringlengths 3
19.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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://api.github.com/repos/huggingface/datasets/issues/6261 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6261/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6261/comments | https://api.github.com/repos/huggingface/datasets/issues/6261/events | https://github.com/huggingface/datasets/issues/6261 | 1,913,813,178 | I_kwDODunzps5yEni6 | 6,261 | Can't load a dataset | {
"login": "joaopedrosdmm",
"id": 37955817,
"node_id": "MDQ6VXNlcjM3OTU1ODE3",
"avatar_url": "https://avatars.githubusercontent.com/u/37955817?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/joaopedrosdmm",
"html_url": "https://github.com/joaopedrosdmm",
"followers_url": "https://api.github.com/users/joaopedrosdmm/followers",
"following_url": "https://api.github.com/users/joaopedrosdmm/following{/other_user}",
"gists_url": "https://api.github.com/users/joaopedrosdmm/gists{/gist_id}",
"starred_url": "https://api.github.com/users/joaopedrosdmm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/joaopedrosdmm/subscriptions",
"organizations_url": "https://api.github.com/users/joaopedrosdmm/orgs",
"repos_url": "https://api.github.com/users/joaopedrosdmm/repos",
"events_url": "https://api.github.com/users/joaopedrosdmm/events{/privacy}",
"received_events_url": "https://api.github.com/users/joaopedrosdmm/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | null | [
"I believe is due to the fact that doesn't work with .tgz files.",
"`JourneyDB/JourneyDB` is a gated dataset, so this error means you are not authenticated to access it, either by using an invalid token or by not agreeing to the terms in the dialog on the dataset page.\r\n\r\n> I believe is due to the fact that doesn't work with .tgz files.\r\n\r\nIndeed, the dataset's data files structure is not supported natively by `datasets`. To load it, one option is to clone the repo (or download it with `huggingface_hub.snapshot_download`) and use `Dataset.from_generator` to process the files."
] | "2023-09-26T15:46:25" | "2023-09-26T16:17:25" | null | NONE | null | ### Describe the bug
Can't seem to load the JourneyDB dataset.
It throws the following error:
```
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Cell In[15], line 2
1 # If the dataset is gated/private, make sure you have run huggingface-cli login
----> 2 dataset = load_dataset("JourneyDB/JourneyDB", data_files="data", use_auth_token=True)
File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1664, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1661 ignore_verifications = ignore_verifications or save_infos
1663 # Create a dataset builder
-> 1664 builder_instance = load_dataset_builder(
1665 path=path,
1666 name=name,
1667 data_dir=data_dir,
1668 data_files=data_files,
1669 cache_dir=cache_dir,
1670 features=features,
1671 download_config=download_config,
1672 download_mode=download_mode,
1673 revision=revision,
1674 use_auth_token=use_auth_token,
1675 **config_kwargs,
1676 )
1678 # Return iterable dataset in case of streaming
1679 if streaming:
File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1490, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs)
1488 download_config = download_config.copy() if download_config else DownloadConfig()
1489 download_config.use_auth_token = use_auth_token
-> 1490 dataset_module = dataset_module_factory(
1491 path,
1492 revision=revision,
1493 download_config=download_config,
1494 download_mode=download_mode,
1495 data_dir=data_dir,
1496 data_files=data_files,
1497 )
1499 # Get dataset builder class from the processing script
1500 builder_cls = import_main_class(dataset_module.module_path)
File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1238, in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs)
1236 raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
1237 if isinstance(e1, FileNotFoundError):
-> 1238 raise FileNotFoundError(
1239 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory. "
1240 f"Couldn't find '{path}' on the Hugging Face Hub either: {type(e1).__name__}: {e1}"
1241 ) from None
1242 raise e1 from None
1243 else:
FileNotFoundError: Couldn't find a dataset script at /kaggle/working/JourneyDB/JourneyDB/JourneyDB.py or any data file in the same directory. Couldn't find 'JourneyDB/JourneyDB' on the Hugging Face Hub either: FileNotFoundError: Unable to find data in dataset repository JourneyDB/JourneyDB with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm', 'zip']
```
### Steps to reproduce the bug
1)
```
from huggingface_hub import notebook_login
notebook_login()
```
2)
```
!pip install -q datasets
from datasets import load_dataset
```
3)
`dataset = load_dataset("JourneyDB/JourneyDB", data_files="data", use_auth_token=True)`
### Expected behavior
Load the dataset
### Environment info
Notebook | {
"url": "https://api.github.com/repos/huggingface/datasets/issues/6261/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/6261/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6260 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6260/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6260/comments | https://api.github.com/repos/huggingface/datasets/issues/6260/events | https://github.com/huggingface/datasets/issues/6260 | 1,912,593,466 | I_kwDODunzps5x_9w6 | 6,260 | REUSE_DATASET_IF_EXISTS don't work | {
"login": "rangehow",
"id": 88258534,
"node_id": "MDQ6VXNlcjg4MjU4NTM0",
"avatar_url": "https://avatars.githubusercontent.com/u/88258534?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rangehow",
"html_url": "https://github.com/rangehow",
"followers_url": "https://api.github.com/users/rangehow/followers",
"following_url": "https://api.github.com/users/rangehow/following{/other_user}",
"gists_url": "https://api.github.com/users/rangehow/gists{/gist_id}",
"starred_url": "https://api.github.com/users/rangehow/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rangehow/subscriptions",
"organizations_url": "https://api.github.com/users/rangehow/orgs",
"repos_url": "https://api.github.com/users/rangehow/repos",
"events_url": "https://api.github.com/users/rangehow/events{/privacy}",
"received_events_url": "https://api.github.com/users/rangehow/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | null | [] | "2023-09-26T03:02:16" | "2023-09-26T03:02:16" | null | NONE | null | ### Describe the bug
I use the following code to download natural_question dataset. Even though I have completely download it, the next time I run this code, the new download procedure will start and cover the original /data/lxy/NQ
config=datasets.DownloadConfig(resume_download=True,max_retries=100,cache_dir=r'/data/lxy/NQ',download_desc='NQ')
data=datasets.load_dataset('natural_questions',cache_dir=r'/data/lxy/NQ',download_config=config,download_mode=DownloadMode.REUSE_DATASET_IF_EXISTS)
---
Since I don't have apache_beam installed, it throw a exception. After I pip install apache_beam ,the download restart..
![image](https://github.com/huggingface/datasets/assets/88258534/f28ce7fe-29ea-4348-b87f-e69182a8bd41)
### Steps to reproduce the bug
run this two line code
config=datasets.DownloadConfig(resume_download=True,max_retries=100,cache_dir=r'/data/lxy/NQ',download_desc='NQ')
data=datasets.load_dataset('natural_questions',cache_dir=r'/data/lxy/NQ',download_config=config,download_mode=DownloadMode.REUSE_DATASET_IF_EXISTS)
### Expected behavior
Download behavior can be correctly follow DownloadMode
### Environment info
- `datasets` version: 2.14.4
- Platform: Linux-3.10.0-1160.88.1.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.9.17
- Huggingface_hub version: 0.16.4
- PyArrow version: 11.0.0
- Pandas version: 2.0.3 | {
"url": "https://api.github.com/repos/huggingface/datasets/issues/6260/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/6260/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6259 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6259/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6259/comments | https://api.github.com/repos/huggingface/datasets/issues/6259/events | https://github.com/huggingface/datasets/issues/6259 | 1,911,965,758 | I_kwDODunzps5x9kg- | 6,259 | Duplicated Rows When Loading Parquet Files from Root Directory with Subdirectories | {
"login": "MF-FOOM",
"id": 141304309,
"node_id": "U_kgDOCGwh9Q",
"avatar_url": "https://avatars.githubusercontent.com/u/141304309?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/MF-FOOM",
"html_url": "https://github.com/MF-FOOM",
"followers_url": "https://api.github.com/users/MF-FOOM/followers",
"following_url": "https://api.github.com/users/MF-FOOM/following{/other_user}",
"gists_url": "https://api.github.com/users/MF-FOOM/gists{/gist_id}",
"starred_url": "https://api.github.com/users/MF-FOOM/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MF-FOOM/subscriptions",
"organizations_url": "https://api.github.com/users/MF-FOOM/orgs",
"repos_url": "https://api.github.com/users/MF-FOOM/repos",
"events_url": "https://api.github.com/users/MF-FOOM/events{/privacy}",
"received_events_url": "https://api.github.com/users/MF-FOOM/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | {
"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
} | [
{
"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
}
] | null | [
"Thanks for reporting this issue! We should be able to avoid this by making our `glob` patterns more precise. In the meantime, you can load the dataset by directly assigning splits to the data files: \r\n```python\r\nfrom datasets import load_dataset\r\nds = load_dataset(\"parquet\", data_files={\"train\": \"testing123/train/output_train.parquet\", \"validation\": \"testing123/val/output_val.parquet\"})\r\n```"
] | "2023-09-25T17:20:54" | "2023-09-26T17:54:08" | null | NONE | null | ### Describe the bug
When parquet files are saved in "train" and "val" subdirectories under a root directory, and datasets are then loaded using `load_dataset("parquet", data_dir="root_directory")`, the resulting dataset has duplicated rows for both the training and validation sets.
### Steps to reproduce the bug
1. Create a root directory, e.g., "testing123".
2. Under "testing123", create two subdirectories: "train" and "val".
3. Create and save a parquet file with 3 unique rows in the "train" subdirectory.
4. Create and save a parquet file with 4 unique rows in the "val" subdirectory.
5. Load the datasets from the root directory using `load_dataset("parquet", data_dir="testing123")`
6. Iterate through the datasets and print the rows
Here's a collab reproducing these steps:
https://colab.research.google.com/drive/11NEdImnQ3OqJlwKSHRMhr7jCBesNdLY4?usp=sharing
### Expected behavior
- Training set should contain 3 unique rows.
- Validation set should contain 4 unique rows.
### Environment info
- `datasets` version: 2.14.5
- Platform: Linux-5.15.120+-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.17.2
- PyArrow version: 9.0.0
- Pandas version: 1.5.3 | {
"url": "https://api.github.com/repos/huggingface/datasets/issues/6259/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/6259/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6258 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6258/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6258/comments | https://api.github.com/repos/huggingface/datasets/issues/6258/events | https://github.com/huggingface/datasets/pull/6258 | 1,911,445,373 | PR_kwDODunzps5bHxHl | 6,258 | [DOCS] Fix typo: Elasticsearch | {
"login": "leemthompo",
"id": 32779855,
"node_id": "MDQ6VXNlcjMyNzc5ODU1",
"avatar_url": "https://avatars.githubusercontent.com/u/32779855?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/leemthompo",
"html_url": "https://github.com/leemthompo",
"followers_url": "https://api.github.com/users/leemthompo/followers",
"following_url": "https://api.github.com/users/leemthompo/following{/other_user}",
"gists_url": "https://api.github.com/users/leemthompo/gists{/gist_id}",
"starred_url": "https://api.github.com/users/leemthompo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/leemthompo/subscriptions",
"organizations_url": "https://api.github.com/users/leemthompo/orgs",
"repos_url": "https://api.github.com/users/leemthompo/repos",
"events_url": "https://api.github.com/users/leemthompo/events{/privacy}",
"received_events_url": "https://api.github.com/users/leemthompo/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | null | [
"_The documentation is not available anymore as the PR was closed or merged._",
"<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.006131 / 0.011353 (-0.005222) | 0.003682 / 0.011008 (-0.007327) | 0.081108 / 0.038508 (0.042600) | 0.061580 / 0.023109 (0.038471) | 0.395880 / 0.275898 (0.119982) | 0.427429 / 0.323480 (0.103949) | 0.003570 / 0.007986 (-0.004416) | 0.003874 / 0.004328 (-0.000455) | 0.063322 / 0.004250 (0.059072) | 0.049742 / 0.037052 (0.012690) | 0.396547 / 0.258489 (0.138058) | 0.434759 / 0.293841 (0.140918) | 0.028137 / 0.128546 (-0.100409) | 0.008103 / 0.075646 (-0.067544) | 0.262504 / 0.419271 (-0.156767) | 0.045944 / 0.043533 (0.002411) | 0.397659 / 0.255139 (0.142520) | 0.416479 / 0.283200 (0.133280) | 0.022870 / 0.141683 (-0.118813) | 1.478280 / 1.452155 (0.026126) | 1.543748 / 1.492716 (0.051031) |\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.228851 / 0.018006 (0.210845) | 0.432845 / 0.000490 (0.432355) | 0.005922 / 0.000200 (0.005722) | 0.000227 / 0.000054 (0.000172) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.025545 / 0.037411 (-0.011867) | 0.073506 / 0.014526 (0.058980) | 0.087622 / 0.176557 (-0.088935) | 0.145455 / 0.737135 (-0.591680) | 0.085236 / 0.296338 (-0.211102) |\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.433083 / 0.215209 (0.217874) | 4.323121 / 2.077655 (2.245466) | 2.297947 / 1.504120 (0.793827) | 2.126405 / 1.541195 (0.585211) | 2.201635 / 1.468490 (0.733145) | 0.509902 / 4.584777 (-4.074875) | 3.116877 / 3.745712 (-0.628835) | 2.892949 / 5.269862 (-2.376912) | 1.866833 / 4.565676 (-2.698844) | 0.058087 / 0.424275 (-0.366189) | 0.006464 / 0.007607 (-0.001143) | 0.503594 / 0.226044 (0.277550) | 5.027634 / 2.268929 (2.758705) | 2.718030 / 55.444624 (-52.726595) | 2.373876 / 6.876477 (-4.502600) | 2.515496 / 2.142072 (0.373423) | 0.602648 / 4.805227 (-4.202579) | 0.126119 / 6.500664 (-6.374545) | 0.060623 / 0.075469 (-0.014846) |\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.236429 / 1.841788 (-0.605359) | 17.760532 / 8.074308 (9.686224) | 13.970093 / 10.191392 (3.778701) | 0.145455 / 0.680424 (-0.534969) | 0.017110 / 0.534201 (-0.517091) | 0.329649 / 0.579283 (-0.249634) | 0.366942 / 0.434364 (-0.067421) | 0.384418 / 0.540337 (-0.155920) | 0.552330 / 1.386936 (-0.834606) |\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.006302 / 0.011353 (-0.005051) | 0.003677 / 0.011008 (-0.007331) | 0.062836 / 0.038508 (0.024328) | 0.063317 / 0.023109 (0.040207) | 0.449970 / 0.275898 (0.174072) | 0.480903 / 0.323480 (0.157423) | 0.005013 / 0.007986 (-0.002972) | 0.002934 / 0.004328 (-0.001394) | 0.062975 / 0.004250 (0.058724) | 0.051285 / 0.037052 (0.014233) | 0.448417 / 0.258489 (0.189928) | 0.486022 / 0.293841 (0.192181) | 0.029215 / 0.128546 (-0.099332) | 0.008189 / 0.075646 (-0.067457) | 0.068203 / 0.419271 (-0.351068) | 0.041942 / 0.043533 (-0.001591) | 0.445749 / 0.255139 (0.190610) | 0.465442 / 0.283200 (0.182243) | 0.020681 / 0.141683 (-0.121002) | 1.500704 / 1.452155 (0.048549) | 1.550511 / 1.492716 (0.057795) |\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.224922 / 0.018006 (0.206915) | 0.419714 / 0.000490 (0.419224) | 0.003804 / 0.000200 (0.003604) | 0.000082 / 0.000054 (0.000028) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.026924 / 0.037411 (-0.010487) | 0.082400 / 0.014526 (0.067874) | 0.092193 / 0.176557 (-0.084363) | 0.147045 / 0.737135 (-0.590090) | 0.093173 / 0.296338 (-0.203166) |\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.462510 / 0.215209 (0.247300) | 4.635249 / 2.077655 (2.557594) | 2.627127 / 1.504120 (1.123007) | 2.442879 / 1.541195 (0.901684) | 2.502456 / 1.468490 (1.033966) | 0.506607 / 4.584777 (-4.078170) | 3.127348 / 3.745712 (-0.618364) | 2.901818 / 5.269862 (-2.368044) | 1.906876 / 4.565676 (-2.658801) | 0.058025 / 0.424275 (-0.366250) | 0.006442 / 0.007607 (-0.001165) | 0.534438 / 0.226044 (0.308394) | 5.352481 / 2.268929 (3.083553) | 3.058068 / 55.444624 (-52.386556) | 2.697310 / 6.876477 (-4.179167) | 2.873141 / 2.142072 (0.731069) | 0.594517 / 4.805227 (-4.210710) | 0.125369 / 6.500664 (-6.375295) | 0.061411 / 0.075469 (-0.014058) |\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.369549 / 1.841788 (-0.472238) | 17.933507 / 8.074308 (9.859199) | 14.890107 / 10.191392 (4.698715) | 0.154398 / 0.680424 (-0.526026) | 0.018021 / 0.534201 (-0.516180) | 0.335163 / 0.579283 (-0.244120) | 0.350396 / 0.434364 (-0.083968) | 0.397694 / 0.540337 (-0.142643) | 0.554853 / 1.386936 (-0.832083) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#f56fd9d6c877ffa6fb44fb832c13b61227c9cc5b \"CML watermark\")\n"
] | "2023-09-25T12:50:59" | "2023-09-26T14:55:35" | "2023-09-26T13:36:40" | CONTRIBUTOR | null | Not ElasticSearch :) | {
"url": "https://api.github.com/repos/huggingface/datasets/issues/6258/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/6258/timeline | null | null | false | {
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6258",
"html_url": "https://github.com/huggingface/datasets/pull/6258",
"diff_url": "https://github.com/huggingface/datasets/pull/6258.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/6258.patch",
"merged_at": "2023-09-26T13:36:40"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6257 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6257/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6257/comments | https://api.github.com/repos/huggingface/datasets/issues/6257/events | https://github.com/huggingface/datasets/issues/6257 | 1,910,741,044 | I_kwDODunzps5x45g0 | 6,257 | HfHubHTTPError - exceeded our hourly quotas for action: commit | {
"login": "yuvalkirstain",
"id": 57996478,
"node_id": "MDQ6VXNlcjU3OTk2NDc4",
"avatar_url": "https://avatars.githubusercontent.com/u/57996478?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yuvalkirstain",
"html_url": "https://github.com/yuvalkirstain",
"followers_url": "https://api.github.com/users/yuvalkirstain/followers",
"following_url": "https://api.github.com/users/yuvalkirstain/following{/other_user}",
"gists_url": "https://api.github.com/users/yuvalkirstain/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yuvalkirstain/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yuvalkirstain/subscriptions",
"organizations_url": "https://api.github.com/users/yuvalkirstain/orgs",
"repos_url": "https://api.github.com/users/yuvalkirstain/repos",
"events_url": "https://api.github.com/users/yuvalkirstain/events{/privacy}",
"received_events_url": "https://api.github.com/users/yuvalkirstain/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | null | [
"how is your dataset structured? (file types, how many commits and files are you trying to push, etc)",
"I succeeded in uploading it after several attempts with an hour gap between each attempt (inconvenient but worked). The final dataset is [here](https://huggingface.co/datasets/yuvalkirstain/pickapic_v2), code and context to the dataset can be found [here](https://github.com/yuvalkirstain/PickScore/).\r\nI can close the issue if this behavior is intended, as most users probably do not need to upload large-scale datasets.",
"We could fix this by creating a single commit for all the (Parquet) shards in `push_to_hub` instead of one commit per shard, as we currently do. \r\n\r\n@Wauplin Any updates on the 2-step commit process suggested by you that we need to implement this?"
] | "2023-09-25T06:11:43" | "2023-09-26T15:56:03" | null | NONE | null | ### Describe the bug
I try to upload a very large dataset of images, and get the following error:
```
File /fsx-multigen/yuvalkirstain/miniconda/envs/pickapic/lib/python3.10/site-packages/huggingface_hub/hf_api.py:2712, in HfApi.create_commit(self, repo_id, operations, commit_message, commit_description, token, repo_type, revision, create_pr, num_threads, parent_commit, run_as_future)
2710 try:
2711 commit_resp = get_session().post(url=commit_url, headers=headers, data=data, params=params)
-> 2712 hf_raise_for_status(commit_resp, endpoint_name="commit")
2713 except RepositoryNotFoundError as e:
2714 e.append_to_message(_CREATE_COMMIT_NO_REPO_ERROR_MESSAGE)
File /fsx-multigen/yuvalkirstain/miniconda/envs/pickapic/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py:301, in hf_raise_for_status(response, endpoint_name)
297 raise BadRequestError(message, response=response) from e
299 # Convert `HTTPError` into a `HfHubHTTPError` to display request information
300 # as well (request id and/or server error message)
--> 301 raise HfHubHTTPError(str(e), response=response) from e
HfHubHTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/api/datasets/yuvalkirstain/pickapic_v2/commit/main (Request ID: Root=1-65112399-12d63f7d7f28bfa40a36a0fd)
You have exceeded our hourly quotas for action: commit. We invite you to retry later.
```
this makes it much less convenient to host large datasets on HF hub.
### Steps to reproduce the bug
Upload a very large dataset of images
### Expected behavior
the upload to work well
### Environment info
- `datasets` version: 2.13.1
- Platform: Linux-5.15.0-1033-aws-x86_64-with-glibc2.31
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 1.5.3 | {
"url": "https://api.github.com/repos/huggingface/datasets/issues/6257/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/6257/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6256 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6256/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6256/comments | https://api.github.com/repos/huggingface/datasets/issues/6256/events | https://github.com/huggingface/datasets/issues/6256 | 1,910,275,199 | I_kwDODunzps5x3Hx_ | 6,256 | load_dataset() function's cache_dir does not seems to work | {
"login": "andyzhu",
"id": 171831,
"node_id": "MDQ6VXNlcjE3MTgzMQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/171831?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/andyzhu",
"html_url": "https://github.com/andyzhu",
"followers_url": "https://api.github.com/users/andyzhu/followers",
"following_url": "https://api.github.com/users/andyzhu/following{/other_user}",
"gists_url": "https://api.github.com/users/andyzhu/gists{/gist_id}",
"starred_url": "https://api.github.com/users/andyzhu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/andyzhu/subscriptions",
"organizations_url": "https://api.github.com/users/andyzhu/orgs",
"repos_url": "https://api.github.com/users/andyzhu/repos",
"events_url": "https://api.github.com/users/andyzhu/events{/privacy}",
"received_events_url": "https://api.github.com/users/andyzhu/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | null | [] | "2023-09-24T15:34:06" | "2023-09-24T15:34:06" | null | NONE | null | ### Describe the bug
datasets version: 2.14.5
when trying to run the following command
trec = load_dataset('trec', split='train[:1000]', cache_dir='/path/to/my/dir')
I keep getting error saying the command does not have permission to the default cache directory on my macbook pro machine.
It seems the cache_dir parameter cannot change the dataset saving directory from the default
what ever explained in the https://huggingface.co/docs/datasets/cache does not seem to work
### Steps to reproduce the bug
datasets version: 2.14.5
when trying to run the following command
trec = load_dataset('trec', split='train[:1000]', cache_dir='/path/to/my/dir')
I keep getting error saying the command does not have permission to the default cache directory on my macbook pro machine.
It seems the cache_dir parameter cannot change the dataset saving directory from the default
what ever explained in the https://huggingface.co/docs/datasets/cache does not seem to work
### Expected behavior
the dataset should be saved to the cache_dir points to
### Environment info
datasets version: 2.14.5
macos X: Ventura 13.4.1 (c) | {
"url": "https://api.github.com/repos/huggingface/datasets/issues/6256/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/6256/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6255 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6255/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6255/comments | https://api.github.com/repos/huggingface/datasets/issues/6255/events | https://github.com/huggingface/datasets/pull/6255 | 1,909,842,977 | PR_kwDODunzps5bCioS | 6,255 | Parallelize builder configs creation | {
"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 | [
"<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.005905 / 0.011353 (-0.005448) | 0.003623 / 0.011008 (-0.007385) | 0.079616 / 0.038508 (0.041108) | 0.059840 / 0.023109 (0.036730) | 0.392281 / 0.275898 (0.116383) | 0.434539 / 0.323480 (0.111059) | 0.004746 / 0.007986 (-0.003239) | 0.002935 / 0.004328 (-0.001394) | 0.062907 / 0.004250 (0.058657) | 0.048233 / 0.037052 (0.011181) | 0.394170 / 0.258489 (0.135681) | 0.427430 / 0.293841 (0.133589) | 0.027382 / 0.128546 (-0.101164) | 0.007890 / 0.075646 (-0.067756) | 0.259681 / 0.419271 (-0.159591) | 0.044085 / 0.043533 (0.000552) | 0.388640 / 0.255139 (0.133501) | 0.412665 / 0.283200 (0.129465) | 0.021256 / 0.141683 (-0.120427) | 1.485672 / 1.452155 (0.033518) | 1.531410 / 1.492716 (0.038694) |\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.220346 / 0.018006 (0.202340) | 0.425329 / 0.000490 (0.424840) | 0.006224 / 0.000200 (0.006024) | 0.000208 / 0.000054 (0.000153) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.024864 / 0.037411 (-0.012547) | 0.072925 / 0.014526 (0.058399) | 0.083711 / 0.176557 (-0.092845) | 0.144213 / 0.737135 (-0.592923) | 0.084201 / 0.296338 (-0.212137) |\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.399467 / 0.215209 (0.184258) | 3.978979 / 2.077655 (1.901325) | 1.916994 / 1.504120 (0.412874) | 1.753098 / 1.541195 (0.211903) | 1.809866 / 1.468490 (0.341376) | 0.506806 / 4.584777 (-4.077971) | 3.051044 / 3.745712 (-0.694668) | 2.857624 / 5.269862 (-2.412237) | 1.872033 / 4.565676 (-2.693644) | 0.058543 / 0.424275 (-0.365732) | 0.006569 / 0.007607 (-0.001038) | 0.472630 / 0.226044 (0.246586) | 4.724862 / 2.268929 (2.455934) | 2.413068 / 55.444624 (-53.031556) | 2.046910 / 6.876477 (-4.829567) | 2.190455 / 2.142072 (0.048383) | 0.595228 / 4.805227 (-4.210000) | 0.125942 / 6.500664 (-6.374722) | 0.059474 / 0.075469 (-0.015995) |\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.235927 / 1.841788 (-0.605861) | 17.367803 / 8.074308 (9.293495) | 13.550362 / 10.191392 (3.358970) | 0.131664 / 0.680424 (-0.548760) | 0.016331 / 0.534201 (-0.517870) | 0.331295 / 0.579283 (-0.247988) | 0.367641 / 0.434364 (-0.066723) | 0.382595 / 0.540337 (-0.157742) | 0.540361 / 1.386936 (-0.846575) |\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.006120 / 0.011353 (-0.005233) | 0.003691 / 0.011008 (-0.007318) | 0.062768 / 0.038508 (0.024259) | 0.058045 / 0.023109 (0.034936) | 0.443616 / 0.275898 (0.167718) | 0.473854 / 0.323480 (0.150374) | 0.004710 / 0.007986 (-0.003275) | 0.002915 / 0.004328 (-0.001414) | 0.062922 / 0.004250 (0.058672) | 0.048557 / 0.037052 (0.011505) | 0.446136 / 0.258489 (0.187647) | 0.479235 / 0.293841 (0.185394) | 0.028704 / 0.128546 (-0.099842) | 0.008170 / 0.075646 (-0.067477) | 0.068853 / 0.419271 (-0.350419) | 0.041393 / 0.043533 (-0.002140) | 0.444683 / 0.255139 (0.189544) | 0.466607 / 0.283200 (0.183407) | 0.020890 / 0.141683 (-0.120793) | 1.473745 / 1.452155 (0.021590) | 1.498772 / 1.492716 (0.006055) |\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.216875 / 0.018006 (0.198868) | 0.411700 / 0.000490 (0.411211) | 0.003337 / 0.000200 (0.003137) | 0.000079 / 0.000054 (0.000024) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.027054 / 0.037411 (-0.010357) | 0.080617 / 0.014526 (0.066092) | 0.091052 / 0.176557 (-0.085505) | 0.144126 / 0.737135 (-0.593009) | 0.090123 / 0.296338 (-0.206216) |\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.461132 / 0.215209 (0.245922) | 4.598662 / 2.077655 (2.521008) | 2.539213 / 1.504120 (1.035093) | 2.362782 / 1.541195 (0.821587) | 2.428648 / 1.468490 (0.960157) | 0.506305 / 4.584777 (-4.078472) | 3.091132 / 3.745712 (-0.654581) | 2.884870 / 5.269862 (-2.384992) | 1.880806 / 4.565676 (-2.684870) | 0.058727 / 0.424275 (-0.365548) | 0.006452 / 0.007607 (-0.001155) | 0.533519 / 0.226044 (0.307474) | 5.346406 / 2.268929 (3.077478) | 2.987920 / 55.444624 (-52.456704) | 2.667591 / 6.876477 (-4.208885) | 2.848696 / 2.142072 (0.706623) | 0.601018 / 4.805227 (-4.204209) | 0.124929 / 6.500664 (-6.375735) | 0.061583 / 0.075469 (-0.013886) |\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.356825 / 1.841788 (-0.484962) | 17.964503 / 8.074308 (9.890195) | 14.691471 / 10.191392 (4.500079) | 0.132525 / 0.680424 (-0.547899) | 0.018061 / 0.534201 (-0.516140) | 0.335459 / 0.579283 (-0.243824) | 0.378260 / 0.434364 (-0.056104) | 0.390681 / 0.540337 (-0.149657) | 0.547030 / 1.386936 (-0.839906) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#8c55213a6c5fcff9b3dacce491caa68eacebe10d \"CML watermark\")\n",
"_The documentation is not available anymore as the PR was closed or merged._",
"<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.006624 / 0.011353 (-0.004729) | 0.004039 / 0.011008 (-0.006970) | 0.085862 / 0.038508 (0.047354) | 0.077183 / 0.023109 (0.054074) | 0.319132 / 0.275898 (0.043234) | 0.350818 / 0.323480 (0.027338) | 0.004122 / 0.007986 (-0.003864) | 0.003395 / 0.004328 (-0.000934) | 0.065237 / 0.004250 (0.060987) | 0.056675 / 0.037052 (0.019623) | 0.321040 / 0.258489 (0.062551) | 0.362011 / 0.293841 (0.068170) | 0.030988 / 0.128546 (-0.097559) | 0.008623 / 0.075646 (-0.067023) | 0.289433 / 0.419271 (-0.129839) | 0.052755 / 0.043533 (0.009222) | 0.323291 / 0.255139 (0.068152) | 0.340110 / 0.283200 (0.056911) | 0.026299 / 0.141683 (-0.115383) | 1.509405 / 1.452155 (0.057250) | 1.559993 / 1.492716 (0.067277) |\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.233285 / 0.018006 (0.215279) | 0.451633 / 0.000490 (0.451143) | 0.009954 / 0.000200 (0.009754) | 0.000098 / 0.000054 (0.000043) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.029623 / 0.037411 (-0.007788) | 0.083942 / 0.014526 (0.069416) | 0.097378 / 0.176557 (-0.079178) | 0.152630 / 0.737135 (-0.584506) | 0.098379 / 0.296338 (-0.197959) |\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.386237 / 0.215209 (0.171028) | 3.850805 / 2.077655 (1.773150) | 1.896032 / 1.504120 (0.391912) | 1.729746 / 1.541195 (0.188551) | 1.867831 / 1.468490 (0.399341) | 0.481496 / 4.584777 (-4.103281) | 3.564432 / 3.745712 (-0.181280) | 3.336084 / 5.269862 (-1.933777) | 2.040944 / 4.565676 (-2.524732) | 0.057247 / 0.424275 (-0.367028) | 0.007275 / 0.007607 (-0.000332) | 0.464600 / 0.226044 (0.238556) | 4.648562 / 2.268929 (2.379634) | 2.394430 / 55.444624 (-53.050195) | 2.029748 / 6.876477 (-4.846728) | 2.280975 / 2.142072 (0.138902) | 0.619073 / 4.805227 (-4.186154) | 0.150504 / 6.500664 (-6.350160) | 0.061206 / 0.075469 (-0.014263) |\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.267309 / 1.841788 (-0.574479) | 19.062725 / 8.074308 (10.988417) | 14.192565 / 10.191392 (4.001173) | 0.162908 / 0.680424 (-0.517515) | 0.018445 / 0.534201 (-0.515756) | 0.392110 / 0.579283 (-0.187173) | 0.415340 / 0.434364 (-0.019024) | 0.456783 / 0.540337 (-0.083554) | 0.653019 / 1.386936 (-0.733917) |\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.006995 / 0.011353 (-0.004358) | 0.004027 / 0.011008 (-0.006981) | 0.064124 / 0.038508 (0.025616) | 0.076004 / 0.023109 (0.052895) | 0.401760 / 0.275898 (0.125862) | 0.432339 / 0.323480 (0.108859) | 0.005471 / 0.007986 (-0.002515) | 0.003335 / 0.004328 (-0.000993) | 0.064164 / 0.004250 (0.059913) | 0.058101 / 0.037052 (0.021048) | 0.401698 / 0.258489 (0.143209) | 0.436033 / 0.293841 (0.142192) | 0.032789 / 0.128546 (-0.095757) | 0.008482 / 0.075646 (-0.067165) | 0.070707 / 0.419271 (-0.348565) | 0.048287 / 0.043533 (0.004755) | 0.395501 / 0.255139 (0.140362) | 0.419385 / 0.283200 (0.136186) | 0.024043 / 0.141683 (-0.117640) | 1.503310 / 1.452155 (0.051156) | 1.562160 / 1.492716 (0.069444) |\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.227629 / 0.018006 (0.209623) | 0.457306 / 0.000490 (0.456816) | 0.005835 / 0.000200 (0.005635) | 0.000109 / 0.000054 (0.000054) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.032991 / 0.037411 (-0.004420) | 0.093265 / 0.014526 (0.078739) | 0.106595 / 0.176557 (-0.069961) | 0.158557 / 0.737135 (-0.578578) | 0.106805 / 0.296338 (-0.189533) |\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.436573 / 0.215209 (0.221364) | 4.355777 / 2.077655 (2.278122) | 2.323151 / 1.504120 (0.819031) | 2.164101 / 1.541195 (0.622906) | 2.252808 / 1.468490 (0.784318) | 0.494902 / 4.584777 (-4.089875) | 3.615073 / 3.745712 (-0.130639) | 3.329738 / 5.269862 (-1.940124) | 2.059137 / 4.565676 (-2.506539) | 0.058384 / 0.424275 (-0.365891) | 0.007330 / 0.007607 (-0.000277) | 0.512326 / 0.226044 (0.286281) | 5.125652 / 2.268929 (2.856724) | 2.861981 / 55.444624 (-52.582644) | 2.500172 / 6.876477 (-4.376305) | 2.715862 / 2.142072 (0.573789) | 0.597299 / 4.805227 (-4.207928) | 0.134346 / 6.500664 (-6.366318) | 0.060396 / 0.075469 (-0.015074) |\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.353771 / 1.841788 (-0.488017) | 19.334801 / 8.074308 (11.260493) | 14.669875 / 10.191392 (4.478483) | 0.167607 / 0.680424 (-0.512817) | 0.019839 / 0.534201 (-0.514362) | 0.395473 / 0.579283 (-0.183810) | 0.419822 / 0.434364 (-0.014542) | 0.471400 / 0.540337 (-0.068938) | 0.648297 / 1.386936 (-0.738639) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#d5a112e7f1ce1635725773d911c825adca7bcfe0 \"CML watermark\")\n",
"@mariosasko let me know what you think or if you have better ideas to make it faster",
"Yea lazy data files resolution seems a better approach actually"
] | "2023-09-23T11:56:20" | "2023-09-26T15:44:47" | "2023-09-26T15:44:19" | MEMBER | null | For datasets with lots of configs defined in YAML
E.g. `load_dataset("uonlp/CulturaX", "fr", revision="refs/pr/6")` from >1min to 15sec | {
"url": "https://api.github.com/repos/huggingface/datasets/issues/6255/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/6255/timeline | null | null | false | {
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6255",
"html_url": "https://github.com/huggingface/datasets/pull/6255",
"diff_url": "https://github.com/huggingface/datasets/pull/6255.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/6255.patch",
"merged_at": null
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6254 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6254/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6254/comments | https://api.github.com/repos/huggingface/datasets/issues/6254/events | https://github.com/huggingface/datasets/issues/6254 | 1,909,672,104 | I_kwDODunzps5x00io | 6,254 | Dataset.from_generator() cost much more time in vscode debugging mode then running mode | {
"login": "dontnet-wuenze",
"id": 56437469,
"node_id": "MDQ6VXNlcjU2NDM3NDY5",
"avatar_url": "https://avatars.githubusercontent.com/u/56437469?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dontnet-wuenze",
"html_url": "https://github.com/dontnet-wuenze",
"followers_url": "https://api.github.com/users/dontnet-wuenze/followers",
"following_url": "https://api.github.com/users/dontnet-wuenze/following{/other_user}",
"gists_url": "https://api.github.com/users/dontnet-wuenze/gists{/gist_id}",
"starred_url": "https://api.github.com/users/dontnet-wuenze/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dontnet-wuenze/subscriptions",
"organizations_url": "https://api.github.com/users/dontnet-wuenze/orgs",
"repos_url": "https://api.github.com/users/dontnet-wuenze/repos",
"events_url": "https://api.github.com/users/dontnet-wuenze/events{/privacy}",
"received_events_url": "https://api.github.com/users/dontnet-wuenze/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | null | [
"Answered on the forum: https://discuss.huggingface.co/t/dataset-from-generator-cost-much-more-time-in-vscode-debugging-mode-then-running-mode/56005/2"
] | "2023-09-23T02:07:26" | "2023-09-26T14:10:58" | null | NONE | null | ### Describe the bug
Hey there,
I’m using Dataset.from_generator() to convert a torch_dataset to the Huggingface Dataset.
However, when I debug my code on vscode, I find that it runs really slow on Dataset.from_generator() which may even 20 times longer then run the script on terminal.
### Steps to reproduce the bug
I write a simple test code :
```python
import os
from functools import partial
from typing import Callable
import torch
import time
from torch.utils.data import Dataset as TorchDataset
from datasets import load_from_disk, Dataset as HFDataset
import torch
from torch.utils.data import Dataset
class SimpleDataset(Dataset):
def __init__(self, data):
self.data = data
self.keys = list(data[0].keys())
def __len__(self):
return len(self.data)
def __getitem__(self, index):
sample = self.data[index]
return {key: sample[key] for key in self.keys}
def TorchDataset2HuggingfaceDataset(torch_dataset: TorchDataset, cache_dir: str = None
) -> HFDataset:
"""
convert torch dataset to huggingface dataset
"""
generator : Callable[[], TorchDataset] = lambda: (sample for sample in torch_dataset)
return HFDataset.from_generator(generator, cache_dir=cache_dir)
if __name__ == '__main__':
data = [
{'id': 1, 'name': 'Alice'},
{'id': 2, 'name': 'Bob'},
{'id': 3, 'name': 'Charlie'}
]
torch_dataset = SimpleDataset(data)
start_time = time.time()
huggingface_dataset = TorchDataset2HuggingfaceDataset(torch_dataset)
end_time = time.time()
print("time: ", end_time - start_time)
print(huggingface_dataset)
```
### Expected behavior
this test on my machine report that the running time on terminal is 0.086,
however the running time in debugging mode on vscode is 0.25, which I think is much longer than expected.
I’d like to know is the anything wrong in the code or just because of debugging?
I have traced the code and I find is this func which I get stuck.
```python
def create_config_id(
self,
config_kwargs: dict,
custom_features: Optional[Features] = None,
) -> str:
...
# stuck in this line
suffix = Hasher.hash(config_kwargs_to_add_to_suffix)
```
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-5.11.0-27-generic-x86_64-with-glibc2.31
- Python version: 3.11.3
- Huggingface_hub version: 0.17.2
- PyArrow version: 11.0.0
- Pandas version: 2.0.1 | {
"url": "https://api.github.com/repos/huggingface/datasets/issues/6254/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/6254/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6253 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6253/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6253/comments | https://api.github.com/repos/huggingface/datasets/issues/6253/events | https://github.com/huggingface/datasets/pull/6253 | 1,906,618,910 | PR_kwDODunzps5a3s__ | 6,253 | Check builder cls default config name in inspect | {
"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 | [
"_The documentation is not available anymore as the PR was closed or merged._",
"<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.006591 / 0.011353 (-0.004762) | 0.003991 / 0.011008 (-0.007017) | 0.085197 / 0.038508 (0.046689) | 0.080312 / 0.023109 (0.057202) | 0.342026 / 0.275898 (0.066128) | 0.370749 / 0.323480 (0.047269) | 0.004124 / 0.007986 (-0.003861) | 0.003413 / 0.004328 (-0.000916) | 0.064363 / 0.004250 (0.060113) | 0.055920 / 0.037052 (0.018868) | 0.340667 / 0.258489 (0.082178) | 0.380138 / 0.293841 (0.086297) | 0.031115 / 0.128546 (-0.097431) | 0.008511 / 0.075646 (-0.067135) | 0.289065 / 0.419271 (-0.130207) | 0.052266 / 0.043533 (0.008734) | 0.343808 / 0.255139 (0.088669) | 0.353578 / 0.283200 (0.070378) | 0.024006 / 0.141683 (-0.117676) | 1.490322 / 1.452155 (0.038168) | 1.591133 / 1.492716 (0.098417) |\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.234718 / 0.018006 (0.216712) | 0.447023 / 0.000490 (0.446533) | 0.009343 / 0.000200 (0.009143) | 0.000259 / 0.000054 (0.000204) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.030466 / 0.037411 (-0.006945) | 0.083367 / 0.014526 (0.068841) | 0.100532 / 0.176557 (-0.076024) | 0.158018 / 0.737135 (-0.579117) | 0.098280 / 0.296338 (-0.198059) |\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.408501 / 0.215209 (0.193292) | 4.066937 / 2.077655 (1.989282) | 2.034029 / 1.504120 (0.529909) | 1.842982 / 1.541195 (0.301788) | 1.987319 / 1.468490 (0.518829) | 0.492126 / 4.584777 (-4.092651) | 3.554027 / 3.745712 (-0.191685) | 3.289023 / 5.269862 (-1.980839) | 2.069796 / 4.565676 (-2.495880) | 0.057930 / 0.424275 (-0.366346) | 0.007308 / 0.007607 (-0.000299) | 0.482596 / 0.226044 (0.256552) | 4.830714 / 2.268929 (2.561785) | 2.506787 / 55.444624 (-52.937838) | 2.163498 / 6.876477 (-4.712979) | 2.389135 / 2.142072 (0.247062) | 0.597538 / 4.805227 (-4.207689) | 0.134268 / 6.500664 (-6.366396) | 0.061189 / 0.075469 (-0.014280) |\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.245328 / 1.841788 (-0.596460) | 19.145151 / 8.074308 (11.070843) | 14.742121 / 10.191392 (4.550729) | 0.144749 / 0.680424 (-0.535675) | 0.018433 / 0.534201 (-0.515768) | 0.391867 / 0.579283 (-0.187416) | 0.416555 / 0.434364 (-0.017809) | 0.454341 / 0.540337 (-0.085997) | 0.646833 / 1.386936 (-0.740103) |\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.006669 / 0.011353 (-0.004684) | 0.004031 / 0.011008 (-0.006978) | 0.064347 / 0.038508 (0.025839) | 0.076857 / 0.023109 (0.053748) | 0.415864 / 0.275898 (0.139966) | 0.468615 / 0.323480 (0.145135) | 0.005383 / 0.007986 (-0.002603) | 0.003314 / 0.004328 (-0.001015) | 0.064829 / 0.004250 (0.060578) | 0.057182 / 0.037052 (0.020129) | 0.417055 / 0.258489 (0.158566) | 0.472725 / 0.293841 (0.178884) | 0.031938 / 0.128546 (-0.096608) | 0.008564 / 0.075646 (-0.067082) | 0.070649 / 0.419271 (-0.348623) | 0.047439 / 0.043533 (0.003906) | 0.409589 / 0.255139 (0.154450) | 0.433700 / 0.283200 (0.150500) | 0.024132 / 0.141683 (-0.117551) | 1.500825 / 1.452155 (0.048670) | 1.592059 / 1.492716 (0.099343) |\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.225652 / 0.018006 (0.207646) | 0.444188 / 0.000490 (0.443698) | 0.004581 / 0.000200 (0.004381) | 0.000104 / 0.000054 (0.000050) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.033272 / 0.037411 (-0.004139) | 0.096833 / 0.014526 (0.082307) | 0.107134 / 0.176557 (-0.069422) | 0.159299 / 0.737135 (-0.577836) | 0.107533 / 0.296338 (-0.188806) |\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.429100 / 0.215209 (0.213890) | 4.281051 / 2.077655 (2.203396) | 2.318713 / 1.504120 (0.814593) | 2.165645 / 1.541195 (0.624451) | 2.250224 / 1.468490 (0.781734) | 0.495791 / 4.584777 (-4.088986) | 3.591953 / 3.745712 (-0.153760) | 3.303426 / 5.269862 (-1.966436) | 2.076861 / 4.565676 (-2.488816) | 0.058369 / 0.424275 (-0.365906) | 0.007387 / 0.007607 (-0.000220) | 0.501270 / 0.226044 (0.275225) | 5.014987 / 2.268929 (2.746059) | 2.800951 / 55.444624 (-52.643673) | 2.464316 / 6.876477 (-4.412161) | 2.685259 / 2.142072 (0.543187) | 0.584797 / 4.805227 (-4.220430) | 0.131889 / 6.500664 (-6.368775) | 0.061021 / 0.075469 (-0.014448) |\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.366982 / 1.841788 (-0.474806) | 19.820376 / 8.074308 (11.746068) | 14.968664 / 10.191392 (4.777272) | 0.165344 / 0.680424 (-0.515080) | 0.019956 / 0.534201 (-0.514245) | 0.395843 / 0.579283 (-0.183441) | 0.420854 / 0.434364 (-0.013510) | 0.465065 / 0.540337 (-0.075272) | 0.651531 / 1.386936 (-0.735405) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#980ca0e13300f5392cd87189d5afd5942927afc7 \"CML watermark\")\n",
"<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.005974 / 0.011353 (-0.005379) | 0.003714 / 0.011008 (-0.007294) | 0.080049 / 0.038508 (0.041541) | 0.061233 / 0.023109 (0.038124) | 0.317187 / 0.275898 (0.041289) | 0.352725 / 0.323480 (0.029245) | 0.004867 / 0.007986 (-0.003119) | 0.002953 / 0.004328 (-0.001376) | 0.063156 / 0.004250 (0.058905) | 0.046752 / 0.037052 (0.009700) | 0.320171 / 0.258489 (0.061682) | 0.367572 / 0.293841 (0.073731) | 0.027253 / 0.128546 (-0.101293) | 0.008100 / 0.075646 (-0.067546) | 0.261206 / 0.419271 (-0.158066) | 0.044581 / 0.043533 (0.001048) | 0.331169 / 0.255139 (0.076030) | 0.348719 / 0.283200 (0.065519) | 0.021397 / 0.141683 (-0.120286) | 1.528315 / 1.452155 (0.076160) | 1.533789 / 1.492716 (0.041073) |\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.233336 / 0.018006 (0.215329) | 0.416866 / 0.000490 (0.416376) | 0.008805 / 0.000200 (0.008605) | 0.000240 / 0.000054 (0.000186) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.024754 / 0.037411 (-0.012657) | 0.073311 / 0.014526 (0.058785) | 0.085419 / 0.176557 (-0.091138) | 0.146380 / 0.737135 (-0.590756) | 0.085545 / 0.296338 (-0.210793) |\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.431426 / 0.215209 (0.216217) | 4.315899 / 2.077655 (2.238244) | 2.232492 / 1.504120 (0.728372) | 2.064174 / 1.541195 (0.522979) | 2.158982 / 1.468490 (0.690492) | 0.499375 / 4.584777 (-4.085402) | 3.093259 / 3.745712 (-0.652454) | 2.848260 / 5.269862 (-2.421601) | 1.853097 / 4.565676 (-2.712579) | 0.057143 / 0.424275 (-0.367132) | 0.006349 / 0.007607 (-0.001258) | 0.507747 / 0.226044 (0.281702) | 5.078872 / 2.268929 (2.809944) | 2.717697 / 55.444624 (-52.726927) | 2.363564 / 6.876477 (-4.512913) | 2.485756 / 2.142072 (0.343684) | 0.595888 / 4.805227 (-4.209340) | 0.127285 / 6.500664 (-6.373379) | 0.060639 / 0.075469 (-0.014830) |\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.219287 / 1.841788 (-0.622501) | 17.300038 / 8.074308 (9.225730) | 13.747230 / 10.191392 (3.555838) | 0.144841 / 0.680424 (-0.535583) | 0.016587 / 0.534201 (-0.517614) | 0.336891 / 0.579283 (-0.242392) | 0.376128 / 0.434364 (-0.058236) | 0.385749 / 0.540337 (-0.154588) | 0.552218 / 1.386936 (-0.834718) |\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.006477 / 0.011353 (-0.004876) | 0.003709 / 0.011008 (-0.007299) | 0.064708 / 0.038508 (0.026200) | 0.062627 / 0.023109 (0.039518) | 0.444721 / 0.275898 (0.168823) | 0.477825 / 0.323480 (0.154345) | 0.004890 / 0.007986 (-0.003096) | 0.002896 / 0.004328 (-0.001432) | 0.063781 / 0.004250 (0.059530) | 0.050488 / 0.037052 (0.013436) | 0.453466 / 0.258489 (0.194977) | 0.483303 / 0.293841 (0.189462) | 0.028814 / 0.128546 (-0.099732) | 0.008207 / 0.075646 (-0.067440) | 0.070140 / 0.419271 (-0.349131) | 0.041487 / 0.043533 (-0.002045) | 0.454599 / 0.255139 (0.199460) | 0.468374 / 0.283200 (0.185174) | 0.019758 / 0.141683 (-0.121925) | 1.437542 / 1.452155 (-0.014613) | 1.507965 / 1.492716 (0.015249) |\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.223358 / 0.018006 (0.205352) | 0.413824 / 0.000490 (0.413334) | 0.004593 / 0.000200 (0.004393) | 0.000089 / 0.000054 (0.000035) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.026278 / 0.037411 (-0.011134) | 0.081992 / 0.014526 (0.067466) | 0.089969 / 0.176557 (-0.086587) | 0.143668 / 0.737135 (-0.593467) | 0.091273 / 0.296338 (-0.205066) |\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.461198 / 0.215209 (0.245989) | 4.615398 / 2.077655 (2.537743) | 2.552291 / 1.504120 (1.048171) | 2.373789 / 1.541195 (0.832595) | 2.431591 / 1.468490 (0.963101) | 0.507683 / 4.584777 (-4.077094) | 3.148771 / 3.745712 (-0.596941) | 2.849118 / 5.269862 (-2.420744) | 1.883001 / 4.565676 (-2.682675) | 0.059423 / 0.424275 (-0.364852) | 0.006463 / 0.007607 (-0.001144) | 0.535129 / 0.226044 (0.309085) | 5.362870 / 2.268929 (3.093941) | 3.016548 / 55.444624 (-52.428076) | 2.666205 / 6.876477 (-4.210271) | 2.821396 / 2.142072 (0.679324) | 0.606596 / 4.805227 (-4.198631) | 0.125991 / 6.500664 (-6.374673) | 0.063566 / 0.075469 (-0.011903) |\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.364771 / 1.841788 (-0.477017) | 18.000713 / 8.074308 (9.926404) | 14.840330 / 10.191392 (4.648937) | 0.144770 / 0.680424 (-0.535653) | 0.018060 / 0.534201 (-0.516141) | 0.334470 / 0.579283 (-0.244813) | 0.387386 / 0.434364 (-0.046978) | 0.398743 / 0.540337 (-0.141595) | 0.555437 / 1.386936 (-0.831499) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#5b974c9af6b45b6ebdbbf4b3418f25506c1c0618 \"CML watermark\")\n",
"<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.006491 / 0.011353 (-0.004862) | 0.004058 / 0.011008 (-0.006950) | 0.084462 / 0.038508 (0.045954) | 0.072310 / 0.023109 (0.049201) | 0.352458 / 0.275898 (0.076560) | 0.385829 / 0.323480 (0.062350) | 0.003978 / 0.007986 (-0.004007) | 0.003455 / 0.004328 (-0.000873) | 0.064070 / 0.004250 (0.059819) | 0.055577 / 0.037052 (0.018525) | 0.361288 / 0.258489 (0.102799) | 0.400147 / 0.293841 (0.106306) | 0.030785 / 0.128546 (-0.097761) | 0.008676 / 0.075646 (-0.066971) | 0.287481 / 0.419271 (-0.131791) | 0.052643 / 0.043533 (0.009110) | 0.354670 / 0.255139 (0.099531) | 0.382322 / 0.283200 (0.099122) | 0.025657 / 0.141683 (-0.116026) | 1.486798 / 1.452155 (0.034643) | 1.588439 / 1.492716 (0.095723) |\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.240881 / 0.018006 (0.222875) | 0.463997 / 0.000490 (0.463507) | 0.009688 / 0.000200 (0.009488) | 0.000601 / 0.000054 (0.000546) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.029071 / 0.037411 (-0.008340) | 0.083077 / 0.014526 (0.068551) | 0.119857 / 0.176557 (-0.056699) | 0.153387 / 0.737135 (-0.583749) | 0.132162 / 0.296338 (-0.164177) |\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.383822 / 0.215209 (0.168613) | 3.828572 / 2.077655 (1.750918) | 1.877629 / 1.504120 (0.373509) | 1.708757 / 1.541195 (0.167562) | 1.771658 / 1.468490 (0.303168) | 0.482439 / 4.584777 (-4.102338) | 3.496247 / 3.745712 (-0.249466) | 3.282055 / 5.269862 (-1.987807) | 2.053069 / 4.565676 (-2.512607) | 0.056626 / 0.424275 (-0.367649) | 0.007338 / 0.007607 (-0.000269) | 0.461257 / 0.226044 (0.235213) | 4.605326 / 2.268929 (2.336397) | 2.408365 / 55.444624 (-53.036260) | 1.986550 / 6.876477 (-4.889926) | 2.225220 / 2.142072 (0.083148) | 0.601301 / 4.805227 (-4.203927) | 0.132217 / 6.500664 (-6.368447) | 0.061217 / 0.075469 (-0.014252) |\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.268706 / 1.841788 (-0.573081) | 18.892026 / 8.074308 (10.817717) | 14.093892 / 10.191392 (3.902500) | 0.162483 / 0.680424 (-0.517941) | 0.018372 / 0.534201 (-0.515829) | 0.391901 / 0.579283 (-0.187382) | 0.401578 / 0.434364 (-0.032786) | 0.456741 / 0.540337 (-0.083596) | 0.646760 / 1.386936 (-0.740176) |\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.006657 / 0.011353 (-0.004696) | 0.003981 / 0.011008 (-0.007027) | 0.066126 / 0.038508 (0.027617) | 0.072673 / 0.023109 (0.049564) | 0.409970 / 0.275898 (0.134072) | 0.430797 / 0.323480 (0.107317) | 0.005477 / 0.007986 (-0.002508) | 0.003362 / 0.004328 (-0.000966) | 0.065532 / 0.004250 (0.061282) | 0.056018 / 0.037052 (0.018966) | 0.406676 / 0.258489 (0.148187) | 0.438516 / 0.293841 (0.144675) | 0.032795 / 0.128546 (-0.095751) | 0.008580 / 0.075646 (-0.067066) | 0.072692 / 0.419271 (-0.346579) | 0.048110 / 0.043533 (0.004577) | 0.396826 / 0.255139 (0.141687) | 0.418442 / 0.283200 (0.135242) | 0.023269 / 0.141683 (-0.118414) | 1.499438 / 1.452155 (0.047283) | 1.568842 / 1.492716 (0.076126) |\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.218729 / 0.018006 (0.200723) | 0.450771 / 0.000490 (0.450281) | 0.004996 / 0.000200 (0.004796) | 0.000086 / 0.000054 (0.000031) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.031484 / 0.037411 (-0.005928) | 0.092927 / 0.014526 (0.078401) | 0.107849 / 0.176557 (-0.068707) | 0.156658 / 0.737135 (-0.580478) | 0.106373 / 0.296338 (-0.189965) |\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.434658 / 0.215209 (0.219449) | 4.336386 / 2.077655 (2.258731) | 2.322577 / 1.504120 (0.818457) | 2.149505 / 1.541195 (0.608310) | 2.201967 / 1.468490 (0.733476) | 0.496994 / 4.584777 (-4.087783) | 3.533065 / 3.745712 (-0.212647) | 3.235750 / 5.269862 (-2.034112) | 2.034854 / 4.565676 (-2.530823) | 0.058258 / 0.424275 (-0.366017) | 0.007260 / 0.007607 (-0.000347) | 0.509115 / 0.226044 (0.283071) | 5.088427 / 2.268929 (2.819499) | 2.793551 / 55.444624 (-52.651073) | 2.430588 / 6.876477 (-4.445889) | 2.625998 / 2.142072 (0.483926) | 0.611676 / 4.805227 (-4.193552) | 0.133343 / 6.500664 (-6.367321) | 0.059888 / 0.075469 (-0.015581) |\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.377292 / 1.841788 (-0.464496) | 19.214299 / 8.074308 (11.139991) | 14.629146 / 10.191392 (4.437754) | 0.171283 / 0.680424 (-0.509141) | 0.020348 / 0.534201 (-0.513853) | 0.397823 / 0.579283 (-0.181461) | 0.411590 / 0.434364 (-0.022774) | 0.470850 / 0.540337 (-0.069487) | 0.658667 / 1.386936 (-0.728269) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#a1e1867e932f14233244fb25713f3c94c46ff50a \"CML watermark\")\n"
] | "2023-09-21T10:15:32" | "2023-09-21T14:16:44" | "2023-09-21T14:08:00" | MEMBER | null | Fix https://github.com/huggingface/datasets-server/issues/1812
this was causing this issue:
```ipython
In [1]: from datasets import *
In [2]: inspect.get_dataset_config_names("aakanksha/udpos")
Out[2]: ['default']
In [3]: load_dataset_builder("aakanksha/udpos").config.name
Out[3]: 'en'
``` | {
"url": "https://api.github.com/repos/huggingface/datasets/issues/6253/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/6253/timeline | null | null | false | {
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6253",
"html_url": "https://github.com/huggingface/datasets/pull/6253",
"diff_url": "https://github.com/huggingface/datasets/pull/6253.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/6253.patch",
"merged_at": "2023-09-21T14:08:00"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6252 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6252/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6252/comments | https://api.github.com/repos/huggingface/datasets/issues/6252/events | https://github.com/huggingface/datasets/issues/6252 | 1,906,375,378 | I_kwDODunzps5xoPrS | 6,252 | exif_transpose not done to Image (PIL problem) | {
"login": "rhajou",
"id": 108274349,
"node_id": "U_kgDOBnQirQ",
"avatar_url": "https://avatars.githubusercontent.com/u/108274349?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rhajou",
"html_url": "https://github.com/rhajou",
"followers_url": "https://api.github.com/users/rhajou/followers",
"following_url": "https://api.github.com/users/rhajou/following{/other_user}",
"gists_url": "https://api.github.com/users/rhajou/gists{/gist_id}",
"starred_url": "https://api.github.com/users/rhajou/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhajou/subscriptions",
"organizations_url": "https://api.github.com/users/rhajou/orgs",
"repos_url": "https://api.github.com/users/rhajou/repos",
"events_url": "https://api.github.com/users/rhajou/events{/privacy}",
"received_events_url": "https://api.github.com/users/rhajou/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 | [] | {
"url": "https://api.github.com/repos/huggingface/datasets/milestones/10",
"html_url": "https://github.com/huggingface/datasets/milestone/10",
"labels_url": "https://api.github.com/repos/huggingface/datasets/milestones/10/labels",
"id": 9038583,
"node_id": "MI_kwDODunzps4Aier3",
"number": 10,
"title": "3.0",
"description": "Next major release",
"creator": {
"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
},
"open_issues": 4,
"closed_issues": 0,
"state": "open",
"created_at": "2023-02-13T16:22:42",
"updated_at": "2023-09-22T14:07:52",
"due_on": null,
"closed_at": null
} | [
"Indeed, it makes sense to do this by default. \r\n\r\nIn the meantime, you can use `.with_transform` to transpose the images when accessing them:\r\n\r\n```python\r\nimport PIL.ImageOps\r\n\r\ndef exif_transpose_transform(batch):\r\n batch[\"image\"] = [PIL.ImageOps.exif_transpose(image) for image in batch[\"image\"]]\r\n return batch\r\n\r\ndataset = dataset.with_transform(exif_transpose_transform)\r\n```",
"This operation sets some `Image` attributes to `None` (`.format`, `.filename`, etc.), causing our tests to fail, so I think we should wait for Datasets 3.0 to make this change. In version 3.0, storing image paths will be replaced by embedding image bytes, so there will be fewer instances where we use the `.filename` attribute."
] | "2023-09-21T08:11:46" | "2023-09-22T14:07:52" | null | NONE | null | ### Feature request
I noticed that some of my images loaded using PIL have some metadata related to exif that can rotate them when loading.
Since the dataset.features.Image uses PIL for loading, the loaded image may be rotated (width and height will be inverted) thus for tasks as object detection and layoutLM this can create some inconsistencies (between input bboxes and input images).
For now there is no option in datasets.features.Image to specify that. We need to do the following when preparing examples (when preparing images for training, test or inference):
```
from PIL import Image, ImageOps
pil = ImageOps.exif_transpose(pil)
```
reference: https://stackoverflow.com/a/63950647/5720150
Is it possible to add this by default to the datasets.feature.Image ? or to add the option to do the ImageOps.exif_transpose?
Thank you
### Motivation
Prevent having inverted data related to exif metadata that may affect object detection tasks
### Your contribution
Changing in datasets.featrues.Image I can help with that. | {
"url": "https://api.github.com/repos/huggingface/datasets/issues/6252/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/6252/timeline | null | null | null | null | false |
https://api.github.com/repos/huggingface/datasets/issues/6251 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6251/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6251/comments | https://api.github.com/repos/huggingface/datasets/issues/6251/events | https://github.com/huggingface/datasets/pull/6251 | 1,904,418,426 | PR_kwDODunzps5awQsy | 6,251 | Support streaming datasets with pyarrow.parquet.read_table | {
"login": "albertvillanova",
"id": 8515462,
"node_id": "MDQ6VXNlcjg1MTU0NjI=",
"avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/albertvillanova",
"html_url": "https://github.com/albertvillanova",
"followers_url": "https://api.github.com/users/albertvillanova/followers",
"following_url": "https://api.github.com/users/albertvillanova/following{/other_user}",
"gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}",
"starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions",
"organizations_url": "https://api.github.com/users/albertvillanova/orgs",
"repos_url": "https://api.github.com/users/albertvillanova/repos",
"events_url": "https://api.github.com/users/albertvillanova/events{/privacy}",
"received_events_url": "https://api.github.com/users/albertvillanova/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | null | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6251). All of your documentation changes will be reflected on that endpoint.",
"This function reads an entire Arrow table in one go, which is not ideal memory-wise, so I don't think we should encourage using this function, considering we want to keep RAM usage as low as possible in the streaming mode. \r\n\r\n(Note that Parquet files are compressed, meaning the loaded table can be significantly larger than the size in Parquet.)\r\n\r\nInstead, we should suggest the authors to use:\r\n```python\r\nwith open(doc_path, \"rb\") as f:\r\n parquet_file = pq.ParquetFile(f)\r\n for batch in parquet_file.iter_batches():\r\n pa_table = pa.Table.from_batches([batch])\r\n yield idx, pa_table\r\n idx += 1\r\n```",
"@mariosasko I think the potential problem you evoke is independent of whether or not we support streaming mode:\r\n- if the user's script with `read_table` works in non-streaming mode, it will also work in streaming mode after this PR\r\n\r\nIn fact, what we should suggest instead is to follow the scriptless approach, so that our `parquet` packaged module is used, with all the optimizations implemented. But this approach is not possible in all cases, and some use cases need to implement a script. And if they have small Parquet files and use `read_table`, I think we should support streaming.\r\n\r\nIn summary, let me clarify the goal and the scope of this PR:\r\n- a user needs using a loading script\r\n- their files are small enough so that they use `read_table`\r\n- their loading script works in non-streaming mode\r\n- therefore, this PR allows loading their dataset in streaming mode as well",
"Yes, the no-script approach with metadata configs makes the most sense.\r\n\r\n> their files are small enough so that they use read_table\r\n\r\nSome of the Parquet files in that repo are larger than 1 GB ...\r\n\r\nAlso, I'd wait for more instances of people using the `read_table` function on the Hub before merging this PR.",
"@mariosasko, yes, this solution is not specifically for the \"uonlp/CulturaX\" dataset, but for other use cases as I explained above: indeed, they finally removed the use of `read_table` because their data files are too large.\r\n\r\n> Also, I'd wait for more instances of people using the `read_table` function on the Hub before merging this PR.\r\n\r\nDo you know how many datasets are currently using `read_table`?",
"> Do you know how many datasets are currently using read_table?\r\n\r\nZero (based on the script that checks the script contents of the public Hub datasets). ",
"I see... Thanks! :hugs: ",
"@mariosasko thanks for pointing the script! :hugs: \r\n\r\nHowever, I have found some Hub datasets that are using `read_table`, e.g.:\r\n- https://huggingface.co/datasets/jglaser/protein_ligand_contacts\r\n- https://huggingface.co/datasets/AresEkb/prof_standards_sbert_large_mt_nlu_ru\r\n- https://huggingface.co/datasets/victorcosta/pt_legislation\r\n- https://huggingface.co/datasets/jglaser/binding_affinity\r\n- https://huggingface.co/datasets/jglaser/pdbbind_complexes\r\n- https://huggingface.co/datasets/victorcosta/ria_pt__proems_format"
] | "2023-09-20T08:07:02" | "2023-09-22T15:35:31" | null | MEMBER | null | Support streaming datasets with `pyarrow.parquet.read_table`.
See: https://huggingface.co/datasets/uonlp/CulturaX/discussions/2
CC: @AndreaFrancis | {
"url": "https://api.github.com/repos/huggingface/datasets/issues/6251/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/6251/timeline | null | null | false | {
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6251",
"html_url": "https://github.com/huggingface/datasets/pull/6251",
"diff_url": "https://github.com/huggingface/datasets/pull/6251.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/6251.patch",
"merged_at": null
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6247 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6247/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6247/comments | https://api.github.com/repos/huggingface/datasets/issues/6247/events | https://github.com/huggingface/datasets/pull/6247 | 1,901,390,945 | PR_kwDODunzps5amAQ1 | 6,247 | Update create_dataset.mdx | {
"login": "EswarDivi",
"id": 76403422,
"node_id": "MDQ6VXNlcjc2NDAzNDIy",
"avatar_url": "https://avatars.githubusercontent.com/u/76403422?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/EswarDivi",
"html_url": "https://github.com/EswarDivi",
"followers_url": "https://api.github.com/users/EswarDivi/followers",
"following_url": "https://api.github.com/users/EswarDivi/following{/other_user}",
"gists_url": "https://api.github.com/users/EswarDivi/gists{/gist_id}",
"starred_url": "https://api.github.com/users/EswarDivi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/EswarDivi/subscriptions",
"organizations_url": "https://api.github.com/users/EswarDivi/orgs",
"repos_url": "https://api.github.com/users/EswarDivi/repos",
"events_url": "https://api.github.com/users/EswarDivi/events{/privacy}",
"received_events_url": "https://api.github.com/users/EswarDivi/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | null | [
"_The documentation is not available anymore as the PR was closed or merged._",
"<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.008892 / 0.011353 (-0.002461) | 0.005140 / 0.011008 (-0.005868) | 0.110951 / 0.038508 (0.072442) | 0.086159 / 0.023109 (0.063050) | 0.391117 / 0.275898 (0.115218) | 0.440884 / 0.323480 (0.117404) | 0.006562 / 0.007986 (-0.001423) | 0.003711 / 0.004328 (-0.000618) | 0.081848 / 0.004250 (0.077598) | 0.063187 / 0.037052 (0.026135) | 0.369771 / 0.258489 (0.111282) | 0.447685 / 0.293841 (0.153844) | 0.046623 / 0.128546 (-0.081923) | 0.014024 / 0.075646 (-0.061622) | 0.418556 / 0.419271 (-0.000715) | 0.064660 / 0.043533 (0.021127) | 0.379416 / 0.255139 (0.124277) | 0.415800 / 0.283200 (0.132600) | 0.036899 / 0.141683 (-0.104784) | 1.710280 / 1.452155 (0.258125) | 1.932326 / 1.492716 (0.439610) |\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.311351 / 0.018006 (0.293345) | 0.621121 / 0.000490 (0.620631) | 0.013677 / 0.000200 (0.013477) | 0.000543 / 0.000054 (0.000488) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.031310 / 0.037411 (-0.006102) | 0.099546 / 0.014526 (0.085020) | 0.122100 / 0.176557 (-0.054457) | 0.186477 / 0.737135 (-0.550659) | 0.116634 / 0.296338 (-0.179704) |\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.574639 / 0.215209 (0.359430) | 5.976678 / 2.077655 (3.899023) | 2.535482 / 1.504120 (1.031362) | 2.248873 / 1.541195 (0.707678) | 2.361696 / 1.468490 (0.893205) | 0.866700 / 4.584777 (-3.718077) | 5.298018 / 3.745712 (1.552306) | 4.753240 / 5.269862 (-0.516622) | 3.124698 / 4.565676 (-1.440979) | 0.101852 / 0.424275 (-0.322423) | 0.009117 / 0.007607 (0.001510) | 0.723730 / 0.226044 (0.497685) | 7.172649 / 2.268929 (4.903720) | 3.400410 / 55.444624 (-52.044214) | 2.626619 / 6.876477 (-4.249857) | 2.948692 / 2.142072 (0.806620) | 0.991589 / 4.805227 (-3.813638) | 0.208902 / 6.500664 (-6.291762) | 0.076172 / 0.075469 (0.000703) |\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.621880 / 1.841788 (-0.219907) | 22.735673 / 8.074308 (14.661365) | 20.376990 / 10.191392 (10.185598) | 0.232219 / 0.680424 (-0.448204) | 0.028616 / 0.534201 (-0.505585) | 0.455725 / 0.579283 (-0.123558) | 0.562796 / 0.434364 (0.128432) | 0.545344 / 0.540337 (0.005007) | 0.759440 / 1.386936 (-0.627496) |\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.009845 / 0.011353 (-0.001508) | 0.005289 / 0.011008 (-0.005719) | 0.083117 / 0.038508 (0.044609) | 0.098467 / 0.023109 (0.075357) | 0.532345 / 0.275898 (0.256447) | 0.571000 / 0.323480 (0.247520) | 0.007223 / 0.007986 (-0.000763) | 0.004442 / 0.004328 (0.000114) | 0.081710 / 0.004250 (0.077459) | 0.071132 / 0.037052 (0.034080) | 0.540093 / 0.258489 (0.281604) | 0.582244 / 0.293841 (0.288403) | 0.048509 / 0.128546 (-0.080038) | 0.013897 / 0.075646 (-0.061749) | 0.092579 / 0.419271 (-0.326692) | 0.073409 / 0.043533 (0.029876) | 0.537369 / 0.255139 (0.282230) | 0.551403 / 0.283200 (0.268203) | 0.038847 / 0.141683 (-0.102835) | 1.940848 / 1.452155 (0.488693) | 2.045597 / 1.492716 (0.552881) |\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.303883 / 0.018006 (0.285877) | 0.600237 / 0.000490 (0.599748) | 0.006030 / 0.000200 (0.005830) | 0.000124 / 0.000054 (0.000070) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.036633 / 0.037411 (-0.000778) | 0.105853 / 0.014526 (0.091327) | 0.126289 / 0.176557 (-0.050267) | 0.190022 / 0.737135 (-0.547113) | 0.123251 / 0.296338 (-0.173087) |\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.711893 / 0.215209 (0.496684) | 6.979781 / 2.077655 (4.902126) | 3.491514 / 1.504120 (1.987394) | 3.268077 / 1.541195 (1.726882) | 3.241777 / 1.468490 (1.773287) | 0.875913 / 4.584777 (-3.708864) | 5.458421 / 3.745712 (1.712709) | 4.818355 / 5.269862 (-0.451507) | 3.256046 / 4.565676 (-1.309631) | 0.095000 / 0.424275 (-0.329275) | 0.009072 / 0.007607 (0.001465) | 0.818468 / 0.226044 (0.592424) | 8.027702 / 2.268929 (5.758773) | 4.363234 / 55.444624 (-51.081390) | 3.695269 / 6.876477 (-3.181207) | 3.902601 / 2.142072 (1.760528) | 1.039007 / 4.805227 (-3.766220) | 0.212050 / 6.500664 (-6.288614) | 0.081438 / 0.075469 (0.005969) |\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.746945 / 1.841788 (-0.094842) | 25.274283 / 8.074308 (17.199975) | 23.514717 / 10.191392 (13.323325) | 0.232580 / 0.680424 (-0.447843) | 0.032083 / 0.534201 (-0.502118) | 0.482873 / 0.579283 (-0.096410) | 0.585730 / 0.434364 (0.151366) | 0.602066 / 0.540337 (0.061729) | 0.796391 / 1.386936 (-0.590546) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#0d7cb68fe37dbfd81e5f82e19d8f9847c337788d \"CML watermark\")\n"
] | "2023-09-18T17:06:29" | "2023-09-19T18:51:49" | "2023-09-19T18:40:10" | CONTRIBUTOR | null | modified , as AudioFolder and ImageFolder not in Dataset Library.
``` from datasets import AudioFolder ``` and ```from datasets import ImageFolder``` to ```from datasets import load_dataset```
```
cannot import name 'AudioFolder' from 'datasets' (/home/eswardivi/miniconda3/envs/Hugformers/lib/python3.10/site-packages/datasets/__init__.py)
``` | {
"url": "https://api.github.com/repos/huggingface/datasets/issues/6247/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/6247/timeline | null | null | false | {
"url": "https://api.github.com/repos/huggingface/datasets/pulls/6247",
"html_url": "https://github.com/huggingface/datasets/pull/6247",
"diff_url": "https://github.com/huggingface/datasets/pull/6247.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/6247.patch",
"merged_at": "2023-09-19T18:40:10"
} | true |
https://api.github.com/repos/huggingface/datasets/issues/6246 | https://api.github.com/repos/huggingface/datasets | https://api.github.com/repos/huggingface/datasets/issues/6246/labels{/name} | https://api.github.com/repos/huggingface/datasets/issues/6246/comments | https://api.github.com/repos/huggingface/datasets/issues/6246/events | https://github.com/huggingface/datasets/issues/6246 | 1,899,848,414 | I_kwDODunzps5xPWLe | 6,246 | Add new column to dataset | {
"login": "andysingal",
"id": 20493493,
"node_id": "MDQ6VXNlcjIwNDkzNDkz",
"avatar_url": "https://avatars.githubusercontent.com/u/20493493?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/andysingal",
"html_url": "https://github.com/andysingal",
"followers_url": "https://api.github.com/users/andysingal/followers",
"following_url": "https://api.github.com/users/andysingal/following{/other_user}",
"gists_url": "https://api.github.com/users/andysingal/gists{/gist_id}",
"starred_url": "https://api.github.com/users/andysingal/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/andysingal/subscriptions",
"organizations_url": "https://api.github.com/users/andysingal/orgs",
"repos_url": "https://api.github.com/users/andysingal/repos",
"events_url": "https://api.github.com/users/andysingal/events{/privacy}",
"received_events_url": "https://api.github.com/users/andysingal/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | null | [
"I think it's an issue with the code.\r\n\r\nSpecifically:\r\n```python\r\ndataset = dataset['train'].add_column(\"/workspace/data\", new_column)\r\n```\r\n\r\nNow `dataset` is the train set with a new column. \r\nTo fix this, you can do:\r\n\r\n```python\r\ndataset['train'] = dataset['train'].add_column(\"/workspace/data\", new_column)\r\n```",
"> I think it's an issue with the code.\r\n> \r\n> Specifically:\r\n> \r\n> ```python\r\n> dataset = dataset['train'].add_column(\"/workspace/data\", new_column)\r\n> ```\r\n> \r\n> Now `dataset` is the train set with a new column. To fix this, you can do:\r\n> \r\n> ```python\r\n> dataset['train'] = dataset['train'].add_column(\"/workspace/data\", new_column)\r\n> ```\r\n\r\nThanks for your response, but i can not access mask images, please let me know why the problem still persists. Here is the notebook for reference: https://colab.research.google.com/drive/10lZ_zLtU4itYVmIVTvIEVbjfOtCZaAZy?usp=sharing ",
"I think there is a slight misunderstanding.\r\n```python\r\nnew_column = [\"mask\"] * len(dataset[\"train\"])\r\ndataset['train'] = dataset['train'].add_column(\"/workspace/data\", new_column)\r\n```\r\n\r\nadds a column with the string `mask` to your dataset.\r\nIf you're trying to load the images `\"mask_{idx}.png\"` in your dataset, you could try:\r\n\r\n```\r\nfrom datasets import Image\r\n\r\ndataset['train'] = dataset['train'].map(lambda u, idx: {'mask': f\"/workspace/data/mask_{idx}.png\", with_indices=True).cast_column(\"mask\", Image())\r\n```\r\n\r\nWhat this does is that it adds a column to your dataset name `mask` with the path to the mask, then it cast the column as an `Image` feature.\r\n\r\nThis [link](https://huggingface.co/docs/datasets/v2.5.1/en/image_load) explains how to load images.\r\n\r\nHope this helps!",
"> I think there is a slight misunderstanding.\r\n> \r\n> ```python\r\n> new_column = [\"mask\"] * len(dataset[\"train\"])\r\n> dataset['train'] = dataset['train'].add_column(\"/workspace/data\", new_column)\r\n> ```\r\n> \r\n> adds a column with the string `mask` to your dataset. If you're trying to load the images `\"mask_{idx}.png\"` in your dataset, you could try:\r\n> \r\n> ```\r\n> from datasets import Image\r\n> \r\n> dataset['train'] = dataset['train'].map(lambda u, idx: {'mask': f\"/workspace/data/mask_{idx}.png\", with_indices=True).cast_column(\"mask\", Image())\r\n> ```\r\n> \r\n> What this does is that it adds a column to your dataset name `mask` with the path to the mask, then it cast the column as an `Image` feature.\r\n> \r\n> This [link](https://huggingface.co/docs/datasets/v2.5.1/en/image_load) explains how to load images.\r\n> \r\n> Hope this helps!\r\n\r\nThank you very much, this is really helpful...\r\ni made some changes for it to work:\r\n```\r\ndataset['train'] = dataset['train'].map(lambda u, idx: {'mask': f\"/content/data/mask_{idx}.png\"}, with_indices=True).cast_column(\"mask\", Image())\r\n```\r\nThanks Again @Dref360 "
] | "2023-09-17T16:59:48" | "2023-09-18T16:20:09" | "2023-09-18T16:20:09" | NONE | null | ### Describe the bug
```
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
[<ipython-input-9-bd197b36b6a0>](https://localhost:8080/#) in <cell line: 1>()
----> 1 dataset['train']['/workspace/data']
3 frames
[/usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py](https://localhost:8080/#) in _check_valid_column_key(key, columns)
518 def _check_valid_column_key(key: str, columns: List[str]) -> None:
519 if key not in columns:
--> 520 raise KeyError(f"Column {key} not in the dataset. Current columns in the dataset: {columns}")
521
522
KeyError: "Column train not in the dataset. Current columns in the dataset: ['image', '/workspace/data']"
```
### Steps to reproduce the bug
please find the notebook for reference: https://colab.research.google.com/drive/10lZ_zLtU4itYVmIVTvIEVbjfOtCZaAZy?usp=sharing
### Expected behavior
add column to the dataset
### Environment info
colab pro | {
"url": "https://api.github.com/repos/huggingface/datasets/issues/6246/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/6246/timeline | null | completed | null | null | false |
End of preview. Expand
in Dataset Viewer.
- Downloads last month
- 0