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.78B
2.32B
node_id
stringlengths
18
19
number
int64
6k
6.92k
title
stringlengths
3
280
user
dict
labels
listlengths
0
2
state
stringclasses
2 values
locked
bool
1 class
assignee
dict
assignees
listlengths
0
1
milestone
dict
comments
sequencelengths
0
30
created_at
unknown
updated_at
unknown
closed_at
unknown
author_association
stringclasses
4 values
active_lock_reason
null
body
stringlengths
3
19.4k
βŒ€
reactions
dict
timeline_url
stringlengths
70
70
performed_via_github_app
null
state_reason
stringclasses
3 values
draft
bool
2 classes
pull_request
dict
https://api.github.com/repos/huggingface/datasets/issues/6824
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6824/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6824/comments
https://api.github.com/repos/huggingface/datasets/issues/6824/events
https://github.com/huggingface/datasets/issues/6824
2,251,076,197
I_kwDODunzps6GLLJl
6,824
Winogrande does not seem to be compatible with datasets version of 1.18.0
{ "login": "spliew", "id": 7878204, "node_id": "MDQ6VXNlcjc4NzgyMDQ=", "avatar_url": "https://avatars.githubusercontent.com/u/7878204?v=4", "gravatar_id": "", "url": "https://api.github.com/users/spliew", "html_url": "https://github.com/spliew", "followers_url": "https://api.github.com/users/spliew/followers", "following_url": "https://api.github.com/users/spliew/following{/other_user}", "gists_url": "https://api.github.com/users/spliew/gists{/gist_id}", "starred_url": "https://api.github.com/users/spliew/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/spliew/subscriptions", "organizations_url": "https://api.github.com/users/spliew/orgs", "repos_url": "https://api.github.com/users/spliew/repos", "events_url": "https://api.github.com/users/spliew/events{/privacy}", "received_events_url": "https://api.github.com/users/spliew/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-04-18T16:11:04"
"2024-04-19T09:53:15"
"2024-04-19T09:52:33"
NONE
null
### Describe the bug I get the following error when simply running `load_dataset('winogrande','winogrande_xl')`. I do not have such an issue in the 1.17.0 version. ```Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "/usr/local/lib/python3.10/dist-packages/datasets/load.py", line 2265, in load_dataset_builder builder_instance: DatasetBuilder = builder_cls( File "/usr/local/lib/python3.10/dist-packages/datasets/builder.py", line 371, in __init__ self.config, self.config_id = self._create_builder_config( File "/usr/local/lib/python3.10/dist-packages/datasets/builder.py", line 620, in _create_builder_config builder_config._resolve_data_files( File "/usr/local/lib/python3.10/dist-packages/datasets/builder.py", line 211, in _resolve_data_files self.data_files = self.data_files.resolve(base_path, download_config) File "/usr/local/lib/python3.10/dist-packages/datasets/data_files.py", line 799, in resolve out[key] = data_files_patterns_list.resolve(base_path, download_config) File "/usr/local/lib/python3.10/dist-packages/datasets/data_files.py", line 752, in resolve resolve_pattern( File "/usr/local/lib/python3.10/dist-packages/datasets/data_files.py", line 393, in resolve_pattern raise FileNotFoundError(error_msg) FileNotFoundError: Unable to find 'hf://datasets/winogrande@ebf71e3c7b5880d019ecf6099c0b09311b1084f5/winogrande_xl/train/0000.parquet' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.parquet', '.geoparquet', '.gpq', '.arrow', '.txt', '.tar', '.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', '.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', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.zip']``` ### Steps to reproduce the bug from datasets import load_dataset datasets = load_dataset('winogrande','winogrande_xl') ### Expected behavior ```Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2.06M/2.06M [00:00<00:00, 5.16MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 118k/118k [00:00<00:00, 360kB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 85.9k/85.9k [00:00<00:00, 242kB/s] Generating train split: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 40398/40398 [00:00<00:00, 845491.12 examples/s] Generating test split: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1767/1767 [00:00<00:00, 362501.11 examples/s] Generating validation split: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1267/1267 [00:00<00:00, 318768.11 examples/s]``` ### Environment info datasets version: 1.18.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6824/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/6824/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6823
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6823/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6823/comments
https://api.github.com/repos/huggingface/datasets/issues/6823/events
https://github.com/huggingface/datasets/issues/6823
2,250,775,569
I_kwDODunzps6GKBwR
6,823
Loading problems of Datasets with a single shard
{ "login": "andjoer", "id": 60151338, "node_id": "MDQ6VXNlcjYwMTUxMzM4", "avatar_url": "https://avatars.githubusercontent.com/u/60151338?v=4", "gravatar_id": "", "url": "https://api.github.com/users/andjoer", "html_url": "https://github.com/andjoer", "followers_url": "https://api.github.com/users/andjoer/followers", "following_url": "https://api.github.com/users/andjoer/following{/other_user}", "gists_url": "https://api.github.com/users/andjoer/gists{/gist_id}", "starred_url": "https://api.github.com/users/andjoer/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/andjoer/subscriptions", "organizations_url": "https://api.github.com/users/andjoer/orgs", "repos_url": "https://api.github.com/users/andjoer/repos", "events_url": "https://api.github.com/users/andjoer/events{/privacy}", "received_events_url": "https://api.github.com/users/andjoer/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "I worked out that if you set padding=False then the text is padded out correctly with input_ids and attention_mask values of 0. This is the opposite setting of what I thought padding to mean but it works.\r\n\r\n'''\r\n\r\n >>input_ids: torch.Size([1, 50]), attention_mask: torch.Size([1, 50]) #pre flatten\r\n\r\n```" ]
"2024-04-18T13:59:00"
"2024-04-18T17:51:08"
null
NONE
null
### Describe the bug When saving a dataset on disk and it has a single shard it is not loaded as when it is saved in multiple shards. I installed the latest version of datasets via pip. ### Steps to reproduce the bug The code below reproduces the behavior. All works well when the range of the loop is 10000 but it fails when it is 1000. ``` from PIL import Image import numpy as np from datasets import Dataset, DatasetDict, load_dataset def load_image(): # Generate random noise image noise = np.random.randint(0, 256, (256, 256, 3), dtype=np.uint8) return Image.fromarray(noise) def create_dataset(): input_images = [] output_images = [] text_prompts = [] for _ in range(10000): # this is the problematic parameter input_images.append(load_image()) output_images.append(load_image()) text_prompts.append('test prompt') data = {'input_image': input_images, 'output_image': output_images, 'text_prompt': text_prompts} dataset = Dataset.from_dict(data) return DatasetDict({'train': dataset}) dataset = create_dataset() print('dataset before saving') print(dataset) print(dataset['train'].column_names) dataset.save_to_disk('test_ds') print('dataset after loading') dataset_loaded = load_dataset('test_ds') print(dataset_loaded) print(dataset_loaded['train'].column_names) ``` The output for 1000 iterations is: ``` dataset before saving DatasetDict({ train: Dataset({ features: ['input_image', 'output_image', 'text_prompt'], num_rows: 1000 }) }) ['input_image', 'output_image', 'text_prompt'] Saving the dataset (1/1 shards): 100%|β–ˆ| 1000/1000 [00:00<00:00, 5156.00 example dataset after loading Generating train split: 1 examples [00:00, 230.52 examples/s] DatasetDict({ train: Dataset({ features: ['_data_files', '_fingerprint', '_format_columns', '_format_kwargs', '_format_type', '_output_all_columns', '_split'], num_rows: 1 }) }) ['_data_files', '_fingerprint', '_format_columns', '_format_kwargs', '_format_type', '_output_all_columns', '_split'] ``` For 10000 iteration (8 shards) it is correct: ``` dataset before saving DatasetDict({ train: Dataset({ features: ['input_image', 'output_image', 'text_prompt'], num_rows: 10000 }) }) ['input_image', 'output_image', 'text_prompt'] Saving the dataset (8/8 shards): 100%|β–ˆ| 10000/10000 [00:01<00:00, 6237.68 examp dataset after loading Generating train split: 10000 examples [00:00, 10773.16 examples/s] DatasetDict({ train: Dataset({ features: ['input_image', 'output_image', 'text_prompt'], num_rows: 10000 }) }) ['input_image', 'output_image', 'text_prompt'] ``` ### Expected behavior The procedure should work for a dataset with one shrad the same as for one with multiple shards ### Environment info - `datasets` version: 2.18.0 - Platform: macOS-14.1-arm64-arm-64bit - Python version: 3.11.8 - `huggingface_hub` version: 0.22.2 - PyArrow version: 15.0.2 - Pandas version: 2.2.2 - `fsspec` version: 2024.2.0 Edit: I looked in the source code of load.py in datasets. I should have used "load_from_disk" and it indeed works that way. But ideally load_dataset would have raisen an error the same way as if I call a path: ``` if Path(path, config.DATASET_STATE_JSON_FILENAME).exists(): raise ValueError( "You are trying to load a dataset that was saved using `save_to_disk`. " "Please use `load_from_disk` instead." ) ``` nevertheless I find it interesting that it works just well and without a warning if there are multiple shards.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6823/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/6823/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6822
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6822/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6822/comments
https://api.github.com/repos/huggingface/datasets/issues/6822/events
https://github.com/huggingface/datasets/pull/6822
2,250,316,258
PR_kwDODunzps5tB8aD
6,822
Fix parquet export infos
{ "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
[]
"2024-04-18T10:21:41"
"2024-04-18T11:15:41"
"2024-04-18T11:09:13"
MEMBER
null
Don't use the parquet export infos when USE_PARQUET_EXPORT is False. Otherwise the `datasets-server` might reuse erroneous data when re-running a job this follows https://github.com/huggingface/datasets/pull/6714
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6822/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/6822/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6822", "html_url": "https://github.com/huggingface/datasets/pull/6822", "diff_url": "https://github.com/huggingface/datasets/pull/6822.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6822.patch", "merged_at": "2024-04-18T11:09:13" }
https://api.github.com/repos/huggingface/datasets/issues/6820
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6820/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6820/comments
https://api.github.com/repos/huggingface/datasets/issues/6820/events
https://github.com/huggingface/datasets/pull/6820
2,248,471,673
PR_kwDODunzps5s7sgy
6,820
Allow deleting a subset/config from a no-script dataset
{ "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 }
[]
closed
false
null
[]
null
[ "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-04-17T14:41:12"
"2024-05-02T07:31:03"
"2024-04-30T09:44:24"
MEMBER
null
TODO: - [x] Add docs - [x] Delete token arg from CLI example - See: #6839 Close #6810.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6820/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/6820/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6820", "html_url": "https://github.com/huggingface/datasets/pull/6820", "diff_url": "https://github.com/huggingface/datasets/pull/6820.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6820.patch", "merged_at": "2024-04-30T09:44:24" }
https://api.github.com/repos/huggingface/datasets/issues/6819
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6819/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6819/comments
https://api.github.com/repos/huggingface/datasets/issues/6819/events
https://github.com/huggingface/datasets/issues/6819
2,248,043,797
I_kwDODunzps6F_m0V
6,819
Give more details in `DataFilesNotFoundError` when getting the config names
{ "login": "severo", "id": 1676121, "node_id": "MDQ6VXNlcjE2NzYxMjE=", "avatar_url": "https://avatars.githubusercontent.com/u/1676121?v=4", "gravatar_id": "", "url": "https://api.github.com/users/severo", "html_url": "https://github.com/severo", "followers_url": "https://api.github.com/users/severo/followers", "following_url": "https://api.github.com/users/severo/following{/other_user}", "gists_url": "https://api.github.com/users/severo/gists{/gist_id}", "starred_url": "https://api.github.com/users/severo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/severo/subscriptions", "organizations_url": "https://api.github.com/users/severo/orgs", "repos_url": "https://api.github.com/users/severo/repos", "events_url": "https://api.github.com/users/severo/events{/privacy}", "received_events_url": "https://api.github.com/users/severo/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
[ "The issue was with the file structur: using the downloaded glue data in the filesystem.", "@aalok-sathe - Could you please explain how you resolved it ?. I am having the same problem with XLNET for glue(STS-B)", "I had the data placed in the wrong location, and I was giving the incorrect path." ]
"2024-04-17T11:19:47"
"2024-04-17T11:19:47"
null
CONTRIBUTOR
null
### Feature request After https://huggingface.co/datasets/cis-lmu/Glot500/commit/39060e01272ff228cc0ce1d31ae53789cacae8c3, the dataset viewer gives the following error: ``` { "error": "Cannot get the config names for the dataset.", "cause_exception": "DataFilesNotFoundError", "cause_message": "No (supported) data files found in cis-lmu/Glot500", "cause_traceback": [ "Traceback (most recent call last):\n", " File \"/src/services/worker/src/worker/job_runners/dataset/config_names.py\", line 73, in compute_config_names_response\n config_names = get_dataset_config_names(\n", " File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py\", line 347, in get_dataset_config_names\n dataset_module = dataset_module_factory(\n", " File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\", line 1873, in dataset_module_factory\n raise e1 from None\n", " File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\", line 1854, in dataset_module_factory\n return HubDatasetModuleFactoryWithoutScript(\n", " File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\", line 1245, in get_module\n module_name, default_builder_kwargs = infer_module_for_data_files(\n", " File \"/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py\", line 595, in infer_module_for_data_files\n raise DataFilesNotFoundError(\"No (supported) data files found\" + (f\" in {path}\" if path else \"\"))\n", "datasets.exceptions.DataFilesNotFoundError: No (supported) data files found in cis-lmu/Glot500\n" ] } ``` because the deleted files were still listed in the README, see https://huggingface.co/datasets/cis-lmu/Glot500/discussions/4 Ideally, the error message would include the name of the first configuration with missing files, to help the user understand how to fix it. Here, it would tell that configuration `aze_Ethi` has no supported data files, instead of telling that the `cis-lmu/Glot500` *dataset* has no supported data files (which is not true). ### Motivation Giving more detail in the error would help the Datasets Hub users to debug why the dataset viewer does not work. ### Your contribution Not sure how to best fix this, as there are a lot of loops on the dataset configs in the traceback methods. "maybe" it would be easier to handle if the code was completely isolating each config.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6819/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/6819/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6817
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6817/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6817/comments
https://api.github.com/repos/huggingface/datasets/issues/6817/events
https://github.com/huggingface/datasets/pull/6817
2,246,578,480
PR_kwDODunzps5s1RAN
6,817
Support indexable objects in `Dataset.__getitem__`
{ "login": "mariosasko", "id": 47462742, "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mariosasko", "html_url": "https://github.com/mariosasko", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "repos_url": "https://api.github.com/users/mariosasko/repos", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "@patrickvonplaten , @jplu any insights into what could be the problem?", "You should create your model into a strategy.", "> You should create your model into a strategy.\r\n\r\nAs in tf distributed strategies? but i am using a single gpu at the moment. ", "This one https://www.tensorflow.org/api_docs/python/tf/distribute/OneDeviceStrategy", "Device placement strategy works and the error is no longer there. i should point out this is not the usual way to train a model in TF. We normally do not need to place the model explicitly on a device while creating a model. ", "Is this method correct?\r\n```\r\nwith mirrored_strategy.scope():\r\n ...\r\n model.compile(...)\r\nmodel.fit(...)\r\n```\r\nThis still gives me the same error on GPT2LMHeadModel.", "@ksjae Please open a new issue with more detail of your issue." ]
"2024-04-16T17:41:27"
"2024-04-16T18:27:44"
"2024-04-16T18:17:29"
COLLABORATOR
null
As discussed in https://github.com/huggingface/datasets/pull/6816, this is needed to support objects that implement `__index__` such as `np.int64` in `Dataset.__getitem__`.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6817/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/6817/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6817", "html_url": "https://github.com/huggingface/datasets/pull/6817", "diff_url": "https://github.com/huggingface/datasets/pull/6817.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6817.patch", "merged_at": "2024-04-16T18:17:29" }
https://api.github.com/repos/huggingface/datasets/issues/6816
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6816/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6816/comments
https://api.github.com/repos/huggingface/datasets/issues/6816/events
https://github.com/huggingface/datasets/pull/6816
2,246,264,911
PR_kwDODunzps5s0MYO
6,816
Improve typing of Dataset.search, matching definition
{ "login": "Dref360", "id": 8976546, "node_id": "MDQ6VXNlcjg5NzY1NDY=", "avatar_url": "https://avatars.githubusercontent.com/u/8976546?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Dref360", "html_url": "https://github.com/Dref360", "followers_url": "https://api.github.com/users/Dref360/followers", "following_url": "https://api.github.com/users/Dref360/following{/other_user}", "gists_url": "https://api.github.com/users/Dref360/gists{/gist_id}", "starred_url": "https://api.github.com/users/Dref360/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Dref360/subscriptions", "organizations_url": "https://api.github.com/users/Dref360/orgs", "repos_url": "https://api.github.com/users/Dref360/repos", "events_url": "https://api.github.com/users/Dref360/events{/privacy}", "received_events_url": "https://api.github.com/users/Dref360/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6816?src=pr&el=h1) Report\n> Merging [#6816](https://codecov.io/gh/huggingface/transformers/pull/6816?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/367235ee52537ff7cada5e1c5c41cdd78731f092?el=desc) will **increase** coverage by `2.48%`.\n> The diff coverage is `67.85%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6816/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6816?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6816 +/- ##\n==========================================\n+ Coverage 76.27% 78.76% +2.48% \n==========================================\n Files 157 157 \n Lines 28795 28823 +28 \n==========================================\n+ Hits 21963 22701 +738 \n+ Misses 6832 6122 -710 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6816?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/testing\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6816/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90ZXN0aW5nX3V0aWxzLnB5) | `66.24% <67.85%> (+0.35%)` | :arrow_up: |\n| [src/transformers/configuration\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6816/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX29wZW5haS5weQ==) | `34.28% <0.00%> (-62.86%)` | :arrow_down: |\n| [src/transformers/tokenization\\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/6816/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYWxiZXJ0LnB5) | `28.84% <0.00%> (-58.66%)` | :arrow_down: |\n| [src/transformers/modeling\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6816/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19vcGVuYWkucHk=) | `23.87% <0.00%> (-57.10%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_distilbert.py](https://codecov.io/gh/huggingface/transformers/pull/6816/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9kaXN0aWxiZXJ0LnB5) | `64.47% <0.00%> (-34.36%)` | :arrow_down: |\n| [src/transformers/modeling\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6816/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190NS5weQ==) | `77.63% <0.00%> (-6.21%)` | :arrow_down: |\n| [src/transformers/tokenization\\_dpr.py](https://codecov.io/gh/huggingface/transformers/pull/6816/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fZHByLnB5) | `53.15% <0.00%> (-4.51%)` | :arrow_down: |\n| [src/transformers/configuration\\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/6816/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2JhcnQucHk=) | `90.00% <0.00%> (-4.00%)` | :arrow_down: |\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6816/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `83.95% <0.00%> (-1.51%)` | :arrow_down: |\n| [src/transformers/modeling\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6816/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `87.50% <0.00%> (-0.56%)` | :arrow_down: |\n| ... and [13 more](https://codecov.io/gh/huggingface/transformers/pull/6816/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6816?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6816?src=pr&el=footer). Last update [367235e...05ec0d0](https://codecov.io/gh/huggingface/transformers/pull/6816?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "[moved to the normal comment from the code review comment, as it might be removed]\r\n\r\n> What is the difference between this method and the previous set_verbosity?\r\n> I think we should select just one way to set the verbosity of the library.\r\n\r\n@thomwolf, I agree. Now that I added a test I can see that `set_verbosity` is an equivalent of `set_global_logging_level(prefices=[\"transformers\"])` (the proposed function).\r\n\r\nSo the main question then is this: do we want to provide a util that allows to do the setting not just for `transformers.`? or leave that to the user - sort of contrib library somewhere?\r\n\r\nThe main reason for setting a global log level not just for `transfromers`, but also for `torch`, `wandb`, etc. is to be able to quickly turn off the noise when it's interfering. And currently each of these external libraries `transformers` uses add their noise to the output. When debugging tests it's very helpful to control the noise-levels. So having a quick switch --logger-be-quiet saves a lot of time.\r\n\r\n\r\n", "I also added: \r\n- a logger setting integration test\r\n- a helper `CaptureLogger` ctx manager", "Could someone please explain why CI gets `logging.ERROR` as the default logging level, when it should be `logging.WARNING` https://github.com/stas00/transformers/blob/loglevels/src/transformers/utils/logging.py#L58 (I rebased this branch to catch that very recent change)\r\n\r\nWhen I run it on my machine, I get `logging.WARNING`. \r\n\r\nOn CI the failure is:\r\n\r\n```\r\n[gw4] linux -- Python 3.7.9 /usr/local/bin/python\r\n\r\nself = <tests.test_logging.HfArgumentParserTest testMethod=test_set_level>\r\n\r\n def test_set_level(self):\r\n logger = logging.get_logger()\r\n \r\n level_origin = logging.get_verbosity()\r\n> self.assertEqual(level_origin, logging.WARNING)\r\nE AssertionError: 40 != 30\r\n```\r\n(`logging.ERROR == 40`, `logging.WARNING == 30`)\r\n\r\n**edit**: found the culprit - it was another test not cleaning up after itself. fixed in this PR.", "Thank you all for your excellent feedback. I made changes and updated the first post to reflect the PR's current state of things.", "I'm not sure we really need to control the logging level of all libraries. Since the logging level was changed back to its initial level `WARNING`, do you feel like there are too much logs during tests?", "For Bart tests there is a repetitive warning, which I raised here: https://github.com/huggingface/transformers/issues/6652\r\n\r\nIf you run others, you will see a bunch still, e.g.:\r\n\r\n```RUN_SLOW=1 pytest -sv --disable-warnings tests/test_modeling_t5.py ```\r\n\r\n```\r\ntests/test_modeling_t5.py::T5ModelTest::test_generate_with_past_key_value_states You might want to consider setting `use_cache=True` to speed up decoding\r\nYou might want to consider setting `use_cache=True` to speed up decoding\r\nYou might want to consider setting `use_cache=True` to speed up decoding\r\nYou might want to consider setting `use_cache=True` to speed up decoding\r\n[...]\r\nDownloading: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 242M/242M [00:06<00:00, 40.1MB/s]\r\nSome weights of T5Model were not initialized from the model checkpoint at t5-small and are newly initialized: ['encoder.embed_tokens.weight', 'decoder.embed_tokens.weight']\r\nYou should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\r\nPASSED\r\n```\r\n\r\nAnd this is just one test.\r\n\r\nOf course, the other approach is to go and fix all those warnings, so that the tests that are fully under our control can be written according to the requirements the library sets and then warnings won't be there :) But see the next comment with a large dump of loggers that aren't `transformers`.\r\n\r\n----\r\n\r\nYet another alternative solution is instead of flag we add an env var, `LOG_LEVEL_GLOBAL`\r\n", "Here is some more samples of noise coming from outside `transformers` - a lot of it:\r\n\r\n```\r\ntests/test_modeling_tf_albert.py::TFAlbertModelTest::test_albert_model 2020-09-02 10:32:56.462871: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcuda.so.1\r\n2020-09-02 10:32:56.467570: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.469326: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties: \r\npciBusID: 0000:01:00.0 name: GeForce GTX TITAN X computeCapability: 5.2\r\ncoreClock: 1.2155GHz coreCount: 24 deviceMemorySize: 11.93GiB deviceMemoryBandwidth: 313.37GiB/s\r\n2020-09-02 10:32:56.469400: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.470032: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 1 with properties: \r\npciBusID: 0000:02:00.0 name: GeForce GTX TITAN X computeCapability: 5.2\r\ncoreClock: 1.2155GHz coreCount: 24 deviceMemorySize: 11.93GiB deviceMemoryBandwidth: 313.37GiB/s\r\n2020-09-02 10:32:56.470303: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1\r\n2020-09-02 10:32:56.470670: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10\r\n2020-09-02 10:32:56.470719: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcufft.so.10\r\n2020-09-02 10:32:56.470752: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcurand.so.10\r\n2020-09-02 10:32:56.495979: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusolver.so.10\r\n2020-09-02 10:32:56.496076: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusparse.so.10\r\n2020-09-02 10:32:56.594292: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7\r\n2020-09-02 10:32:56.594768: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.597007: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.599207: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.601306: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.603994: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0, 1\r\n2020-09-02 10:32:56.612943: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2 FMA\r\nTo enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\r\n2020-09-02 10:32:56.672605: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 3199980000 Hz\r\n2020-09-02 10:32:56.675701: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x556ed093a910 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\r\n2020-09-02 10:32:56.675767: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\r\n2020-09-02 10:32:56.678402: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.680525: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties: \r\npciBusID: 0000:01:00.0 name: GeForce GTX TITAN X computeCapability: 5.2\r\ncoreClock: 1.2155GHz coreCount: 24 deviceMemorySize: 11.93GiB deviceMemoryBandwidth: 313.37GiB/s\r\n2020-09-02 10:32:56.680889: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.683022: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 1 with properties: \r\npciBusID: 0000:02:00.0 name: GeForce GTX TITAN X computeCapability: 5.2\r\ncoreClock: 1.2155GHz coreCount: 24 deviceMemorySize: 11.93GiB deviceMemoryBandwidth: 313.37GiB/s\r\n2020-09-02 10:32:56.683197: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1\r\n2020-09-02 10:32:56.683257: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10\r\n2020-09-02 10:32:56.683304: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcufft.so.10\r\n2020-09-02 10:32:56.683346: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcurand.so.10\r\n2020-09-02 10:32:56.683504: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusolver.so.10\r\n2020-09-02 10:32:56.683566: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusparse.so.10\r\n2020-09-02 10:32:56.683693: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7\r\n2020-09-02 10:32:56.684014: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.686245: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.688465: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.690589: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.692497: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0, 1\r\n2020-09-02 10:32:56.692670: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix:\r\n2020-09-02 10:32:56.692706: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263] 0 1 \r\n2020-09-02 10:32:56.693071: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 0: N Y \r\n2020-09-02 10:32:56.693135: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 1: Y N \r\n2020-09-02 10:32:56.694784: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.696986: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.699094: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.701214: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.703406: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10865 MB memory) -> physical GPU (device: 0, name: GeForce GTX TITAN X, pci bus id: 0000:01:00.0, compute capability: 5.2)\r\n2020-09-02 10:32:56.706854: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.709029: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n2020-09-02 10:32:56.710969: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:1 with 10856 MB memory) -> physical GPU (device: 1, name: GeForce GTX TITAN X, pci bus id: 0000:02:00.0, compute capability: 5.2)\r\n2020-09-02 10:32:56.718970: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x556e0ea3c200 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\r\n2020-09-02 10:32:56.719031: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): GeForce GTX TITAN X, Compute Capability 5.2\r\n2020-09-02 10:32:56.719056: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (1): GeForce GTX TITAN X, Compute Capability 5.2\r\n2020-09-02 10:32:57.410269: W tensorflow/python/util/util.cc:348] Sets are not currently considered sequences, but this may change in the future, so consider avoiding using them.\r\nPASSED\r\n[...]\r\ntests/test_modeling_tf_albert.py::TFAlbertModelTest::test_for_sequence_classification PASSED\r\ntests/test_modeling_tf_albert.py::TFAlbertModelTest::test_graph_mode WARNING:tensorflow:5 out of the last 5 calls to <function TFModelTesterMixin.test_graph_mode.<locals>.run_in_graph_mode at 0x7f273870ba70> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\r\nWARNING:tensorflow:6 out of the last 6 calls to <function TFModelTesterMixin.test_graph_mode.<locals>.run_in_graph_mode at 0x7f2738779ef0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\r\nWARNING:tensorflow:7 out of the last 7 calls to <function TFModelTesterMixin.test_graph_mode.<locals>.run_in_graph_mode at 0x7f2742cb89e0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\r\nPASSED\r\n[...]\r\ntests/test_modeling_tf_albert.py::TFAlbertModelTest::test_model_common_attributes PASSED\r\nDownloading: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 63.0M/63.0M [00:02<00:00, 28.8MB/s]\r\nPASSED\r\ntests/test_modeling_tf_albert.py::TFAlbertModelTest::test_model_outputs_equivalence PASSED\r\ntests/test_modeling_tf_albert.py::TFAlbertModelTest::test_pt_tf_model_equivalence PASSED\r\ntests/test_modeling_tf_albert.py::TFAlbertModelTest::test_resize_token_embeddings PASSED\r\ntests/test_modeling_tf_albert.py::TFAlbertModelTest::test_save_load PASSED\r\ntests/test_modeling_tf_albert.py::TFAlbertModelTest::test_saved_model_with_attentions_output WARNING:tensorflow:Skipping full serialization of Keras layer <tensorflow.python.keras.layers.core.Dropout object at 0x7f273831d450>, because it is not built.\r\nWARNING:tensorflow:From /home/stas/anaconda3/envs/main/lib/python3.7/site-packages/tensorflow/python/training/tracking/tracking.py:111: Model.state_updates (from tensorflow.python.keras.engine.training) is deprecated and will be removed in a future version.\r\nInstructions for updating:\r\nThis property should not be used in TensorFlow 2.0, as updates are applied automatically.\r\nWARNING:tensorflow:From /home/stas/anaconda3/envs/main/lib/python3.7/site-packages/tensorflow/python/training/tracking/tracking.py:111: Layer.updates (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\r\nInstructions for updating:\r\nThis property should not be used in TensorFlow 2.0, as updates are applied automatically.\r\nWARNING:tensorflow:No training configuration found in save file, so the model was *not* compiled. Compile it manually.\r\nFAILED\r\ntests/test_modeling_tf_albert.py::TFAlbertModelTest::test_saved_model_with_hidden_states_output WARNING:tensorflow:Skipping full serialization of Keras layer <tensorflow.python.keras.layers.core.Dropout object at 0x7f26cb69b7d0>, because it is not built.\r\nWARNING:tensorflow:No training configuration found in save file, so the model was *not* compiled. Compile it manually.\r\nWARNING:tensorflow:Skipping full serialization of Keras layer <tensorflow.python.keras.layers.core.Dropout object at 0x7f26c625ccd0>, because it is not built.\r\nWARNING:tensorflow:No training configuration found in save file, so the model was *not* compiled. Compile it manually.\r\nFAILED\r\ntests/test_modeling_tf_auto.py::TFAutoModelTest::test_from_identifier_from_model_type PASSED\r\ntests/test_modeling_tf_auto.py::TFAutoModelTest::test_from_pretrained_identifier PASSED\r\nDownloading: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 536M/536M [00:18<00:00, 28.9MB/s]\r\n2020-09-02 10:34:15.259729: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 93763584 exceeds 10% of free system memory.\r\n2020-09-02 10:34:15.394172: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 93763584 exceeds 10% of free system memory.\r\nPASSED\r\nDownloading: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 498M/498M [00:12<00:00, 40.0MB/s]\r\n2020-09-02 10:34:29.779196: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 154389504 exceeds 10% of free system memory.\r\n2020-09-02 10:34:30.859094: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 154389504 exceeds 10% of free system memory.\r\nPASSED\r\ntests/test_modeling_tf_auto.py::TFAutoModelTest::test_model_for_encoder_decoder_lm 2020-09-02 10:34:32.437951: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 65798144 exceeds 10% of free system memory.\r\nPASSED\r\n[...]\r\ntests/test_modeling_tf_bert.py::TFBertModelTest::test_for_token_classification PASSED\r\ntests/test_modeling_tf_bert.py::TFBertModelTest::test_graph_mode WARNING:tensorflow:8 out of the last 8 calls to <function TFModelTesterMixin.test_graph_mode.<locals>.run_in_graph_mode at 0x7f26c5ccbef0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\r\nWARNING:tensorflow:9 out of the last 9 calls to <function TFModelTesterMixin.test_graph_mode.<locals>.run_in_graph_mode at 0x7f26c5db8950> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\r\nWARNING:tensorflow:10 out of the last 10 calls to <function TFModelTesterMixin.test_graph_mode.<locals>.run_in_graph_mode at 0x7f26c5ccbcb0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\r\nWARNING:tensorflow:11 out of the last 11 calls to <function TFModelTesterMixin.test_graph_mode.<locals>.run_in_graph_mode at 0x7f277c0eb5f0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\r\nWARNING:tensorflow:11 out of the last 11 calls to <function TFModelTesterMixin.test_graph_mode.<locals>.run_in_graph_mode at 0x7f26c8298dd0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\r\nWARNING:tensorflow:11 out of the last 11 calls to <function TFModelTesterMixin.test_graph_mode.<locals>.run_in_graph_mode at 0x7f273816d5f0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\r\nWARNING:tensorflow:11 out of the last 11 calls to <function TFModelTesterMixin.test_graph_mode.<locals>.run_in_graph_mode at 0x7f26c8235560> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\r\nWARNING:tensorflow:11 out of the last 11 calls to <function TFModelTesterMixin.test_graph_mode.<locals>.run_in_graph_mode at 0x7f26caab45f0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\r\nWARNING:tensorflow:11 out of the last 11 calls to <function TFModelTesterMixin.test_graph_mode.<locals>.run_in_graph_mode at 0x7f26c9da34d0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\r\nPASSED\r\n```\r\n", "Thinking about it more while working with other tools, it'd be of a great help to have an env var that can set the default logging level for `transformers`. e.g. I wanted to change the logging level for `run_eval.py` and I couldn't do that w/o modifying it. If we had an env var that would have been trivial and much faster to use.\r\n\r\nThis is regardless of the outcome of this discussion of whether we should have a way to turn non-transformers-related loggers off.", "I understand the issue, and while I agree that some frameworks are extremely log intensive (TensorFlow ...), I wonder if it's such a bad thing to have too many logs during testing. If a test fails, the logs may help to understand the issue quicker when the stack trace isn't helping much. Removing these logs would mean needing to restart the CI with a different logging level to see what's happening in the logs around this error.\r\n\r\nRegarding your second point, yes, I think it would be nice to control the default logging level with an environment variable! Would welcome such a PR.", "I would find some more control over logging very useful! A lot of our users are on colab, and warnings waste a ton of screen space there. Same with my debugging workflow -- there are so many logger statements that can't see my full traceback on the screen.", "> I would find some more control over logging very useful! A lot of our users are on colab, and warnings waste a ton of screen space there. Same with my debugging workflow -- there are so many logger statements that can't see my full traceback on the screen.\r\n\r\nI wonder whether we should just have an env var `DISABLE_LOGGING=info` that will just do:\r\n```\r\nimport logging\r\nlogging.disable(logging.INFO) # disable INFO and DEBUG logger everywhere\r\n```\r\n`DISABLE_LOGGING=warning` for WARNING, INFO and DEBUG...\r\n\r\nIn addition to the transformers-specific one `TRANSFORMERS_VERBOSITY=info...` which I will add.\r\n", "> I understand the issue, and while I agree that some frameworks are extremely log intensive (TensorFlow ...), I wonder if it's such a bad thing to have too many logs during testing. If a test fails, the logs may help to understand the issue quicker when the stack trace isn't helping much. Removing these logs would mean needing to restart the CI with a different logging level to see what's happening in the logs around this error.\r\n\r\nIn no way I am proposing to impact CI in any way - on the contrary - on CI the more debug info the merrier. I'm only proposing a way for a developer to turn the logging off on their own setup. i.e. we won't be enabling any such features on CI.\r\n\r\nDifferent developers have different needs and for me, for example, noise is very counterproductive for development. When debugging something I only want to see outputs that are relevant to what I'm debugging and nothing else - and seconding @sshleifer's comment - I too want them to fit into the current screen so I don't need to scroll. Especially in complicated situations when I need to look at output numbers. I understand how this can be a total non-issue for others.\r\n\r\n> Regarding your second point, yes, I think it would be nice to control the default logging level with an environment variable! Would welcome such a PR.\r\n\r\nI will do so. Thank you!", "> I would find some more control over logging very useful! A lot of our users are on colab, and warnings waste a ton of screen space there. Same with my debugging workflow -- there are so many logger statements that can't see my full traceback on the screen.\r\n\r\n@sshleifer have you tried the new library-wide control for logging that Lysandre added in #6434?\r\nThe doc is here: https://huggingface.co/transformers/master/main_classes/logging.html", "Added the env var to control the transformers verbosity level: https://github.com/huggingface/transformers/pull/6961", "It feels that this proposal is a no go at the moment, so I'm closing it down.\r\n\r\nThe extended tests and added testing utils which were part of this PR have been merged in https://github.com/huggingface/transformers/pull/6961\r\n\r\nThank you all who contributed to this discussion." ]
"2024-04-16T14:53:39"
"2024-04-16T15:54:10"
"2024-04-16T15:54:10"
CONTRIBUTOR
null
Previously, the output of `score, indices = Dataset.search(...)` would be numpy arrays. The definition in `SearchResult` is a `List[int]` so this PR now matched the expected type. The previous behavior is a bit annoying as `Dataset.__getitem__` doesn't support `numpy.int64` which forced me to convert `indices` to int eg: ```python score, indices = ds.search(...) item = ds[int(indices[0])] ```
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6816/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/6816/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6816", "html_url": "https://github.com/huggingface/datasets/pull/6816", "diff_url": "https://github.com/huggingface/datasets/pull/6816.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6816.patch", "merged_at": null }
https://api.github.com/repos/huggingface/datasets/issues/6815
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6815/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6815/comments
https://api.github.com/repos/huggingface/datasets/issues/6815/events
https://github.com/huggingface/datasets/pull/6815
2,246,197,070
PR_kwDODunzps5sz9eC
6,815
Remove `os.path.relpath` in `resolve_patterns`
{ "login": "mariosasko", "id": 47462742, "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mariosasko", "html_url": "https://github.com/mariosasko", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "repos_url": "https://api.github.com/users/mariosasko/repos", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6815?src=pr&el=h1) Report\n> Merging [#6815](https://codecov.io/gh/huggingface/transformers/pull/6815?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/5ab21b072fa2a122da930386381d23f95de06e28?el=desc) will **decrease** coverage by `1.46%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6815/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6815?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6815 +/- ##\n==========================================\n- Coverage 79.58% 78.11% -1.47% \n==========================================\n Files 157 157 \n Lines 28588 28588 \n==========================================\n- Hits 22752 22332 -420 \n- Misses 5836 6256 +420 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6815?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_tf\\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/6815/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9hbGJlcnQucHk=) | `21.47% <0.00%> (-69.44%)` | :arrow_down: |\n| [src/transformers/pipelines.py](https://codecov.io/gh/huggingface/transformers/pull/6815/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9waXBlbGluZXMucHk=) | `26.26% <0.00%> (-53.69%)` | :arrow_down: |\n| [src/transformers/optimization.py](https://codecov.io/gh/huggingface/transformers/pull/6815/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9vcHRpbWl6YXRpb24ucHk=) | `34.28% <0.00%> (-48.00%)` | :arrow_down: |\n| [src/transformers/optimization\\_tf.py](https://codecov.io/gh/huggingface/transformers/pull/6815/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9vcHRpbWl6YXRpb25fdGYucHk=) | `33.33% <0.00%> (-24.33%)` | :arrow_down: |\n| [src/transformers/modeling\\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6815/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yb2JlcnRhLnB5) | `74.81% <0.00%> (-22.27%)` | :arrow_down: |\n| [src/transformers/modeling\\_longformer.py](https://codecov.io/gh/huggingface/transformers/pull/6815/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19sb25nZm9ybWVyLnB5) | `71.55% <0.00%> (-20.48%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/6815/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9hdXRvLnB5) | `48.79% <0.00%> (-18.08%)` | :arrow_down: |\n| [src/transformers/data/processors/squad.py](https://codecov.io/gh/huggingface/transformers/pull/6815/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL3Byb2Nlc3NvcnMvc3F1YWQucHk=) | `13.76% <0.00%> (-14.38%)` | :arrow_down: |\n| [src/transformers/modeling\\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/6815/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19hdXRvLnB5) | `64.36% <0.00%> (-14.37%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_xlm.py](https://codecov.io/gh/huggingface/transformers/pull/6815/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl94bG0ucHk=) | `88.42% <0.00%> (-4.85%)` | :arrow_down: |\n| ... and [24 more](https://codecov.io/gh/huggingface/transformers/pull/6815/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6815?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6815?src=pr&el=footer). Last update [5ab21b0...d984fd8](https://codecov.io/gh/huggingface/transformers/pull/6815?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "After sleeping on this, I'm not quite sure of 2 things.\r\n\r\n1. the main switch from mixin to normal subclassing - if it's done it should be done for all other common testing mixins - the benefit would be - having simpler access to `unittest.TestCase` and the extended `unittest.TestCasePlus` features. As I proposed in the alternative solution, it's not at all required, as a different solution can be used for temp dirs during debug.\r\n\r\n2. a totally unrelated issue of having debugging code in place. Do we want to gradually make the test suite easier to debug, by leaving `if DEBUG: ...` in strategic places (currently, consisting of just one thing - having a fixed tmp dir and not having it removed, but there are probably others). \r\n\r\n For example, I find myself adding a debug message for various asserts, so it's easier to see what's not matching, but those are usually a 2nd/3rd argument to the assert function (or `msg=`), so it's a smooth feature requiring no `if DEBUG`.\r\n\r\ni.e. I'd love to hear what others think - if you think this is a useful discussion - I can open 2 unrelated issues if it helps to make discussing these 2 unrelated issues focused.\r\n\r\nMy inclination right now is to just provide a quick way to make a fixed temp dir w/o it being deleted, i.e. the alt solution in OP, and leave the original PR for maybe some time in the future if we see other benefits to doing so.", "I agree with having a quicker fix for this specific problem and think a bit more about a general way to have a specific debug behavior for our use.", "If you're joining in now, please ignore the proposed code (as it also requires changing from Mixin to a subclass), and what this needs is your feedback on this question: **do we want to have a simple DEBUG flag in tests, that once enabled it would switch to not deleting temp dirs and would use a fixed temp dir path, so that it's easy to monitor?** So instead of needing to manually tweak the tests, we have the debug setup already in place. That's the question.\r\n\r\nLet me know if perhaps I should scratch that PR and start a new one discussing just that, so that the initial attempts at solving the issue won't be confusing to you, the readers.\r\n\r\nAnd to quickly give you context, we are talking about:\r\n```\r\n def setUp(self):\r\n self.tmpdirname = tempfile.mkdtemp()\r\n```\r\nand the modified version is:\r\n```\r\nDEBUG=0\r\n[...]\r\n def setUp(self):\r\n super().setUp()\r\n \r\n # if you need to debug the contents of the tmpdirname, set DEBUG to True, which will then use\r\n # a hardcoded path and won't delete it at the end of the test\r\n if not DEBUG:\r\n self.tmpdirname = self.get_auto_remove_tmp_dir()\r\n else:\r\n self.tmpdirname = self.get_auto_remove_tmp_dir(tmp_dir=\"./tmp/token-test\", after=False)\r\n```\r\nhttps://github.com/huggingface/transformers/blob/d984fd82bf940c62700919da5735e60f3f883348/tests/test_tokenization_common.py#L69\r\n\r\nexcept the code itself will be different as we can't make it work with mixins in that way.\r\n\r\nIf it helps, here is the last time a related issue of working with temp dirs has been worked on with a successful PR merge:\r\nhttps://github.com/huggingface/transformers/pull/6494 - i.e. this is a continuation of the same to other parts of the test suite.\r\n", "> do we want to have a simple DEBUG flag in tests, that once enabled it would switch to not deleting temp dirs and would use a fixed temp dir path, so that it's easy to monitor?\r\n\r\nyes, this would be useful if you can do it in a way that doesn't add overhead for people trying to add new tokenizers.\r\n\r\nI didn't look at the code.", "I will close it for now and revisit the next time I deal with this unless someone beats me to it." ]
"2024-04-16T14:23:13"
"2024-04-16T16:06:48"
"2024-04-16T15:58:22"
COLLABORATOR
null
... to save a few seconds when resolving repos with many data files.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6815/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/6815/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6815", "html_url": "https://github.com/huggingface/datasets/pull/6815", "diff_url": "https://github.com/huggingface/datasets/pull/6815.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6815.patch", "merged_at": "2024-04-16T15:58:22" }
https://api.github.com/repos/huggingface/datasets/issues/6814
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6814/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6814/comments
https://api.github.com/repos/huggingface/datasets/issues/6814/events
https://github.com/huggingface/datasets/issues/6814
2,245,857,902
I_kwDODunzps6F3RJu
6,814
`map` with `num_proc` > 1 leads to OOM
{ "login": "bhavitvyamalik", "id": 19718818, "node_id": "MDQ6VXNlcjE5NzE4ODE4", "avatar_url": "https://avatars.githubusercontent.com/u/19718818?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bhavitvyamalik", "html_url": "https://github.com/bhavitvyamalik", "followers_url": "https://api.github.com/users/bhavitvyamalik/followers", "following_url": "https://api.github.com/users/bhavitvyamalik/following{/other_user}", "gists_url": "https://api.github.com/users/bhavitvyamalik/gists{/gist_id}", "starred_url": "https://api.github.com/users/bhavitvyamalik/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bhavitvyamalik/subscriptions", "organizations_url": "https://api.github.com/users/bhavitvyamalik/orgs", "repos_url": "https://api.github.com/users/bhavitvyamalik/repos", "events_url": "https://api.github.com/users/bhavitvyamalik/events{/privacy}", "received_events_url": "https://api.github.com/users/bhavitvyamalik/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-04-16T11:56:03"
"2024-04-19T11:53:41"
null
CONTRIBUTOR
null
### Describe the bug When running `map` on parquet dataset loaded from local machine, the RAM usage increases linearly eventually leading to OOM. I was wondering if I should I save the `cache_file` after every n steps in order to prevent this? ### Steps to reproduce the bug ``` ds = load_dataset("parquet", data_files=dataset_path, split="train") ds = ds.shard(num_shards=4, index=0) ds = ds.cast_column("audio", datasets.features.Audio(sampling_rate=16_000)) ds = ds.map(prepare_dataset, num_proc=32, writer_batch_size=1000, keep_in_memory=False, desc="preprocess dataset") ``` ``` def prepare_dataset(batch): # load audio sample = batch["audio"] inputs = feature_extractor(sample["array"], sampling_rate=16000) batch["input_values"] = inputs.input_values[0] batch["input_length"] = len(sample["array"].squeeze()) return batch ``` ### Expected behavior It shouldn't run into OOM problem. ### Environment info - `datasets` version: 2.18.0 - Platform: Linux-5.4.0-91-generic-x86_64-with-glibc2.17 - Python version: 3.8.19 - `huggingface_hub` version: 0.22.2 - PyArrow version: 15.0.2 - Pandas version: 2.0.3 - `fsspec` version: 2024.2.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6814/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/6814/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6813
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6813/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6813/comments
https://api.github.com/repos/huggingface/datasets/issues/6813/events
https://github.com/huggingface/datasets/pull/6813
2,245,626,870
PR_kwDODunzps5sx-9V
6,813
Add Dataset.take and Dataset.skip
{ "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
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6813?src=pr&el=h1) Report\n> Merging [#6813](https://codecov.io/gh/huggingface/transformers/pull/6813?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/244e1b5ba331cb4c1ed96d88d0895c252567f7f3?el=desc) will **decrease** coverage by `0.85%`.\n> The diff coverage is `82.89%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6813/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6813?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6813 +/- ##\n==========================================\n- Coverage 78.81% 77.95% -0.86% \n==========================================\n Files 174 178 +4 \n Lines 33670 34125 +455 \n==========================================\n+ Hits 26537 26603 +66 \n- Misses 7133 7522 +389 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6813?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/tokenization\\_rag.py](https://codecov.io/gh/huggingface/transformers/pull/6813/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fcmFnLnB5) | `69.76% <69.76%> (ΓΈ)` | |\n| [src/transformers/modeling\\_rag.py](https://codecov.io/gh/huggingface/transformers/pull/6813/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yYWcucHk=) | `76.98% <76.98%> (ΓΈ)` | |\n| [src/transformers/testing\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6813/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90ZXN0aW5nX3V0aWxzLnB5) | `67.28% <77.77%> (+0.40%)` | :arrow_up: |\n| [src/transformers/retrieval\\_rag.py](https://codecov.io/gh/huggingface/transformers/pull/6813/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9yZXRyaWV2YWxfcmFnLnB5) | `91.27% <91.27%> (ΓΈ)` | |\n| [src/transformers/\\_\\_init\\_\\_.py](https://codecov.io/gh/huggingface/transformers/pull/6813/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9fX2luaXRfXy5weQ==) | `99.37% <100.00%> (+0.01%)` | :arrow_up: |\n| [src/transformers/configuration\\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/6813/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2F1dG8ucHk=) | `96.25% <100.00%> (+0.09%)` | :arrow_up: |\n| [src/transformers/configuration\\_dpr.py](https://codecov.io/gh/huggingface/transformers/pull/6813/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2Rwci5weQ==) | `100.00% <100.00%> (ΓΈ)` | |\n| [src/transformers/configuration\\_rag.py](https://codecov.io/gh/huggingface/transformers/pull/6813/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3JhZy5weQ==) | `100.00% <100.00%> (ΓΈ)` | |\n| [src/transformers/file\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6813/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `83.37% <100.00%> (+0.53%)` | :arrow_up: |\n| [src/transformers/modeling\\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/6813/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19hdXRvLnB5) | `83.96% <100.00%> (+1.58%)` | :arrow_up: |\n| ... and [24 more](https://codecov.io/gh/huggingface/transformers/pull/6813/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6813?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6813?src=pr&el=footer). Last update [3ebb1b3...db3e5e0](https://codecov.io/gh/huggingface/transformers/pull/6813?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "@lhoestq thanks for the comments! I did consider moving retrieval outside of the model - the benefit of this that I see would be that we would move all training-related logic (e.g. handling distributed processing in Retriever) from `transformers` to `examples`.\r\n\r\nThat said, I'm still in favor of keeping the call to `contextualize` as part of the forward pass. Here's my thinking:\r\n- retrieval is more than just data pre-processing step, it is a core part of the model's architecture. E.g. we can't pre-compute retrieved docs for a batch of data beforehand as the question encoder will be updated at every step of training, so the set of retrieved docs would be changing dynamically. If we move retrieval outside of the model people may be tempted to do that.\r\n- we would need to call `contextualize` before every forward pass on the model, so not only in finetuning, but also e.g. in evaluation code. On top of that anyone who would want to run the model for demo purposes would have to instantiate the retriever first and remember to call `contextualize`, instead of doing the two simple steps that other HF models require (encoding the sequence and running the model) - we could potentially consider making contextualization a part of tokenizer's `encode` method (not sure this would be intuitive for people used to HF's APIs) - however, the retrieval logic would still remain in `transformers` then\r\n- In terms of flexibility - I think with the current approach it'd still be possible for people to build different retrievers and pass them to the model\r\n\r\nWhat do you think? I'd be curious to know what others think about it, cc @patrick-s-h-lewis, @thomwolf", "So we've been brainstorming with @patrickvonplaten and @lhoestq on this yesterday and here is a proposal.\r\n\r\nThe general context is that we expect to include more hybrid models with a retrieval component in the future (like REALM, MARGE, knn-LM) so it's nice if we can setup an API which is general enough to include a diversity of models.\r\n\r\nHere is the general idea: we can add a new base class to the library (in addition to the `Tokenizer` and `Model`) which we can call a `Retriever` for instance. The `Retriever` class:\r\n- won't include trainable components and will thus be framework independent like the tokenizer,\r\n- does both the retrieval of the documents given an encoding and the post processing (in our case the retokenization),\r\n- it is sub-classed to be model specific (`RAGRetriever`) like the models and tokenizers,\r\n- we can add an `AutoRetriever` version later.\r\n\r\nWe probably want to keep it's API fairly generic for now since this field is only beginning to be explored. The `Retriever` can just have a `__call__` method (like the tokenizers) which expect an encoding and does retrieval and postprocessing.\r\n\r\nThen (copying @patrickvonplaten's idea) we would be to have a `RetrievalGenerationModel` that comprises the trainable (and PyTorch/TF specific) elements, i.e. the encoder and generator models. In its forward pass the `RetrievalGenerationModel` would have besides the usual `input_ids` one more input argument which is of class `Retriever`. The RetrivalGenerationModel would just call Retriever.forward(encoded_input) and expect an encoding that the self.generator could then be conditioned on.\r\n\r\nWhat do you think? We would help you implement this option of course since it impacts more significantly the library.", "I'm just wondering if TF will like a model which accept a class as input. What do you think @jplu @patrickvonplaten?\r\nWe could also have a method in the class to set the retriever instead of dynamically providing it. ", "Never tried, but I doubt it should be possible in compiled mode. I think what you propose would be a better way to go.", "> Never tried, but I doubt it should be possible in compiled mode. I think what you propose would be a better way to go.\r\n\r\n@jplu - I think there was a slight misunderstanding. \r\nWith the proposed approach we actually would pass an instantiation of a class as an argument to the forward pass of the `RetrievalGenerationModel` -> so before following this path we should check if this can nicely be done with TF...", "Oh ok! I thought the question was about to pass one class that contains all the arguments. My bad 😒 \r\n\r\nSo, after reading your explanation I can say, yes it is doable!", "Hey @ola13,\r\n\r\nThanks for your comment, this is indeed a very important aspect that I didn't really think of before. \r\nWith @lhoestq, we have been brainstorming a bit and thought maybe a slighly different design could make sense:\r\n\r\n```python\r\n#!/usr/bin/env python3\r\n\r\nclass RetrievalGenerationModel(PretrainedModel):\r\n \r\n def __init__(self, config: RetrievalGenerationConfig, encoder: PretrainedModel, retrieval_generator: PretrainedModel):\r\n if encoder is not None and retrieval_generator is not None: \r\n self.encoder = encoder\r\n self.retrieval_generator = retrieval_generator\r\n self.config = RetrievalGenerationConfig.from_encoder_generator_config(self.encoder.config, self.retrieval_generator.config)\r\n\r\n assert config is not None\r\n super().__init__(config)\r\n\r\n if encoder is None:\r\n self.encoder = AutoModel.from_config(config.encoder)\r\n if retrieval_generator is None:\r\n self.retrieval_generator.from_config(config.generator)\r\n\r\n @classmethod\r\n def from_pretrained_encoder_generator(cls, encoder_model_id, generator_model_id):\r\n encoder = AutoModel.from_pretrained(...) # load any query encoding model\r\n retrieval_generator = AutoRetrievalGeneratorModel.from_pretrained(...) # this would be a new class that contains any model that can be used as the `retrieval_generator` model.\r\n return cls(encoder=encoder, retrieval_generator=retrieval_generator)\r\n\r\n\r\n def forward(input_ids, retriever: PretrainedRetriever):\r\n # 1. Every retriever model encodes the query -> any `AutoModel` can be used here\r\n input_ids_encodings = self.encoder(input_ids) # model with weights\r\n\r\n # 2. Use costumized retriever (tokenizer-like) class instance, like `RAGRetriever` that \r\n # - query the index\r\n # - reformats the document outputs\r\n # - tokenizes the document outpus\r\n retrieved_docs_input_ids, retrieved_docs_encodings = retriever(input_ids_encodings, input_ids) # tokenizer like postprocessor that returns the tokenized docs input and the docs encodings\r\n\r\n # 3. Now the retrieval_generator requires a specific forward pass which accepts at least four kinds of tensors: 1) the input_ids (query), 2) the encoded_input_ids (encoded query), 3) retrieved_docs_input (tokenized context) and 4) retrieved_docs_encodings\r\n output_ids = self.retrieval_generator(input_ids, encoded_query, retrieved_docs_input_ids, retrieved_docs_encodings) # any `AutoRetrievalGeneratorModel` can be used here\r\n\r\nclass RagRetrievalGenerator(PretrainedModel):\r\n\r\n def __init__(self):\r\n self.generator = AutoModelForSeq2Seq.from_pretrained(...) # e.g. Bart\r\n\r\n def forward(input_ids, encodings, docs_input_ids, docs_encodings):\r\n doc_scores = torch.bmm(encodings.unsqueeze(1), docs_encodings.transpose(1, 2)).squeeze(1)\r\n ....\r\n output_ids = self.generator.generate(...)\r\n\r\nclass RAGRetriever(PretrainedRetriever)\r\n \"\"\"\r\n This retriever is framework independant (for both TF and PT) \r\n similar to a tokenizer\r\n \"\"\"\r\n\r\n def __init__(self):\r\n self.docs = nlp.load_dataset(...)\r\n ...\r\n\r\n def __call__(input_ids_encodings, input_ids):\r\n # no tensor operations happen here\r\n ...\r\n\r\nclass DPRRetrivalGenerator(PretrainedModel):\r\n\r\n def __init__(self):\r\n self.genator = AutoModelForQuestionsAnswering.from_pretrained(...) # QA model \r\n\r\n\r\n def forward(input_ids, encodings, docs_input_ids, docs_encodings):\r\n \r\n concated_qa_input = torch.cat([input_ids, docs_input_ids], dim=-1)\r\n output_ids = self.generator(concated_qa_input)\r\n\r\n\r\nclass DPRRetriever(PretrainedRetriever)\r\n \"\"\"\r\n This retriever is framework independant (for both TF and PT) \r\n similar to a tokenizer\r\n \"\"\"\r\n\r\n def __init__(self):\r\n self.docs = nlp.load_dataset(...)\r\n ...\r\n\r\n def __call__(input_ids_encodings, input_ids):\r\n # no tensor operations happen here\r\n ...\r\n```\r\n\r\nHopefully this is somewhat understandable @ola13 @thomwolf ...\r\n\r\n@lhoestq and I think that for each RetrivalAugmentedModel we need 2 specific parts:\r\n\r\n1) A specific Retriever: how are documents retrieved and formated and tokenized -> e.g. `RAGRetriever`\r\n2) A specific Generator: Here we can also have multiple possibilities: DPR uses a `AutoModelForQuestionAnswering` while RAG uses a `AutoModelForSeq2Seq`\r\n\r\nSo with this framework we would have to introduce 1 general class that would be used for all RetrievalAugementedModels, called `RetrievalGenerationModel` (or whatever name fits better) and 2 architecture specific classes `RAGRetriever` and `RagRetrievalGenerator`.\r\n\r\nWould be keen to hear your thoughts :-) ", "Hey @patrickvonplaten, makes sense and in fact it's not very different from how we structured the code already the key differences that I see are:\r\n- we move re-tokenization between query_encoder and generator to the Retriever (so respective tokenizers will be encapsulated by the Retriever not a model class as we currently do it)\r\n- we move retrieval score calculation to the model so that no tensor operations happen in the retriever\r\n\r\nwhich both should be pretty straightforward to implement.\r\n\r\nThe one thing that I'm still on the fence about is passing a `retriever` to each `forward` pass on a `RetrievalGenerationModel`, instead of making it a member of `RetrievalGenerationModel` class. Why do you feel the former is preferable over the latter?", "Yeah, good point! It's a bit weird to pass a class instance just to make a forward pass with it. \r\n\r\nMy main reason is the following: \r\n\r\nCurrently, the library makes a very clear distinction between `config`, `tokenizer` and `model` which are all independent of each other. Each of these classes have a seperate `.from_pretrained()` and `.save_pretrained()` method where as the `PretrainedModel.save_pretrained(...)` and `PretrainedModel.from_pretrained(...)` internally call `PretrainedConfig.save_pretrained(...)` and `PretrainedConfig.save_pretrained(...)`, but **never** the `PretrainedTokenizer.from_pretrained(...)` an d`PretrainedTokenizer.save_pretrained(...)` methods. For a `RetrievalGenerationModel` I would like to reuse `PretrainedModel`'s `from_pretrained(...)` and `save_pretrained(...)` methods which means that a tokenizer instance should not be part of the model because other wise we would have to tweak this function (which I don't think is a good idea). \r\nAlso, this will make the `RetrievalGenerationModel` a \"clean\" and relatively light `Model` object without any string processing logic in it whatsoever which is more in line with other `PretrainedModel` classes. ", "@patrickvonplaten, got it, yeah makes sense! We would still want to call `PretrainedTokenizer.from_pretrained(...)` when initializing `RagRetriever` but I guess this should be fine?\r\n\r\nOkay, so I would propose to do the following - I will refactor this PR to follow the design we discussed. It seems though that implementing the generic `Retriever` logic as discussed earlier by @thomwolf would require extra effort and time, and is not necessarily within the scope of this PR. In the interest of time, we could land this PR and then proceed with generalizing the retrieval logic? I'm then happy to work with the RAG implementation to make it compatible.", "Exactly! I was thinking that we either create a genereric `PretrainedRetriever` class with a `from_pretrained()` method that calls the tokenizer `from_pretrained()` methods or add `from_pretrained()` method directly to `RagRetriever`. Maybe @lhoestq and @thomwolf have better insight on the \"tokenizer\" side. \r\n\r\n@ola13 maybe we can wait quickly if @lhoestq and @thomwolf are fine with the design as discussed above :-) ", "Sounds awesome to me!", "Hey I just refactored the model following suggestions above. One point is that I had to modify `generation_utils.py` to account for a model which takes a `retriever` as an argument to the encoder. Let me know what you think!", "Hi, a question - to use RAG I need a couple of non-standard dependencies (faiss, psutil, nlp) - can I define a special test environment which would install those for rag tests? any pointers on how to handle this?", "> Hey I just refactored the model following suggestions above. One point is that I had to modify `generation_utils.py` to account for a model which takes a `retriever` as an argument to the encoder. Let me know what you think!\r\n\r\nAwesome ! I'll take a look. Also cc @patrickvonplaten \r\n\r\n> Hi, a question - to use RAG I need a couple of non-standard dependencies (faiss, psutil, nlp) - can I define a special test environment which would install those for rag tests? any pointers on how to handle this?\r\n\r\nMaybe @LysandreJik knows more about how to handle tests with dependencies ?\r\n", "Hey @ola13, \r\n\r\nI think the general code design is exactly what we have imagined to go for, defining a `RagRetriever` and passing the `retriever` to the forward pass, so this is great! ", "Regarding the test dependencies, you can add the libraries here: https://github.com/huggingface/transformers/blob/d6c08b07a087e83915b4b3156bbf464cebc7b9b5/setup.py#L92 and it should automatically be installed for testing on circle ci :-) `psutil` is already in the test dependency", "@ola13 - it would be awesome if you could add one \"full\" integration test with hardcoded input and output under @slow \r\n\r\nBy that I mean, *e.g.* hardcoding an input question \"Why does it rain\", loading a relevant dataset using the `HfIndex` and the full pretrained encoder and generator model and hardcoding the expected output answer in thet test. I think all operations are deterministic (beam search, etc...), so no random seeds have to be set.\r\n\r\n This way we have one test where we can be sure that the model works as expected and every change to the model in the future can be checked against that.\r\n\r\nThe tests you have in `test_modeling_rag.py` so far look great. We could also add a full `RagModel` test by defining a dummy dataset that will be instantiated from a hardcoded dict at test time and instantiating a very light `RagRetriever` at test time this way. But we can manually add those tests later, they are not super important.\r\n\r\nIn terms of a timeline, it would be be awesome if you manage to make the `test_modeling_rag.py` tests pass and if you could add one \"full\" integration test showing reasonable results. After this is finished, I think the best idea is if we add some changes on top of your PR (this should take another 1,2 days) and then merge the model into the lib :-) \r\n\r\nThanks a mille for your awesome work so far!!!", "Hey @patrickvonplaten, sounds good! yes definitely adding an integration test was on my agenda, right now having merged the `master` I'm also dealing with some issues arising after the refactor from https://github.com/huggingface/transformers/commit/afc4ece462ad83a090af620ff4da099a0272e171#diff-72b038fcff0de4ae5e094e3cde9471f1 as we were relying on the old structure of `past`. I'm hoping to be done with both of these things by tomorrow :) ", "Hi, I just added an integration test for RAG using the dummy variant of `wiki_dpr`. However, I had to locally hack `datasets` to make it run locally, as there seems to be a discrepancy between the dummy index name hardcoded in `wiki_dpr.py` here: https://github.com/huggingface/datasets/blob/37d4840a39eeff5d472beb890c8f850dc7723bb8/datasets/wiki_dpr/wiki_dpr.py#L72 (expecting `dummy.psgs_w100.nq.IndexHNSWFlat-IP-train.faiss`) and what's available on HF's google cloud bucket:\r\n```\r\n~$ gsutil ls -r gs://huggingface-nlp/datasets/wiki_dpr/*\r\ngs://huggingface-nlp/datasets/wiki_dpr/\r\ngs://huggingface-nlp/datasets/wiki_dpr/dummy_psgs_w100_with_nq_embeddings_IndexFlatIP-train.faiss\r\ngs://huggingface-nlp/datasets/wiki_dpr/psgs_w100.nq.IVFPQ4096_HNSW32_PQ64-IP-train.faiss\r\ngs://huggingface-nlp/datasets/wiki_dpr/psgs_w100_with_nq_embeddings_IVFPQ4096_HNSW32,PQ64-IP-train.faiss\r\n```\r\n\r\ncc @lhoestq - this would have to be fixed quickly, alternatively I could use full `wiki_dpr` in tests, but that's 78GB, not sure if it makes sense.\r\n\r\nLet me know what you think!", "> cc @lhoestq - this would have to be fixed quickly, alternatively I could use full `wiki_dpr` in tests, but that's 78GB, not sure if it makes sense.\r\n\r\nI fixed it, dummy.psgs_w100.nq.IndexHNSWFlat-IP-train.faiss is now available on gcs\r\n\r\n", "Previous RAG code is now saved in this PR: #7200", "Last fail is due to time-out. All import tests are passing => merging to master." ]
"2024-04-16T09:53:42"
"2024-04-16T14:12:14"
"2024-04-16T14:06:07"
MEMBER
null
...to be aligned with IterableDataset.take and IterableDataset.skip
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6813/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/6813/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6813", "html_url": "https://github.com/huggingface/datasets/pull/6813", "diff_url": "https://github.com/huggingface/datasets/pull/6813.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6813.patch", "merged_at": "2024-04-16T14:06:07" }
https://api.github.com/repos/huggingface/datasets/issues/6812
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6812/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6812/comments
https://api.github.com/repos/huggingface/datasets/issues/6812/events
https://github.com/huggingface/datasets/pull/6812
2,244,898,824
PR_kwDODunzps5svgoq
6,812
Run CI
{ "login": "charliermarsh", "id": 1309177, "node_id": "MDQ6VXNlcjEzMDkxNzc=", "avatar_url": "https://avatars.githubusercontent.com/u/1309177?v=4", "gravatar_id": "", "url": "https://api.github.com/users/charliermarsh", "html_url": "https://github.com/charliermarsh", "followers_url": "https://api.github.com/users/charliermarsh/followers", "following_url": "https://api.github.com/users/charliermarsh/following{/other_user}", "gists_url": "https://api.github.com/users/charliermarsh/gists{/gist_id}", "starred_url": "https://api.github.com/users/charliermarsh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/charliermarsh/subscriptions", "organizations_url": "https://api.github.com/users/charliermarsh/orgs", "repos_url": "https://api.github.com/users/charliermarsh/repos", "events_url": "https://api.github.com/users/charliermarsh/events{/privacy}", "received_events_url": "https://api.github.com/users/charliermarsh/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "I think this is correct. It should be replaced by an `|`. Do you get a better perplexity if you change this line?", "Thanks a lot for opening this issue @HarshTrivedi ! I also agree that the logic should be OR and not AND. @shngt - can you maybe comment here as well?", "Thank you for confirming this!\r\n\r\nIf I remember correctly, changing `&` to `|` didn't fix the high zero-shot perplexity for me. I'll try it again later today or tomorrow and report back the numbers with `&` vs `|`.", "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n", "I agree - the logic should be OR and not AND. Could you please confirm if the numbers change @HarshTrivedi?\r\n\r\nSorry for the delay - I missed the notification at the time. I'll submit a PR for AND -> OR fix asap, and try to do some more stringent testing to catch the reason for the perplexity difference. How can I proceed with the latter @patrickvonplaten @LysandreJik ?", "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n", "(Resolved by https://github.com/huggingface/transformers/pull/8409 I believe)" ]
"2024-04-16T01:12:36"
"2024-04-16T01:14:16"
"2024-04-16T01:12:41"
NONE
null
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6812/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/6812/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6812", "html_url": "https://github.com/huggingface/datasets/pull/6812", "diff_url": "https://github.com/huggingface/datasets/pull/6812.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6812.patch", "merged_at": null }
https://api.github.com/repos/huggingface/datasets/issues/6811
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6811/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6811/comments
https://api.github.com/repos/huggingface/datasets/issues/6811/events
https://github.com/huggingface/datasets/pull/6811
2,243,656,096
PR_kwDODunzps5srOtR
6,811
add allow_primitive_to_str and allow_decimal_to_str instead of allow_number_to_str
{ "login": "Modexus", "id": 37351874, "node_id": "MDQ6VXNlcjM3MzUxODc0", "avatar_url": "https://avatars.githubusercontent.com/u/37351874?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Modexus", "html_url": "https://github.com/Modexus", "followers_url": "https://api.github.com/users/Modexus/followers", "following_url": "https://api.github.com/users/Modexus/following{/other_user}", "gists_url": "https://api.github.com/users/Modexus/gists{/gist_id}", "starred_url": "https://api.github.com/users/Modexus/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Modexus/subscriptions", "organizations_url": "https://api.github.com/users/Modexus/orgs", "repos_url": "https://api.github.com/users/Modexus/repos", "events_url": "https://api.github.com/users/Modexus/events{/privacy}", "received_events_url": "https://api.github.com/users/Modexus/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6811?src=pr&el=h1) Report\n> Merging [#6811](https://codecov.io/gh/huggingface/transformers/pull/6811?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/5ab21b072fa2a122da930386381d23f95de06e28?el=desc) will **decrease** coverage by `0.10%`.\n> The diff coverage is `100.00%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6811/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6811?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6811 +/- ##\n==========================================\n- Coverage 79.58% 79.47% -0.11% \n==========================================\n Files 157 157 \n Lines 28588 28586 -2 \n==========================================\n- Hits 22752 22719 -33 \n- Misses 5836 5867 +31 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6811?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/configuration\\_pegasus.py](https://codecov.io/gh/huggingface/transformers/pull/6811/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3BlZ2FzdXMucHk=) | `100.00% <100.00%> (ΓΈ)` | |\n| [src/transformers/configuration\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6811/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX29wZW5haS5weQ==) | `34.28% <0.00%> (-62.86%)` | :arrow_down: |\n| [src/transformers/tokenization\\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/6811/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYWxiZXJ0LnB5) | `28.84% <0.00%> (-58.66%)` | :arrow_down: |\n| [src/transformers/modeling\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6811/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19vcGVuYWkucHk=) | `23.87% <0.00%> (-57.10%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_distilbert.py](https://codecov.io/gh/huggingface/transformers/pull/6811/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9kaXN0aWxiZXJ0LnB5) | `64.47% <0.00%> (-34.36%)` | :arrow_down: |\n| [src/transformers/tokenization\\_marian.py](https://codecov.io/gh/huggingface/transformers/pull/6811/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fbWFyaWFuLnB5) | `67.79% <0.00%> (-31.36%)` | :arrow_down: |\n| [src/transformers/tokenization\\_transfo\\_xl.py](https://codecov.io/gh/huggingface/transformers/pull/6811/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdHJhbnNmb194bC5weQ==) | `20.53% <0.00%> (-21.21%)` | :arrow_down: |\n| [src/transformers/generation\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6811/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3V0aWxzLnB5) | `96.66% <0.00%> (-0.28%)` | :arrow_down: |\n| [src/transformers/tokenization\\_utils\\_base.py](https://codecov.io/gh/huggingface/transformers/pull/6811/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfYmFzZS5weQ==) | `93.76% <0.00%> (+0.27%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6811/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `87.29% <0.00%> (+0.32%)` | :arrow_up: |\n| ... and [8 more](https://codecov.io/gh/huggingface/transformers/pull/6811/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6811?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6811?src=pr&el=footer). Last update [5ab21b0...67322db](https://codecov.io/gh/huggingface/transformers/pull/6811?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-04-15T13:14:38"
"2024-04-16T17:09:28"
"2024-04-16T17:03:17"
CONTRIBUTOR
null
PR for #6805
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6811/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/6811/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6811", "html_url": "https://github.com/huggingface/datasets/pull/6811", "diff_url": "https://github.com/huggingface/datasets/pull/6811.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6811.patch", "merged_at": "2024-04-16T17:03:17" }
https://api.github.com/repos/huggingface/datasets/issues/6810
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6810/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6810/comments
https://api.github.com/repos/huggingface/datasets/issues/6810/events
https://github.com/huggingface/datasets/issues/6810
2,242,968,745
I_kwDODunzps6FsPyp
6,810
Allow deleting a subset/config from a no-script dataset
{ "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 }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
closed
false
{ "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 }
[ { "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 } ]
null
[]
"2024-04-15T07:53:26"
"2024-04-30T09:44:25"
"2024-04-30T09:44:25"
MEMBER
null
As proposed by @BramVanroy, it would be neat to have this functionality through the API.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6810/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/6810/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6809
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6809/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6809/comments
https://api.github.com/repos/huggingface/datasets/issues/6809/events
https://github.com/huggingface/datasets/pull/6809
2,242,956,297
PR_kwDODunzps5so0e2
6,809
Make convert_to_parquet CLI command create script branch
{ "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 }
[]
closed
false
null
[]
null
[]
"2024-04-15T07:47:26"
"2024-04-17T08:44:26"
"2024-04-17T08:38:18"
MEMBER
null
Make convert_to_parquet CLI command create a "script" branch and keep the script file on it. This PR proposes the simplest UX approach: whenever `--revision` is not explicitly passed (i.e., when the script is in the main branch), try to create a "script" branch from the "main" branch; if the "script" branch exists already, then do nothing. Follow-up of: - #6795 Close #6808. CC: @severo
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6809/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/6809/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6809", "html_url": "https://github.com/huggingface/datasets/pull/6809", "diff_url": "https://github.com/huggingface/datasets/pull/6809.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6809.patch", "merged_at": "2024-04-17T08:38:18" }
https://api.github.com/repos/huggingface/datasets/issues/6808
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6808/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6808/comments
https://api.github.com/repos/huggingface/datasets/issues/6808/events
https://github.com/huggingface/datasets/issues/6808
2,242,843,611
I_kwDODunzps6FrxPb
6,808
Make convert_to_parquet CLI command create script branch
{ "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 }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
closed
false
{ "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 }
[ { "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 } ]
null
[ "Also noticed this! I have convinced myself that it's a scoring difference because the summaries generated are the same between this model and the fairseq implementation.\r\n", "This might help:\r\nhttps://github.com/google-research/google-research/issues/168\r\nI used pyrogue and R1, R2, RL = 44.32, 21.15, 37.53\r\n", "@yxyzzz can you tell me how you're using it? I get similar scores with py-rogue\r\n\r\n```\r\ndef calculate_rouge(output_lns: List[str], reference_lns: List[str], use_stemmer=True) -> Dict:\r\n scorer = rouge_scorer.RougeScorer(ROUGE_KEYS, use_stemmer=use_stemmer)\r\n aggregator = scoring.BootstrapAggregator()\r\n\r\n for reference_ln, output_ln in zip(reference_lns, output_lns):\r\n scores = scorer.score(reference_ln, output_ln)\r\n aggregator.add_scores(scores)\r\n\r\n result = aggregator.aggregate()\r\n\r\n\r\n import rouge\r\n import nltk\r\n nltk.download('punkt')\r\n\r\n evaluator = rouge.Rouge(metrics=['rouge-n', 'rouge-l'],\r\n max_n=2,\r\n limit_length=False,\r\n apply_avg=True)\r\n scores = evaluator.get_scores(reference_lns, output_lns)\r\n print(\"py-rogue\", scores)\r\n\r\n print(\"rogue_scorer\", {k: round(v.mid.fmeasure * 100, 4) for k, v in result.items()})\r\n```\r\n\r\nResults in:\r\n\r\n```\r\npy-rogue {'rouge-1': {'f': 0.44335299665102107, 'p': 0.5174289830764615, 'r': 0.40466586165106366}, 'rouge-2': {'f': 0.21133693864752542, 'p': 0.2465209393822732, 'r': 0.19324181648769206}, 'rouge-l': {'f': 0.3073058732169781, 'p': 0.35988134598642835, 'r': 0.2798097075410874}}\r\n\r\nrogue_scorer {'rouge1': 44.0698, 'rouge2': 21.0711, 'rougeLsum': 30.6233}\r\n```", "1. rouge_score split sentences by '\\n'. You can add a '\\n' to separate sentences in the summaries and evaluate. The summary level rougeL (rougeLsum) should be a lot higher and close to the one in the literature. \r\n'{'rouge1': 44.0536, 'rouge2': 21.0711, 'rougeL': 30.6157, 'rougeLsum': 40.9812}'\r\n```\r\noutput_ln2 = []\r\nfor o in `output_ln:\r\n s = sent_tokenize(p)\r\n output_ln2.append('\\n'.join(s))\r\n```\r\n2. Use pyrouge -> https://pypi.org/project/pyrouge/ ", "replacing \r\n```\r\noutput_lns = [x.rstrip() for x in open(args.save_path).readlines()]\r\nreference_lns = [x.rstrip() for x in open(args.reference_path).readlines()][: len(output_lns)]\r\n```\r\nwith works for rouge_score\r\n\r\n```\r\noutput_lns = [\" . \\n\".join(x.rstrip().split('. ')) for x in open(args.save_path).readlines()]\r\nreference_lns = [\" . \\n\".join(x.rstrip().split(' . ')) for x in open(args.reference_path).readlines()][: len(output_lns)]\r\n```\r\n\r\nThanks @yxyzzz !", "should we change run_eval.py ?\n", "Opened a PR at #7356 that fixes this issue @sshleifer " ]
"2024-04-15T06:46:07"
"2024-04-17T08:38:19"
"2024-04-17T08:38:19"
MEMBER
null
As proposed by @severo, maybe we should add this functionality as well to the CLI command to convert a script-dataset to Parquet. See: https://github.com/huggingface/datasets/pull/6795#discussion_r1562819168 > When providing support, we sometimes suggest that users store their script in a script branch. What do you think of this alternative to deleting the files?
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6808/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/6808/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6806
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6806/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6806/comments
https://api.github.com/repos/huggingface/datasets/issues/6806/events
https://github.com/huggingface/datasets/pull/6806
2,239,435,074
PR_kwDODunzps5sc8Mb
6,806
Fix hf-internal-testing/dataset_with_script commit SHA in CI test
{ "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 }
[]
closed
false
null
[]
null
[ "Fixed, will add a check. \r\nAre you running distillation experiments!? FYI that model is not trained.", "> Are you running distillation experiments!? FYI that model is not trained.\r\n\r\nYes, I know. Reproducing the results, then planning to run a few experiments with it.\r\n\r\nWasn't able to use `--fp16 `, kept getting OOM errors (using 4 2080TIs).", "Cool! \r\nre: fp16:\r\nAre you in torch 1.6?\r\nTry torch 1.5.1 with apex installed.\r\n\r\nI haven't run anything successfully in torch 1.6 and am very suspicious of native amp.", "> Try torch 1.5.1 with apex installed.\r\n> \r\n> I haven't run anything successfully in torch 1.6 and am very suspicious of native amp.\r\n\r\nThanks, I will try that.\r\nAlso, did you use `run_eval.py` for the results [here](https://docs.google.com/spreadsheets/d/1EkhDMwVO02m8jCD1cG3RoFPLicpcL1GQHTQjfvDYgIM/edit#gid=0)? \r\nI tried using `sshleifer/distilbart-cnn-12-6` as well as one I finetuned from `sshleifer/student_cnn_12_6`, but got comparatively lower results.\r\n", "Yes I did, what were your results?", "Validation - `{'rouge1': 36.902390083382635, 'rouge2': 15.98520126771937, 'rougeL': 25.75566724592724} `\r\nTest -` {'rouge1': 33.980893339399074, 'rouge2': 13.925809496977044, 'rougeL': 23.731267594610095} `", "That's awful! Can I see your command?\r\n", "```\r\npython run_eval.py distilbart-cnn-12-6/best_tfmr $DATA_DIR/val.source dbart_val_generations.txt \\\r\n --reference_path $DATA_DIR/val.target \\\r\n --score_path distilbart-cnn-12-6/cnn_rouge.json \\\r\n --task summarization \\\r\n --n_obs 100 \\\r\n --device cuda \\\r\n --bs 32 \\\r\n```", "On 100 observations that might not be so bad. \r\nThe 21.26 Rouge 2 is from the following command (a few months ago):\r\n\r\n```bash\r\npython run_eval.py sshleifer/distilbart-cnn-12-6 \\\r\ncnn_dm/test.source \\\r\ndbart_cnn_12_6_test_gens.txt \\\r\n--reference_path cnn_dm/test.target \\\r\n--score_path dbart_cnn_12_6_test_rouge.json \\\r\n--task summarization --bs 32 --fp16\r\n```\r\nin torch 1.5.1.\r\n\r\nReran Today (it took an hour)\r\n```\r\n{'rouge1': 44.2503, 'rouge2': 21.2586, 'rougeL': 30.3729, 'n_obs': 11490, 'runtime': 3569, 'seconds_per_sample': 0.3106}\r\n```\r\n\r\n\r\n", "I had tried with 1000 (based on the [comment](https://docs.google.com/spreadsheets/d/1EkhDMwVO02m8jCD1cG3RoFPLicpcL1GQHTQjfvDYgIM/edit#gid=0)), had similar results. I wouldn't have expected the result to change that much, my bad. Thanks for your help!", "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-04-12T08:47:50"
"2024-04-12T09:08:23"
"2024-04-12T09:02:12"
MEMBER
null
Fix test using latest commit SHA in hf-internal-testing/dataset_with_script dataset: https://huggingface.co/datasets/hf-internal-testing/dataset_with_script/commits/refs%2Fconvert%2Fparquet Fix #6796.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6806/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/6806/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6806", "html_url": "https://github.com/huggingface/datasets/pull/6806", "diff_url": "https://github.com/huggingface/datasets/pull/6806.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6806.patch", "merged_at": "2024-04-12T09:02:12" }
https://api.github.com/repos/huggingface/datasets/issues/6805
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6805/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6805/comments
https://api.github.com/repos/huggingface/datasets/issues/6805/events
https://github.com/huggingface/datasets/issues/6805
2,239,034,951
I_kwDODunzps6FdPZH
6,805
Batched mapping of existing string column casts boolean to string
{ "login": "starmpcc", "id": 46891489, "node_id": "MDQ6VXNlcjQ2ODkxNDg5", "avatar_url": "https://avatars.githubusercontent.com/u/46891489?v=4", "gravatar_id": "", "url": "https://api.github.com/users/starmpcc", "html_url": "https://github.com/starmpcc", "followers_url": "https://api.github.com/users/starmpcc/followers", "following_url": "https://api.github.com/users/starmpcc/following{/other_user}", "gists_url": "https://api.github.com/users/starmpcc/gists{/gist_id}", "starred_url": "https://api.github.com/users/starmpcc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/starmpcc/subscriptions", "organizations_url": "https://api.github.com/users/starmpcc/orgs", "repos_url": "https://api.github.com/users/starmpcc/repos", "events_url": "https://api.github.com/users/starmpcc/events{/privacy}", "received_events_url": "https://api.github.com/users/starmpcc/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[]
"2024-04-12T04:21:41"
"2024-04-15T12:55:19"
null
NONE
null
### Describe the bug Let the dataset contain a column named 'a', which is of the string type. If 'a' is converted to a boolean using batched mapping, the mapper automatically casts the boolean to a string (e.g., True -> 'true'). It only happens when the original column and the mapped column name are identical. Thank you! ### Steps to reproduce the bug ```python from datasets import Dataset dset = Dataset.from_dict({'a': ['11', '22']}) dset = dset.map(lambda x: {'a': [True for _ in x['a']]}, batched=True) print(dset['a']) ``` ``` > ['true', 'true'] ``` ### Expected behavior [True, True] ### Environment info - `datasets` version: 2.18.0 - Platform: Linux-5.4.0-148-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.21.4 - PyArrow version: 15.0.2 - Pandas version: 2.2.1 - `fsspec` version: 2023.12.2
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6805/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/6805/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6804
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6804/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6804/comments
https://api.github.com/repos/huggingface/datasets/issues/6804/events
https://github.com/huggingface/datasets/pull/6804
2,238,035,124
PR_kwDODunzps5sYJFF
6,804
Fix --repo-type order in cli upload docs
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6804?src=pr&el=h1) Report\n> Merging [#6804](https://codecov.io/gh/huggingface/transformers/pull/6804?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/3cac867fac3f8717b25e3026b97b456a4e748039?el=desc) will **increase** coverage by `0.03%`.\n> The diff coverage is `100.00%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6804/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6804?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6804 +/- ##\n==========================================\n+ Coverage 79.21% 79.25% +0.03% \n==========================================\n Files 157 157 \n Lines 28588 28588 \n==========================================\n+ Hits 22646 22656 +10 \n+ Misses 5942 5932 -10 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6804?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/6804/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19iYXJ0LnB5) | `95.06% <100.00%> (-0.52%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_electra.py](https://codecov.io/gh/huggingface/transformers/pull/6804/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9lbGVjdHJhLnB5) | `25.13% <0.00%> (-73.83%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6804/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9vcGVuYWkucHk=) | `22.58% <0.00%> (-72.26%)` | :arrow_down: |\n| [src/transformers/tokenization\\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/6804/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYmFydC5weQ==) | `42.10% <0.00%> (-57.90%)` | :arrow_down: |\n| [src/transformers/trainer.py](https://codecov.io/gh/huggingface/transformers/pull/6804/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90cmFpbmVyLnB5) | `13.21% <0.00%> (-40.45%)` | :arrow_down: |\n| [src/transformers/modeling\\_marian.py](https://codecov.io/gh/huggingface/transformers/pull/6804/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19tYXJpYW4ucHk=) | `60.00% <0.00%> (-30.00%)` | :arrow_down: |\n| [src/transformers/training\\_args.py](https://codecov.io/gh/huggingface/transformers/pull/6804/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90cmFpbmluZ19hcmdzLnB5) | `66.66% <0.00%> (-25.00%)` | :arrow_down: |\n| [src/transformers/trainer\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6804/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90cmFpbmVyX3V0aWxzLnB5) | `64.44% <0.00%> (-20.00%)` | :arrow_down: |\n| [src/transformers/activations.py](https://codecov.io/gh/huggingface/transformers/pull/6804/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9hY3RpdmF0aW9ucy5weQ==) | `85.00% <0.00%> (-5.00%)` | :arrow_down: |\n| [src/transformers/tokenization\\_dpr.py](https://codecov.io/gh/huggingface/transformers/pull/6804/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fZHByLnB5) | `53.15% <0.00%> (-4.51%)` | :arrow_down: |\n| ... and [14 more](https://codecov.io/gh/huggingface/transformers/pull/6804/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6804?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6804?src=pr&el=footer). Last update [3cac867...7a6bf5a](https://codecov.io/gh/huggingface/transformers/pull/6804?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "What do you mean default in config?\r\nThe default `ignore_index` is -100 for CrossEntropyLoss.\r\n`pad_token_id` is overwritten by BartConfig.", "Sorry mixed things up. This would make `BartForConditionalGeneration` behave differently from all the others models (all ModelForMaskedLM and T5ForConditionalGeneration use -100) so I think this is pretty breaking. Users probably have special code to changed padded token to -100, plus you may want to mask other things than the padding for loss computation (more relevant for masked LM than seq2seq but still).\r\n\r\nI think this is some preprocessing work to do on the labels, for instance the `DataCollatorForLanguageModeling` replaces all non-masked tokens by -100 in the labels." ]
"2024-04-11T15:39:09"
"2024-04-11T16:24:57"
"2024-04-11T16:18:47"
MEMBER
null
null
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6804/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/6804/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6804", "html_url": "https://github.com/huggingface/datasets/pull/6804", "diff_url": "https://github.com/huggingface/datasets/pull/6804.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6804.patch", "merged_at": "2024-04-11T16:18:47" }
https://api.github.com/repos/huggingface/datasets/issues/6803
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6803/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6803/comments
https://api.github.com/repos/huggingface/datasets/issues/6803/events
https://github.com/huggingface/datasets/pull/6803
2,237,933,090
PR_kwDODunzps5sXyct
6,803
#6791 Improve type checking around FAISS
{ "login": "Dref360", "id": 8976546, "node_id": "MDQ6VXNlcjg5NzY1NDY=", "avatar_url": "https://avatars.githubusercontent.com/u/8976546?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Dref360", "html_url": "https://github.com/Dref360", "followers_url": "https://api.github.com/users/Dref360/followers", "following_url": "https://api.github.com/users/Dref360/following{/other_user}", "gists_url": "https://api.github.com/users/Dref360/gists{/gist_id}", "starred_url": "https://api.github.com/users/Dref360/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Dref360/subscriptions", "organizations_url": "https://api.github.com/users/Dref360/orgs", "repos_url": "https://api.github.com/users/Dref360/repos", "events_url": "https://api.github.com/users/Dref360/events{/privacy}", "received_events_url": "https://api.github.com/users/Dref360/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[]
"2024-04-11T14:54:30"
"2024-04-11T15:44:09"
"2024-04-11T15:38:04"
CONTRIBUTOR
null
Fixes #6791 Small PR to raise a better error when a dataset is not embedded properly.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6803/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/6803/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6803", "html_url": "https://github.com/huggingface/datasets/pull/6803", "diff_url": "https://github.com/huggingface/datasets/pull/6803.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6803.patch", "merged_at": "2024-04-11T15:38:04" }
https://api.github.com/repos/huggingface/datasets/issues/6802
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6802/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6802/comments
https://api.github.com/repos/huggingface/datasets/issues/6802/events
https://github.com/huggingface/datasets/pull/6802
2,237,365,489
PR_kwDODunzps5sV0m8
6,802
Fix typo in docs (upload CLI)
{ "login": "Wauplin", "id": 11801849, "node_id": "MDQ6VXNlcjExODAxODQ5", "avatar_url": "https://avatars.githubusercontent.com/u/11801849?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Wauplin", "html_url": "https://github.com/Wauplin", "followers_url": "https://api.github.com/users/Wauplin/followers", "following_url": "https://api.github.com/users/Wauplin/following{/other_user}", "gists_url": "https://api.github.com/users/Wauplin/gists{/gist_id}", "starred_url": "https://api.github.com/users/Wauplin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Wauplin/subscriptions", "organizations_url": "https://api.github.com/users/Wauplin/orgs", "repos_url": "https://api.github.com/users/Wauplin/repos", "events_url": "https://api.github.com/users/Wauplin/events{/privacy}", "received_events_url": "https://api.github.com/users/Wauplin/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "Style issue will be solved with merge @sgugger ", "> Thanks for fixing this! I'd remove the first change in the logs though.\r\n\r\nThanks for the review! Done.", "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6802?src=pr&el=h1) Report\n> Merging [#6802](https://codecov.io/gh/huggingface/transformers/pull/6802?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/9336086ab5d232cccd9512333518cf4299528882?el=desc) will **decrease** coverage by `0.42%`.\n> The diff coverage is `89.47%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6802/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6802?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6802 +/- ##\n==========================================\n- Coverage 80.32% 79.89% -0.43% \n==========================================\n Files 157 157 \n Lines 28589 28739 +150 \n==========================================\n- Hits 22963 22960 -3 \n- Misses 5626 5779 +153 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6802?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/\\_\\_init\\_\\_.py](https://codecov.io/gh/huggingface/transformers/pull/6802/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9fX2luaXRfXy5weQ==) | `99.28% <ΓΈ> (ΓΈ)` | |\n| [src/transformers/file\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6802/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.66% <ΓΈ> (+0.25%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_flaubert.py](https://codecov.io/gh/huggingface/transformers/pull/6802/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9mbGF1YmVydC5weQ==) | `88.34% <ΓΈ> (+63.80%)` | :arrow_up: |\n| [src/transformers/optimization.py](https://codecov.io/gh/huggingface/transformers/pull/6802/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9vcHRpbWl6YXRpb24ucHk=) | `82.28% <ΓΈ> (ΓΈ)` | |\n| [src/transformers/tokenization\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6802/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdDUucHk=) | `95.28% <ΓΈ> (-0.05%)` | :arrow_down: |\n| [src/transformers/trainer.py](https://codecov.io/gh/huggingface/transformers/pull/6802/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90cmFpbmVyLnB5) | `53.23% <46.66%> (-0.43%)` | :arrow_down: |\n| [...rc/transformers/data/datasets/language\\_modeling.py](https://codecov.io/gh/huggingface/transformers/pull/6802/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL2RhdGFzZXRzL2xhbmd1YWdlX21vZGVsaW5nLnB5) | `90.69% <89.18%> (-1.14%)` | :arrow_down: |\n| [src/transformers/data/data\\_collator.py](https://codecov.io/gh/huggingface/transformers/pull/6802/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL2RhdGFfY29sbGF0b3IucHk=) | `91.90% <94.59%> (+2.19%)` | :arrow_up: |\n| [src/transformers/configuration\\_pegasus.py](https://codecov.io/gh/huggingface/transformers/pull/6802/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3BlZ2FzdXMucHk=) | `100.00% <100.00%> (ΓΈ)` | |\n| [src/transformers/data/datasets/\\_\\_init\\_\\_.py](https://codecov.io/gh/huggingface/transformers/pull/6802/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL2RhdGFzZXRzL19faW5pdF9fLnB5) | `100.00% <100.00%> (ΓΈ)` | |\n| ... and [25 more](https://codecov.io/gh/huggingface/transformers/pull/6802/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6802?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6802?src=pr&el=footer). Last update [9336086...2b981cd](https://codecov.io/gh/huggingface/transformers/pull/6802?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-04-11T10:05:05"
"2024-04-11T16:19:00"
"2024-04-11T13:19:43"
CONTRIBUTOR
null
Related to https://huggingface.slack.com/archives/C04RG8YRVB8/p1712643948574129 (interal) Positional args must be placed before optional args. Feel free to merge whenever it's ready.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6802/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/6802/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6802", "html_url": "https://github.com/huggingface/datasets/pull/6802", "diff_url": "https://github.com/huggingface/datasets/pull/6802.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6802.patch", "merged_at": "2024-04-11T13:19:43" }
https://api.github.com/repos/huggingface/datasets/issues/6801
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6801/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6801/comments
https://api.github.com/repos/huggingface/datasets/issues/6801/events
https://github.com/huggingface/datasets/issues/6801
2,236,911,556
I_kwDODunzps6FVI_E
6,801
got fileNotFound
{ "login": "laoniandisko", "id": 93729155, "node_id": "U_kgDOBZYxgw", "avatar_url": "https://avatars.githubusercontent.com/u/93729155?v=4", "gravatar_id": "", "url": "https://api.github.com/users/laoniandisko", "html_url": "https://github.com/laoniandisko", "followers_url": "https://api.github.com/users/laoniandisko/followers", "following_url": "https://api.github.com/users/laoniandisko/following{/other_user}", "gists_url": "https://api.github.com/users/laoniandisko/gists{/gist_id}", "starred_url": "https://api.github.com/users/laoniandisko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/laoniandisko/subscriptions", "organizations_url": "https://api.github.com/users/laoniandisko/orgs", "repos_url": "https://api.github.com/users/laoniandisko/repos", "events_url": "https://api.github.com/users/laoniandisko/events{/privacy}", "received_events_url": "https://api.github.com/users/laoniandisko/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[]
"2024-04-11T04:57:41"
"2024-04-12T16:47:43"
"2024-04-12T16:47:43"
NONE
null
### Describe the bug When I use load_dataset to load the nyanko7/danbooru2023 data set, the cache is read in the form of a symlink. There may be a problem with the arrow_dataset initialization process and I get FileNotFoundError: [Errno 2] No such file or directory: '2945000.jpg' ### Steps to reproduce the bug #code show as below from datasets import load_dataset data = load_dataset("nyanko7/danbooru2023",cache_dir=<symlink>) data["train"][0] ### Expected behavior I should get this result: {'image': <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=365x256 at 0x7FB730CB4070>, 'label': 0} ### Environment info datasets==2.12.0 python==3.10.14
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6801/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/6801/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6800
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6800/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6800/comments
https://api.github.com/repos/huggingface/datasets/issues/6800/events
https://github.com/huggingface/datasets/issues/6800
2,236,431,288
I_kwDODunzps6FTTu4
6,800
High overhead when loading lots of subsets from the same dataset
{ "login": "loicmagne", "id": 53355258, "node_id": "MDQ6VXNlcjUzMzU1MjU4", "avatar_url": "https://avatars.githubusercontent.com/u/53355258?v=4", "gravatar_id": "", "url": "https://api.github.com/users/loicmagne", "html_url": "https://github.com/loicmagne", "followers_url": "https://api.github.com/users/loicmagne/followers", "following_url": "https://api.github.com/users/loicmagne/following{/other_user}", "gists_url": "https://api.github.com/users/loicmagne/gists{/gist_id}", "starred_url": "https://api.github.com/users/loicmagne/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/loicmagne/subscriptions", "organizations_url": "https://api.github.com/users/loicmagne/orgs", "repos_url": "https://api.github.com/users/loicmagne/repos", "events_url": "https://api.github.com/users/loicmagne/events{/privacy}", "received_events_url": "https://api.github.com/users/loicmagne/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[]
"2024-04-10T21:08:57"
"2024-04-24T13:48:05"
null
NONE
null
### Describe the bug I have a multilingual dataset that contains a lot of subsets. Each subset corresponds to a pair of languages, you can see here an example with 250 subsets: [https://hf.co/datasets/loicmagne/open-subtitles-250-bitext-mining](). As part of the MTEB benchmark, we may need to load all the subsets of the dataset. The dataset is relatively small and contains only ~45MB of data, but when I try to load every subset, it takes 15 minutes from the HF hub and 13 minutes from the cache This issue https://github.com/huggingface/datasets/issues/5499 also referenced this overhead, but I'm wondering if there is anything I can do to speedup loading different subsets of the same dataset, both when loading from disk and from the HF hub? Currently each subset is stored in a jsonl file ### Steps to reproduce the bug ``` from datasets import load_dataset for subset in ['ka-ml', 'br-sr', 'bg-br', 'kk-lv', 'br-sk', 'br-fi', 'eu-ze_zh', 'kk-nl', 'kk-vi', 'ja-kk', 'br-sv', 'kk-zh_cn', 'kk-ms', 'br-et', 'br-hu', 'eo-kk', 'br-tr', 'ko-tl', 'te-zh_tw', 'br-hr', 'br-nl', 'ka-si', 'br-cs', 'br-is', 'br-ro', 'br-de', 'et-kk', 'fr-hy', 'br-no', 'is-ko', 'br-da', 'br-en', 'eo-lt', 'is-ze_zh', 'eu-ko', 'br-it', 'br-id', 'eu-zh_cn', 'is-ja', 'br-sl', 'br-gl', 'br-pt_br', 'br-es', 'br-pt', 'is-th', 'fa-is', 'br-ca', 'eu-ka', 'is-zh_cn', 'eu-ur', 'id-kk', 'br-sq', 'eu-ja', 'uk-ur', 'is-zh_tw', 'ka-ko', 'eu-zh_tw', 'eu-th', 'eu-is', 'is-tl', 'br-eo', 'eo-ze_zh', 'eu-te', 'ar-kk', 'eo-lv', 'ko-ze_zh', 'ml-ze_zh', 'is-lt', 'br-fr', 'ko-te', 'kk-sl', 'eu-fa', 'eo-ko', 'ka-ze_en', 'eo-eu', 'ta-zh_tw', 'eu-lv', 'ko-lv', 'lt-tl', 'eu-si', 'hy-ru', 'ar-is', 'eu-lt', 'eu-tl', 'eu-uk', 'ka-ze_zh', 'si-ze_zh', 'el-is', 'bn-is', 'ko-ze_en', 'eo-si', 'cs-kk', 'is-uk', 'eu-ze_en', 'ta-ze_zh', 'is-pl', 'is-mk', 'eu-ta', 'ko-lt', 'is-lv', 'fa-ko', 'bn-ko', 'hi-is', 'bn-ze_zh', 'bn-eu', 'bn-ja', 'is-ml', 'eu-ru', 'ko-ta', 'is-vi', 'ja-tl', 'eu-mk', 'eu-he', 'ka-zh_tw', 'ka-zh_cn', 'si-tl', 'is-kk', 'eu-fi', 'fi-ko', 'is-ur', 'ka-th', 'ko-ur', 'eo-ja', 'he-is', 'is-tr', 'ka-ur', 'et-ko', 'eu-vi', 'is-sk', 'gl-is', 'fr-is', 'is-sq', 'hu-is', 'fr-kk', 'eu-sq', 'is-ru', 'ja-ka', 'fi-tl', 'ka-lv', 'fi-is', 'is-si', 'ar-ko', 'ko-sl', 'ar-eu', 'ko-si', 'bg-is', 'eu-hu', 'ko-sv', 'bn-hu', 'kk-ro', 'eu-hi', 'ka-ms', 'ko-th', 'ko-sr', 'ko-mk', 'fi-kk', 'ka-vi', 'eu-ml', 'ko-ml', 'de-ko', 'fa-ze_zh', 'eu-sk', 'is-sl', 'et-is', 'eo-is', 'is-sr', 'is-ze_en', 'kk-pt_br', 'hr-hy', 'kk-pl', 'ja-ta', 'is-ms', 'hi-ze_en', 'is-ro', 'ko-zh_cn', 'el-eu', 'ka-pl', 'ka-sq', 'eu-sl', 'fa-ka', 'ko-no', 'si-ze_en', 'ko-uk', 'ja-ze_zh', 'hu-ko', 'kk-no', 'eu-pl', 'is-pt_br', 'bn-lv', 'tl-zh_cn', 'is-nl', 'he-ko', 'ko-sq', 'ta-th', 'lt-ta', 'da-ko', 'ca-is', 'is-ta', 'bn-fi', 'ja-ml', 'lv-si', 'eu-sv', 'ja-te', 'bn-ur', 'bn-ca', 'bs-ko', 'bs-is', 'eu-sr', 'ko-vi', 'ko-zh_tw', 'et-tl', 'kk-tr', 'eo-vi', 'is-it', 'ja-ko', 'eo-et', 'id-is', 'bn-et', 'bs-eu', 'bn-lt', 'tl-uk', 'bn-zh_tw', 'da-eu', 'el-ko', 'no-tl', 'ko-sk', 'is-pt', 'hu-kk', 'si-zh_tw', 'si-te', 'ka-ru', 'lt-ml', 'af-ja', 'bg-eu', 'eo-th', 'cs-is', 'pl-ze_zh', 'el-kk', 'kk-sv', 'ka-nl', 'ko-pl', 'bg-ko', 'ka-pt_br', 'et-eu', 'tl-zh_tw', 'ka-pt', 'id-ko', 'fi-ze_zh', 'he-kk', 'ka-tr']: load_dataset('loicmagne/open-subtitles-250-bitext-mining', subset) ``` ### Expected behavior Faster loading? ### Environment info Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.18.0 - Platform: Linux-6.5.0-27-generic-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.22.2 - PyArrow version: 15.0.2 - Pandas version: 2.2.2 - `fsspec` version: 2023.5.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6800/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6800/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6799
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6799/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6799/comments
https://api.github.com/repos/huggingface/datasets/issues/6799/events
https://github.com/huggingface/datasets/pull/6799
2,236,124,531
PR_kwDODunzps5sRk_r
6,799
fix `DatasetBuilder._split_generators` incomplete type annotation
{ "login": "JonasLoos", "id": 33965649, "node_id": "MDQ6VXNlcjMzOTY1NjQ5", "avatar_url": "https://avatars.githubusercontent.com/u/33965649?v=4", "gravatar_id": "", "url": "https://api.github.com/users/JonasLoos", "html_url": "https://github.com/JonasLoos", "followers_url": "https://api.github.com/users/JonasLoos/followers", "following_url": "https://api.github.com/users/JonasLoos/following{/other_user}", "gists_url": "https://api.github.com/users/JonasLoos/gists{/gist_id}", "starred_url": "https://api.github.com/users/JonasLoos/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JonasLoos/subscriptions", "organizations_url": "https://api.github.com/users/JonasLoos/orgs", "repos_url": "https://api.github.com/users/JonasLoos/repos", "events_url": "https://api.github.com/users/JonasLoos/events{/privacy}", "received_events_url": "https://api.github.com/users/JonasLoos/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6799?src=pr&el=h1) Report\n> Merging [#6799](https://codecov.io/gh/huggingface/transformers/pull/6799?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/02d09c8fcc6bda2c345c84cec53289abbe7532ac?el=desc) will **increase** coverage by `0.10%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6799/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6799?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6799 +/- ##\n==========================================\n+ Coverage 79.01% 79.11% +0.10% \n==========================================\n Files 157 157 \n Lines 28739 28739 \n==========================================\n+ Hits 22707 22736 +29 \n+ Misses 6032 6003 -29 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6799?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_tf\\_electra.py](https://codecov.io/gh/huggingface/transformers/pull/6799/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9lbGVjdHJhLnB5) | `25.13% <0.00%> (-73.83%)` | :arrow_down: |\n| [src/transformers/tokenization\\_marian.py](https://codecov.io/gh/huggingface/transformers/pull/6799/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fbWFyaWFuLnB5) | `32.20% <0.00%> (-66.95%)` | :arrow_down: |\n| [src/transformers/modeling\\_marian.py](https://codecov.io/gh/huggingface/transformers/pull/6799/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19tYXJpYW4ucHk=) | `60.00% <0.00%> (-30.00%)` | :arrow_down: |\n| [src/transformers/tokenization\\_reformer.py](https://codecov.io/gh/huggingface/transformers/pull/6799/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fcmVmb3JtZXIucHk=) | `81.66% <0.00%> (-13.34%)` | :arrow_down: |\n| [src/transformers/activations.py](https://codecov.io/gh/huggingface/transformers/pull/6799/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9hY3RpdmF0aW9ucy5weQ==) | `85.00% <0.00%> (-5.00%)` | :arrow_down: |\n| [src/transformers/tokenization\\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/6799/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYXV0by5weQ==) | `95.55% <0.00%> (-2.23%)` | :arrow_down: |\n| [src/transformers/configuration\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6799/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3V0aWxzLnB5) | `96.00% <0.00%> (-0.67%)` | :arrow_down: |\n| [src/transformers/modeling\\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/6799/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19iYXJ0LnB5) | `95.06% <0.00%> (-0.52%)` | :arrow_down: |\n| [src/transformers/data/data\\_collator.py](https://codecov.io/gh/huggingface/transformers/pull/6799/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL2RhdGFfY29sbGF0b3IucHk=) | `91.90% <0.00%> (-0.41%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6799/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `86.97% <0.00%> (-0.33%)` | :arrow_down: |\n| ... and [8 more](https://codecov.io/gh/huggingface/transformers/pull/6799/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6799?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6799?src=pr&el=footer). Last update [02d09c8...d6e38c4](https://codecov.io/gh/huggingface/transformers/pull/6799?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-04-10T17:46:08"
"2024-04-11T15:41:06"
"2024-04-11T15:34:58"
CONTRIBUTOR
null
solve #6798: add missing `StreamingDownloadManager` type annotation to the `dl_manager` argument of the `DatasetBuilder._split_generators` function
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6799/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/6799/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6799", "html_url": "https://github.com/huggingface/datasets/pull/6799", "diff_url": "https://github.com/huggingface/datasets/pull/6799.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6799.patch", "merged_at": "2024-04-11T15:34:58" }
https://api.github.com/repos/huggingface/datasets/issues/6798
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6798/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6798/comments
https://api.github.com/repos/huggingface/datasets/issues/6798/events
https://github.com/huggingface/datasets/issues/6798
2,235,768,891
I_kwDODunzps6FQyA7
6,798
`DatasetBuilder._split_generators` incomplete type annotation
{ "login": "JonasLoos", "id": 33965649, "node_id": "MDQ6VXNlcjMzOTY1NjQ5", "avatar_url": "https://avatars.githubusercontent.com/u/33965649?v=4", "gravatar_id": "", "url": "https://api.github.com/users/JonasLoos", "html_url": "https://github.com/JonasLoos", "followers_url": "https://api.github.com/users/JonasLoos/followers", "following_url": "https://api.github.com/users/JonasLoos/following{/other_user}", "gists_url": "https://api.github.com/users/JonasLoos/gists{/gist_id}", "starred_url": "https://api.github.com/users/JonasLoos/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JonasLoos/subscriptions", "organizations_url": "https://api.github.com/users/JonasLoos/orgs", "repos_url": "https://api.github.com/users/JonasLoos/repos", "events_url": "https://api.github.com/users/JonasLoos/events{/privacy}", "received_events_url": "https://api.github.com/users/JonasLoos/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[]
"2024-04-10T14:38:50"
"2024-04-11T15:34:59"
"2024-04-11T15:34:59"
CONTRIBUTOR
null
### Describe the bug The [`DatasetBuilder._split_generators`](https://github.com/huggingface/datasets/blob/0f27d7b77c73412cfc50b24354bfd7a3e838202f/src/datasets/builder.py#L1449) function has currently the following signature: ```python class DatasetBuilder: def _split_generators(self, dl_manager: DownloadManager): ... ``` However, the `dl_manager` argument can also be of type [`StreamingDownloadManager`](https://github.com/huggingface/datasets/blob/0f27d7b77c73412cfc50b24354bfd7a3e838202f/src/datasets/download/streaming_download_manager.py#L962), which has different functionality. For example, the `download` function doesn't download, but rather just returns the given url(s). I suggest changing the function signature to: ```python class DatasetBuilder: def _split_generators(self, dl_manager: Union[DownloadManager, StreamingDownloadManager]): ... ``` and also adjust the docstring accordingly. I would like to create a Pull Request to fix this, and have the following questions: * Are there also other options than `DownloadManager`, and `StreamingDownloadManager`? * Should this also be changed in other functions? ### Steps to reproduce the bug Minimal example to print the different class names: ```python import tempfile from datasets import load_dataset example = b''' from datasets import GeneratorBasedBuilder, DatasetInfo, Features, Value, SplitGenerator class Test(GeneratorBasedBuilder): def _info(self): return DatasetInfo(features=Features({"x": Value("int64")})) def _split_generators(self, dl_manager): print(type(dl_manager)) return [SplitGenerator('test')] def _generate_examples(self): yield 0, {'x': 42} ''' with tempfile.NamedTemporaryFile(suffix='.py') as f: f.write(example) f.flush() load_dataset(f.name, streaming=False) load_dataset(f.name, streaming=True) ``` ### Expected behavior complete type annotations ### Environment info /
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6798/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/6798/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6797
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6797/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6797/comments
https://api.github.com/repos/huggingface/datasets/issues/6797/events
https://github.com/huggingface/datasets/pull/6797
2,234,890,097
PR_kwDODunzps5sNYKZ
6,797
Fix CI test_load_dataset_distributed_with_script
{ "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 }
[]
closed
false
null
[]
null
[]
"2024-04-10T06:57:48"
"2024-04-10T08:25:00"
"2024-04-10T08:18:01"
MEMBER
null
Fix #6796.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6797/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/6797/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6797", "html_url": "https://github.com/huggingface/datasets/pull/6797", "diff_url": "https://github.com/huggingface/datasets/pull/6797.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6797.patch", "merged_at": null }
https://api.github.com/repos/huggingface/datasets/issues/6796
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6796/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6796/comments
https://api.github.com/repos/huggingface/datasets/issues/6796/events
https://github.com/huggingface/datasets/issues/6796
2,234,887,618
I_kwDODunzps6FNa3C
6,796
CI is broken due to hf-internal-testing/dataset_with_script
{ "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 }
[ { "id": 1935892857, "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": "Something isn't working" } ]
closed
false
{ "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 }
[ { "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 } ]
null
[ "Which tutorial? its called `prepare_seq2seq_batch` now.", "\"prepare_seq2seq_batch\" works. Thanks a lot.\r\n\r\nI follow this tutorial, https://huggingface.co/transformers/model_doc/marian.html\r\n\r\nWhere can I find the new user manual for MarianMT model? Thank you.\r\n", "https://huggingface.co/transformers/master/model_doc/marian.html", "Have they change it again and add a maximum length?", "I am getting: `AttributeError: 'MarianTokenizer' object has no attribute 'prepare_seq2seq_batch'`\r\n\r\nI changed it to `prepare_translation_batch` and it works", "It fails again... and changing to `prepare_seq2seq_batch` throws the deprecation warning..." ]
"2024-04-10T06:56:02"
"2024-04-12T09:02:13"
"2024-04-12T09:02:13"
MEMBER
null
CI is broken for test_load_dataset_distributed_with_script. See: https://github.com/huggingface/datasets/actions/runs/8614926216/job/23609378127 ``` FAILED tests/test_load.py::test_load_dataset_distributed_with_script[None] - assert False + where False = all(<generator object test_load_dataset_distributed_with_script.<locals>.<genexpr> at 0x7f0c741de3b0>) FAILED tests/test_load.py::test_load_dataset_distributed_with_script[force_redownload] - assert False + where False = all(<generator object test_load_dataset_distributed_with_script.<locals>.<genexpr> at 0x7f0be45f6ea0>) ```
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6796/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/6796/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6795
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6795/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6795/comments
https://api.github.com/repos/huggingface/datasets/issues/6795/events
https://github.com/huggingface/datasets/pull/6795
2,233,618,719
PR_kwDODunzps5sJAC8
6,795
Add CLI function to convert script-dataset to Parquet
{ "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 }
[]
closed
false
null
[]
null
[ "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-04-09T14:45:12"
"2024-04-17T08:41:23"
"2024-04-12T15:27:04"
MEMBER
null
Close #6690.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6795/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/6795/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6795", "html_url": "https://github.com/huggingface/datasets/pull/6795", "diff_url": "https://github.com/huggingface/datasets/pull/6795.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6795.patch", "merged_at": "2024-04-12T15:27:04" }
https://api.github.com/repos/huggingface/datasets/issues/6794
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6794/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6794/comments
https://api.github.com/repos/huggingface/datasets/issues/6794/events
https://github.com/huggingface/datasets/pull/6794
2,233,202,088
PR_kwDODunzps5sHkJF
6,794
Multithreaded downloads
{ "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
[ "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-04-09T11:13:19"
"2024-04-15T21:24:13"
"2024-04-15T21:18:08"
MEMBER
null
...for faster dataset download when there are many many small files (e.g. imagefolder, audiofolder) ### Behcnmark for example on [lhoestq/tmp-images-writer_batch_size](https://hf.co/datasets/lhoestq/tmp-images-writer_batch_size) (128 images) | | duration of the download step in `load_dataset()` | |--| ----------------------------------------------------------------------| | Before | 58s | | Now | 3s | This should fix issues with the Dataset Viewer taking too much time to show up for imagefolder/audiofolder datasets. ### Implementation details The main change is in the `DownloadManager`: ```diff - download_func = partial(self._download, download_config=download_config) + download_func = partial(self._download_batched, download_config=download_config) downloaded_path_or_paths = map_nested( download_func, url_or_urls, map_tuple=True, num_proc=download_config.num_proc, desc="Downloading data files", + batched=True, + batch_size=-1, ) ``` and `_download_batched` is a multithreaded function. I only enable multithreading if there are more than 16 files and files are small though, otherwise the progress bar that counts the number of downloaded files is not fluid (updating when a big batch of big files are done downloading). To do so I simply check if the first file is smaller than 20MB. I also had to tweak `map_nested` to support batching. In particular it slices the data correctly if the user also enables multiprocessing.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6794/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6794/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6794", "html_url": "https://github.com/huggingface/datasets/pull/6794", "diff_url": "https://github.com/huggingface/datasets/pull/6794.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6794.patch", "merged_at": "2024-04-15T21:18:08" }
https://api.github.com/repos/huggingface/datasets/issues/6793
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6793/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6793/comments
https://api.github.com/repos/huggingface/datasets/issues/6793/events
https://github.com/huggingface/datasets/issues/6793
2,231,400,200
I_kwDODunzps6FAHcI
6,793
Loading just one particular split is not possible for imagenet-1k
{ "login": "PaulPSta", "id": 165930106, "node_id": "U_kgDOCePkeg", "avatar_url": "https://avatars.githubusercontent.com/u/165930106?v=4", "gravatar_id": "", "url": "https://api.github.com/users/PaulPSta", "html_url": "https://github.com/PaulPSta", "followers_url": "https://api.github.com/users/PaulPSta/followers", "following_url": "https://api.github.com/users/PaulPSta/following{/other_user}", "gists_url": "https://api.github.com/users/PaulPSta/gists{/gist_id}", "starred_url": "https://api.github.com/users/PaulPSta/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/PaulPSta/subscriptions", "organizations_url": "https://api.github.com/users/PaulPSta/orgs", "repos_url": "https://api.github.com/users/PaulPSta/repos", "events_url": "https://api.github.com/users/PaulPSta/events{/privacy}", "received_events_url": "https://api.github.com/users/PaulPSta/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[]
"2024-04-08T14:39:14"
"2024-04-08T14:39:14"
null
NONE
null
### Describe the bug I'd expect the following code to download just the validation split but instead I get all data on my disk (train, test and validation splits) ` from datasets import load_dataset dataset = load_dataset("imagenet-1k", split="validation", trust_remote_code=True) ` Is it expected to work like that? ### Steps to reproduce the bug 1. Install the required libraries (python, datasets, huggingface_hub) 2. Login using huggingface cli 2. Run the code in the description ### Expected behavior Just a single (validation) split should be downloaded. ### Environment info python: 3.12.2 datasets: 2.18.0 huggingface_hub: 0.22.2
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6793/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6793/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6792
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6792/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6792/comments
https://api.github.com/repos/huggingface/datasets/issues/6792/events
https://github.com/huggingface/datasets/pull/6792
2,231,318,682
PR_kwDODunzps5sBEyn
6,792
Fix cache conflict in `_check_legacy_cache2`
{ "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
[ "Fixed by #6858 " ]
"2024-04-08T14:05:42"
"2024-04-09T11:34:08"
"2024-04-09T11:27:58"
MEMBER
null
It was reloading from the wrong cache dir because of a bug in `_check_legacy_cache2`. This function should not trigger if there are config_kwars like `sample_by=` fix https://github.com/huggingface/datasets/issues/6758
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6792/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/6792/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6792", "html_url": "https://github.com/huggingface/datasets/pull/6792", "diff_url": "https://github.com/huggingface/datasets/pull/6792.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6792.patch", "merged_at": "2024-04-09T11:27:57" }
https://api.github.com/repos/huggingface/datasets/issues/6791
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6791/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6791/comments
https://api.github.com/repos/huggingface/datasets/issues/6791/events
https://github.com/huggingface/datasets/issues/6791
2,230,102,332
I_kwDODunzps6E7Kk8
6,791
`add_faiss_index` raises ValueError: not enough values to unpack (expected 2, got 1)
{ "login": "NeuralFlux", "id": 40491005, "node_id": "MDQ6VXNlcjQwNDkxMDA1", "avatar_url": "https://avatars.githubusercontent.com/u/40491005?v=4", "gravatar_id": "", "url": "https://api.github.com/users/NeuralFlux", "html_url": "https://github.com/NeuralFlux", "followers_url": "https://api.github.com/users/NeuralFlux/followers", "following_url": "https://api.github.com/users/NeuralFlux/following{/other_user}", "gists_url": "https://api.github.com/users/NeuralFlux/gists{/gist_id}", "starred_url": "https://api.github.com/users/NeuralFlux/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/NeuralFlux/subscriptions", "organizations_url": "https://api.github.com/users/NeuralFlux/orgs", "repos_url": "https://api.github.com/users/NeuralFlux/repos", "events_url": "https://api.github.com/users/NeuralFlux/events{/privacy}", "received_events_url": "https://api.github.com/users/NeuralFlux/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6791?src=pr&el=h1) Report\n> Merging [#6791](https://codecov.io/gh/huggingface/transformers/pull/6791?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/930153e7d2d658267b7630a047a4bfc85b86042d?el=desc) will **increase** coverage by `0.41%`.\n> The diff coverage is `0.00%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6791/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6791?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6791 +/- ##\n==========================================\n+ Coverage 79.36% 79.78% +0.41% \n==========================================\n Files 157 157 \n Lines 28569 28578 +9 \n==========================================\n+ Hits 22675 22800 +125 \n+ Misses 5894 5778 -116 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6791?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/trainer.py](https://codecov.io/gh/huggingface/transformers/pull/6791/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90cmFpbmVyLnB5) | `52.90% <0.00%> (+39.68%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_mobilebert.py](https://codecov.io/gh/huggingface/transformers/pull/6791/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9tb2JpbGViZXJ0LnB5) | `24.55% <0.00%> (-72.36%)` | :arrow_down: |\n| [src/transformers/tokenization\\_mbart.py](https://codecov.io/gh/huggingface/transformers/pull/6791/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fbWJhcnQucHk=) | `35.93% <0.00%> (-59.38%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_distilbert.py](https://codecov.io/gh/huggingface/transformers/pull/6791/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9kaXN0aWxiZXJ0LnB5) | `64.47% <0.00%> (-34.36%)` | :arrow_down: |\n| [src/transformers/tokenization\\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/6791/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxuZXQucHk=) | `66.66% <0.00%> (-23.43%)` | :arrow_down: |\n| [src/transformers/modeling\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6791/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19vcGVuYWkucHk=) | `72.25% <0.00%> (-8.71%)` | :arrow_down: |\n| [src/transformers/configuration\\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/6791/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2JhcnQucHk=) | `90.00% <0.00%> (-4.00%)` | :arrow_down: |\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6791/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `85.21% <0.00%> (-1.26%)` | :arrow_down: |\n| [src/transformers/generation\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6791/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3V0aWxzLnB5) | `96.66% <0.00%> (-0.28%)` | :arrow_down: |\n| [src/transformers/file\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6791/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.66% <0.00%> (+0.25%)` | :arrow_up: |\n| ... and [14 more](https://codecov.io/gh/huggingface/transformers/pull/6791/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6791?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6791?src=pr&el=footer). Last update [930153e...001a17f](https://codecov.io/gh/huggingface/transformers/pull/6791?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "making sure that @borisdayma sees this PR.", "Thanks, I've not played too much with ray tune yet but there seems to be 2 ways to integrate through Ray Tune libraries as per [the docs](https://docs.wandb.com/library/integrations/ray-tune).\r\n\r\nHowever ideally, the setup, logging, etc would be handled directly by `Trainer` existing functions for clarity and concision (and also to support all existing loggers). Handling multiple logging runs should be done within `hyperparameter_search` if possible.\r\n\r\nCould the setup methods be wrapped in a new function and called during the search, in order to avoid duplicating the same logic.\r\nFor wandb, forcing a new run just requires `wandb.init(reinit=True)` so it works both in notebooks and scripts.\r\n\r\nNote: Use this argument **only** while using `hyperparameter_search` as users can currently call manually `wandb.init` before (for example when using pytorch-lightning, sweeps, or keras + huggingface), making the call within the `Trainer` a \"noop\" (because it does not have `reinit=True`).", "Thanks for your comments.\r\n\r\n@borisdayma, simply moving the logger setup to `train()` would do the trick in any case, as it is called from the hyperparameter search methods. This should also work for Optuna, not only for Ray Tune.\r\n\r\nI created a PR for that here: #6850. Is this what you meant?", "Closed in favor of #6850." ]
"2024-04-08T01:57:03"
"2024-04-11T15:38:05"
"2024-04-11T15:38:05"
NONE
null
### Describe the bug Calling `add_faiss_index` on a `Dataset` with a column argument raises a ValueError. The following is the trace ```python 214 def replacement_add(self, x): 215 """Adds vectors to the index. 216 The index must be trained before vectors can be added to it. 217 The vectors are implicitly numbered in sequence. When `n` vectors are (...) 224 `dtype` must be float32. 225 """ --> 227 n, d = x.shape 228 assert d == self.d 229 x = np.ascontiguousarray(x, dtype='float32') ValueError: not enough values to unpack (expected 2, got 1) ``` ### Steps to reproduce the bug 1. Load any dataset like `ds = datasets.load_dataset("wikimedia/wikipedia", "20231101.en")["train"]` 2. Add an FAISS index on any column `ds.add_faiss_index('title')` ### Expected behavior The index should be created ### Environment info - `datasets` version: 2.18.0 - Platform: Linux-6.5.0-26-generic-x86_64-with-glibc2.35 - Python version: 3.9.19 - `huggingface_hub` version: 0.22.2 - PyArrow version: 15.0.2 - Pandas version: 2.2.1 - `fsspec` version: 2024.2.0 - `faiss-cpu` version: 1.8.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6791/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/6791/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6790
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6790/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6790/comments
https://api.github.com/repos/huggingface/datasets/issues/6790/events
https://github.com/huggingface/datasets/issues/6790
2,229,915,236
I_kwDODunzps6E6c5k
6,790
PyArrow 'Memory mapping file failed: Cannot allocate memory' bug
{ "login": "lasuomela", "id": 25725697, "node_id": "MDQ6VXNlcjI1NzI1Njk3", "avatar_url": "https://avatars.githubusercontent.com/u/25725697?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lasuomela", "html_url": "https://github.com/lasuomela", "followers_url": "https://api.github.com/users/lasuomela/followers", "following_url": "https://api.github.com/users/lasuomela/following{/other_user}", "gists_url": "https://api.github.com/users/lasuomela/gists{/gist_id}", "starred_url": "https://api.github.com/users/lasuomela/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lasuomela/subscriptions", "organizations_url": "https://api.github.com/users/lasuomela/orgs", "repos_url": "https://api.github.com/users/lasuomela/repos", "events_url": "https://api.github.com/users/lasuomela/events{/privacy}", "received_events_url": "https://api.github.com/users/lasuomela/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-04-07T19:25:39"
"2024-04-07T20:00:54"
null
NONE
null
### Describe the bug Hello, I've been struggling with a problem using Huggingface datasets caused by PyArrow memory allocation. I finally managed to solve it, and thought to document it since similar issues have been raised here before (https://github.com/huggingface/datasets/issues/5710, https://github.com/huggingface/datasets/issues/6176). In my case, I was trying to load ~70k dataset files from disk using `datasets.load_from_disk(data_path)` (meaning 70k repeated calls to load_from_disk). This triggered an (uninformative) exception around 64k loaded files: ``` File "pyarrow/io.pxi", line 1053, in pyarrow.lib.memory_map File "pyarrow/io.pxi", line 1000, in pyarrow.lib.MemoryMappedFile._open File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status OSError: Memory mapping file failed: Cannot allocate memory ``` Despite system RAM usage being very low. After a lot of digging around, I discovered that my Ubuntu machine had a limit on the maximum number of memory mapped files in `/proc/sys/vm/max_map_count` set to 65530, which was causing my data loader to crash. Increasing the limit in the file (`echo <new_mmap_size> | sudo tee /proc/sys/vm/max_map_count`) made the issue go away. While this isn't a bug as such in either Datasets or PyArrow, this behavior can be very confusing to users. Maybe this should be mentioned in documentation? I suspect the other issues raised here about memory mapping OOM errors could actually be consequence of system configuration. Br, Lauri ### Steps to reproduce the bug ``` import numpy as np import pyarrow as pa import tqdm # Write some data to disk arr = pa.array(np.arange(100)) schema = pa.schema([ pa.field('nums', arr.type) ]) with pa.OSFile('arraydata.arrow', 'wb') as sink: with pa.ipc.new_file(sink, schema=schema) as writer: batch = pa.record_batch([arr], schema=schema) writer.write(batch) # Number of times to open the memory map nums = 70000 # Read the data back arrays = [pa.memory_map('arraydata.arrow', 'r') for _ in tqdm.tqdm(range(nums))] ``` ### Expected behavior No errors. ### Environment info datasets: 2.18.0 pyarrow: 15.0.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6790/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/6790/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6789
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6789/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6789/comments
https://api.github.com/repos/huggingface/datasets/issues/6789/events
https://github.com/huggingface/datasets/issues/6789
2,229,527,001
I_kwDODunzps6E4-HZ
6,789
Issue with map
{ "login": "Nsohko", "id": 102672238, "node_id": "U_kgDOBh6nbg", "avatar_url": "https://avatars.githubusercontent.com/u/102672238?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Nsohko", "html_url": "https://github.com/Nsohko", "followers_url": "https://api.github.com/users/Nsohko/followers", "following_url": "https://api.github.com/users/Nsohko/following{/other_user}", "gists_url": "https://api.github.com/users/Nsohko/gists{/gist_id}", "starred_url": "https://api.github.com/users/Nsohko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Nsohko/subscriptions", "organizations_url": "https://api.github.com/users/Nsohko/orgs", "repos_url": "https://api.github.com/users/Nsohko/repos", "events_url": "https://api.github.com/users/Nsohko/events{/privacy}", "received_events_url": "https://api.github.com/users/Nsohko/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "Let's say the tokens you want to add are <some_token_1> and <some_token_2> (including angle brackets)\r\n```\r\nfrom transformers import T5Tokenizer\r\ntokenizer = T5Tokenizer.from_pretrained(\"t5-base\")\r\ntokenizer.add_tokens(['<some_token_1>', '<some_token_2'>])\r\n```", "I want to add this line in addition to modifying the tokenizer for the model to work with the new tokenizer:\r\n\r\n`model.resize_token_embeddings(len(tokenizer))`" ]
"2024-04-07T02:52:06"
"2024-04-15T16:43:48"
null
NONE
null
### Describe the bug Map has been taking extremely long to preprocess my data. It seems to process 1000 examples (which it does really fast in about 10 seconds), then it hangs for a good 1-2 minutes, before it moves on to the next batch of 1000 examples. It also keeps eating up my hard drive space for some reason by creating a file named tmp1335llua that is over 300GB. Trying to set num_proc to be >1 also gives me the following error: NameError: name 'processor' is not defined Please advise on how I could optimise this? ### Steps to reproduce the bug In general, I have been using map as per normal. Here is a snippet of my code: ```` ########################### DATASET LOADING AND PREP ######################### def load_custom_dataset(split): ds = [] if split == 'train': for dset in args.train_datasets: ds.append(load_from_disk(dset)) if split == 'test': for dset in args.test_datasets: ds.append(load_from_disk(dset)) ds_to_return = concatenate_datasets(ds) ds_to_return = ds_to_return.shuffle(seed=22) return ds_to_return def prepare_dataset(batch): # load and (possibly) resample audio data to 16kHz audio = batch["audio"] # compute log-Mel input features from input audio array batch["input_features"] = processor.feature_extractor(audio["array"], sampling_rate=audio["sampling_rate"]).input_features[0] # compute input length of audio sample in seconds batch["input_length"] = len(audio["array"]) / audio["sampling_rate"] # optional pre-processing steps transcription = batch["sentence"] if do_lower_case: transcription = transcription.lower() if do_remove_punctuation: transcription = normalizer(transcription).strip() # encode target text to label ids batch["labels"] = processor.tokenizer(transcription).input_ids return batch print('DATASET PREPARATION IN PROGRESS...') # case 3: combine_and_shuffle is true, only train provided # load train datasets train_set = load_custom_dataset('train') # split dataset raw_dataset = DatasetDict() raw_dataset = train_set.train_test_split(test_size = args.test_size, shuffle=True, seed=42) raw_dataset = raw_dataset.cast_column("audio", Audio(sampling_rate=args.sampling_rate)) print("Before Map:") print(raw_dataset) raw_dataset = raw_dataset.map(prepare_dataset, num_proc=1) print("After Map:") print(raw_dataset) ```` ### Expected behavior Based on the speed at which map is processing examples, I would expect a 5-6 hours completion for all mapping However, because it hangs every 1000 examples, I instead roughly estimate it would take about 40 hours! Moreover, i cant even finish the map because it keeps exponentially eating up my hard drive space ### Environment info - `datasets` version: 2.18.0 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.10.14 - `huggingface_hub` version: 0.22.2 - PyArrow version: 15.0.2 - Pandas version: 2.2.1 - `fsspec` version: 2024.2.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6789/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/6789/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6788
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6788/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6788/comments
https://api.github.com/repos/huggingface/datasets/issues/6788/events
https://github.com/huggingface/datasets/issues/6788
2,229,207,521
I_kwDODunzps6E3wHh
6,788
A Question About the Map Function
{ "login": "ys-lan", "id": 87431052, "node_id": "MDQ6VXNlcjg3NDMxMDUy", "avatar_url": "https://avatars.githubusercontent.com/u/87431052?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ys-lan", "html_url": "https://github.com/ys-lan", "followers_url": "https://api.github.com/users/ys-lan/followers", "following_url": "https://api.github.com/users/ys-lan/following{/other_user}", "gists_url": "https://api.github.com/users/ys-lan/gists{/gist_id}", "starred_url": "https://api.github.com/users/ys-lan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ys-lan/subscriptions", "organizations_url": "https://api.github.com/users/ys-lan/orgs", "repos_url": "https://api.github.com/users/ys-lan/repos", "events_url": "https://api.github.com/users/ys-lan/events{/privacy}", "received_events_url": "https://api.github.com/users/ys-lan/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6788?src=pr&el=h1) Report\n> Merging [#6788](https://codecov.io/gh/huggingface/transformers/pull/6788?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/930153e7d2d658267b7630a047a4bfc85b86042d?el=desc) will **decrease** coverage by `2.98%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6788/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6788?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6788 +/- ##\n==========================================\n- Coverage 79.36% 76.38% -2.99% \n==========================================\n Files 157 157 \n Lines 28569 28569 \n==========================================\n- Hits 22675 21822 -853 \n- Misses 5894 6747 +853 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6788?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_reformer.py](https://codecov.io/gh/huggingface/transformers/pull/6788/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yZWZvcm1lci5weQ==) | `16.87% <0.00%> (-79.30%)` | :arrow_down: |\n| [src/transformers/configuration\\_reformer.py](https://codecov.io/gh/huggingface/transformers/pull/6788/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3JlZm9ybWVyLnB5) | `21.62% <0.00%> (-78.38%)` | :arrow_down: |\n| [src/transformers/tokenization\\_xlm.py](https://codecov.io/gh/huggingface/transformers/pull/6788/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxtLnB5) | `16.26% <0.00%> (-66.67%)` | :arrow_down: |\n| [src/transformers/configuration\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6788/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX29wZW5haS5weQ==) | `34.28% <0.00%> (-62.86%)` | :arrow_down: |\n| [src/transformers/tokenization\\_mbart.py](https://codecov.io/gh/huggingface/transformers/pull/6788/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fbWJhcnQucHk=) | `35.93% <0.00%> (-59.38%)` | :arrow_down: |\n| [src/transformers/modeling\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6788/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19vcGVuYWkucHk=) | `23.87% <0.00%> (-57.10%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_distilbert.py](https://codecov.io/gh/huggingface/transformers/pull/6788/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9kaXN0aWxiZXJ0LnB5) | `64.47% <0.00%> (-34.36%)` | :arrow_down: |\n| [src/transformers/tokenization\\_ctrl.py](https://codecov.io/gh/huggingface/transformers/pull/6788/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fY3RybC5weQ==) | `78.64% <0.00%> (-17.48%)` | :arrow_down: |\n| [src/transformers/tokenization\\_utils\\_fast.py](https://codecov.io/gh/huggingface/transformers/pull/6788/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfZmFzdC5weQ==) | `81.42% <0.00%> (-12.86%)` | :arrow_down: |\n| [src/transformers/tokenization\\_transfo\\_xl.py](https://codecov.io/gh/huggingface/transformers/pull/6788/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdHJhbnNmb194bC5weQ==) | `33.56% <0.00%> (-8.93%)` | :arrow_down: |\n| ... and [18 more](https://codecov.io/gh/huggingface/transformers/pull/6788/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6788?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6788?src=pr&el=footer). Last update [930153e...3482a3e](https://codecov.io/gh/huggingface/transformers/pull/6788?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-04-06T11:45:23"
"2024-04-11T05:29:35"
"2024-04-11T05:29:35"
NONE
null
### Describe the bug Hello, I have a question regarding the map function in the Hugging Face datasets. The situation is as follows: when I load a jsonl file using load_dataset(..., streaming=False), and then utilize the map function to process it, I specify that the returned example should be of type Torch.tensor. However, I noticed that after applying the map function, the datatype automatically changes to List, which leads to errors in my program. I attempted to use load_dataset(..., streaming=True), and this issue no longer occurs. I'm not entirely clear on why this happens. Could you please provide some insights into this? ### Steps to reproduce the bug 1.dataset = load_dataset(xxx, streaming = False) 2. dataset.map(function), function will return torch.Tensor. 3. you will find the format of data in dataset is List. ### Expected behavior I expected to receieve the format of data is torch.Tensor. ### Environment info 2.18.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6788/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/6788/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6787
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6787/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6787/comments
https://api.github.com/repos/huggingface/datasets/issues/6787/events
https://github.com/huggingface/datasets/issues/6787
2,229,103,264
I_kwDODunzps6E3Wqg
6,787
TimeoutError in map
{ "login": "Jiaxin-Wen", "id": 48146603, "node_id": "MDQ6VXNlcjQ4MTQ2NjAz", "avatar_url": "https://avatars.githubusercontent.com/u/48146603?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Jiaxin-Wen", "html_url": "https://github.com/Jiaxin-Wen", "followers_url": "https://api.github.com/users/Jiaxin-Wen/followers", "following_url": "https://api.github.com/users/Jiaxin-Wen/following{/other_user}", "gists_url": "https://api.github.com/users/Jiaxin-Wen/gists{/gist_id}", "starred_url": "https://api.github.com/users/Jiaxin-Wen/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Jiaxin-Wen/subscriptions", "organizations_url": "https://api.github.com/users/Jiaxin-Wen/orgs", "repos_url": "https://api.github.com/users/Jiaxin-Wen/repos", "events_url": "https://api.github.com/users/Jiaxin-Wen/events{/privacy}", "received_events_url": "https://api.github.com/users/Jiaxin-Wen/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "Hi,\r\n\r\nHave a look at the following script from Huggingface:\r\n\r\nhttps://github.com/huggingface/transformers/blob/master/examples/token-classification/run_ner.py\r\n\r\nIt shows how you can finetune a pretrained BERT-model for NER.\r\nRemember to take a look at the utility code as well, since this is the code preparing and creating your features (and tensors in general).\r\n\r\nhttps://github.com/huggingface/transformers/blob/master/examples/token-classification/utils_ner.py\r\n\r\nRegards", "\r\n> Hi,\r\n> \r\n> Have a look at the following script from Huggingface:\r\n> \r\n> https://github.com/huggingface/transformers/blob/master/examples/token-classification/run_ner.py\r\n> \r\n> It shows how you can finetune a pretrained BERT-model for NER.\r\n> Remember to take a look at the utility code as well, since this is the code preparing and creating your features (and tensors in general).\r\n> \r\n> https://github.com/huggingface/transformers/blob/master/examples/token-classification/utils_ner.py\r\n> \r\n> Regards\r\n\r\nThanks for your response very much.\r\n\r\nActually I am not good at python programming.\r\n\r\nrun_ner.py could create a new pretrained model or I could us it to fine tune a existed model to my target NER task?\r\n\r\nWhat are the functions of these two programs? And what parameters should I set?\r\nWhat are the formats of train and test data?\r\n\r\nI also could not find these two programs in the download folder. \r\n![image](https://user-images.githubusercontent.com/16911126/93067378-ba15fe00-f6ad-11ea-99ab-e4fd87742e0b.png)\r\n\r\nBy the way, could you offer the tutorial of colab format of NER task just like below link?\r\nhttps://www.depends-on-the-definition.com/named-entity-recognition-with-bert/\r\n\r\nIt is complicated and consuming to set virtual environment in PC.\r\n\r\nThank you\r\n Best regards; \r\n\r\n\r\n", "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-04-06T06:25:39"
"2024-04-13T06:34:59"
null
CONTRIBUTOR
null
### Describe the bug ```python from datasets import Dataset def worker(example): while True: continue example['a'] = 100 return example data = Dataset.from_list([{"a": 1}, {"a": 2}]) data = data.map(worker) print(data[0]) ``` I'm implementing a worker function whose runtime will depend on specific examples (e.g., while most examples take 0.01s in worker, several examples may take 50s). Therefore, I would like to know how the current implementation will handle those subprocesses that require a long (e.g., >= 5min) or even infinite time. I notice that the current implementation set a timeout of 0.05 second https://github.com/huggingface/datasets/blob/c3ddb1ef00334a6f973679a51e783905fbc9ef0b/src/datasets/utils/py_utils.py#L674 However, this example code still gets stuck. ### Steps to reproduce the bug run the example above ### Expected behavior I want to set a default worker to handle these timeout cases, instead of getting stuck ### Environment info main branch version
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6787/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/6787/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6786
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6786/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6786/comments
https://api.github.com/repos/huggingface/datasets/issues/6786/events
https://github.com/huggingface/datasets/pull/6786
2,228,463,776
PR_kwDODunzps5r3kWg
6,786
Make Image cast storage faster
{ "login": "Modexus", "id": 37351874, "node_id": "MDQ6VXNlcjM3MzUxODc0", "avatar_url": "https://avatars.githubusercontent.com/u/37351874?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Modexus", "html_url": "https://github.com/Modexus", "followers_url": "https://api.github.com/users/Modexus/followers", "following_url": "https://api.github.com/users/Modexus/following{/other_user}", "gists_url": "https://api.github.com/users/Modexus/gists{/gist_id}", "starred_url": "https://api.github.com/users/Modexus/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Modexus/subscriptions", "organizations_url": "https://api.github.com/users/Modexus/orgs", "repos_url": "https://api.github.com/users/Modexus/repos", "events_url": "https://api.github.com/users/Modexus/events{/privacy}", "received_events_url": "https://api.github.com/users/Modexus/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "When I add torch.manual_seed(0) at the beginning the outputs will be the same.\r\ndoes the model from tf pretrained has some randomization when loading the model weights?", "Hmm, there sholud always be the same. Could you add your script to a google colab that allows to run your checkpoint, so that we can debug?", "Hi here is the colab script with my checkpoint uploaded:\r\nhttps://colab.research.google.com/drive/1Yx7zRkzpaGMMraTkIeIGnJJLnlpUKzQH?usp=sharing\r\n\r\nyou can download my checkpoint here: https://drive.google.com/drive/folders/1521pvzvkqvEBUvRqZn7CRO-soCXOUZCu?usp=sharing", "I think some layers in your T5 model have not been trained and are therefore not saved in your model checkpoint. At initialization this layer is then randomely initialized. \r\n\r\nOne thing you can do to verify is to load the model as follows, save it as a PyTorch model and then load the PyTorch model as follows.\r\n\r\n```python \r\nconfig = T5Config.from_pretrained('t5-base')\r\nmodel = T5ForConditionalGeneration.from_pretrained(\r\n \"sample_data/model/model.ckpt-1004000\", from_tf=True, config=config)\r\nmodel.save_pretrained(\"./model\")\r\nmodel = T5ForConditionalGeneration.from_pretrained(\"/.model\")\r\n```\r\n\r\nif this command throws a warning that some layers are not initialized, then you know what the problem is.\r\nIf not, I will take a look again :-) \r\n", "hi, I tried what you said, no warning shows up.\r\nso I guess it is not the case?\r\n\r\nDo you think it could be that weights from float64 to float32 or the opposite causing this problem? because the difference in outputs is tiny. I don't know, this still cannot explain why outputs are different every time.", "any updates?", "Hey @ArvinZhuang, \r\n\r\nI just downloaded the weights and tried to reproduce the error using your code snippet. In my case the output is deterministic, as expected. Could you make sure that you are using the newest version of transformers and try again?", "Hi, the outputs still different on my machine.... very strange.\r\n\r\nI'm using transformer v3.3.0\r\ntorch v1.6.0\r\nTensorFlow v2.3.1 \r\n\r\n![image](https://user-images.githubusercontent.com/46237844/94499979-607f0900-0241-11eb-8b64-3b91d4ef1d31.png)\r\n\r\nand btw, I cannot directly load t5 config by using T5Config.from_pretrained('t5-base') now, but the 't5-base' is still in the \"https://huggingface.co/models\" list. So I copy and past config.json from \"https://huggingface.co/t5-base\" but the results show this time is very different from the post above, which I think should not be the case because the tf checkpoint and input string are exactly the same as before....\r\n\r\n\r\nupdates: can directly load t5 config by T5Config.from_pretrained('t5-base') now, however, the output logits still very different from my first post above.....", "+1 on the issue\r\nI'm using transformer ==3.4.0\r\ntorch==1.6.0\r\n\r\nI run:\r\n\r\n```\r\nfrom transformers import AutoTokenizer, AutoModelForSeq2SeqLM, AutoConfig\r\n\r\nconfig = AutoConfig.from_pretrained(\"Vamsi/T5_Paraphrase_Paws\", output_hidden_states=True) \r\ntokenizer = AutoTokenizer.from_pretrained(\"Vamsi/T5_Paraphrase_Paws\") \r\nmodel = AutoModelForSeq2SeqLM.from_pretrained(\"Vamsi/T5_Paraphrase_Paws\", config=config).to('cuda')\r\n\r\ndef prediction(documents, query):\r\n querys = [query] * len(documents)\r\n encoded_decoder_inputs = tokenizer(documents, padding=True, truncation=True, return_tensors=\"pt\").to('cuda')\r\n encoded_encoder_inputs = tokenizer(querys, padding=True, truncation=True, return_tensors=\"pt\").to('cuda')\r\n with torch.no_grad():\r\n outputs = model(input_ids=encoded_encoder_inputs[\"input_ids\"],\r\n labels=encoded_decoder_inputs[\"input_ids\"],\r\n attention_mask=encoded_encoder_inputs[\"attention_mask\"])\r\n batch_logits = outputs[1]\r\n print(batch_logits)\r\n\r\ndocuments = ['a', 'b']\r\nquery = \"who am I?\"\r\nprediction(documents, query) \r\n```\r\n\r\nand got:\r\n```\r\ntensor([[[-21.6500, -9.8658, -13.6561, ..., -43.1233, -43.0788, -43.0745],\r\n [-30.3906, -12.7200, -1.2460, ..., -41.7208, -41.6774, -41.6465],\r\n [-15.7073, -5.9496, -5.9364, ..., -36.8553, -36.8221, -36.8052]],\r\n\r\ntensor([[[-21.6500, -9.8658, -13.6561, ..., -43.1233, -43.0788, -43.0745],\r\n [-30.3906, -12.7200, -1.2460, ..., -41.7208, -41.6774, -41.6465],\r\n [-20.1459, -5.3198, -4.7644, ..., -37.7978, -37.7850, -37.8202]]],\r\n device='cuda:0')\r\n```\r\nNote: rerunning ` prediction(documents, query)` produces same deterministic results, suggesting that the inputs to `labels` do affect the `logits` outcome.", "Hi ednussi, \r\nyes, rerunning prediction(documents, query) will give deterministic results. \r\nHowever, my issue is rerunning the above chunk of code twice (reload everything, including model.). the outputs are different.\r\nDoes this also happen to you?\r\n\r\nUpdate:\r\nI tried the model provided by ednussi, and the outputs of running the code twice are the same. But my tf model still gives two different results, suggesting that loading model from tf gives different outcomes.", "Hi @ArvinZhuang,\r\nYes, similar to you when I run the model call with same input_ids but different labels I got different outcomes (using pytorch). Realized I missed a part of the print so edited my comment above to match the output.\r\nHoping @patrickvonplaten or someone from the `huggingface` team can take a second look, so we can get to the bottom of this.", "Hey @ednussi, if you look into the code, you can see that T5 uses the `labels` to create the `decoder_input_ids` which necessarily do affect the outputs. You can try using deterministic `input_ids` and `decoder_input_ids` and no labels and see if the output stays deterministic (it should).", "Thanks @patrickvonplaten.\r\nWas following your suggestion, and after reading through the documentation and code of how the `decoder_input_ids` is used, it became clear why it affects the `logits` and helped clear my confusion.", "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n", "@ednussi - wanted to ask for your help if you could provide a brief explanation from your reading? Thanks." ]
"2024-04-05T17:00:46"
"2024-04-23T07:02:00"
null
CONTRIBUTOR
null
PR for issue #6782. Makes `cast_storage` of the `Image` class faster by removing the slow call to `.pylist`. Instead directly convert each `ListArray` item to either `Array2DExtensionType` or `Array3DExtensionType`. This also preserves the `dtype` removing the warning if the array is already `uint8`.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6786/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/6786/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6786", "html_url": "https://github.com/huggingface/datasets/pull/6786", "diff_url": "https://github.com/huggingface/datasets/pull/6786.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6786.patch", "merged_at": null }
https://api.github.com/repos/huggingface/datasets/issues/6785
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6785/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6785/comments
https://api.github.com/repos/huggingface/datasets/issues/6785/events
https://github.com/huggingface/datasets/pull/6785
2,228,429,852
PR_kwDODunzps5r3dCw
6,785
rename datasets-server to dataset-viewer
{ "login": "severo", "id": 1676121, "node_id": "MDQ6VXNlcjE2NzYxMjE=", "avatar_url": "https://avatars.githubusercontent.com/u/1676121?v=4", "gravatar_id": "", "url": "https://api.github.com/users/severo", "html_url": "https://github.com/severo", "followers_url": "https://api.github.com/users/severo/followers", "following_url": "https://api.github.com/users/severo/following{/other_user}", "gists_url": "https://api.github.com/users/severo/gists{/gist_id}", "starred_url": "https://api.github.com/users/severo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/severo/subscriptions", "organizations_url": "https://api.github.com/users/severo/orgs", "repos_url": "https://api.github.com/users/severo/repos", "events_url": "https://api.github.com/users/severo/events{/privacy}", "received_events_url": "https://api.github.com/users/severo/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[]
"2024-04-05T16:37:05"
"2024-04-08T12:41:13"
"2024-04-08T12:35:02"
CONTRIBUTOR
null
See https://github.com/huggingface/dataset-viewer/issues/2650 Tell me if it's OK, or if it's a breaking change that must be handled differently. Also note that the docs page is still https://huggingface.co/docs/datasets-server/, so I didn't change it. And the API URL is still https://datasets-server.huggingface.co/ (and [might always be](https://github.com/huggingface/dataset-viewer/issues/2666)), so I let it too.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6785/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/6785/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6785", "html_url": "https://github.com/huggingface/datasets/pull/6785", "diff_url": "https://github.com/huggingface/datasets/pull/6785.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6785.patch", "merged_at": "2024-04-08T12:35:02" }
https://api.github.com/repos/huggingface/datasets/issues/6784
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6784/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6784/comments
https://api.github.com/repos/huggingface/datasets/issues/6784/events
https://github.com/huggingface/datasets/pull/6784
2,228,390,504
PR_kwDODunzps5r3UTj
6,784
Extract data on the fly in packaged builders
{ "login": "mariosasko", "id": 47462742, "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mariosasko", "html_url": "https://github.com/mariosasko", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "repos_url": "https://api.github.com/users/mariosasko/repos", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[]
"2024-04-05T16:12:25"
"2024-04-16T16:37:47"
"2024-04-16T16:31:29"
COLLABORATOR
null
Instead of waiting for data files to be extracted in the packaged builders, we can prepend the compression prefix and extract them as they are being read (using `fsspec`). This saves disk space (deleting extracted archives is not set by default) and slightly speeds up dataset generation (less disk reads)
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6784/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/6784/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6784", "html_url": "https://github.com/huggingface/datasets/pull/6784", "diff_url": "https://github.com/huggingface/datasets/pull/6784.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6784.patch", "merged_at": "2024-04-16T16:31:29" }
https://api.github.com/repos/huggingface/datasets/issues/6783
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6783/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6783/comments
https://api.github.com/repos/huggingface/datasets/issues/6783/events
https://github.com/huggingface/datasets/issues/6783
2,228,179,466
I_kwDODunzps6Ez1IK
6,783
AttributeError: module 'numpy' has no attribute 'object'. in Kaggle Notebook
{ "login": "petrov826", "id": 26062262, "node_id": "MDQ6VXNlcjI2MDYyMjYy", "avatar_url": "https://avatars.githubusercontent.com/u/26062262?v=4", "gravatar_id": "", "url": "https://api.github.com/users/petrov826", "html_url": "https://github.com/petrov826", "followers_url": "https://api.github.com/users/petrov826/followers", "following_url": "https://api.github.com/users/petrov826/following{/other_user}", "gists_url": "https://api.github.com/users/petrov826/gists{/gist_id}", "starred_url": "https://api.github.com/users/petrov826/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/petrov826/subscriptions", "organizations_url": "https://api.github.com/users/petrov826/orgs", "repos_url": "https://api.github.com/users/petrov826/repos", "events_url": "https://api.github.com/users/petrov826/events{/privacy}", "received_events_url": "https://api.github.com/users/petrov826/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "@sshleifer I can help out here. What exactly are you looking for?", "I'll take care of it actually, sorry! There is a harder one at #6785 if you're interested.", "Fixed, using sortish sampler for val. Much faster!" ]
"2024-04-05T14:31:48"
"2024-04-11T17:18:53"
"2024-04-11T17:18:53"
NONE
null
### Describe the bug # problem I can't resample audio dataset in Kaggle Notebook. It looks like some code in `datasets` library use aliases that were deprecated in NumPy 1.20. ## code for resampling ``` from datasets import load_dataset, Audio from transformers import AutoFeatureExtractor from transformers import AutoModelForAudioClassification, TrainingArguments, Trainer minds = load_dataset("PolyAI/minds14", name="en-US", split="train") feature_extractor = AutoFeatureExtractor.from_pretrained("facebook/wav2vec2-base") def preprocess_function(examples): audio_arrays = [x["array"] for x in examples["audio"]] inputs = feature_extractor( audio_arrays, sampling_rate=feature_extractor.sampling_rate, max_length=16000, truncation=True ) return inputs dataset = dataset.map(preprocess_function, remove_columns="audio", batched=True, batch_size=100) ``` ## the error I got <details> <summary>Click to expand</summary> ``` --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[20], line 1 ----> 1 dataset = dataset.map(preprocess_function, remove_columns="audio", batched=True, batch_size=100) 2 dataset File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1955, in Dataset.map(self, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1952 disable_tqdm = not logging.is_progress_bar_enabled() 1954 if num_proc is None or num_proc == 1: -> 1955 return self._map_single( 1956 function=function, 1957 with_indices=with_indices, 1958 with_rank=with_rank, 1959 input_columns=input_columns, 1960 batched=batched, 1961 batch_size=batch_size, 1962 drop_last_batch=drop_last_batch, 1963 remove_columns=remove_columns, 1964 keep_in_memory=keep_in_memory, 1965 load_from_cache_file=load_from_cache_file, 1966 cache_file_name=cache_file_name, 1967 writer_batch_size=writer_batch_size, 1968 features=features, 1969 disable_nullable=disable_nullable, 1970 fn_kwargs=fn_kwargs, 1971 new_fingerprint=new_fingerprint, 1972 disable_tqdm=disable_tqdm, 1973 desc=desc, 1974 ) 1975 else: 1977 def format_cache_file_name(cache_file_name, rank): File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:520, in transmit_tasks.<locals>.wrapper(*args, **kwargs) 518 self: "Dataset" = kwargs.pop("self") 519 # apply actual function --> 520 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 521 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 522 for dataset in datasets: 523 # Remove task templates if a column mapping of the template is no longer valid File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:487, in transmit_format.<locals>.wrapper(*args, **kwargs) 480 self_format = { 481 "type": self._format_type, 482 "format_kwargs": self._format_kwargs, 483 "columns": self._format_columns, 484 "output_all_columns": self._output_all_columns, 485 } 486 # apply actual function --> 487 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 488 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 489 # re-apply format to the output File /opt/conda/lib/python3.10/site-packages/datasets/fingerprint.py:458, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 452 kwargs[fingerprint_name] = update_fingerprint( 453 self._fingerprint, transform, kwargs_for_fingerprint 454 ) 456 # Call actual function --> 458 out = func(self, *args, **kwargs) 460 # Update fingerprint of in-place transforms + update in-place history of transforms 462 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:2356, in Dataset._map_single(self, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, disable_tqdm, desc, cache_only) 2354 writer.write_table(batch) 2355 else: -> 2356 writer.write_batch(batch) 2357 if update_data and writer is not None: 2358 writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file File /opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py:507, in ArrowWriter.write_batch(self, batch_examples, writer_batch_size) 505 col_try_type = try_features[col] if try_features is not None and col in try_features else None 506 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col) --> 507 arrays.append(pa.array(typed_sequence)) 508 inferred_features[col] = typed_sequence.get_inferred_type() 509 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema File /opt/conda/lib/python3.10/site-packages/pyarrow/array.pxi:236, in pyarrow.lib.array() File /opt/conda/lib/python3.10/site-packages/pyarrow/array.pxi:110, in pyarrow.lib._handle_arrow_array_protocol() File /opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py:184, in TypedSequence.__arrow_array__(self, type) 182 out = numpy_to_pyarrow_listarray(data) 183 elif isinstance(data, list) and data and isinstance(first_non_null_value(data)[1], np.ndarray): --> 184 out = list_of_np_array_to_pyarrow_listarray(data) 185 else: 186 trying_cast_to_python_objects = True File /opt/conda/lib/python3.10/site-packages/datasets/features/features.py:1174, in list_of_np_array_to_pyarrow_listarray(l_arr, type) 1172 """Build a PyArrow ListArray from a possibly nested list of NumPy arrays""" 1173 if len(l_arr) > 0: -> 1174 return list_of_pa_arrays_to_pyarrow_listarray( 1175 [numpy_to_pyarrow_listarray(arr, type=type) if arr is not None else None for arr in l_arr] 1176 ) 1177 else: 1178 return pa.array([], type=type) File /opt/conda/lib/python3.10/site-packages/datasets/features/features.py:1163, in list_of_pa_arrays_to_pyarrow_listarray(l_arr) 1160 null_indices = [i for i, arr in enumerate(l_arr) if arr is None] 1161 l_arr = [arr for arr in l_arr if arr is not None] 1162 offsets = np.cumsum( -> 1163 [0] + [len(arr) for arr in l_arr], dtype=np.object 1164 ) # convert to dtype object to allow None insertion 1165 offsets = np.insert(offsets, null_indices, None) 1166 offsets = pa.array(offsets, type=pa.int32()) File /opt/conda/lib/python3.10/site-packages/numpy/__init__.py:324, in __getattr__(attr) 319 warnings.warn( 320 f"In the future `np.{attr}` will be defined as the " 321 "corresponding NumPy scalar.", FutureWarning, stacklevel=2) 323 if attr in __former_attrs__: --> 324 raise AttributeError(__former_attrs__[attr]) 326 if attr == 'testing': 327 import numpy.testing as testing AttributeError: module 'numpy' has no attribute 'object'. `np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations ``` </details> ### Steps to reproduce the bug Run above code in Kaggle Notebook. ### Expected behavior I can resample audio data without fail. ### Environment info - `datasets` version: 2.1.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.31 - Python version: 3.10.13 - PyArrow version: 11.0.0 - Pandas version: 2.2.1
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6783/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/6783/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6782
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6782/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6782/comments
https://api.github.com/repos/huggingface/datasets/issues/6782/events
https://github.com/huggingface/datasets/issues/6782
2,228,081,955
I_kwDODunzps6EzdUj
6,782
Image cast_storage very slow for arrays (e.g. numpy, tensors)
{ "login": "Modexus", "id": 37351874, "node_id": "MDQ6VXNlcjM3MzUxODc0", "avatar_url": "https://avatars.githubusercontent.com/u/37351874?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Modexus", "html_url": "https://github.com/Modexus", "followers_url": "https://api.github.com/users/Modexus/followers", "following_url": "https://api.github.com/users/Modexus/following{/other_user}", "gists_url": "https://api.github.com/users/Modexus/gists{/gist_id}", "starred_url": "https://api.github.com/users/Modexus/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Modexus/subscriptions", "organizations_url": "https://api.github.com/users/Modexus/orgs", "repos_url": "https://api.github.com/users/Modexus/repos", "events_url": "https://api.github.com/users/Modexus/events{/privacy}", "received_events_url": "https://api.github.com/users/Modexus/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "weird, I thought I had a newer version, but it was old for some reason. updating to `pip install black==20.8b1` resolved this." ]
"2024-04-05T13:46:54"
"2024-04-10T14:36:13"
null
CONTRIBUTOR
null
Update: see comments below ### Describe the bug Operations that save an image from a path are very slow. I believe the reason for this is that the image data (`numpy`) is converted into `pyarrow` format but then back to python using `.pylist()` before being converted to a numpy array again. `pylist` is already slow but used on a multi-dimensional numpy array such as an image it takes a very long time. From the trace below we can see that `__arrow_array__` takes a long time. It is currently also called in `get_inferred_type`, this should be removable #6781 but doesn't change the underyling issue. The conversion to `pyarrow` and back also leads to the `numpy` array having type `int64` which causes a warning message because the image type excepts `uint8`. However, originally the `numpy` image array was in `uint8`. ### Steps to reproduce the bug ```python from PIL import Image import numpy as np import datasets import cProfile image = Image.fromarray(np.random.randint(0, 255, (2048, 2048, 3), dtype=np.uint8)) image.save("test_image.jpg") ds = datasets.Dataset.from_dict( {"image": ["test_image.jpg"]}, features=datasets.Features({"image": datasets.Image(decode=True)}), ) # load as numpy array, e.g. for further processing with map # same result as map returning numpy arrays ds.set_format("numpy") cProfile.run("ds.map(writer_batch_size=1, load_from_cache_file=False)", "restats") ``` ```bash Fri Apr 5 14:56:17 2024 restats 66817 function calls (64992 primitive calls) in 33.382 seconds Ordered by: cumulative time List reduced from 1073 to 20 due to restriction <20> ncalls tottime percall cumtime percall filename:lineno(function) 46/1 0.000 0.000 33.382 33.382 {built-in method builtins.exec} 1 0.000 0.000 33.382 33.382 <string>:1(<module>) 1 0.000 0.000 33.382 33.382 arrow_dataset.py:594(wrapper) 1 0.000 0.000 33.382 33.382 arrow_dataset.py:551(wrapper) 1 0.000 0.000 33.379 33.379 arrow_dataset.py:2916(map) 4 0.000 0.000 33.327 8.332 arrow_dataset.py:3277(_map_single) 1 0.000 0.000 33.311 33.311 arrow_writer.py:465(write) 2 0.000 0.000 33.311 16.656 arrow_writer.py:423(write_examples_on_file) 1 0.000 0.000 33.311 33.311 arrow_writer.py:527(write_batch) 2 14.484 7.242 33.260 16.630 arrow_writer.py:161(__arrow_array__) 1 0.001 0.001 16.438 16.438 arrow_writer.py:121(get_inferred_type) 1 0.000 0.000 14.398 14.398 threading.py:637(wait) 1 0.000 0.000 14.398 14.398 threading.py:323(wait) 8 14.398 1.800 14.398 1.800 {method 'acquire' of '_thread.lock' objects} 4/2 0.000 0.000 4.337 2.169 table.py:1800(wrapper) 2 0.000 0.000 4.337 2.169 table.py:1950(cast_array_to_feature) 2 0.475 0.238 4.337 2.169 image.py:209(cast_storage) 9 2.583 0.287 2.583 0.287 {built-in method numpy.array} 2 0.000 0.000 1.284 0.642 image.py:319(encode_np_array) 2 0.000 0.000 1.246 0.623 image.py:301(image_to_bytes) ``` ### Expected behavior The `numpy` image data should be passed through as it will be directly consumed by `pillow` to convert it to bytes. As an example one can replace `list_of_np_array_to_pyarrow_listarray(data)` in `__arrow_array__` with just `out = data` as a test. We have to change `cast_storage` of the `Image` feature so it handles the passed through data (& if to handle type before) ```python bytes_array = pa.array( [encode_np_array(arr)["bytes"] if arr is not None else None for arr in storage], type=pa.binary(), ) ``` Leading to the following: ```bash Fri Apr 5 15:44:27 2024 restats 66419 function calls (64595 primitive calls) in 0.937 seconds Ordered by: cumulative time List reduced from 1023 to 20 due to restriction <20> ncalls tottime percall cumtime percall filename:lineno(function) 47/1 0.000 0.000 0.935 0.935 {built-in method builtins.exec} 2/1 0.000 0.000 0.935 0.935 <string>:1(<module>) 2/1 0.000 0.000 0.934 0.934 arrow_dataset.py:594(wrapper) 2/1 0.000 0.000 0.934 0.934 arrow_dataset.py:551(wrapper) 2/1 0.000 0.000 0.934 0.934 arrow_dataset.py:2916(map) 4 0.000 0.000 0.933 0.233 arrow_dataset.py:3277(_map_single) 1 0.000 0.000 0.883 0.883 arrow_writer.py:466(write) 2 0.000 0.000 0.883 0.441 arrow_writer.py:424(write_examples_on_file) 1 0.000 0.000 0.882 0.882 arrow_writer.py:528(write_batch) 2 0.000 0.000 0.877 0.439 arrow_writer.py:161(__arrow_array__) 4/2 0.000 0.000 0.877 0.439 table.py:1800(wrapper) 2 0.000 0.000 0.877 0.439 table.py:1950(cast_array_to_feature) 2 0.009 0.005 0.877 0.439 image.py:209(cast_storage) 2 0.000 0.000 0.868 0.434 image.py:335(encode_np_array) 2 0.000 0.000 0.856 0.428 image.py:317(image_to_bytes) 2 0.000 0.000 0.822 0.411 Image.py:2376(save) 2 0.000 0.000 0.822 0.411 PngImagePlugin.py:1233(_save) 2 0.000 0.000 0.822 0.411 ImageFile.py:517(_save) 2 0.000 0.000 0.821 0.411 ImageFile.py:545(_encode_tile) 589 0.803 0.001 0.803 0.001 {method 'encode' of 'ImagingEncoder' objects} ``` This is of course only a test as it passes through all `numpy` arrays irrespective of if they should be an image. Also I guess `cast_storage` is meant for casting `pyarrow` storage exclusively. Converting to `pyarrow` array seems like a good solution as it also handles `pytorch` tensors etc., maybe there is a more efficient way to create a PIL image from a `pyarrow` array? Not sure how this should be handled but I would be happy to help if there is a good solution. ### Environment info - `datasets` version: 2.18.1.dev0 - Platform: Linux-6.7.11-200.fc39.x86_64-x86_64-with-glibc2.38 - Python version: 3.12.2 - `huggingface_hub` version: 0.22.2 - PyArrow version: 15.0.2 - Pandas version: 2.2.1 - `fsspec` version: 2024.3.1
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6782/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/6782/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6781
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6781/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6781/comments
https://api.github.com/repos/huggingface/datasets/issues/6781/events
https://github.com/huggingface/datasets/pull/6781
2,228,026,497
PR_kwDODunzps5r2DMe
6,781
Remove get_inferred_type from ArrowWriter write_batch
{ "login": "Modexus", "id": 37351874, "node_id": "MDQ6VXNlcjM3MzUxODc0", "avatar_url": "https://avatars.githubusercontent.com/u/37351874?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Modexus", "html_url": "https://github.com/Modexus", "followers_url": "https://api.github.com/users/Modexus/followers", "following_url": "https://api.github.com/users/Modexus/following{/other_user}", "gists_url": "https://api.github.com/users/Modexus/gists{/gist_id}", "starred_url": "https://api.github.com/users/Modexus/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Modexus/subscriptions", "organizations_url": "https://api.github.com/users/Modexus/orgs", "repos_url": "https://api.github.com/users/Modexus/repos", "events_url": "https://api.github.com/users/Modexus/events{/privacy}", "received_events_url": "https://api.github.com/users/Modexus/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "Good catch, thanks a lot! We will fix it ASAP.", "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-04-05T13:21:05"
"2024-04-09T07:49:11"
"2024-04-09T07:49:11"
CONTRIBUTOR
null
Inferring the type seems to be unnecessary given that the pyarrow array has already been created. Because pyarrow array creation is sometimes extremely slow this doubles the time write_batch takes.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6781/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/6781/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6781", "html_url": "https://github.com/huggingface/datasets/pull/6781", "diff_url": "https://github.com/huggingface/datasets/pull/6781.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6781.patch", "merged_at": null }
https://api.github.com/repos/huggingface/datasets/issues/6780
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6780/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6780/comments
https://api.github.com/repos/huggingface/datasets/issues/6780/events
https://github.com/huggingface/datasets/pull/6780
2,226,160,096
PR_kwDODunzps5rvkyj
6,780
Fix CI
{ "login": "mariosasko", "id": 47462742, "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mariosasko", "html_url": "https://github.com/mariosasko", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "repos_url": "https://api.github.com/users/mariosasko/repos", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-04-04T17:45:04"
"2024-04-04T18:46:04"
"2024-04-04T18:23:34"
COLLABORATOR
null
Updates the `wmt_t2t` test to pin the `revision` to the version with a loading script (cc @albertvillanova). Additionally, it replaces the occurrences of the `lhoestq/test` repo id with `hf-internal-testing/dataset_with_script` and re-enables logging checks in the `Dataset.from_sql` tests.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6780/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6780/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6780", "html_url": "https://github.com/huggingface/datasets/pull/6780", "diff_url": "https://github.com/huggingface/datasets/pull/6780.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6780.patch", "merged_at": "2024-04-04T18:23:34" }
https://api.github.com/repos/huggingface/datasets/issues/6779
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6779/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6779/comments
https://api.github.com/repos/huggingface/datasets/issues/6779/events
https://github.com/huggingface/datasets/pull/6779
2,226,075,551
PR_kwDODunzps5rvSA8
6,779
Install dependencies with `uv` in CI
{ "login": "mariosasko", "id": 47462742, "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mariosasko", "html_url": "https://github.com/mariosasko", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "repos_url": "https://api.github.com/users/mariosasko/repos", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-04-04T17:02:51"
"2024-04-08T13:34:01"
"2024-04-08T13:27:44"
COLLABORATOR
null
`diffusers` (https://github.com/huggingface/diffusers/pull/7116) and `huggingface_hub` (https://github.com/huggingface/huggingface_hub/pull/2072) also use `uv` to install their dependencies, so we can do the same here. It seems to make the "Install dependencies" step in the `ubuntu` jobs 5-8x faster and 1.5-2x in the `windows` one. Besides introducing `uv` in CI, this PR bumps the `tensorflow` minimal version requirement to align with Transformers and simplifies the SpaCy hashing tests (use blank language models instead of the pre-trained ones)
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6779/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/6779/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6779", "html_url": "https://github.com/huggingface/datasets/pull/6779", "diff_url": "https://github.com/huggingface/datasets/pull/6779.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6779.patch", "merged_at": "2024-04-08T13:27:43" }
https://api.github.com/repos/huggingface/datasets/issues/6778
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6778/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6778/comments
https://api.github.com/repos/huggingface/datasets/issues/6778/events
https://github.com/huggingface/datasets/issues/6778
2,226,040,636
I_kwDODunzps6Erq88
6,778
Dataset.to_csv() missing commas in columns with lists
{ "login": "mpickard-dataprof", "id": 100041276, "node_id": "U_kgDOBfaCPA", "avatar_url": "https://avatars.githubusercontent.com/u/100041276?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mpickard-dataprof", "html_url": "https://github.com/mpickard-dataprof", "followers_url": "https://api.github.com/users/mpickard-dataprof/followers", "following_url": "https://api.github.com/users/mpickard-dataprof/following{/other_user}", "gists_url": "https://api.github.com/users/mpickard-dataprof/gists{/gist_id}", "starred_url": "https://api.github.com/users/mpickard-dataprof/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mpickard-dataprof/subscriptions", "organizations_url": "https://api.github.com/users/mpickard-dataprof/orgs", "repos_url": "https://api.github.com/users/mpickard-dataprof/repos", "events_url": "https://api.github.com/users/mpickard-dataprof/events{/privacy}", "received_events_url": "https://api.github.com/users/mpickard-dataprof/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-04-04T16:46:13"
"2024-04-08T15:24:41"
null
NONE
null
### Describe the bug The `to_csv()` method does not output commas in lists. So when the Dataset is loaded back in the data structure of the column with a list is not correct. Here's an example: Obviously, it's not as trivial as inserting commas in the list, since its a comma-separated file. But hopefully there's a way to export the list in a way that it'll be imported by `load_dataset()` correctly. ### Steps to reproduce the bug Here's some code to reproduce the bug: ```python from datasets import Dataset ds = Dataset.from_dict( { "pokemon": ["bulbasaur", "squirtle"], "type": ["grass", "water"] } ) def ascii_to_hex(text): return [ord(c) for c in text] ds = ds.map(lambda x: {"int": ascii_to_hex(x['pokemon'])}) ds.to_csv('../output/temp.csv') ``` temp.csv then contains: ``` ### Expected behavior ACTUAL OUTPUT: ``` pokemon,type,int bulbasaur,grass,[ 98 117 108 98 97 115 97 117 114] squirtle,water,[115 113 117 105 114 116 108 101] ``` EXPECTED OUTPUT: ``` pokemon,type,int bulbasaur,grass,[98, 117, 108, 98, 97, 115, 97, 117, 114] squirtle,water,[115, 113, 117, 105, 114, 116, 108, 101] ``` or probably something more like this since it's a CSV file: ``` pokemon,type,int bulbasaur,grass,"[98, 117, 108, 98, 97, 115, 97, 117, 114]" squirtle,water,"[115, 113, 117, 105, 114, 116, 108, 101]" ``` ### Environment info ### Package Version Name: datasets Version: 2.16.1 ### Python version: 3.10.12 ### OS Info PRETTY_NAME="Ubuntu 22.04.4 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.4 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian ... UBUNTU_CODENAME=jammy
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6778/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/6778/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6777
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6777/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6777/comments
https://api.github.com/repos/huggingface/datasets/issues/6777/events
https://github.com/huggingface/datasets/issues/6777
2,224,611,247
I_kwDODunzps6EmN-v
6,777
.Jsonl metadata not detected
{ "login": "nighting0le01", "id": 81643693, "node_id": "MDQ6VXNlcjgxNjQzNjkz", "avatar_url": "https://avatars.githubusercontent.com/u/81643693?v=4", "gravatar_id": "", "url": "https://api.github.com/users/nighting0le01", "html_url": "https://github.com/nighting0le01", "followers_url": "https://api.github.com/users/nighting0le01/followers", "following_url": "https://api.github.com/users/nighting0le01/following{/other_user}", "gists_url": "https://api.github.com/users/nighting0le01/gists{/gist_id}", "starred_url": "https://api.github.com/users/nighting0le01/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nighting0le01/subscriptions", "organizations_url": "https://api.github.com/users/nighting0le01/orgs", "repos_url": "https://api.github.com/users/nighting0le01/repos", "events_url": "https://api.github.com/users/nighting0le01/events{/privacy}", "received_events_url": "https://api.github.com/users/nighting0le01/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6777?src=pr&el=h1) Report\n> Merging [#6777](https://codecov.io/gh/huggingface/transformers/pull/6777?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/42fddacd1cac3cc57c3326aa51a409f5090b1261?el=desc) will **increase** coverage by `1.90%`.\n> The diff coverage is `100.00%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6777/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6777?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6777 +/- ##\n==========================================\n+ Coverage 78.47% 80.37% +1.90% \n==========================================\n Files 157 157 \n Lines 28569 28569 \n==========================================\n+ Hits 22420 22963 +543 \n+ Misses 6149 5606 -543 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6777?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/commands/serving.py](https://codecov.io/gh/huggingface/transformers/pull/6777/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb21tYW5kcy9zZXJ2aW5nLnB5) | `55.88% <100.00%> (+55.88%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6777/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl90NS5weQ==) | `26.84% <0.00%> (-64.10%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_flaubert.py](https://codecov.io/gh/huggingface/transformers/pull/6777/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9mbGF1YmVydC5weQ==) | `24.53% <0.00%> (-63.81%)` | :arrow_down: |\n| [src/transformers/modeling\\_marian.py](https://codecov.io/gh/huggingface/transformers/pull/6777/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19tYXJpYW4ucHk=) | `60.00% <0.00%> (-30.00%)` | :arrow_down: |\n| [src/transformers/modeling\\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6777/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yb2JlcnRhLnB5) | `77.37% <0.00%> (-19.71%)` | :arrow_down: |\n| [src/transformers/activations.py](https://codecov.io/gh/huggingface/transformers/pull/6777/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9hY3RpdmF0aW9ucy5weQ==) | `85.00% <0.00%> (-5.00%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6777/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `85.01% <0.00%> (-2.29%)` | :arrow_down: |\n| [src/transformers/modeling\\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/6777/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19iYXJ0LnB5) | `95.05% <0.00%> (-0.35%)` | :arrow_down: |\n| [src/transformers/tokenization\\_utils\\_base.py](https://codecov.io/gh/huggingface/transformers/pull/6777/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfYmFzZS5weQ==) | `93.49% <0.00%> (-0.28%)` | :arrow_down: |\n| [src/transformers/file\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6777/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.41% <0.00%> (-0.26%)` | :arrow_down: |\n| ... and [21 more](https://codecov.io/gh/huggingface/transformers/pull/6777/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6777?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6777?src=pr&el=footer). Last update [42fddac...6fd85c4](https://codecov.io/gh/huggingface/transformers/pull/6777?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-04-04T06:31:53"
"2024-04-05T21:14:48"
null
NONE
null
### Describe the bug Hi I have the following directory structure: |--dataset | |-- images | |-- metadata1000.csv | |-- metadata1000.jsonl | |-- padded_images Example of metadata1000.jsonl file {"caption": "a drawing depicts a full shot of a black t-shirt with a triangular pattern on the front there is a white label on the left side of the triangle", "image": "images/212734.png", "gaussian_padded_image": "padded_images/p_212734.png"} {"caption": "an eye-level full shot of a large elephant and a baby elephant standing in a watering hole on the left side is a small elephant with its head turned to the right of dry land, trees, and bushes", "image": "images/212735.png", "gaussian_padded_image": "padded_images/p_212735.png"} . . . I'm trying to use dataset = load_dataset("imagefolder", data_dir='/dataset/', split='train') to load the the dataset, however it is not able to load according to the fields in the metadata1000.jsonl . please assist to load the data properly also getting ``` File "/workspace/train_trans_vae.py", line 1089, in <module> print(get_metadata_patterns('/dataset/')) File "/opt/conda/lib/python3.10/site-packages/datasets/data_files.py", line 499, in get_metadata_patterns raise FileNotFoundError(f"The directory at {base_path} doesn't contain any metadata file") from None FileNotFoundError: The directory at /dataset/ doesn't contain any metadata file ``` when trying ``` from datasets.data_files import get_metadata_patterns print(get_metadata_patterns('/dataset/')) ``` ### Steps to reproduce the bug dataset Version: 2.18.0 make a similar jsonl and similar directory format ### Expected behavior creates a dataset object with the column names, caption,image,gaussian_padded_image ### Environment info dataset Version: 2.18.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6777/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/6777/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6775
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6775/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6775/comments
https://api.github.com/repos/huggingface/datasets/issues/6775/events
https://github.com/huggingface/datasets/issues/6775
2,223,457,792
I_kwDODunzps6Eh0YA
6,775
IndexError: Invalid key: 0 is out of bounds for size 0
{ "login": "kk2491", "id": 38481564, "node_id": "MDQ6VXNlcjM4NDgxNTY0", "avatar_url": "https://avatars.githubusercontent.com/u/38481564?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kk2491", "html_url": "https://github.com/kk2491", "followers_url": "https://api.github.com/users/kk2491/followers", "following_url": "https://api.github.com/users/kk2491/following{/other_user}", "gists_url": "https://api.github.com/users/kk2491/gists{/gist_id}", "starred_url": "https://api.github.com/users/kk2491/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kk2491/subscriptions", "organizations_url": "https://api.github.com/users/kk2491/orgs", "repos_url": "https://api.github.com/users/kk2491/repos", "events_url": "https://api.github.com/users/kk2491/events{/privacy}", "received_events_url": "https://api.github.com/users/kk2491/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6775?src=pr&el=h1) Report\n> Merging [#6775](https://codecov.io/gh/huggingface/transformers/pull/6775?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/42fddacd1cac3cc57c3326aa51a409f5090b1261?el=desc) will **increase** coverage by `1.22%`.\n> The diff coverage is `13.33%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6775/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6775?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6775 +/- ##\n==========================================\n+ Coverage 78.47% 79.70% +1.22% \n==========================================\n Files 157 157 \n Lines 28569 28579 +10 \n==========================================\n+ Hits 22420 22779 +359 \n+ Misses 6149 5800 -349 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6775?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/data/processors/squad.py](https://codecov.io/gh/huggingface/transformers/pull/6775/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL3Byb2Nlc3NvcnMvc3F1YWQucHk=) | `27.59% <13.33%> (-0.54%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_flaubert.py](https://codecov.io/gh/huggingface/transformers/pull/6775/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9mbGF1YmVydC5weQ==) | `24.53% <0.00%> (-63.81%)` | :arrow_down: |\n| [src/transformers/modeling\\_marian.py](https://codecov.io/gh/huggingface/transformers/pull/6775/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19tYXJpYW4ucHk=) | `60.00% <0.00%> (-30.00%)` | :arrow_down: |\n| [src/transformers/modeling\\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6775/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yb2JlcnRhLnB5) | `77.37% <0.00%> (-19.71%)` | :arrow_down: |\n| [src/transformers/activations.py](https://codecov.io/gh/huggingface/transformers/pull/6775/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9hY3RpdmF0aW9ucy5weQ==) | `85.00% <0.00%> (-5.00%)` | :arrow_down: |\n| [src/transformers/tokenization\\_dpr.py](https://codecov.io/gh/huggingface/transformers/pull/6775/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fZHByLnB5) | `53.15% <0.00%> (-4.51%)` | :arrow_down: |\n| [src/transformers/modeling\\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/6775/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19iYXJ0LnB5) | `95.05% <0.00%> (-0.35%)` | :arrow_down: |\n| [src/transformers/tokenization\\_utils\\_base.py](https://codecov.io/gh/huggingface/transformers/pull/6775/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfYmFzZS5weQ==) | `93.49% <0.00%> (-0.28%)` | :arrow_down: |\n| [src/transformers/file\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6775/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.41% <0.00%> (-0.26%)` | :arrow_down: |\n| [src/transformers/pipelines.py](https://codecov.io/gh/huggingface/transformers/pull/6775/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9waXBlbGluZXMucHk=) | `80.07% <0.00%> (+0.12%)` | :arrow_up: |\n| ... and [10 more](https://codecov.io/gh/huggingface/transformers/pull/6775/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6775?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6775?src=pr&el=footer). Last update [42fddac...54cbfb1](https://codecov.io/gh/huggingface/transformers/pull/6775?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "@LysandreJik @mfuntowicz \r\nJust checking in to see if this PR is good, or does it need some more improvements?\r\n\r\nThanks", "Hi @bdalal,\n\nWill have a look at it ASAP, sorry for the delay \n\nMorgan", "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-04-03T17:06:30"
"2024-04-08T01:24:35"
null
NONE
null
### Describe the bug I am trying to fine-tune llama2-7b model in GCP. The notebook I am using for this can be found [here](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). When I use the dataset given in the example, the training gets successfully completed (example dataset can be found [here](https://huggingface.co/datasets/timdettmers/openassistant-guanaco)). However when I use my own dataset which is in the same format as the example dataset, I get the below error (my dataset can be found [here](https://huggingface.co/datasets/kk2491/finetune_dataset_002)). ![image](https://github.com/huggingface/datasets/assets/38481564/47fa2de3-95e0-478b-a35f-58cbaf90427a) I see the files are being read correctly from the logs: ![image](https://github.com/huggingface/datasets/assets/38481564/b0b6316c-2cc7-476c-9674-ca2222c8f4e3) ### Steps to reproduce the bug 1. Clone the [vertex-ai-samples](https://github.com/GoogleCloudPlatform/vertex-ai-samples) repository. 2. Run the [llama2-7b peft fine-tuning](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). 3. Change the dataset `kk2491/finetune_dataset_002` ### Expected behavior The training should complete successfully, and model gets deployed to an endpoint. ### Environment info Python version : Python 3.10.12 Dataset : https://huggingface.co/datasets/kk2491/finetune_dataset_002
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6775/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/6775/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6774
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6774/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6774/comments
https://api.github.com/repos/huggingface/datasets/issues/6774/events
https://github.com/huggingface/datasets/issues/6774
2,222,164,316
I_kwDODunzps6Ec4lc
6,774
Generating split is very slow when Image format is PNG
{ "login": "Tramac", "id": 22740819, "node_id": "MDQ6VXNlcjIyNzQwODE5", "avatar_url": "https://avatars.githubusercontent.com/u/22740819?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Tramac", "html_url": "https://github.com/Tramac", "followers_url": "https://api.github.com/users/Tramac/followers", "following_url": "https://api.github.com/users/Tramac/following{/other_user}", "gists_url": "https://api.github.com/users/Tramac/gists{/gist_id}", "starred_url": "https://api.github.com/users/Tramac/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Tramac/subscriptions", "organizations_url": "https://api.github.com/users/Tramac/orgs", "repos_url": "https://api.github.com/users/Tramac/repos", "events_url": "https://api.github.com/users/Tramac/events{/privacy}", "received_events_url": "https://api.github.com/users/Tramac/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "Done!\r\n```python\r\n# Config values that vary between checkpoints: for testing and conversion\r\ntask_specific_params = {\r\n # These are task specific params for pegasus-large and normal params for finetuned checkpoints\r\n \"summarization_xsum\": {\"length_penalty\": 0.8, \"max_length\": 64, \"max_position_embeddings\": 512},\r\n \"summarization_cnn_dailymail\": {\"length_penalty\": 0.8, \"max_length\": 128, \"max_position_embeddings\": 1024},\r\n \"summarization_newsroom\": {\"length_penalty\": 0.8, \"max_length\": 128, \"max_position_embeddings\": 512},\r\n \"summarization_wikihow\": {\"length_penalty\": 0.6, \"max_length\": 256, \"max_position_embeddings\": 512},\r\n \"summarization_multi_news\": {\"length_penalty\": 0.8, \"max_length\": 256, \"max_position_embeddings\": 1024},\r\n \"summarization_reddit_tifu\": {\"length_penalty\": 0.6, \"max_length\": 128, \"max_position_embeddings\": 512},\r\n \"summarization_big_patent\": {\"length_penalty\": 0.7, \"max_length\": 256, \"max_position_embeddings\": 1024},\r\n \"summarization_arxiv\": {\"length_penalty\": 0.8, \"max_length\": 256, \"max_position_embeddings\": 1024},\r\n \"summarization_pubmed\": {\"length_penalty\": 0.8, \"max_length\": 256, \"max_position_embeddings\": 1024},\r\n \"summarization_gigaword\": {\"length_penalty\": 0.6, \"max_length\": 32, \"max_position_embeddings\": 128},\r\n \"summarization_aeslc\": {\"length_penalty\": 0.6, \"max_length\": 32, \"max_position_embeddings\": 512},\r\n \"summarization_billsum\": {\"length_penalty\": 0.6, \"max_length\": 256, \"max_position_embeddings\": 1024},\r\n # this last entry is useless -- just for consistency\r\n \"summarization_large\": {\"length_penalty\": 0.8, \"max_length\": 256, \"max_position_embeddings\": 1024},\r\n}\r\n```" ]
"2024-04-03T07:47:31"
"2024-04-10T17:28:17"
null
NONE
null
### Describe the bug When I create a dataset, it gets stuck while generating cached data. The image format is PNG, and it will not get stuck when the image format is jpeg. ![image](https://github.com/huggingface/datasets/assets/22740819/3b888fd8-e6d6-488f-b828-95a8f206a152) After debugging, I know that it is because of the `pa.array` operation in [arrow_writer](https://github.com/huggingface/datasets/blob/2.13.0/src/datasets/arrow_writer.py#L553), but i don't why. ### Steps to reproduce the bug ``` from datasets import Dataset def generator(lines): for line in lines: img = Image.open(open(line["url"], "rb")) # print(img.format) # "PNG" yield { "image": img, } lines = open(dataset_path, "r") dataset = Dataset.from_generator( generator, gen_kwargs={"lines": lines} ) ``` ### Expected behavior Generating split done. ### Environment info datasets 2.13.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6774/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/6774/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6773
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6773/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6773/comments
https://api.github.com/repos/huggingface/datasets/issues/6773/events
https://github.com/huggingface/datasets/issues/6773
2,221,049,121
I_kwDODunzps6EYoUh
6,773
Dataset on Hub re-downloads every time?
{ "login": "manestay", "id": 9099139, "node_id": "MDQ6VXNlcjkwOTkxMzk=", "avatar_url": "https://avatars.githubusercontent.com/u/9099139?v=4", "gravatar_id": "", "url": "https://api.github.com/users/manestay", "html_url": "https://github.com/manestay", "followers_url": "https://api.github.com/users/manestay/followers", "following_url": "https://api.github.com/users/manestay/following{/other_user}", "gists_url": "https://api.github.com/users/manestay/gists{/gist_id}", "starred_url": "https://api.github.com/users/manestay/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/manestay/subscriptions", "organizations_url": "https://api.github.com/users/manestay/orgs", "repos_url": "https://api.github.com/users/manestay/repos", "events_url": "https://api.github.com/users/manestay/events{/privacy}", "received_events_url": "https://api.github.com/users/manestay/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-04-02T17:23:22"
"2024-04-08T18:43:45"
"2024-04-08T18:43:45"
NONE
null
### Describe the bug Hi, I have a dataset on the hub [here](https://huggingface.co/datasets/manestay/borderlines). It has 1k+ downloads, which I sure is mostly just me and my colleagues working with it. It should have far fewer, since I'm using the same machine with a properly set up HF_HOME variable. However, whenever I run the below function `load_borderlines_hf`, it downloads the entire dataset from the hub and then does the other logic: https://github.com/manestay/borderlines/blob/4e161f444661e2ebfe643f3fe149d9258d63a57d/run_gpt/lib.py#L80 Let me know what I'm doing wrong here, or if it's a bug with the `datasets` library itself. On the hub I have my data stored in CSVs, but several columns are lists, so that's why I have the code to map splitting on `;`. I looked into dataset loading scripts, but it seemed difficult to set up. I have verified that other `datasets` and `models` on my system are using the cache properly (e.g. I have a 13B parameter model and large datasets, but those are cached and don't redownload). __EDIT: __ as pointed out in the discussion below, it may be the `map()` calls that aren't being cached properly. Supposing the `load_dataset()` retrieve from the cache, then it should be the case that the `map()` calls also retrieve from the cached output. But the `map()` commands re-execute sometimes. ### Steps to reproduce the bug 1. Copy and paste the function from [here](https://github.com/manestay/borderlines/blob/4e161f444661e2ebfe643f3fe149d9258d63a57d/run_gpt/lib.py#L80) (lines 80-100) 2. Run it in Python `load_borderlines_hf(None)` 3. It completes successfully, downloading from HF hub, then doing the mapping logic etc. 4. If you run it again after some time, it will re-download, ignoring the cache ### Expected behavior Re-running the code, which calls `datasets.load_dataset('manestay/borderlines', 'territories')`, should use the cached version ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.14.21-150500.55.7-default-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6773/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/6773/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6772
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6772/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6772/comments
https://api.github.com/repos/huggingface/datasets/issues/6772/events
https://github.com/huggingface/datasets/pull/6772
2,220,851,533
PR_kwDODunzps5rdKZ2
6,772
`remove_columns`/`rename_columns` doc fixes
{ "login": "mariosasko", "id": 47462742, "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mariosasko", "html_url": "https://github.com/mariosasko", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "repos_url": "https://api.github.com/users/mariosasko/repos", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "Answered in #6752" ]
"2024-04-02T15:41:28"
"2024-04-02T16:28:45"
"2024-04-02T16:17:46"
COLLABORATOR
null
Use more consistent wording in `remove_columns` to explain why it's faster than `map` and update `remove_columns`/`rename_columns` docstrings to fix in-place calls. Reported in https://github.com/huggingface/datasets/issues/6700
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6772/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/6772/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6772", "html_url": "https://github.com/huggingface/datasets/pull/6772", "diff_url": "https://github.com/huggingface/datasets/pull/6772.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6772.patch", "merged_at": "2024-04-02T16:17:46" }
https://api.github.com/repos/huggingface/datasets/issues/6771
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6771/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6771/comments
https://api.github.com/repos/huggingface/datasets/issues/6771/events
https://github.com/huggingface/datasets/issues/6771
2,220,131,457
I_kwDODunzps6EVISB
6,771
Datasets FileNotFoundError when trying to generate examples.
{ "login": "RitchieP", "id": 26197115, "node_id": "MDQ6VXNlcjI2MTk3MTE1", "avatar_url": "https://avatars.githubusercontent.com/u/26197115?v=4", "gravatar_id": "", "url": "https://api.github.com/users/RitchieP", "html_url": "https://github.com/RitchieP", "followers_url": "https://api.github.com/users/RitchieP/followers", "following_url": "https://api.github.com/users/RitchieP/following{/other_user}", "gists_url": "https://api.github.com/users/RitchieP/gists{/gist_id}", "starred_url": "https://api.github.com/users/RitchieP/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/RitchieP/subscriptions", "organizations_url": "https://api.github.com/users/RitchieP/orgs", "repos_url": "https://api.github.com/users/RitchieP/repos", "events_url": "https://api.github.com/users/RitchieP/events{/privacy}", "received_events_url": "https://api.github.com/users/RitchieP/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "This looks super interesting @jlei2 ! I openen a PR #6877 to see if changing to EinusmDense speeds up the runtime...In the PR I cannot see an improvement - could you take a look and maybe comment on how you changed the TF Bert code in transformers to benchmark your changes? :-) ", "Hi Patrick, thank you for taking time to investigate this issue! Your PR is not completely correct. Here is my draft [PR](https://github.com/jlei2/transformers/pull/1). DenseEinsum actually is the combination of matrix reshape/transpose and dense layer. So we need to be careful when replacing keras.dense with DenseEinsum, otherwise we will not be able to get the same output as we can get before this change.\r\n\r\nI tested on my end that there is no speedup after this change **at runtime**, using the huggingface bechmark command tool given by you. But I did see expected speedup after exporting DenseEinsum models. I used tensorflow profiling tool(https://www.tensorflow.org/tfx/serving/tensorboard) to benchmark the inference time of exported model when serving on TF-serving 2.2.0. So actually I don't have my own benchmark code.\r\n\r\nDevice: 1 GPU-V100\r\nBatch Size: 1\r\nModel: Bert-base FP32\r\n\r\n<img width=\"220\" alt=\"Screen Shot 2020-09-02 at 1 52 08 PM\" src=\"https://user-images.githubusercontent.com/70337521/92035460-981e9200-ed23-11ea-8141-a5f8e600559a.png\"> <img width=\"220\" alt=\"Screen Shot 2020-09-02 at 1 52 28 PM\" src=\"https://user-images.githubusercontent.com/70337521/92035489-a2409080-ed23-11ea-9414-dd2bb6e8ea68.png\">\r\nSo the left picture is from the Huggingface model after applying my PR. The right one is from original Huggingface model using current master. You can see that there is almost 100% speedup. So I suspect this issue only happens on exported model for tf-serving. \r\n\r\nThe code I used to export saved model:\r\n```\r\nimport tensorflow as tf\r\nimport transformers\r\n\r\nfrom transformers import BertModel\r\npt_model_path = 'bert-base-uncased'\r\n\r\nmodel = BertModel.from_pretrained('bert-base-uncased')\r\nmodel.save_pretrained(pt_model_path)\r\n\r\nMAX_LEN = 128\r\nmodel_path = 'saved_model/tmp_model'\r\ninput_ids = tf.keras.layers.Input((MAX_LEN,), dtype=tf.int32, name='input_ids')\r\nattention_mask = tf.keras.layers.Input((MAX_LEN,), dtype=tf.int32, name='attention_mask')\r\ntoken_type_ids = tf.keras.layers.Input((MAX_LEN,), dtype=tf.int32, name='token_type_ids')\r\nbase_model = transformers.TFBertModel.from_pretrained(pt_model_path, output_hidden_states=False, from_pt=True)\r\nbase_output = base_model.bert([input_ids, attention_mask, token_type_ids])\r\nseq_out, pool_out = base_output[0], base_output[1]\r\nbase_model.trainable = False\r\nmodel = tf.keras.models.Model(inputs=[input_ids, attention_mask, token_type_ids], outputs=[pool_out])\r\nmodel.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])\r\nprint(model.summary())\r\nmodel.save(model_path, include_optimizer=False, save_format=\"tf\")\r\n```\r\n\r\nIs this something you will want to solve on your end? though we see that during runtime there is no difference.", "Hey @jlei2, \r\n\r\nThanks a lot for checking and your draft PR. I think we will be able to implement your proposition given that we can keep complete backwards compatibility. Do you have an idea by any chance why we can see the speed up only on TF-serving? \r\n\r\nAlso cc @jplu - this looks very interesting! ", "To be honest I have no idea about the root difference on TFS side. I can only observe that there are some CPU processes wasting time before the Matmul op. My feeling is that the MatMul op triggered by tf.keras.layers.Dense() may not be implemented to be very efficient on TF-serving. Though this issue seems to have more to do with tensorflow keras team or TFS team instead of Huggingface code base imo, it would be helpful to all Huggingface users if you are able to resolve this issue on your end.", "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n", "Re-activated cc @jplu ", "Hey @jlei2!\r\n\r\nSorry for this long silence. We are currently working on this performance issue and to be sure to make the proper changes, can you share with us your benchmark script that you used to compute the values in the table?\r\n\r\nThanks!", "Hi @jplu , thanks for keeping an eye on this! Unfortunately I can not share the benchmark script I used to get the numbers in the table with you because it's confidential. But I can share how you can obtain the same slow-down observation using Tensorflow Profiler tool (to get the two Performance Summary Screenshots I uploaded above 15.7ms vs 28.8ms).\r\n\r\n### Export baseline and modified SavedModel\r\n**Baseline transformers repo**: The commit I used is the same as the master branch in my fork (https://github.com/jlei2/transformers)\r\n\r\n**Modified transformers repo using tf.keras.layers.experimental.EinsumDense**: (https://github.com/jlei2/transformers/tree/dense-einsum-tf2.3)\r\n\r\n**The code to export the model**: \r\n```\r\nimport tensorflow as tf\r\nimport transformers\r\n\r\nfrom transformers import BertModel\r\npt_model_path = 'bert-base-uncased'\r\n\r\nmodel = BertModel.from_pretrained('bert-base-uncased')\r\nmodel.save_pretrained(pt_model_path)\r\n\r\nMAX_LEN = 128\r\nmodel_path = 'saved_model/tmp_model'\r\ninput_ids = tf.keras.layers.Input((MAX_LEN,), dtype=tf.int32, name='input_ids')\r\nattention_mask = tf.keras.layers.Input((MAX_LEN,), dtype=tf.int32, name='attention_mask')\r\ntoken_type_ids = tf.keras.layers.Input((MAX_LEN,), dtype=tf.int32, name='token_type_ids')\r\nbase_model = transformers.TFBertModel.from_pretrained(pt_model_path, output_hidden_states=False, from_pt=True)\r\nbase_output = base_model.bert([input_ids, attention_mask, token_type_ids])\r\nseq_out, pool_out = base_output[0], base_output[1]\r\nbase_model.trainable = False\r\nmodel = tf.keras.models.Model(inputs=[input_ids, attention_mask, token_type_ids], outputs=[pool_out])\r\nmodel.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])\r\nprint(model.summary())\r\nmodel.save(model_path, include_optimizer=False, save_format=\"tf\")\r\n```\r\n\r\nThen on a machine with 1 GPU-V100 and TF-Serving-gpu== 2.3.0 and Tensorflow==2.3.0:\r\n### Spin up SavedModel:\r\n```\r\nexport LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH\r\nexport MODEL_DIR=your_model_dir\r\nexport MODEL_NAME=your_model_name\r\nnohup tensorflow_model_server --rest_api_port=8501 --model_name=$MODEL_NAME --model_base_path=$MODEL_DIR >server.log 2>&1\r\n```\r\n\r\n### Spin up Tensorboard\r\n```\r\ntensorboard --logdir ~/logs/inference_demo/ --port your_port_number --bind_all\r\n```\r\n\r\nGo to the profile page on Tensorboard\r\n<img width=\"447\" alt=\"Screen Shot 2020-12-01 at 8 58 18 PM\" src=\"https://user-images.githubusercontent.com/70337521/100830662-03f2c280-3419-11eb-95bc-f0d70caec6db.png\">\r\n\r\nAfter clicking capture, I would send request to TFS to profile the whole process\r\n\r\n**Code to send request to served model**:\r\n```\r\nimport json\r\nimport requests\r\n\r\nBATCH_SIZE = 1\r\nMAX_SEQ_LEN = 128\r\nbatch = []\r\nMODEL_NAME = your_model_name\r\n\r\nfor _ in range(BATCH_SIZE):\r\n batch.append({\"input_ids\":[999] * MAX_SEQ_LEN, \"attention_mask\":[1] * MAX_SEQ_LEN, \"token_type_ids\":[0] * MAX_SEQ_LEN})\r\n\r\ninput_data = {\"instances\": batch}\r\nr = requests.post(\"http://localhost:8501/v1/models/%s:predict\"%(MODEL_NAME), data=json.dumps(input_data))\r\nprint(r.text)\r\n```\r\nI would run this scripts for several times first to warm up the model and then start to profile formally. \r\n\r\nAnd finally you will see profiling results on Tensorboard UI page just like what I uploaded.\r\n\r\nHope this could be helpful to you!", "Actually I write a very simple benchmark script that can show the difference:\r\n\r\n```\r\nimport json\r\nimport requests\r\nimport time\r\nBATCH_SIZE = 1\r\nMAX_SEQ_LEN = 128\r\nbatch = []\r\nMODEL_NAME = your_model_name\r\n\r\nfor _ in range(BATCH_SIZE):\r\n\tbatch.append({\"input_ids\":[999] * MAX_SEQ_LEN, \"attention_mask\":[1] * MAX_SEQ_LEN, \"token_type_ids\":[0] * MAX_SEQ_LEN})\r\n\r\ninput_data = {\"instances\": batch}\r\n\r\nstart = time.time()\r\nfor _ in range(100):\r\n\tr = requests.post(\"http://localhost:8501/v1/models/%s:predict\"%(MODEL_NAME), data=json.dumps(input_data))\r\nend = time.time()\r\nprint(end-start)\r\n```\r\nBaseline time: ~2.8s\r\nMy version's time: ~1.5s.\r\n\r\nSo we can easily see ~2x speed up.", "Awesome!! Thanks a lot @jlei2!! This is already a good start to check the differences. I will let you know here once we have done the changes!", "@jlei2 I have open a PR for integrating this change. Unfortunately, as I'm on Windows, the GPU profiling is not yet available in WSL, can you clone my branch and run it on your side with your own benchmark in order to be sure that it looks ok.\r\n\r\nThere is a small update on the code to create the saved model:\r\n```\r\nimport tensorflow as tf\r\nimport transformers\r\n\r\nMAX_LEN = 128\r\nmodel_path = 'saved_model/tmp_model'\r\ninput_ids = tf.keras.layers.Input((MAX_LEN,), dtype=tf.int32, name='input_ids')\r\nattention_mask = tf.keras.layers.Input((MAX_LEN,), dtype=tf.int32, name='attention_mask')\r\ntoken_type_ids = tf.keras.layers.Input((MAX_LEN,), dtype=tf.int32, name='token_type_ids')\r\nbase_model = transformers.TFBertModel.from_pretrained(\"bert-base-uncased\")\r\ninputs = {\"input_ids\": input_ids, \"attention_mask\": attention_mask, \"token_type_ids\": token_type_ids}\r\nbase_output = base_model.bert(inputs)\r\nseq_out, pool_out = base_output[0], base_output[1]\r\nbase_model.trainable = False\r\nmodel = tf.keras.models.Model(inputs=inputs, outputs=[pool_out])\r\nmodel.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])\r\nprint(model.summary())\r\nmodel.save(model_path, include_optimizer=False, save_format=\"tf\")\r\n```\r\n\r\nNo need anymore to load from the PT model, thanks to some update we have applied on the loading weights mechanism.", "Hi @jplu ,\r\n\r\nThanks for opening the PR to integrate this change. I have cloned your branch and run benchmark on my side. The results are as expected!\r\n\r\n**latency: (ms/batch) on 1 GPU-V100**\r\nBatch Size | current master | tf-einsumdense |\r\n-- | -- | --\r\n1 | 20.9 | 6.26\r\n2 | 24.1 | 8.68\r\n4 | 27.6 | 13.1\r\n8 | 36.3 | 21.5\r\n16 | 58.8 | 42.3\r\n32 | 94.7 | 80.4\r\n64 | 170 | 156\r\n128 | 321 | 309\r\n\r\nAnd on GPU profiling, obtained the same observation like I posted in the very first comment: GPU computation is continuous and compact. It is not cut off by CPU process anymore.\r\n\r\n**current master, batch_size=128**\r\n![image](https://user-images.githubusercontent.com/70337521/102310915-c580fb80-3f20-11eb-8062-b89e8b11dc49.png)\r\n\r\n**tf-einsumdense, batch_size=128**\r\n![image](https://user-images.githubusercontent.com/70337521/102311089-12fd6880-3f21-11eb-9129-100081eef716.png)\r\n\r\n\r\n\r\n" ]
"2024-04-02T10:24:57"
"2024-04-04T14:22:03"
"2024-04-04T14:22:03"
NONE
null
### Discussed in https://github.com/huggingface/datasets/discussions/6768 <div type='discussions-op-text'> <sup>Originally posted by **RitchieP** April 1, 2024</sup> Currently, I have a dataset hosted on Huggingface with a custom script [here](https://huggingface.co/datasets/RitchieP/VerbaLex_voice). I'm loading my dataset as below. ```py from datasets import load_dataset, IterableDatasetDict dataset = IterableDatasetDict() dataset["train"] = load_dataset("RitchieP/VerbaLex_voice", "ar", split="train", use_auth_token=True, streaming=True) dataset["test"] = load_dataset("RitchieP/VerbaLex_voice", "ar", split="test", use_auth_token=True, streaming=True) ``` And when I try to see the data I have loaded with ```py list(dataset["train"].take(1)) ``` And it gives me this stack trace ``` --------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) Cell In[2], line 1 ----> 1 list(dataset["train"].take(1)) File /opt/conda/lib/python3.10/site-packages/datasets/iterable_dataset.py:1388, in IterableDataset.__iter__(self) 1385 yield formatter.format_row(pa_table) 1386 return -> 1388 for key, example in ex_iterable: 1389 if self.features: 1390 # `IterableDataset` automatically fills missing columns with None. 1391 # This is done with `_apply_feature_types_on_example`. 1392 example = _apply_feature_types_on_example( 1393 example, self.features, token_per_repo_id=self._token_per_repo_id 1394 ) File /opt/conda/lib/python3.10/site-packages/datasets/iterable_dataset.py:1044, in TakeExamplesIterable.__iter__(self) 1043 def __iter__(self): -> 1044 yield from islice(self.ex_iterable, self.n) File /opt/conda/lib/python3.10/site-packages/datasets/iterable_dataset.py:234, in ExamplesIterable.__iter__(self) 233 def __iter__(self): --> 234 yield from self.generate_examples_fn(**self.kwargs) File ~/.cache/huggingface/modules/datasets_modules/datasets/RitchieP--VerbaLex_voice/9465eaee58383cf9d7c3e14111d7abaea56398185a641b646897d6df4e4732f7/VerbaLex_voice.py:127, in VerbaLexVoiceDataset._generate_examples(self, local_extracted_archive_paths, archives, meta_path) 125 for i, audio_archive in enumerate(archives): 126 print(audio_archive) --> 127 for path, file in audio_archive: 128 _, filename = os.path.split(path) 129 if filename in metadata: File /opt/conda/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:869, in _IterableFromGenerator.__iter__(self) 868 def __iter__(self): --> 869 yield from self.generator(*self.args, **self.kwargs) File /opt/conda/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:919, in ArchiveIterable._iter_from_urlpath(cls, urlpath, download_config) 915 @classmethod 916 def _iter_from_urlpath( 917 cls, urlpath: str, download_config: Optional[DownloadConfig] = None 918 ) -> Generator[Tuple, None, None]: --> 919 compression = _get_extraction_protocol(urlpath, download_config=download_config) 920 # Set block_size=0 to get faster streaming 921 # (e.g. for hf:// and https:// it uses streaming Requests file-like instances) 922 with xopen(urlpath, "rb", download_config=download_config, block_size=0) as f: File /opt/conda/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:400, in _get_extraction_protocol(urlpath, download_config) 398 urlpath, storage_options = _prepare_path_and_storage_options(urlpath, download_config=download_config) 399 try: --> 400 with fsspec.open(urlpath, **(storage_options or {})) as f: 401 return _get_extraction_protocol_with_magic_number(f) 402 except FileNotFoundError: File /opt/conda/lib/python3.10/site-packages/fsspec/core.py:100, in OpenFile.__enter__(self) 97 def __enter__(self): 98 mode = self.mode.replace("t", "").replace("b", "") + "b" --> 100 f = self.fs.open(self.path, mode=mode) 102 self.fobjects = [f] 104 if self.compression is not None: File /opt/conda/lib/python3.10/site-packages/fsspec/spec.py:1307, in AbstractFileSystem.open(self, path, mode, block_size, cache_options, compression, **kwargs) 1305 else: 1306 ac = kwargs.pop("autocommit", not self._intrans) -> 1307 f = self._open( 1308 path, 1309 mode=mode, 1310 block_size=block_size, 1311 autocommit=ac, 1312 cache_options=cache_options, 1313 **kwargs, 1314 ) 1315 if compression is not None: 1316 from fsspec.compression import compr File /opt/conda/lib/python3.10/site-packages/fsspec/implementations/local.py:180, in LocalFileSystem._open(self, path, mode, block_size, **kwargs) 178 if self.auto_mkdir and "w" in mode: 179 self.makedirs(self._parent(path), exist_ok=True) --> 180 return LocalFileOpener(path, mode, fs=self, **kwargs) File /opt/conda/lib/python3.10/site-packages/fsspec/implementations/local.py:302, in LocalFileOpener.__init__(self, path, mode, autocommit, fs, compression, **kwargs) 300 self.compression = get_compression(path, compression) 301 self.blocksize = io.DEFAULT_BUFFER_SIZE --> 302 self._open() File /opt/conda/lib/python3.10/site-packages/fsspec/implementations/local.py:307, in LocalFileOpener._open(self) 305 if self.f is None or self.f.closed: 306 if self.autocommit or "w" not in self.mode: --> 307 self.f = open(self.path, mode=self.mode) 308 if self.compression: 309 compress = compr[self.compression] FileNotFoundError: [Errno 2] No such file or directory: '/kaggle/working/h' ``` After looking into the stack trace, and referring to the source codes, it looks like its trying to access a directory in the notebook's environment and I don't understand why. Not sure if its a bug in Datasets library, so I'm opening a discussions first. Feel free to ask for more information if needed. Appreciate any help in advance!</div> Hi, referring to the discussion title above, after further digging, I think it's an issue within the datasets library. But not quite sure where it is. If you require any more info or actions from me, please let me know. Appreciate any help in advance!
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6771/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/6771/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6770
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6770/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6770/comments
https://api.github.com/repos/huggingface/datasets/issues/6770/events
https://github.com/huggingface/datasets/issues/6770
2,218,991,883
I_kwDODunzps6EQyEL
6,770
[Bug Report] `datasets==2.18.0` is not compatible with `fsspec==2023.12.2`
{ "login": "fshp971", "id": 19348888, "node_id": "MDQ6VXNlcjE5MzQ4ODg4", "avatar_url": "https://avatars.githubusercontent.com/u/19348888?v=4", "gravatar_id": "", "url": "https://api.github.com/users/fshp971", "html_url": "https://github.com/fshp971", "followers_url": "https://api.github.com/users/fshp971/followers", "following_url": "https://api.github.com/users/fshp971/following{/other_user}", "gists_url": "https://api.github.com/users/fshp971/gists{/gist_id}", "starred_url": "https://api.github.com/users/fshp971/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fshp971/subscriptions", "organizations_url": "https://api.github.com/users/fshp971/orgs", "repos_url": "https://api.github.com/users/fshp971/repos", "events_url": "https://api.github.com/users/fshp971/events{/privacy}", "received_events_url": "https://api.github.com/users/fshp971/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-04-01T20:17:48"
"2024-04-11T17:31:44"
"2024-04-11T17:31:44"
NONE
null
### Describe the bug `Datasets==2.18.0` is not compatible with `fsspec==2023.12.2`. I have to downgrade fsspec to `fsspec==2023.10.0` to make `Datasets==2.18.0` work properly. ### Steps to reproduce the bug To reproduce the bug: 1. Make sure that `Datasets==2.18.0` and `fsspec==2023.12.2`. 2. Run the following code: ``` from datasets import load_dataset dataset = load_dataset("trec") ``` 3. Then one will get the following error message: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/conda/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "/opt/conda/lib/python3.10/site-packages/datasets/load.py", line 2265, in load_dataset_builder builder_instance: DatasetBuilder = builder_cls( File "/opt/conda/lib/python3.10/site-packages/datasets/builder.py", line 371, in __init__ self.config, self.config_id = self._create_builder_config( File "/opt/conda/lib/python3.10/site-packages/datasets/builder.py", line 620, in _create_builder_config builder_config._resolve_data_files( File "/opt/conda/lib/python3.10/site-packages/datasets/builder.py", line 211, in _resolve_data_files self.data_files = self.data_files.resolve(base_path, download_config) File "/opt/conda/lib/python3.10/site-packages/datasets/data_files.py", line 799, in resolve out[key] = data_files_patterns_list.resolve(base_path, download_config) File "/opt/conda/lib/python3.10/site-packages/datasets/data_files.py", line 752, in resolve resolve_pattern( File "/opt/conda/lib/python3.10/site-packages/datasets/data_files.py", line 393, in resolve_pattern raise FileNotFoundError(error_msg) FileNotFoundError: Unable to find 'hf://datasets/trec@65752bf53af25bc935a0dce92fb5b6c930728450/default/train/0000.parquet' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.parquet', '.geoparquet', '.gpq', '.arrow', '.txt', '.tar', '.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', '.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', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.zip'] ``` 4. Similar issue also found for the following code: ``` dataset = load_dataset("sst", "default") ``` ### Expected behavior If the dataset is loaded correctly, one will have: ``` >>> print(dataset) DatasetDict({ train: Dataset({ features: ['text', 'coarse_label', 'fine_label'], num_rows: 5452 }) test: Dataset({ features: ['text', 'coarse_label', 'fine_label'], num_rows: 500 }) }) >>> ``` ### Environment info - `datasets` version: 2.18.0 - Platform: Linux-6.2.0-35-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.1 - Pandas version: 2.2.1 - `fsspec` version: 2023.12.2
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6770/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6770/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6769
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6769/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6769/comments
https://api.github.com/repos/huggingface/datasets/issues/6769/events
https://github.com/huggingface/datasets/issues/6769
2,218,242,015
I_kwDODunzps6EN6_f
6,769
(Willing to PR) Datasets with custom python objects
{ "login": "fzyzcjy", "id": 5236035, "node_id": "MDQ6VXNlcjUyMzYwMzU=", "avatar_url": "https://avatars.githubusercontent.com/u/5236035?v=4", "gravatar_id": "", "url": "https://api.github.com/users/fzyzcjy", "html_url": "https://github.com/fzyzcjy", "followers_url": "https://api.github.com/users/fzyzcjy/followers", "following_url": "https://api.github.com/users/fzyzcjy/following{/other_user}", "gists_url": "https://api.github.com/users/fzyzcjy/gists{/gist_id}", "starred_url": "https://api.github.com/users/fzyzcjy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fzyzcjy/subscriptions", "organizations_url": "https://api.github.com/users/fzyzcjy/orgs", "repos_url": "https://api.github.com/users/fzyzcjy/repos", "events_url": "https://api.github.com/users/fzyzcjy/events{/privacy}", "received_events_url": "https://api.github.com/users/fzyzcjy/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
[ "Command for running `finetune_trainer.py`\r\n\r\n```bash\r\npython finetune_trainer.py \\\r\n --model_name_or_path sshleifer/bart-tiny-random \\\r\n --data_dir xsum \\\r\n --output_dir test \\\r\n --overwrite_output_dir \\\r\n --n_train 8 \\\r\n --n_val 8 \\\r\n --max_source_length 512 \\\r\n --max_target_length 56 \\\r\n --val_max_target_length 56 \\\r\n --do_train \\\r\n --do_eval \\\r\n --num_train_epochs 2 \\\r\n --per_device_train_batch_size 4 \\\r\n --per_device_eval_batch_size 4 \\\r\n --evaluate_during_training \\\r\n --predict_from_generate \\\r\n --logging_steps 2 \\\r\n --save_steps 2 \\\r\n --eval_steps 2 \\\r\n --sortish_sampler \\\r\n```", "Note: Eventually we need to refactor seq2seq/README.md to accommodate this", "This looks great. Very excited to try this out with the `EncoderDecoder` model.", "LGTM pending resolution of padding mystery.", "Great work @patil-suraj !" ]
"2024-04-01T13:18:47"
"2024-04-01T13:36:58"
null
NONE
null
### Feature request Hi thanks for the library! I would like to have a huggingface Dataset, and one of its column is custom (non-serializable) Python objects. For example, a minimal code: ``` class MyClass: pass dataset = datasets.Dataset.from_list([ dict(a=MyClass(), b='hello'), ]) ``` It gives error: ``` ArrowInvalid: Could not convert <__main__.MyClass object at 0x7a852830d050> with type MyClass: did not recognize Python value type when inferring an Arrow data type ``` I guess it is because Dataset forces to convert everything into arrow format. However, is there any ways to make the scenario work? Thanks! ### Motivation (see above) ### Your contribution Yes, I am happy to PR! Cross-posted: https://discuss.huggingface.co/t/datasets-with-custom-python-objects/79050?u=fzyzcjy EDIT: possibly related https://github.com/huggingface/datasets/issues/5766
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6769/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 1 }
https://api.github.com/repos/huggingface/datasets/issues/6769/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6767
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6767/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6767/comments
https://api.github.com/repos/huggingface/datasets/issues/6767/events
https://github.com/huggingface/datasets/pull/6767
2,217,065,412
PR_kwDODunzps5rQO9J
6,767
fixing the issue 6755(small typo)
{ "login": "JINO-ROHIT", "id": 63234112, "node_id": "MDQ6VXNlcjYzMjM0MTEy", "avatar_url": "https://avatars.githubusercontent.com/u/63234112?v=4", "gravatar_id": "", "url": "https://api.github.com/users/JINO-ROHIT", "html_url": "https://github.com/JINO-ROHIT", "followers_url": "https://api.github.com/users/JINO-ROHIT/followers", "following_url": "https://api.github.com/users/JINO-ROHIT/following{/other_user}", "gists_url": "https://api.github.com/users/JINO-ROHIT/gists{/gist_id}", "starred_url": "https://api.github.com/users/JINO-ROHIT/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JINO-ROHIT/subscriptions", "organizations_url": "https://api.github.com/users/JINO-ROHIT/orgs", "repos_url": "https://api.github.com/users/JINO-ROHIT/repos", "events_url": "https://api.github.com/users/JINO-ROHIT/events{/privacy}", "received_events_url": "https://api.github.com/users/JINO-ROHIT/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[]
"2024-03-31T16:13:37"
"2024-04-02T14:14:02"
"2024-04-02T14:01:18"
CONTRIBUTOR
null
Fixed the issue #6755 on the typo mistake
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6767/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/6767/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6767", "html_url": "https://github.com/huggingface/datasets/pull/6767", "diff_url": "https://github.com/huggingface/datasets/pull/6767.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6767.patch", "merged_at": "2024-04-02T14:01:18" }
https://api.github.com/repos/huggingface/datasets/issues/6765
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6765/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6765/comments
https://api.github.com/repos/huggingface/datasets/issues/6765/events
https://github.com/huggingface/datasets/issues/6765
2,215,933,515
I_kwDODunzps6EFHZL
6,765
Compatibility issue between s3fs, fsspec, and datasets
{ "login": "njbrake", "id": 33383515, "node_id": "MDQ6VXNlcjMzMzgzNTE1", "avatar_url": "https://avatars.githubusercontent.com/u/33383515?v=4", "gravatar_id": "", "url": "https://api.github.com/users/njbrake", "html_url": "https://github.com/njbrake", "followers_url": "https://api.github.com/users/njbrake/followers", "following_url": "https://api.github.com/users/njbrake/following{/other_user}", "gists_url": "https://api.github.com/users/njbrake/gists{/gist_id}", "starred_url": "https://api.github.com/users/njbrake/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/njbrake/subscriptions", "organizations_url": "https://api.github.com/users/njbrake/orgs", "repos_url": "https://api.github.com/users/njbrake/repos", "events_url": "https://api.github.com/users/njbrake/events{/privacy}", "received_events_url": "https://api.github.com/users/njbrake/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[]
"2024-03-29T19:57:24"
"2024-05-05T13:37:14"
"2024-04-03T14:33:12"
NONE
null
### Describe the bug Here is the full error stack when installing: ``` ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. datasets 2.18.0 requires fsspec[http]<=2024.2.0,>=2023.1.0, but you have fsspec 2024.3.1 which is incompatible. Successfully installed aiobotocore-2.12.1 aioitertools-0.11.0 botocore-1.34.51 fsspec-2024.3.1 jmespath-1.0.1 s3fs-2024.3.1 urllib3-2.0.7 wrapt-1.16.0 ``` When I install with pip, pip allows this error to exist while still installing s3fs, but this error breaks poetry, since poetry will refuse to install s3fs because of the dependency conflict. Maybe I'm missing something so maybe it's not a bug but some mistake on my end? Any input would be helpful. Thanks! ### Steps to reproduce the bug 1. conda create -n tmp python=3.10 -y 2. conda activate tmp 3. pip install datasets 4. pip install s3fs ### Expected behavior I would expect there to be no error. ### Environment info MacOS (ARM), Python3.10, conda 23.11.0.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6765/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6765/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6764
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6764/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6764/comments
https://api.github.com/repos/huggingface/datasets/issues/6764/events
https://github.com/huggingface/datasets/issues/6764
2,215,767,119
I_kwDODunzps6EEexP
6,764
load_dataset can't work with symbolic links
{ "login": "VladimirVincan", "id": 13640533, "node_id": "MDQ6VXNlcjEzNjQwNTMz", "avatar_url": "https://avatars.githubusercontent.com/u/13640533?v=4", "gravatar_id": "", "url": "https://api.github.com/users/VladimirVincan", "html_url": "https://github.com/VladimirVincan", "followers_url": "https://api.github.com/users/VladimirVincan/followers", "following_url": "https://api.github.com/users/VladimirVincan/following{/other_user}", "gists_url": "https://api.github.com/users/VladimirVincan/gists{/gist_id}", "starred_url": "https://api.github.com/users/VladimirVincan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/VladimirVincan/subscriptions", "organizations_url": "https://api.github.com/users/VladimirVincan/orgs", "repos_url": "https://api.github.com/users/VladimirVincan/repos", "events_url": "https://api.github.com/users/VladimirVincan/events{/privacy}", "received_events_url": "https://api.github.com/users/VladimirVincan/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
[ "Any idea why there is one failed test case ?\r\nI have checked the code on the notebook and it runs without any issue on Colab.", "This seems completely unrelated, just relaunched the failed test.", "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6764?src=pr&el=h1) Report\n> Merging [#6764](https://codecov.io/gh/huggingface/transformers/pull/6764?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/4bd7be9a4268221d2a0000c7e8033aaeb365c03b?el=desc) will **decrease** coverage by `0.04%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6764/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6764?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6764 +/- ##\n==========================================\n- Coverage 79.74% 79.70% -0.05% \n==========================================\n Files 157 157 \n Lines 28479 28479 \n==========================================\n- Hits 22712 22698 -14 \n- Misses 5767 5781 +14 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6764?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/tokenization\\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6764/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fcm9iZXJ0YS5weQ==) | `87.67% <0.00%> (-10.96%)` | :arrow_down: |\n| [src/transformers/tokenization\\_utils\\_base.py](https://codecov.io/gh/huggingface/transformers/pull/6764/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfYmFzZS5weQ==) | `86.58% <0.00%> (-7.19%)` | :arrow_down: |\n| [src/transformers/tokenization\\_transfo\\_xl.py](https://codecov.io/gh/huggingface/transformers/pull/6764/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdHJhbnNmb194bC5weQ==) | `38.73% <0.00%> (-3.76%)` | :arrow_down: |\n| [src/transformers/tokenization\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6764/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fb3BlbmFpLnB5) | `82.57% <0.00%> (-1.52%)` | :arrow_down: |\n| [src/transformers/tokenization\\_utils\\_fast.py](https://codecov.io/gh/huggingface/transformers/pull/6764/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfZmFzdC5weQ==) | `92.85% <0.00%> (-1.43%)` | :arrow_down: |\n| [src/transformers/tokenization\\_bert.py](https://codecov.io/gh/huggingface/transformers/pull/6764/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYmVydC5weQ==) | `91.07% <0.00%> (-0.45%)` | :arrow_down: |\n| [src/transformers/tokenization\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6764/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHMucHk=) | `89.45% <0.00%> (-0.40%)` | :arrow_down: |\n| [src/transformers/file\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6764/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.41% <0.00%> (-0.26%)` | :arrow_down: |\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6764/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `86.46% <0.00%> (-0.26%)` | :arrow_down: |\n| [src/transformers/tokenization\\_marian.py](https://codecov.io/gh/huggingface/transformers/pull/6764/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fbWFyaWFuLnB5) | `99.16% <0.00%> (+32.50%)` | :arrow_up: |\n| ... and [1 more](https://codecov.io/gh/huggingface/transformers/pull/6764/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6764?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6764?src=pr&el=footer). Last update [4bd7be9...c7eb12c](https://codecov.io/gh/huggingface/transformers/pull/6764?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "Hi @agemagician, your model https://huggingface.co/Rostlab/prot_bert is not recognized by our Hosted inference API, probably because it doesn't have a `architectures` field in its config.json:\r\n\r\n<img width=\"565\" alt=\"Screenshot 2020-10-21 at 21 52 57\" src=\"https://user-images.githubusercontent.com/326577/96775413-849fb700-13b5-11eb-8075-11d7792548f6.png\">\r\n\r\n\r\nDo you mind if we update the config.json on the model hub? Alternatively, do you prefer doing it yourself?\r\n\r\nThanks!", "Hi @julien-c , No problem.\r\nI already have seen you updated it.\r\n\r\nHowever, it doesn't work properly because we don't lower case tokens:\r\nhttps://huggingface.co/Rostlab/prot_bert?text=A+T+G+%5BMASK%5D+C\r\n\r\nI have uploaded the \"tokenizer_config.json\" file which should fix it, but we have to wait until the model is no longer in memory and reload it.\r\n\r\nI have also did the same for our better bert model \"prot_bert_bfd\", and it is working fine:\r\nhttps://huggingface.co/Rostlab/prot_bert_bfd?text=A+T+G+%5BMASK%5D+C\r\n\r\nThanks for your help.", "Now properly loaded, and looks great!\r\n\r\nhttps://huggingface.co/Rostlab/prot_bert?text=D+L+I+P+T+S+S+K+V+V+%5BMASK%5D+D+T+S+L+Q+V+K+K+A+F+F+A+L+V+T\r\n\r\n<img width=\"693\" alt=\"Screenshot 2020-10-21 at 22 56 44\" src=\"https://user-images.githubusercontent.com/326577/96786965-ff210480-13be-11eb-9133-375bb20e60a1.png\">\r\n\r\nThanks a lot @agemagician " ]
"2024-03-29T17:49:28"
"2024-03-29T17:52:27"
null
NONE
null
### Feature request Enable the `load_dataset` function to load local datasets with symbolic links. E.g, this dataset can be loaded: β”œβ”€β”€ example_dataset/ β”‚ β”œβ”€β”€ data/ β”‚ β”‚ β”œβ”€β”€ train/ β”‚ β”‚ β”‚ β”œβ”€β”€ file0 β”‚ β”‚ β”‚ β”œβ”€β”€ file1 β”‚ β”‚ β”œβ”€β”€ dev/ β”‚ β”‚ β”‚ β”œβ”€β”€ file2 β”‚ β”‚ β”‚ β”œβ”€β”€ file3 β”‚ β”œβ”€β”€ metadata.csv while this dataset can't: β”œβ”€β”€ example_dataset_symlink/ β”‚ β”œβ”€β”€ data/ β”‚ β”‚ β”œβ”€β”€ train/ β”‚ β”‚ β”‚ β”œβ”€β”€ sym0 -> file0 β”‚ β”‚ β”‚ β”œβ”€β”€ sym1 -> file1 β”‚ β”‚ β”œβ”€β”€ dev/ β”‚ β”‚ β”‚ β”œβ”€β”€ sym2 -> file2 β”‚ β”‚ β”‚ β”œβ”€β”€ sym3 -> file3 β”‚ β”œβ”€β”€ metadata.csv I have created an example dataset in order to reproduce the problem: 1. Unzip `example_dataset.zip`. 2. Run `no_symlink.sh`. Training should start without issues. 3. Run `symlink.sh`. You will see that all four examples will be in train split, instead of having two examples in train and two examples in dev. The script won't load the correct audio files. [example_dataset.zip](https://github.com/huggingface/datasets/files/14807053/example_dataset.zip) ### Motivation I have a very large dataset locally. Instead of initiating training on the entire dataset, I need to start training on smaller subsets of the data. Due to the purpose of the experiments I am running, I will need to create many smaller datasets with overlapping data. Instead of copying the all the files for each subset, I would prefer copying symbolic links of the data. This way, the memory usage would not significantly increase beyond the initial dataset size. Advantages of this approach: - It would leave a smaller memory footprint on the hard drive - Creating smaller datasets would be much faster ### Your contribution I would gladly contribute, if this is something useful to the community. It seems like a simple change of code, something like `file_path = os.path.realpath(file_path)` should be added before loading the files. If anyone has insights on how to incorporate this functionality, I would greatly appreciate your knowledge and input.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6764/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/6764/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6763
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6763/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6763/comments
https://api.github.com/repos/huggingface/datasets/issues/6763/events
https://github.com/huggingface/datasets/pull/6763
2,213,440,804
PR_kwDODunzps5rENat
6,763
Fix issue with case sensitivity when loading dataset from local cache
{ "login": "Sumsky21", "id": 58537872, "node_id": "MDQ6VXNlcjU4NTM3ODcy", "avatar_url": "https://avatars.githubusercontent.com/u/58537872?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Sumsky21", "html_url": "https://github.com/Sumsky21", "followers_url": "https://api.github.com/users/Sumsky21/followers", "following_url": "https://api.github.com/users/Sumsky21/following{/other_user}", "gists_url": "https://api.github.com/users/Sumsky21/gists{/gist_id}", "starred_url": "https://api.github.com/users/Sumsky21/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Sumsky21/subscriptions", "organizations_url": "https://api.github.com/users/Sumsky21/orgs", "repos_url": "https://api.github.com/users/Sumsky21/repos", "events_url": "https://api.github.com/users/Sumsky21/events{/privacy}", "received_events_url": "https://api.github.com/users/Sumsky21/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "Same issue when running distilbart", "I face the same issue with PEGASUS", "I've run into this with several seq2seq models (Pegasus, BART, T5). Ironically, running with fp16 causes increased GPU memory usage.", "I solved my issue by downgrading Pytorch to 1.5.1 and installing Nvidia/Apex. ", "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-03-28T14:52:35"
"2024-04-20T12:16:45"
null
NONE
null
When a dataset with upper-cases in its name is first loaded using `load_dataset()`, the local cache directory is created with all lowercase letters. However, upon subsequent loads, the current version attempts to locate the cache directory using the dataset's original name, which includes uppercase letters. This discrepancy can lead to confusion and, particularly in offline mode, results in errors. ### Reproduce ```bash ~$ python Python 3.9.19 (main, Mar 21 2024, 17:11:28) [GCC 11.2.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> from datasets import load_dataset >>> dataset = load_dataset("locuslab/TOFU", "full") >>> quit() ~$ export HF_DATASETS_OFFLINE=1 ~$ python Python 3.9.19 (main, Mar 21 2024, 17:11:28) [GCC 11.2.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> from datasets import load_dataset >>> dataset = load_dataset("locuslab/TOFU", "full") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "xxxxxx/anaconda3/envs/llm/lib/python3.9/site-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "xxxxxx/anaconda3/envs/llm/lib/python3.9/site-packages/datasets/load.py", line 2228, in load_dataset_builder dataset_module = dataset_module_factory( File "xxxxxx/anaconda3/envs/llm/lib/python3.9/site-packages/datasets/load.py", line 1871, in dataset_module_factory raise ConnectionError(f"Couldn't reach the Hugging Face Hub for dataset '{path}': {e1}") from None ConnectionError: Couldn't reach the Hugging Face Hub for dataset 'locuslab/TOFU': Offline mode is enabled. >>> ``` I fix this issue by lowering the dataset name (`.lower()`) when generating cache_dir.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6763/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6763/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6763", "html_url": "https://github.com/huggingface/datasets/pull/6763", "diff_url": "https://github.com/huggingface/datasets/pull/6763.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6763.patch", "merged_at": null }
https://api.github.com/repos/huggingface/datasets/issues/6762
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6762/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6762/comments
https://api.github.com/repos/huggingface/datasets/issues/6762/events
https://github.com/huggingface/datasets/pull/6762
2,213,275,468
PR_kwDODunzps5rDpBe
6,762
Allow polars as valid output type
{ "login": "psmyth94", "id": 11325244, "node_id": "MDQ6VXNlcjExMzI1MjQ0", "avatar_url": "https://avatars.githubusercontent.com/u/11325244?v=4", "gravatar_id": "", "url": "https://api.github.com/users/psmyth94", "html_url": "https://github.com/psmyth94", "followers_url": "https://api.github.com/users/psmyth94/followers", "following_url": "https://api.github.com/users/psmyth94/following{/other_user}", "gists_url": "https://api.github.com/users/psmyth94/gists{/gist_id}", "starred_url": "https://api.github.com/users/psmyth94/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/psmyth94/subscriptions", "organizations_url": "https://api.github.com/users/psmyth94/orgs", "repos_url": "https://api.github.com/users/psmyth94/repos", "events_url": "https://api.github.com/users/psmyth94/events{/privacy}", "received_events_url": "https://api.github.com/users/psmyth94/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "Yes! This is something we'll build, step by step. I'll post more about our roadmap for this in the coming weeks.", "> Yes! This is something we'll build, step by step. I'll post more about our roadmap for this in the coming weeks.\r\n\r\nMaybe you can create a web-based interface with input fields/drop downs that can generate the model card automatically. Just a thought. ", "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n", "posting so that the bot doesn't close this issue.", "@prajjwal1 Have you checked out our new model storage/model versioning features on huggingface.co? You can also now edit your model card directly from the website (or from `git`) and we'll make this workflow more prominent (vs. adding model cards to `transformers`) in the coming days/weeks.\r\n\r\nFeedback welcome, here or on the Forum.", "No, I haven't. I am aware of it. I will check out soon. Loving the direction where HF is headed.", "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n", "This issue has been automatically marked as stale and been closed because it has not had recent activity. Thank you for your contributions.\n\nIf you think this still needs to be addressed please comment on this thread." ]
"2024-03-28T13:40:28"
"2024-05-21T14:29:40"
null
CONTRIBUTOR
null
I was trying out polars as an output for a map function and found that it wasn't a valid return type in `validate_function_output`. Thought that we should accommodate this by creating and adding it to the `allowed_processed_input_types` variable.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6762/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/6762/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6762", "html_url": "https://github.com/huggingface/datasets/pull/6762", "diff_url": "https://github.com/huggingface/datasets/pull/6762.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6762.patch", "merged_at": null }
https://api.github.com/repos/huggingface/datasets/issues/6761
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6761/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6761/comments
https://api.github.com/repos/huggingface/datasets/issues/6761/events
https://github.com/huggingface/datasets/pull/6761
2,212,805,108
PR_kwDODunzps5rCAu8
6,761
Remove deprecated code
{ "login": "Wauplin", "id": 11801849, "node_id": "MDQ6VXNlcjExODAxODQ5", "avatar_url": "https://avatars.githubusercontent.com/u/11801849?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Wauplin", "html_url": "https://github.com/Wauplin", "followers_url": "https://api.github.com/users/Wauplin/followers", "following_url": "https://api.github.com/users/Wauplin/following{/other_user}", "gists_url": "https://api.github.com/users/Wauplin/gists{/gist_id}", "starred_url": "https://api.github.com/users/Wauplin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Wauplin/subscriptions", "organizations_url": "https://api.github.com/users/Wauplin/orgs", "repos_url": "https://api.github.com/users/Wauplin/repos", "events_url": "https://api.github.com/users/Wauplin/events{/privacy}", "received_events_url": "https://api.github.com/users/Wauplin/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6761?src=pr&el=h1) Report\n> Merging [#6761](https://codecov.io/gh/huggingface/transformers/pull/6761?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/05e7150a53cc6c1571c0e3acb1b4d692737976d9?el=desc) will **decrease** coverage by `0.24%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6761/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6761?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6761 +/- ##\n==========================================\n- Coverage 79.70% 79.45% -0.25% \n==========================================\n Files 157 157 \n Lines 28479 28479 \n==========================================\n- Hits 22698 22627 -71 \n- Misses 5781 5852 +71 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6761?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_tf\\_electra.py](https://codecov.io/gh/huggingface/transformers/pull/6761/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9lbGVjdHJhLnB5) | `25.13% <0.00%> (-73.83%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6761/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9vcGVuYWkucHk=) | `22.58% <0.00%> (-72.26%)` | :arrow_down: |\n| [src/transformers/tokenization\\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/6761/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxuZXQucHk=) | `66.66% <0.00%> (-23.43%)` | :arrow_down: |\n| [src/transformers/tokenization\\_ctrl.py](https://codecov.io/gh/huggingface/transformers/pull/6761/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fY3RybC5weQ==) | `78.64% <0.00%> (-17.48%)` | :arrow_down: |\n| [src/transformers/tokenization\\_reformer.py](https://codecov.io/gh/huggingface/transformers/pull/6761/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fcmVmb3JtZXIucHk=) | `81.66% <0.00%> (-13.34%)` | :arrow_down: |\n| [src/transformers/tokenization\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6761/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fb3BlbmFpLnB5) | `71.21% <0.00%> (-11.37%)` | :arrow_down: |\n| [src/transformers/modeling\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6761/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190NS5weQ==) | `77.63% <0.00%> (-6.21%)` | :arrow_down: |\n| [src/transformers/modeling\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6761/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19vcGVuYWkucHk=) | `80.96% <0.00%> (-1.30%)` | :arrow_down: |\n| [src/transformers/modeling\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6761/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `87.50% <0.00%> (-0.56%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6761/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `86.97% <0.00%> (-0.33%)` | :arrow_down: |\n| ... and [9 more](https://codecov.io/gh/huggingface/transformers/pull/6761/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6761?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6761?src=pr&el=footer). Last update [05e7150...88974cc](https://codecov.io/gh/huggingface/transformers/pull/6761?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-03-28T09:57:57"
"2024-03-29T13:27:26"
"2024-03-29T13:18:13"
CONTRIBUTOR
null
What does this PR do? 1. remove `list_files_info` in favor of `list_repo_tree`. As of `0.23`, `list_files_info` will be removed for good. `datasets` had a utility to support both pre-0.20 and post-0.20 versions. Since `hfh` version is already pinned to `>=0.21.2`, I removed the legacy part. 2. `preupload_lfs_files` had also a different behavior between `<0.20` and `>=0.20`. I remove it since huggingface_hub is now pinned to `>=0.21.2` 3. `hf_hub_url` is overwritten to default to the dataset repo_type. I do think it is misleading to keep the same method naming for it. I renamed it to `get_dataset_url` for clarity. Let me know if you prefer to see this change reverted.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6761/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/6761/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6761", "html_url": "https://github.com/huggingface/datasets/pull/6761", "diff_url": "https://github.com/huggingface/datasets/pull/6761.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6761.patch", "merged_at": "2024-03-29T13:18:13" }
https://api.github.com/repos/huggingface/datasets/issues/6760
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6760/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6760/comments
https://api.github.com/repos/huggingface/datasets/issues/6760/events
https://github.com/huggingface/datasets/issues/6760
2,212,288,122
I_kwDODunzps6D3NZ6
6,760
Load codeparrot/apps raising UnicodeDecodeError in datasets-2.18.0
{ "login": "yucc-leon", "id": 17897916, "node_id": "MDQ6VXNlcjE3ODk3OTE2", "avatar_url": "https://avatars.githubusercontent.com/u/17897916?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yucc-leon", "html_url": "https://github.com/yucc-leon", "followers_url": "https://api.github.com/users/yucc-leon/followers", "following_url": "https://api.github.com/users/yucc-leon/following{/other_user}", "gists_url": "https://api.github.com/users/yucc-leon/gists{/gist_id}", "starred_url": "https://api.github.com/users/yucc-leon/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yucc-leon/subscriptions", "organizations_url": "https://api.github.com/users/yucc-leon/orgs", "repos_url": "https://api.github.com/users/yucc-leon/repos", "events_url": "https://api.github.com/users/yucc-leon/events{/privacy}", "received_events_url": "https://api.github.com/users/yucc-leon/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-03-28T03:44:26"
"2024-04-07T09:40:40"
null
NONE
null
### Describe the bug This happens with datasets-2.18.0; I downgraded the version to 2.14.6 fixing this temporarily. ``` Traceback (most recent call last): File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 2228, in load_dataset_builder dataset_module = dataset_module_factory( File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 1879, in dataset_module_factory raise e1 from None File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 1831, in dataset_module_factory can_load_config_from_parquet_export = "DEFAULT_CONFIG_NAME" not in f.read() File "/home/xxx/miniconda3/envs/py310/lib/python3.10/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte ``` ### Steps to reproduce the bug 1. Using Python3.10/3.11 2. Install datasets-2.18.0 3. test with ``` from datasets import load_dataset dataset = load_dataset("codeparrot/apps") ``` ### Expected behavior Normally it should manage to download and load the dataset without such error. ### Environment info Ubuntu, Python3.10/3.11
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6760/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/6760/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6759
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6759/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6759/comments
https://api.github.com/repos/huggingface/datasets/issues/6759/events
https://github.com/huggingface/datasets/issues/6759
2,208,892,891
I_kwDODunzps6DqQfb
6,759
Persistent multi-process Pool
{ "login": "fostiropoulos", "id": 4337024, "node_id": "MDQ6VXNlcjQzMzcwMjQ=", "avatar_url": "https://avatars.githubusercontent.com/u/4337024?v=4", "gravatar_id": "", "url": "https://api.github.com/users/fostiropoulos", "html_url": "https://github.com/fostiropoulos", "followers_url": "https://api.github.com/users/fostiropoulos/followers", "following_url": "https://api.github.com/users/fostiropoulos/following{/other_user}", "gists_url": "https://api.github.com/users/fostiropoulos/gists{/gist_id}", "starred_url": "https://api.github.com/users/fostiropoulos/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fostiropoulos/subscriptions", "organizations_url": "https://api.github.com/users/fostiropoulos/orgs", "repos_url": "https://api.github.com/users/fostiropoulos/repos", "events_url": "https://api.github.com/users/fostiropoulos/events{/privacy}", "received_events_url": "https://api.github.com/users/fostiropoulos/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6759?src=pr&el=h1) Report\n> Merging [#6759](https://codecov.io/gh/huggingface/transformers/pull/6759?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/434936f34a8b3154a79564c87f4cb50f5d57e050?el=desc) will **increase** coverage by `0.03%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6759/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6759?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6759 +/- ##\n==========================================\n+ Coverage 79.47% 79.51% +0.03% \n==========================================\n Files 157 157 \n Lines 28479 28479 \n==========================================\n+ Hits 22635 22644 +9 \n+ Misses 5844 5835 -9 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6759?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/tokenization\\_ctrl.py](https://codecov.io/gh/huggingface/transformers/pull/6759/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fY3RybC5weQ==) | `78.64% <0.00%> (-17.48%)` | :arrow_down: |\n| [src/transformers/tokenization\\_reformer.py](https://codecov.io/gh/huggingface/transformers/pull/6759/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fcmVmb3JtZXIucHk=) | `81.66% <0.00%> (-13.34%)` | :arrow_down: |\n| [src/transformers/tokenization\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6759/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fb3BlbmFpLnB5) | `71.21% <0.00%> (-12.88%)` | :arrow_down: |\n| [src/transformers/tokenization\\_xlm\\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6759/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxtX3JvYmVydGEucHk=) | `84.52% <0.00%> (-10.72%)` | :arrow_down: |\n| [src/transformers/tokenization\\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/6759/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYWxiZXJ0LnB5) | `87.50% <0.00%> (+58.65%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6759?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6759?src=pr&el=footer). Last update [434936f...fd0b38d](https://codecov.io/gh/huggingface/transformers/pull/6759?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "really cool model card, thanks for sharing", "File path was incorrect but I fixed it in d822ab636b6a14ed50f7bca0797c1de42c19de61. Thanks!", "@julien-c thanks" ]
"2024-03-26T17:35:25"
"2024-03-26T17:35:25"
null
NONE
null
### Feature request Running .map and filter functions with `num_procs` consecutively instantiates several multiprocessing pools iteratively. As instantiating a Pool is very resource intensive it can be a bottleneck to performing iteratively filtering. My ideas: 1. There should be an option to declare `persistent_workers` similar to pytorch DataLoader. Downside would be that would be complex to determine the correct resource allocation and deallocation of the pool. i.e. the dataset can outlive the utility of the pool. 2. Provide a pool as an argument. Downside would be the expertise required by the user. Upside, is that there is better resource management. ### Motivation Is really slow to iteratively perform map and filter operations on a dataset. ### Your contribution If approved I could integrate it. I would need to know what method would be most suitable to implement from the two options above.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6759/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6759/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6758
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6758/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6758/comments
https://api.github.com/repos/huggingface/datasets/issues/6758/events
https://github.com/huggingface/datasets/issues/6758
2,208,494,302
I_kwDODunzps6DovLe
6,758
Passing `sample_by` to `load_dataset` when loading text data does not work
{ "login": "ntoxeg", "id": 823693, "node_id": "MDQ6VXNlcjgyMzY5Mw==", "avatar_url": "https://avatars.githubusercontent.com/u/823693?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ntoxeg", "html_url": "https://github.com/ntoxeg", "followers_url": "https://api.github.com/users/ntoxeg/followers", "following_url": "https://api.github.com/users/ntoxeg/following{/other_user}", "gists_url": "https://api.github.com/users/ntoxeg/gists{/gist_id}", "starred_url": "https://api.github.com/users/ntoxeg/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ntoxeg/subscriptions", "organizations_url": "https://api.github.com/users/ntoxeg/orgs", "repos_url": "https://api.github.com/users/ntoxeg/repos", "events_url": "https://api.github.com/users/ntoxeg/events{/privacy}", "received_events_url": "https://api.github.com/users/ntoxeg/received_events", "type": "User", "site_admin": false }
[]
closed
false
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "site_admin": false }
[ { "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "site_admin": false } ]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6758?src=pr&el=h1) Report\n> Merging [#6758](https://codecov.io/gh/huggingface/transformers/pull/6758?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/a75c64d80c76c3dc71f735d9197a4a601847e0cd?el=desc) will **decrease** coverage by `0.00%`.\n> The diff coverage is `100.00%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6758/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6758?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6758 +/- ##\n==========================================\n- Coverage 78.96% 78.96% -0.01% \n==========================================\n Files 157 157 \n Lines 28486 28488 +2 \n==========================================\n+ Hits 22495 22496 +1 \n- Misses 5991 5992 +1 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6758?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/6758/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19iYXJ0LnB5) | `95.57% <100.00%> (+0.01%)` | :arrow_up: |\n| [src/transformers/file\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6758/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.41% <0.00%> (-0.26%)` | :arrow_down: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6758?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6758?src=pr&el=footer). Last update [a75c64d...06e7cc5](https://codecov.io/gh/huggingface/transformers/pull/6758?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-03-26T14:55:33"
"2024-04-09T11:27:59"
"2024-04-09T11:27:59"
NONE
null
### Describe the bug I have a dataset that consists of a bunch of text files, each representing an example. There is an undocumented `sample_by` argument for the `TextConfig` class that is used by `Text` to decide whether to split files into lines, paragraphs or take them whole. Passing `sample_by=β€œdocument”` to `load_dataset` results in files getting split into lines regardless. I have edited `src/datasets/packaged_modules/text/text.py` for myself to switch the default and it works fine. As a side note, the `if-else` for `sample_by` will silently load an empty dataset if someone makes a typo in the argument, which is not ideal. ### Steps to reproduce the bug 1. Prepare data as a bunch of files in a directory. 2. Load that data via `load_dataset(β€œtext”, data_files=<data_dir>/<files_glob>, …, sample_by=β€œdocument”)`. 3. Inspect the resultant dataset β€” every item should have the form of `{β€œtext”: <a line from a file>}`. ### Expected behavior `load_dataset(β€œtext”, data_files=<data_dir>/<files_glob>, …, sample_by=β€œdocument”)` should result in a dataset with items of the form `{β€œtext”: <one document>}`. ### Environment info - `datasets` version: 2.18.0 - Platform: Linux-5.15.0-1046-nvidia-x86_64-with-glibc2.35 - Python version: 3.11.8 - `huggingface_hub` version: 0.21.4 - PyArrow version: 15.0.2 - Pandas version: 2.2.1 - `fsspec` version: 2024.2.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6758/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6758/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6757
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6757/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6757/comments
https://api.github.com/repos/huggingface/datasets/issues/6757/events
https://github.com/huggingface/datasets/pull/6757
2,206,280,340
PR_kwDODunzps5qr7Li
6,757
Test disabling transformers containers in docs CI
{ "login": "Wauplin", "id": 11801849, "node_id": "MDQ6VXNlcjExODAxODQ5", "avatar_url": "https://avatars.githubusercontent.com/u/11801849?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Wauplin", "html_url": "https://github.com/Wauplin", "followers_url": "https://api.github.com/users/Wauplin/followers", "following_url": "https://api.github.com/users/Wauplin/following{/other_user}", "gists_url": "https://api.github.com/users/Wauplin/gists{/gist_id}", "starred_url": "https://api.github.com/users/Wauplin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Wauplin/subscriptions", "organizations_url": "https://api.github.com/users/Wauplin/orgs", "repos_url": "https://api.github.com/users/Wauplin/repos", "events_url": "https://api.github.com/users/Wauplin/events{/privacy}", "received_events_url": "https://api.github.com/users/Wauplin/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[]
"2024-03-25T17:16:11"
"2024-03-27T16:26:35"
null
CONTRIBUTOR
null
Related to https://github.com/huggingface/doc-builder/pull/487 and [internal slack thread](https://huggingface.slack.com/archives/C04F8N7FQNL/p1711384899462349?thread_ts=1711041424.720769&cid=C04F8N7FQNL). There is now a `custom_container` option when building docs in CI. When set to `""` (instead of `"huggingface/transformers-doc-builder"` by default), we don't run the CI inside a container, therefore saving ~2min of download time. The plan is to test disabling the transformers container on a few "big" repo and if everything works correctly, we will stop making it the default container. More details on https://github.com/huggingface/doc-builder/pull/487. cc @mishig25
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6757/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 1, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6757/timeline
null
null
true
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6757", "html_url": "https://github.com/huggingface/datasets/pull/6757", "diff_url": "https://github.com/huggingface/datasets/pull/6757.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6757.patch", "merged_at": null }
https://api.github.com/repos/huggingface/datasets/issues/6756
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6756/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6756/comments
https://api.github.com/repos/huggingface/datasets/issues/6756/events
https://github.com/huggingface/datasets/issues/6756
2,205,557,725
I_kwDODunzps6DdiPd
6,756
Support SQLite files?
{ "login": "severo", "id": 1676121, "node_id": "MDQ6VXNlcjE2NzYxMjE=", "avatar_url": "https://avatars.githubusercontent.com/u/1676121?v=4", "gravatar_id": "", "url": "https://api.github.com/users/severo", "html_url": "https://github.com/severo", "followers_url": "https://api.github.com/users/severo/followers", "following_url": "https://api.github.com/users/severo/following{/other_user}", "gists_url": "https://api.github.com/users/severo/gists{/gist_id}", "starred_url": "https://api.github.com/users/severo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/severo/subscriptions", "organizations_url": "https://api.github.com/users/severo/orgs", "repos_url": "https://api.github.com/users/severo/repos", "events_url": "https://api.github.com/users/severo/events{/privacy}", "received_events_url": "https://api.github.com/users/severo/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6756?src=pr&el=h1) Report\n> Merging [#6756](https://codecov.io/gh/huggingface/transformers/pull/6756?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/61b9ed80742f564dc522783a33bf001d6d871a2c?el=desc) will **increase** coverage by `0.16%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6756/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6756?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6756 +/- ##\n==========================================\n+ Coverage 79.65% 79.82% +0.16% \n==========================================\n Files 157 157 \n Lines 28479 28479 \n==========================================\n+ Hits 22686 22734 +48 \n+ Misses 5793 5745 -48 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6756?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_tf\\_xlm.py](https://codecov.io/gh/huggingface/transformers/pull/6756/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl94bG0ucHk=) | `18.94% <0.00%> (-74.32%)` | :arrow_down: |\n| [src/transformers/modeling\\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6756/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yb2JlcnRhLnB5) | `77.37% <0.00%> (-19.71%)` | :arrow_down: |\n| [src/transformers/file\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6756/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.66% <0.00%> (+0.25%)` | :arrow_up: |\n| [src/transformers/tokenization\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6756/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHMucHk=) | `89.84% <0.00%> (+0.39%)` | :arrow_up: |\n| [src/transformers/tokenization\\_bert.py](https://codecov.io/gh/huggingface/transformers/pull/6756/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYmVydC5weQ==) | `91.51% <0.00%> (+0.44%)` | :arrow_up: |\n| [src/transformers/tokenization\\_utils\\_fast.py](https://codecov.io/gh/huggingface/transformers/pull/6756/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfZmFzdC5weQ==) | `94.28% <0.00%> (+1.42%)` | :arrow_up: |\n| [src/transformers/tokenization\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6756/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fb3BlbmFpLnB5) | `84.09% <0.00%> (+1.51%)` | :arrow_up: |\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6756/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `86.46% <0.00%> (+3.00%)` | :arrow_up: |\n| [src/transformers/tokenization\\_transfo\\_xl.py](https://codecov.io/gh/huggingface/transformers/pull/6756/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdHJhbnNmb194bC5weQ==) | `42.48% <0.00%> (+3.75%)` | :arrow_up: |\n| [src/transformers/tokenization\\_utils\\_base.py](https://codecov.io/gh/huggingface/transformers/pull/6756/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfYmFzZS5weQ==) | `93.76% <0.00%> (+7.18%)` | :arrow_up: |\n| ... and [2 more](https://codecov.io/gh/huggingface/transformers/pull/6756/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6756?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6756?src=pr&el=footer). Last update [61b9ed8...7ba95ec](https://codecov.io/gh/huggingface/transformers/pull/6756?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-03-25T11:48:05"
"2024-03-26T16:09:32"
"2024-03-26T16:09:32"
CONTRIBUTOR
null
### Feature request Support loading a dataset from a SQLite file https://huggingface.co/datasets/severo/test_iris_sqlite/tree/main ### Motivation SQLite is a popular file format. ### Your contribution See discussion on slack: https://huggingface.slack.com/archives/C04L6P8KNQ5/p1702481859117909 (internal) In particular: a SQLite file can contain multiple tables, which might be matched to multiple configs. Maybe the detail of splits and configs should be defined in the README YAML, or use the same format as for ZIP files: `Iris.sqlite::Iris`. See dataset here: https://huggingface.co/datasets/severo/test_iris_sqlite Note: should we also support DuckDB files?
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6756/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6756/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6755
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6755/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6755/comments
https://api.github.com/repos/huggingface/datasets/issues/6755/events
https://github.com/huggingface/datasets/issues/6755
2,204,573,289
I_kwDODunzps6DZx5p
6,755
Small typo on the documentation
{ "login": "fostiropoulos", "id": 4337024, "node_id": "MDQ6VXNlcjQzMzcwMjQ=", "avatar_url": "https://avatars.githubusercontent.com/u/4337024?v=4", "gravatar_id": "", "url": "https://api.github.com/users/fostiropoulos", "html_url": "https://github.com/fostiropoulos", "followers_url": "https://api.github.com/users/fostiropoulos/followers", "following_url": "https://api.github.com/users/fostiropoulos/following{/other_user}", "gists_url": "https://api.github.com/users/fostiropoulos/gists{/gist_id}", "starred_url": "https://api.github.com/users/fostiropoulos/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fostiropoulos/subscriptions", "organizations_url": "https://api.github.com/users/fostiropoulos/orgs", "repos_url": "https://api.github.com/users/fostiropoulos/repos", "events_url": "https://api.github.com/users/fostiropoulos/events{/privacy}", "received_events_url": "https://api.github.com/users/fostiropoulos/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892877, "node_id": "MDU6TGFiZWwxOTM1ODkyODc3", "url": "https://api.github.com/repos/huggingface/datasets/labels/good%20first%20issue", "name": "good first issue", "color": "7057ff", "default": true, "description": "Good for newcomers" } ]
closed
false
{ "login": "JINO-ROHIT", "id": 63234112, "node_id": "MDQ6VXNlcjYzMjM0MTEy", "avatar_url": "https://avatars.githubusercontent.com/u/63234112?v=4", "gravatar_id": "", "url": "https://api.github.com/users/JINO-ROHIT", "html_url": "https://github.com/JINO-ROHIT", "followers_url": "https://api.github.com/users/JINO-ROHIT/followers", "following_url": "https://api.github.com/users/JINO-ROHIT/following{/other_user}", "gists_url": "https://api.github.com/users/JINO-ROHIT/gists{/gist_id}", "starred_url": "https://api.github.com/users/JINO-ROHIT/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JINO-ROHIT/subscriptions", "organizations_url": "https://api.github.com/users/JINO-ROHIT/orgs", "repos_url": "https://api.github.com/users/JINO-ROHIT/repos", "events_url": "https://api.github.com/users/JINO-ROHIT/events{/privacy}", "received_events_url": "https://api.github.com/users/JINO-ROHIT/received_events", "type": "User", "site_admin": false }
[ { "login": "JINO-ROHIT", "id": 63234112, "node_id": "MDQ6VXNlcjYzMjM0MTEy", "avatar_url": "https://avatars.githubusercontent.com/u/63234112?v=4", "gravatar_id": "", "url": "https://api.github.com/users/JINO-ROHIT", "html_url": "https://github.com/JINO-ROHIT", "followers_url": "https://api.github.com/users/JINO-ROHIT/followers", "following_url": "https://api.github.com/users/JINO-ROHIT/following{/other_user}", "gists_url": "https://api.github.com/users/JINO-ROHIT/gists{/gist_id}", "starred_url": "https://api.github.com/users/JINO-ROHIT/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JINO-ROHIT/subscriptions", "organizations_url": "https://api.github.com/users/JINO-ROHIT/orgs", "repos_url": "https://api.github.com/users/JINO-ROHIT/repos", "events_url": "https://api.github.com/users/JINO-ROHIT/events{/privacy}", "received_events_url": "https://api.github.com/users/JINO-ROHIT/received_events", "type": "User", "site_admin": false } ]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6755?src=pr&el=h1) Report\n> Merging [#6755](https://codecov.io/gh/huggingface/transformers/pull/6755?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/61b9ed80742f564dc522783a33bf001d6d871a2c?el=desc) will **decrease** coverage by `0.23%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6755/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6755?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6755 +/- ##\n==========================================\n- Coverage 79.65% 79.41% -0.24% \n==========================================\n Files 157 157 \n Lines 28479 28479 \n==========================================\n- Hits 22686 22618 -68 \n- Misses 5793 5861 +68 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6755?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_tf\\_electra.py](https://codecov.io/gh/huggingface/transformers/pull/6755/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9lbGVjdHJhLnB5) | `25.13% <0.00%> (-73.83%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6755/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9vcGVuYWkucHk=) | `22.58% <0.00%> (-72.26%)` | :arrow_down: |\n| [src/transformers/tokenization\\_mbart.py](https://codecov.io/gh/huggingface/transformers/pull/6755/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fbWJhcnQucHk=) | `56.25% <0.00%> (-39.07%)` | :arrow_down: |\n| [src/transformers/tokenization\\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/6755/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxuZXQucHk=) | `66.66% <0.00%> (-23.43%)` | :arrow_down: |\n| [src/transformers/tokenization\\_ctrl.py](https://codecov.io/gh/huggingface/transformers/pull/6755/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fY3RybC5weQ==) | `78.64% <0.00%> (-17.48%)` | :arrow_down: |\n| [src/transformers/modeling\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6755/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190NS5weQ==) | `77.63% <0.00%> (-6.21%)` | :arrow_down: |\n| [src/transformers/modeling\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6755/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19vcGVuYWkucHk=) | `80.96% <0.00%> (-1.30%)` | :arrow_down: |\n| [src/transformers/modeling\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6755/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `87.50% <0.00%> (-0.56%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6755/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `86.97% <0.00%> (-0.33%)` | :arrow_down: |\n| [src/transformers/tokenization\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6755/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHMucHk=) | `89.84% <0.00%> (+0.39%)` | :arrow_up: |\n| ... and [9 more](https://codecov.io/gh/huggingface/transformers/pull/6755/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6755?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6755?src=pr&el=footer). Last update [61b9ed8...9ff6c2f](https://codecov.io/gh/huggingface/transformers/pull/6755?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "That is an awesome model card, thanks for sharing. \r\n\r\n➑️ **[amberoad/bert-multilingual-passage-reranking-msmarco](https://huggingface.co/amberoad/bert-multilingual-passage-reranking-msmarco)**" ]
"2024-03-24T21:47:52"
"2024-04-02T14:01:19"
"2024-04-02T14:01:19"
NONE
null
### Describe the bug There is a small typo on https://github.com/huggingface/datasets/blob/d5468836fe94e8be1ae093397dd43d4a2503b926/src/datasets/dataset_dict.py#L938 It should be `caching is enabled`. ### Steps to reproduce the bug Please visit https://github.com/huggingface/datasets/blob/d5468836fe94e8be1ae093397dd43d4a2503b926/src/datasets/dataset_dict.py#L938 ### Expected behavior `caching is enabled` ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-5.15.0-101-generic-x86_64-with-glibc2.35 - Python version: 3.11.7 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.10.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6755/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6755/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6754
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6754/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6754/comments
https://api.github.com/repos/huggingface/datasets/issues/6754/events
https://github.com/huggingface/datasets/pull/6754
2,204,214,595
PR_kwDODunzps5qk-nr
6,754
Fix cache path to snakecase for `CachedDatasetModuleFactory` and `Cache`
{ "login": "izhx", "id": 26690193, "node_id": "MDQ6VXNlcjI2NjkwMTkz", "avatar_url": "https://avatars.githubusercontent.com/u/26690193?v=4", "gravatar_id": "", "url": "https://api.github.com/users/izhx", "html_url": "https://github.com/izhx", "followers_url": "https://api.github.com/users/izhx/followers", "following_url": "https://api.github.com/users/izhx/following{/other_user}", "gists_url": "https://api.github.com/users/izhx/gists{/gist_id}", "starred_url": "https://api.github.com/users/izhx/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/izhx/subscriptions", "organizations_url": "https://api.github.com/users/izhx/orgs", "repos_url": "https://api.github.com/users/izhx/repos", "events_url": "https://api.github.com/users/izhx/events{/privacy}", "received_events_url": "https://api.github.com/users/izhx/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6754?src=pr&el=h1) Report\n> Merging [#6754](https://codecov.io/gh/huggingface/transformers/pull/6754?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/99407f9d1ece38d62a257fa8c65c3a2e114164e6?el=desc) will **increase** coverage by `0.42%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6754/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6754?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6754 +/- ##\n==========================================\n+ Coverage 79.02% 79.45% +0.42% \n==========================================\n Files 157 157 \n Lines 28479 28479 \n==========================================\n+ Hits 22505 22627 +122 \n+ Misses 5974 5852 -122 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6754?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/tokenization\\_mbart.py](https://codecov.io/gh/huggingface/transformers/pull/6754/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fbWJhcnQucHk=) | `56.25% <0.00%> (-39.07%)` | :arrow_down: |\n| [src/transformers/tokenization\\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/6754/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxuZXQucHk=) | `66.66% <0.00%> (-23.43%)` | :arrow_down: |\n| [src/transformers/tokenization\\_dpr.py](https://codecov.io/gh/huggingface/transformers/pull/6754/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fZHByLnB5) | `57.65% <0.00%> (+4.50%)` | :arrow_up: |\n| [src/transformers/tokenization\\_xlm.py](https://codecov.io/gh/huggingface/transformers/pull/6754/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxtLnB5) | `82.93% <0.00%> (+66.66%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6754?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6754?src=pr&el=footer). Last update [99407f9...c6e6400](https://codecov.io/gh/huggingface/transformers/pull/6754?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "This is great! I can confirm this fixes it. It would be good to merge it fast as the current master fails." ]
"2024-03-24T06:59:15"
"2024-04-15T15:45:44"
"2024-04-15T15:38:51"
CONTRIBUTOR
null
Fix https://github.com/huggingface/datasets/issues/6750#issuecomment-2016678729 I didn't find a guideline on how to run the tests, so i just run the following steps to make sure that this bug is fixed. 1. `python test.py`, 2. then `HF_DATASETS_OFFLINE=1 python test.py` The `test.py` is ``` import datasets datasets.utils.logging.set_verbosity_info() ds = datasets.load_dataset('izhx/STS17-debug') print(ds) ds = datasets.load_dataset('C-MTEB/AFQMC', revision='b44c3b011063adb25877c13823db83bb193913c4') print(ds) ```
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6754/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6754/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6754", "html_url": "https://github.com/huggingface/datasets/pull/6754", "diff_url": "https://github.com/huggingface/datasets/pull/6754.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6754.patch", "merged_at": "2024-04-15T15:38:51" }
https://api.github.com/repos/huggingface/datasets/issues/6753
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6753/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6753/comments
https://api.github.com/repos/huggingface/datasets/issues/6753/events
https://github.com/huggingface/datasets/issues/6753
2,204,155,091
I_kwDODunzps6DYLzT
6,753
Type error when importing datasets on Kaggle
{ "login": "jtv199", "id": 18300717, "node_id": "MDQ6VXNlcjE4MzAwNzE3", "avatar_url": "https://avatars.githubusercontent.com/u/18300717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jtv199", "html_url": "https://github.com/jtv199", "followers_url": "https://api.github.com/users/jtv199/followers", "following_url": "https://api.github.com/users/jtv199/following{/other_user}", "gists_url": "https://api.github.com/users/jtv199/gists{/gist_id}", "starred_url": "https://api.github.com/users/jtv199/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jtv199/subscriptions", "organizations_url": "https://api.github.com/users/jtv199/orgs", "repos_url": "https://api.github.com/users/jtv199/repos", "events_url": "https://api.github.com/users/jtv199/events{/privacy}", "received_events_url": "https://api.github.com/users/jtv199/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "I encountered similar problems of freeing GPU memory while implementing the benchmark tools. A trick that worked for me was to wrap the function into a multi-process. Maybe you can take a look at this implementation and change your code accordingly so that the model is run in a subprocess: \r\nhttps://github.com/huggingface/transformers/blob/3726754a6c646adcf9cb2135ab7f72dffe074473/src/transformers/benchmark/benchmark_utils.py#L64", "Thanks for getting back! \r\n\r\nAfter investigating a bit further, my particular problems seem to be partly related to PyTorch-Lightning (specificially, related to not properly detaching tensors in some of the eval code), but this general bit of advice is good since this seems to be a more general problem that I've seen in other contexts (like you mentioned). I will look more closely at running a multi-process. \r\n\r\nAs a terrible hack (which probably shouldn't be repeated), I found that converting all models/tensors/training params/.. to cpu then deleting them and applying manual garbage collection fixed my issue. ", "> \r\n> \r\n> I encountered similar problems of freeing GPU memory while implementing the benchmark tools. A trick that worked for me was to wrap the function into a multi-process. Maybe you can take a look at this implementation and change your code accordingly so that the model is run in a subprocess:\r\n> \r\n> https://github.com/huggingface/transformers/blob/3726754a6c646adcf9cb2135ab7f72dffe074473/src/transformers/benchmark/benchmark_utils.py#L64\r\n\r\n@patrickvonplaten have you ran into the following error using this method?\r\n\r\n```\r\nCannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method\r\n```\r\n\r\nTried setting the context as follows with no success:\r\n\r\n```python\r\nimport multiprocessing as mp\r\nmp.set_start_method('spawn')\r\n```", "met the same problem, anything update ?", "Very useful!! Thank you so much for sharing your solution!" ]
"2024-03-24T03:01:30"
"2024-04-04T13:50:35"
"2024-03-30T00:23:49"
NONE
null
### Describe the bug When trying to run ``` import datasets print(datasets.__version__) ``` It generates the following error ``` TypeError: expected string or bytes-like object ``` It looks like It cannot find the valid versions of `fsspec` though fsspec version is fine when I checked Via command ``` import fsspec print(fsspec.__version__) ​ # output: 2024.3.1 ``` Detailed crash report ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import datasets 2 print(datasets.__version__) File /opt/conda/lib/python3.10/site-packages/datasets/__init__.py:18 1 # ruff: noqa 2 # Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. 3 # (...) 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 16 __version__ = "2.18.0" ---> 18 from .arrow_dataset import Dataset 19 from .arrow_reader import ReadInstruction 20 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:66 63 from multiprocess import Pool 64 from tqdm.contrib.concurrent import thread_map ---> 66 from . import config 67 from .arrow_reader import ArrowReader 68 from .arrow_writer import ArrowWriter, OptimizedTypedSequence File /opt/conda/lib/python3.10/site-packages/datasets/config.py:41 39 # Imports 40 DILL_VERSION = version.parse(importlib.metadata.version("dill")) ---> 41 FSSPEC_VERSION = version.parse(importlib.metadata.version("fsspec")) 42 PANDAS_VERSION = version.parse(importlib.metadata.version("pandas")) 43 PYARROW_VERSION = version.parse(importlib.metadata.version("pyarrow")) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:49, in parse(version) 43 """ 44 Parse the given version string and return either a :class:`Version` object 45 or a :class:`LegacyVersion` object depending on if the given version is 46 a valid PEP 440 version or a legacy version. 47 """ 48 try: ---> 49 return Version(version) 50 except InvalidVersion: 51 return LegacyVersion(version) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:264, in Version.__init__(self, version) 261 def __init__(self, version: str) -> None: 262 263 # Validate the version and parse it into pieces --> 264 match = self._regex.search(version) 265 if not match: 266 raise InvalidVersion(f"Invalid version: '{version}'") TypeError: expected string or bytes-like object ``` ### Steps to reproduce the bug 1. run `!pip install -U datasets` on kaggle 2. check datasets is installed via ``` import datasets print(datasets.__version__) ``` ### Expected behavior Expected to print datasets version, like `2.18.0` ### Environment info Running on Kaggle, latest enviornment , here is the notebook https://www.kaggle.com/code/jtv199/mistrial-7b-part2
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6753/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6753/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6752
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6752/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6752/comments
https://api.github.com/repos/huggingface/datasets/issues/6752/events
https://github.com/huggingface/datasets/issues/6752
2,204,043,839
I_kwDODunzps6DXwo_
6,752
Precision being changed from float16 to float32 unexpectedly
{ "login": "gcervantes8", "id": 21228908, "node_id": "MDQ6VXNlcjIxMjI4OTA4", "avatar_url": "https://avatars.githubusercontent.com/u/21228908?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gcervantes8", "html_url": "https://github.com/gcervantes8", "followers_url": "https://api.github.com/users/gcervantes8/followers", "following_url": "https://api.github.com/users/gcervantes8/following{/other_user}", "gists_url": "https://api.github.com/users/gcervantes8/gists{/gist_id}", "starred_url": "https://api.github.com/users/gcervantes8/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gcervantes8/subscriptions", "organizations_url": "https://api.github.com/users/gcervantes8/orgs", "repos_url": "https://api.github.com/users/gcervantes8/repos", "events_url": "https://api.github.com/users/gcervantes8/events{/privacy}", "received_events_url": "https://api.github.com/users/gcervantes8/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "The problem with the current `master` is that I have the following error\r\n\r\n`ModuleNotFoundError: No module named 'transformers.utils'`\r\n\r\n `version 3.0.2` does not include Pegasus.\r\n\r\nCan anyone suggest to us the latest stable version of master (not release `version 3.0.2`)? So we will be able to run the Pegasus Model.", "`pip install -U git+https://github.com/huggingface/transformers.git`", "I actually think this is a breaking change which @joeddav seems to have fixed in his PR. It is due to a change 6 hours ago which makes the import of the utils [here](https://github.com/huggingface/transformers/blob/master/src/transformers/file_utils.py) fail!", "K, import issue is fixed by #6754 and installs from master as @patil-suraj mentioned should be good now.", "@patil-suraj @joeddav \r\nIs there some other way to install master version of transformers?\r\nI tried using the URL to install the master version but it installed v3.0.2", "@AnkitVarshney02 \r\n\r\n1. Since master is not tagged as a release it will still register as `3.02` in your environment when you've installed from master.\r\n2. If you already have transformers installed in your env make sure you're also passing `--upgrade`\r\n\r\n`pip install --upgrade git+https://github.com/huggingface/transformers.git`\r\n\r\n", "@joeddav \r\nI tried using the URL to install the master version but it again installed v3.0.2.\r\nNot sure what am I missing here. Please see the terminal output below:\r\n\r\n`pip install --upgrade git+https://github.com/huggingface/transformers.git\r\nCollecting git+https://github.com/huggingface/transformers.git\r\n Cloning https://github.com/huggingface/transformers.git to c:\\users\\varshney ankit\\appdata\\local\\temp\\pip-req-build-iddyb2c1\r\n Running command git clone -q https://github.com/huggingface/transformers.git 'C:\\Users\\varshney ankit\\AppData\\Local\\Temp\\pip-req-build-iddyb2c1'\r\nRequirement already satisfied, skipping upgrade: numpy in c:\\programdata\\anaconda3\\lib\\site-packages (from transformers==3.0.2) (1.18.5)\r\nCollecting tokenizers==0.8.1.rc2\r\n Using cached tokenizers-0.8.1rc2-cp38-cp38-win_amd64.whl (1.9 MB)\r\nRequirement already satisfied, skipping upgrade: packaging in c:\\users\\varshney ankit\\appdata\\roaming\\python\\python38\\site-packages (from transformers==3.0.2) (20.4)\r\nRequirement already satisfied, skipping upgrade: filelock in c:\\programdata\\anaconda3\\lib\\site-packages (from transformers==3.0.2) (3.0.12)\r\nRequirement already satisfied, skipping upgrade: requests in c:\\programdata\\anaconda3\\lib\\site-packages (from transformers==3.0.2) (2.24.0)\r\nRequirement already satisfied, skipping upgrade: tqdm>=4.27 in c:\\programdata\\anaconda3\\lib\\site-packages (from transformers==3.0.2) (4.47.0)\r\nRequirement already satisfied, skipping upgrade: regex!=2019.12.17 in c:\\programdata\\anaconda3\\lib\\site-packages (from transformers==3.0.2) (2020.6.8)\r\nCollecting sentencepiece!=0.1.92\r\n Using cached sentencepiece-0.1.91-cp38-cp38-win_amd64.whl (1.2 MB)\r\nCollecting sacremoses\r\n Using cached sacremoses-0.0.43.tar.gz (883 kB)\r\nRequirement already satisfied, skipping upgrade: pyparsing>=2.0.2 in c:\\users\\varshney ankit\\appdata\\roaming\\python\\python38\\site-packages (from packaging->transformers==3.0.2) (2.4.7)\r\nRequirement already satisfied, skipping upgrade: six in c:\\users\\varshney ankit\\appdata\\roaming\\python\\python38\\site-packages (from packaging->transformers==3.0.2) (1.15.0)\r\nRequirement already satisfied, skipping upgrade: certifi>=2017.4.17 in c:\\programdata\\anaconda3\\lib\\site-packages (from requests->transformers==3.0.2) (2020.6.20)\r\nRequirement already satisfied, skipping upgrade: idna<3,>=2.5 in c:\\programdata\\anaconda3\\lib\\site-packages (from requests->transformers==3.0.2) (2.10)\r\nRequirement already satisfied, skipping upgrade: chardet<4,>=3.0.2 in c:\\programdata\\anaconda3\\lib\\site-packages (from requests->transformers==3.0.2) (3.0.4)\r\nRequirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\\programdata\\anaconda3\\lib\\site-packages (from requests->transformers==3.0.2) (1.25.9)\r\nRequirement already satisfied, skipping upgrade: click in c:\\programdata\\anaconda3\\lib\\site-packages (from sacremoses->transformers==3.0.2) (7.1.2)\r\nRequirement already satisfied, skipping upgrade: joblib in c:\\programdata\\anaconda3\\lib\\site-packages (from sacremoses->transformers==3.0.2) (0.16.0)\r\nBuilding wheels for collected packages: transformers, sacremoses\r\n Building wheel for transformers (setup.py) ... done\r\n Created wheel for transformers: filename=transformers-3.0.2-py3-none-any.whl size=886632 sha256=fde9ef47b87c3c42f0dc98920877a9cb6a2446395dce5e03eb3a6e3802d73f06\r\n Stored in directory: C:\\Users\\varshney ankit\\AppData\\Local\\Temp\\pip-ephem-wheel-cache-dptow2tc\\wheels\\05\\0a\\97\\64ae47c27ba95fae2cb5838e7b4b7247a34d4a8ba5f7092de2\r\n Building wheel for sacremoses (setup.py) ... done\r\n Created wheel for sacremoses: filename=sacremoses-0.0.43-py3-none-any.whl size=893262 sha256=d9c55c4f55923ebf6ffba1f0a27a9034af0eebfb76a5dc6475c1de1a4e977abd\r\n Stored in directory: c:\\users\\varshney ankit\\appdata\\local\\pip\\cache\\wheels\\7b\\78\\f4\\27d43a65043e1b75dbddaa421b573eddc67e712be4b1c80677\r\nSuccessfully built transformers sacremoses\r\nInstalling collected packages: tokenizers, sentencepiece, sacremoses, transformers\r\nSuccessfully installed sacremoses-0.0.43 sentencepiece-0.1.91 tokenizers-0.8.1rc2 transformers-3.0.2`", "Master isn't tagged with its own release, so it will actually still show as `3.02` right now even if you've installed from master correctly. Did you try importing Pegasus after the above?", "> Master isn't tagged with its own release, so it will actually still show as `3.02` right now even if you've installed from master correctly. Did you try importing Pegasus after the above?\r\n\r\nThanks @joeddav ! It is working!!" ]
"2024-03-23T20:53:56"
"2024-04-10T15:21:33"
null
NONE
null
### Describe the bug I'm loading a HuggingFace Dataset for images. I'm running a preprocessing (map operation) step that runs a few operations, one of them being conversion to float16. The Dataset features also say that the 'img' is of type float16. Whenever I take an image from that HuggingFace Dataset instance, the type turns out to be float32. ### Steps to reproduce the bug ```python import torchvision.transforms.v2 as transforms from datasets import load_dataset dataset = load_dataset('cifar10', split='test') dataset = dataset.with_format("torch") data_transform = transforms.Compose([transforms.Resize((32, 32)), transforms.ToDtype(torch.float16, scale=True), transforms.Normalize([0.5, 0.5, 0.5], [0.5, 0.5, 0.5]), ]) def _preprocess(examples): # Permutes from (BS x H x W x C) to (BS x C x H x W) images = torch.permute(examples['img'], (0, 3, 2, 1)) examples['img'] = data_transform(images) return examples dataset = dataset.map(_preprocess, batched=True, batch_size=8) ``` Now at this point the dataset.features are showing float16 which is great because that's what I want. ```python print(data_loader.features['img']) Sequence(feature=Sequence(feature=Sequence(feature=Value(dtype='float16', id=None), length=-1, id=None), length=-1, id=None), length=-1, id=None) ``` But when I try to sample an image from this dataloader; I'm getting a float32 image, when I'm expecting float16: ```python print(next(iter(data_loader))['img'].dtype) torch.float32 ``` ### Expected behavior I'm expecting the images loaded after the transformation to stay in float16. ### Environment info - `datasets` version: 2.18.0 - Platform: Linux-5.15.146.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.9 - `huggingface_hub` version: 0.21.4 - PyArrow version: 14.0.2 - Pandas version: 2.0.3 - `fsspec` version: 2023.10.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6752/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6752/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6751
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6751/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6751/comments
https://api.github.com/repos/huggingface/datasets/issues/6751/events
https://github.com/huggingface/datasets/pull/6751
2,203,951,501
PR_kwDODunzps5qkKLH
6,751
Use 'with' operator for some download functions
{ "login": "Moisan", "id": 31669, "node_id": "MDQ6VXNlcjMxNjY5", "avatar_url": "https://avatars.githubusercontent.com/u/31669?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Moisan", "html_url": "https://github.com/Moisan", "followers_url": "https://api.github.com/users/Moisan/followers", "following_url": "https://api.github.com/users/Moisan/following{/other_user}", "gists_url": "https://api.github.com/users/Moisan/gists{/gist_id}", "starred_url": "https://api.github.com/users/Moisan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Moisan/subscriptions", "organizations_url": "https://api.github.com/users/Moisan/orgs", "repos_url": "https://api.github.com/users/Moisan/repos", "events_url": "https://api.github.com/users/Moisan/events{/privacy}", "received_events_url": "https://api.github.com/users/Moisan/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "Any update on this if this will be taken up by the team?", "I think this is already done right? seen that we have this https://github.com/huggingface/transformers/tree/master/model_cards/pvl/labse_bert", "The model uploaded by @pvl mentioned by @aalloul performs the wrong pooling, i.e., embeddings produced by that model are NOT the same as the embeddings from the TFHub version.\r\n\r\nI uploaded the model with the right pooling here:\r\nhttps://huggingface.co/sentence-transformers/LaBSE\r\n\r\nIt tested it against the TF Hub version and it produces similar embeddings (small epsilon difference due to different padding variations). On down stream tasks, the TFHub and the HF Pytorch version achieve the same performance.", "For LABSE model can we use FAISS to build parallel corpus. If not what is the best best algo to that. LABSE paper was suggesting ANN. Where can I find its implementation for building parallel corpus.", "Have a look here for some examples with ANN, including FAISS\r\nhttps://github.com/UKPLab/sentence-transformers/tree/master/examples/applications\r\n\r\nPersonally I prefer hnswlib over Faiss:\r\nhttps://github.com/UKPLab/sentence-transformers/blob/master/examples/applications/semantic_search_quora_hnswlib.py\r\n\r\n\r\nIt is nicer and easier to use, better documented and offer certain features that are missing in Faiss. FAISS added later hnswlib as index structure, as it is also faster than the other index types FAISS were offering.\r\n\r\nYes, you can use LaBSE with ANN. ", "@nreimers Which ANN LaBSE paper was recommending?", "@aj7tesh I think they are not mentioning which ANN is used.\r\n\r\nAs it is a google paper, I could imagine they use SCANN:\r\nhttps://github.com/google-research/google-research/tree/master/scann\r\n\r\nA good source for comparison is:\r\nhttp://ann-benchmarks.com/index.html\r\n\r\nHere, HNSWLib performs really well:\r\nhttps://github.com/nmslib/hnswlib", "@nreimers thank you. Surely I will explore above comparisons. Will see which one is helping me more to generate parallel corpus.", "32GB should be more than fine. Issues can be:\r\n- too long sequences. Try to use max_length in the tokenizer\r\n- Too large batch sizes. Try to use a smaller batch size.\r\n", "basically\r\n# in my case i have lets say more than 2k sentences in array\r\n# its passing the encoded_input step, however its going OOM in model_output. Usually on my machine its works fine for upto 10k sentences when using LASER, however for LABSE its failing after 150 only\r\nencoded_input = tokenizer(sentences, padding=True, truncation=True, max_length=64, return_tensors='pt')\r\n\r\nwith torch.no_grad():\r\n model_output = model(**encoded_input, return_dict=True)", "@nreimers \r\nits working fine when I used below method\r\n\r\nfrom sentence_transformers import SentenceTransformer\r\n\r\nnot exaclty sure the reason(hope model weights are similar to tf model)\r\n\r\nI have a questions, does these Labse and Laser kind of multilingual model works on language which is not related to major languages on which these models are trained? I believe for zero shot learning the language should have some similarity to other major languages. ", "sentence transformers performs batching of your data. If you pass 10k sentences, it splits it into batches of e.g. 32 and encodes them. So that you don't run out of memory.\r\n\r\nEmbeddings are nearly identical to those of Tensorflow. I tested both models on Tatoeba test set on 100 languages, and Pytorch and TF Version perform equally.\r\n\r\n\r\nDepends on the language. If the language is really similar to another language that was used for training, then it works. If it uses a different vocab or is really different, then it doesn't work.", "> Have a look here for some examples with ANN, including FAISS\r\n> https://github.com/UKPLab/sentence-transformers/tree/master/examples/applications\r\n> \r\n> Personally I prefer hnswlib over Faiss:\r\n> https://github.com/UKPLab/sentence-transformers/blob/master/examples/applications/semantic_search_quora_hnswlib.py\r\n> \r\n> It is nicer and easier to use, better documented and offer certain features that are missing in Faiss. FAISS added later hnswlib as index structure, as it is also faster than the other index types FAISS were offering.\r\n> \r\n> Yes, you can use LaBSE with ANN.\r\n\r\nI was going through this HNSW implementation. At some places it was written that ANN is not perfect and then HNSWs results were compared against util.semantic search, which again was executing cosine similarity for bitext mining. What is the reason of performing this step.\r\nI understand this thread is not the right place to ask this question, kindly suggest some other thread or place for such queries", "Approximate Nearest Neighbor only returns approximately the 10 nearest neighbor. It can be that it misses points that are closer. This is expressed as recall. \r\n\r\nIn the examples, it compares ANN against an exact nearest neighbor to see if there might be an issue with the index construction.\r\n\r\nFor large datasets, exact search is too slow, so you have to live with it that ANN does not find perfectly all nearest neighbors.", "so for corpus building where I expect the sentence with highest cosine similarity be the translation pair for corresponding source sentence. I will have to go for exact matches using something like util.semantic_search or scipy spatial distance", "If the corpora are not too large, yes, you can use exact matches. But these methods have quadratic runtime, i.e., when you have 10 Millions of sentences, searching will take a long time.\r\n\r\nIf your corpus is smaller, you can use exact search.", "Got it @nreimers thanks", "> The model uploaded by @pvl mentioned by @aalloul performs the wrong pooling, i.e., embeddings produced by that model are NOT the same as the embeddings from the TFHub version.\r\n> \r\n> I uploaded the model with the right pooling here:\r\n> https://huggingface.co/sentence-transformers/LaBSE\r\n> \r\n> It tested it against the TF Hub version and it produces similar embeddings (small epsilon difference due to different padding variations). On down stream tasks, the TFHub and the HF Pytorch version achieve the same performance.\r\n\r\n@nreimers I'm guessing there should be only 1 implementation of LaBSE and people might get confused with which one to use. How should we go about this?", "Coming late to this thread, we also uploaded a pytorch and TF compatible versions of the LaBSE model here - https://huggingface.co/rasa/LaBSE . This will also be available inside Rasa Open Source very soon.\r\nI do agree with @aalloul about the confusion this can create. Looking for thoughts from folks on this.", "@dakshvar22 did you run any comparisons with the official model?", "> I'm guessing there should be only 1 implementation of LaBSE and people might get confused with which one to use. How should we go about this?\r\n\r\nWe could imagine building a curation system built on top of (e.g.) a combination of downloads and an explicit marker like a \"Star\" button, but I don't want to overfit too much to the first few examples – given that this use case is still not super frequent.\r\n\r\nHappy to hear anyone's thoughts on this", "@aalloul I cross-checked the embeddings from the TFhub version and the transformers compatible versions we uploaded and they are almost identical. This was on a corpus of around 50k sentences across 5 different languages. Please feel free to test them out on the Tatoeba dataset on all 100 languages. I might not be able to do that myself right now.", "@aalloul @dakshvar22 \r\nI tested https://huggingface.co/sentence-transformers/LaBSE on the Tatoeba dataset on all 100+ languages and the performances were comparable to the TFHub model (+/- 0.1 accuracy for some languages due to different padding and numerical stability in pytorch vs. tensorflow)", "ah nice, thanks @nreimers for letting us know! I'll have a look at it.", "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n", "Late to this thread (and noticed it existed after publishing the model), but I ported the model from TF Hub and uploaded it here: https://huggingface.co/setu4993/LaBSE\r\n\r\nAdditionally, my code to port it, alongside tests that verify the embeddings generated by the source TF Hub model and the ported PyTorch model (uploaded above) are in my repo: https://github.com/setu4993/convert-labse-tf-pt\r\n\r\nShould be easy to extend it / add other tests and verify the embeddings match, if someone is interested. I haven't run tests on downstream performance, though." ]
"2024-03-23T16:32:08"
"2024-03-26T00:40:57"
"2024-03-26T00:40:57"
NONE
null
Some functions in `streaming_download_manager.py` are not closing the file they open which lead to `Unclosed file` warnings in our code. This fixes a few of them.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6751/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6751/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6751", "html_url": "https://github.com/huggingface/datasets/pull/6751", "diff_url": "https://github.com/huggingface/datasets/pull/6751.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6751.patch", "merged_at": null }
https://api.github.com/repos/huggingface/datasets/issues/6750
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6750/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6750/comments
https://api.github.com/repos/huggingface/datasets/issues/6750/events
https://github.com/huggingface/datasets/issues/6750
2,203,590,658
I_kwDODunzps6DWCAC
6,750
`load_dataset` requires a network connection for local download?
{ "login": "MiroFurtado", "id": 6306695, "node_id": "MDQ6VXNlcjYzMDY2OTU=", "avatar_url": "https://avatars.githubusercontent.com/u/6306695?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MiroFurtado", "html_url": "https://github.com/MiroFurtado", "followers_url": "https://api.github.com/users/MiroFurtado/followers", "following_url": "https://api.github.com/users/MiroFurtado/following{/other_user}", "gists_url": "https://api.github.com/users/MiroFurtado/gists{/gist_id}", "starred_url": "https://api.github.com/users/MiroFurtado/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MiroFurtado/subscriptions", "organizations_url": "https://api.github.com/users/MiroFurtado/orgs", "repos_url": "https://api.github.com/users/MiroFurtado/repos", "events_url": "https://api.github.com/users/MiroFurtado/events{/privacy}", "received_events_url": "https://api.github.com/users/MiroFurtado/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "## System Info\r\nDebian 10\r\nPytorch: 1.6.0\r\nTransformers: 3.0.2\r\nPython: 3.7.8\r\nPretrained Model: AlbertPreTrainedModel (albert-base-v2)\r\nPretrained Tokenizer: AlbertTokenizer (albert-base-v2)\r\n\r\n## Question\r\nI'm getting the same error, but when trying to evaluate the model after training.\r\n```python\r\n---------------------------------------------------------------------------\r\nRuntimeError Traceback (most recent call last)\r\n<ipython-input-39-7c7016f6f03e> in <module>\r\n----> 1 res = trainer.evaluate(val_dataset)\r\n\r\n/opt/conda/lib/python3.7/site-packages/transformers/trainer.py in evaluate(self, eval_dataset)\r\n 743 eval_dataloader = self.get_eval_dataloader(eval_dataset)\r\n 744 \r\n--> 745 output = self._prediction_loop(eval_dataloader, description=\"Evaluation\")\r\n 746 \r\n 747 self._log(output.metrics)\r\n\r\n/opt/conda/lib/python3.7/site-packages/transformers/trainer.py in _prediction_loop(self, dataloader, description, prediction_loss_only)\r\n 834 preds = logits.detach()\r\n 835 else:\r\n--> 836 preds = torch.cat((preds, logits.detach()), dim=0)\r\n 837 if inputs.get(\"labels\") is not None:\r\n 838 if label_ids is None:\r\n\r\nRuntimeError: zero-dimensional tensor (at position 0) cannot be concatenated\r\n```\r\nThe values of `preds` and logits at this point are:\r\n```\r\nipdb> preds\r\ntensor(0.4661, device='cuda:0')\r\nipdb> logits\r\ntensor(0.4578, device='cuda:0')\r\n```\r\nReplacing `torch.cat` with `torch.stack` seemed to do the job, is there a reason for using `torch.cat` here?\r\n```\r\nipdb> torch.stack((preds, logits.detach()), dim=0)\r\ntensor([0.4661, 0.4578], device='cuda:0')\r\n```\r\nThese are my training arguments and trainer:\r\n```python\r\ntraining_args = TrainingArguments(\r\n output_dir='./results',\r\n num_train_epochs=1,\r\n per_device_train_batch_size=16,\r\n per_device_eval_batch_size=64,\r\n warmup_steps=500,\r\n weight_decay=0.01,\r\n logging_dir='./logs',\r\n logging_steps=10,\r\n)\r\ntrainer = Trainer(\r\n model=model,\r\n args=training_args,\r\n train_dataset=train_dataset,\r\n eval_dataset=train_dataset,\r\n compute_metrics=compute_metrics,\r\n)\r\n```", "Same issue", "I am getting the same issue. CC: @sgugger", "Same issue!", "It's not that we don't want to fix that issue but no one as given us a reproducer and it was linked to a version of transformers that is now quite old. So please do let us know if the error persists on v3.5.1 (after upgrading transformers) and on which script.", "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n", "Found the same issue on `transformers==3.4.0`. But after upgrading to `transformers==4.2.2` the problem fixed. FYI.", "This issue has been automatically marked as stale and been closed because it has not had recent activity. Thank you for your contributions.\n\nIf you think this still needs to be addressed please comment on this thread.", "Facing the same issue with > 4.2, now the issue is File \"***/lib/python3.6/site-packages/transformers/trainer_pt_utils.py\", line 48, in torch_pad_and_concatenate\r\n if len(tensor1.shape) == 1 or tensor1.shape[1] == tensor2.shape[1]:\r\nIndexError: tuple index out of range" ]
"2024-03-23T01:06:32"
"2024-04-15T15:38:52"
"2024-04-15T15:38:52"
NONE
null
### Describe the bug Hi all - I see that in the past a network dependency has been mistakenly introduced into `load_dataset` even for local loads. Is it possible this has happened again? ### Steps to reproduce the bug ``` >>> import datasets >>> datasets.load_dataset("hh-rlhf") Repo card metadata block was not found. Setting CardData to empty. *hangs bc i'm firewalled* ```` stack trace from ctrl-c: ``` ^CTraceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/load.py", line 2582, in load_dataset builder_instance.download_and_prepare( output_path = get_from_cache( [0/122] File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 532, in get_from_cache response = http_head( File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 419, in http_head response = _request_with_retry( File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 304, in _request_with_retry response = requests.request(method=method.upper(), url=url, timeout=timeout, **params) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/adapters.py", line 487, in send resp = conn.urlopen( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn conn.connect() File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connection.py", line 363, in connect self.sock = conn = self._new_conn() File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) KeyboardInterrupt ``` ### Expected behavior loads the dataset ### Environment info ``` > pip show datasets Name: datasets Version: 2.18.0 ``` Python 3.10.2
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6750/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6750/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6749
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6749/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6749/comments
https://api.github.com/repos/huggingface/datasets/issues/6749/events
https://github.com/huggingface/datasets/pull/6749
2,202,310,116
PR_kwDODunzps5qeoSk
6,749
Fix fsspec tqdm callback
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "When the model receives inputs that include the labels, it's supposed to produce a tuple of (loss, predictions), where the loss is a scalar. The trainer then uses the loss to calculate the gradients. In this case (or at least in my case when I get a similar error) the trainer appears to be trying to use the predictions not the loss to calculate the gradient. This appears to be because the model is not receiving the 'labels' as input and so is only producing a one tuple of (predictions). You should be able to fix it by passing a value for \"labels\" in your collator. See for example transformers.DataCollatorForLanguageModeling.", "For me, I am getting the same error because the model I choose does not return loss even though I pass labels. It's better to check the model documentation you are using whether model forward() return loss or not. This is the snapshot of BertModel (Model which I choose first) forward() returns. Which does not return any loss value.\r\n![image](https://user-images.githubusercontent.com/47693507/96410535-e40c9400-1208-11eb-95aa-df4f58928932.png)\r\nAnd this is the snapshot of BertModelLMHeadModel (Model which I choose later) forward() returns. Which return loss value.\r\n![image](https://user-images.githubusercontent.com/47693507/96410933-80cf3180-1209-11eb-8ef1-19effe5ea93a.png)\r\n", "@ameasure @MojammelHossain Thank you both for your feedback! Checking the GPT2 documentation showed me an example of what I could set the `labels` value to in my collator." ]
"2024-03-22T11:44:11"
"2024-03-22T14:51:45"
"2024-03-22T14:45:39"
MEMBER
null
Following changes at https://github.com/fsspec/filesystem_spec/pull/1497 for `fsspec>=2024.2.0`
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6749/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6749/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6749", "html_url": "https://github.com/huggingface/datasets/pull/6749", "diff_url": "https://github.com/huggingface/datasets/pull/6749.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6749.patch", "merged_at": "2024-03-22T14:45:39" }
https://api.github.com/repos/huggingface/datasets/issues/6748
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6748/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6748/comments
https://api.github.com/repos/huggingface/datasets/issues/6748/events
https://github.com/huggingface/datasets/issues/6748
2,201,517,348
I_kwDODunzps6DOH0k
6,748
Strange slicing behavior
{ "login": "Luciennnnnnn", "id": 20135317, "node_id": "MDQ6VXNlcjIwMTM1MzE3", "avatar_url": "https://avatars.githubusercontent.com/u/20135317?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Luciennnnnnn", "html_url": "https://github.com/Luciennnnnnn", "followers_url": "https://api.github.com/users/Luciennnnnnn/followers", "following_url": "https://api.github.com/users/Luciennnnnnn/following{/other_user}", "gists_url": "https://api.github.com/users/Luciennnnnnn/gists{/gist_id}", "starred_url": "https://api.github.com/users/Luciennnnnnn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Luciennnnnnn/subscriptions", "organizations_url": "https://api.github.com/users/Luciennnnnnn/orgs", "repos_url": "https://api.github.com/users/Luciennnnnnn/repos", "events_url": "https://api.github.com/users/Luciennnnnnn/events{/privacy}", "received_events_url": "https://api.github.com/users/Luciennnnnnn/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6748?src=pr&el=h1) Report\n> Merging [#6748](https://codecov.io/gh/huggingface/transformers/pull/6748?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/a75c64d80c76c3dc71f735d9197a4a601847e0cd?el=desc) will **decrease** coverage by `0.18%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6748/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6748?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6748 +/- ##\n==========================================\n- Coverage 78.96% 78.78% -0.19% \n==========================================\n Files 157 157 \n Lines 28486 28486 \n==========================================\n- Hits 22495 22442 -53 \n- Misses 5991 6044 +53 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6748?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_tf\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6748/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9vcGVuYWkucHk=) | `22.58% <0.00%> (-72.26%)` | :arrow_down: |\n| [src/transformers/tokenization\\_xlm.py](https://codecov.io/gh/huggingface/transformers/pull/6748/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxtLnB5) | `16.26% <0.00%> (-66.67%)` | :arrow_down: |\n| [src/transformers/tokenization\\_marian.py](https://codecov.io/gh/huggingface/transformers/pull/6748/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fbWFyaWFuLnB5) | `66.66% <0.00%> (-32.50%)` | :arrow_down: |\n| [src/transformers/tokenization\\_gpt2.py](https://codecov.io/gh/huggingface/transformers/pull/6748/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fZ3B0Mi5weQ==) | `87.50% <0.00%> (-9.73%)` | :arrow_down: |\n| [src/transformers/tokenization\\_transfo\\_xl.py](https://codecov.io/gh/huggingface/transformers/pull/6748/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdHJhbnNmb194bC5weQ==) | `33.56% <0.00%> (-8.93%)` | :arrow_down: |\n| [src/transformers/modeling\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6748/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19vcGVuYWkucHk=) | `80.96% <0.00%> (-1.30%)` | :arrow_down: |\n| [src/transformers/tokenization\\_utils\\_base.py](https://codecov.io/gh/huggingface/transformers/pull/6748/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfYmFzZS5weQ==) | `93.49% <0.00%> (-0.28%)` | :arrow_down: |\n| [src/transformers/file\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6748/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.41% <0.00%> (-0.26%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6748/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `86.97% <0.00%> (+2.28%)` | :arrow_up: |\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6748/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `86.21% <0.00%> (+3.25%)` | :arrow_up: |\n| ... and [3 more](https://codecov.io/gh/huggingface/transformers/pull/6748/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6748?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6748?src=pr&el=footer). Last update [a75c64d...9ca2abb](https://codecov.io/gh/huggingface/transformers/pull/6748?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "Someone else did it!" ]
"2024-03-22T01:49:13"
"2024-03-22T16:43:57"
null
NONE
null
### Describe the bug I have loaded a dataset, and then slice first 300 samples using `:` ops, however, the resulting dataset is not expected, as the output below: ```bash len(dataset)=1050324 len(dataset[:300])=2 len(dataset[0:300])=2 len(dataset.select(range(300)))=300 ``` ### Steps to reproduce the bug load a dataset then: ```bash dataset = load_from_disk(args.train_data_dir) print(f"{len(dataset)=}", flush=True) print(f"{len(dataset[:300])=}", flush=True) print(f"{len(dataset[0:300])=}", flush=True) print(f"{len(dataset.select(range(300)))=}", flush=True) ``` ### Expected behavior ```bash len(dataset)=1050324 len(dataset[:300])=300 len(dataset[0:300])=300 len(dataset.select(range(300)))=300 ``` ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35 - Python version: 3.10.11 - `huggingface_hub` version: 0.20.2 - PyArrow version: 10.0.1 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6748/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6748/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6747
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6747/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6747/comments
https://api.github.com/repos/huggingface/datasets/issues/6747/events
https://github.com/huggingface/datasets/pull/6747
2,201,219,384
PR_kwDODunzps5qa5L-
6,747
chore(deps): bump fsspec
{ "login": "shcheklein", "id": 3659196, "node_id": "MDQ6VXNlcjM2NTkxOTY=", "avatar_url": "https://avatars.githubusercontent.com/u/3659196?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shcheklein", "html_url": "https://github.com/shcheklein", "followers_url": "https://api.github.com/users/shcheklein/followers", "following_url": "https://api.github.com/users/shcheklein/following{/other_user}", "gists_url": "https://api.github.com/users/shcheklein/gists{/gist_id}", "starred_url": "https://api.github.com/users/shcheklein/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shcheklein/subscriptions", "organizations_url": "https://api.github.com/users/shcheklein/orgs", "repos_url": "https://api.github.com/users/shcheklein/repos", "events_url": "https://api.github.com/users/shcheklein/events{/privacy}", "received_events_url": "https://api.github.com/users/shcheklein/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6747?src=pr&el=h1) Report\n> Merging [#6747](https://codecov.io/gh/huggingface/transformers/pull/6747?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/02d09c8fcc6bda2c345c84cec53289abbe7532ac?el=desc) will **decrease** coverage by `0.82%`.\n> The diff coverage is `8.33%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6747/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6747?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6747 +/- ##\n==========================================\n- Coverage 79.01% 78.18% -0.83% \n==========================================\n Files 157 157 \n Lines 28739 28782 +43 \n==========================================\n- Hits 22707 22503 -204 \n- Misses 6032 6279 +247 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6747?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/trainer\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6747/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90cmFpbmVyX3V0aWxzLnB5) | `59.57% <0.00%> (-4.87%)` | :arrow_down: |\n| [src/transformers/trainer.py](https://codecov.io/gh/huggingface/transformers/pull/6747/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90cmFpbmVyLnB5) | `13.57% <7.14%> (+0.45%)` | :arrow_up: |\n| [src/transformers/integrations.py](https://codecov.io/gh/huggingface/transformers/pull/6747/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9pbnRlZ3JhdGlvbnMucHk=) | `31.11% <9.09%> (-34.61%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_mobilebert.py](https://codecov.io/gh/huggingface/transformers/pull/6747/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9tb2JpbGViZXJ0LnB5) | `24.55% <0.00%> (-72.36%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/6747/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9hbGJlcnQucHk=) | `21.47% <0.00%> (-69.44%)` | :arrow_down: |\n| [src/transformers/tokenization\\_mbart.py](https://codecov.io/gh/huggingface/transformers/pull/6747/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fbWJhcnQucHk=) | `57.14% <0.00%> (-39.69%)` | :arrow_down: |\n| [src/transformers/modeling\\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6747/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yb2JlcnRhLnB5) | `77.37% <0.00%> (-19.71%)` | :arrow_down: |\n| [src/transformers/data/data\\_collator.py](https://codecov.io/gh/huggingface/transformers/pull/6747/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL2RhdGFfY29sbGF0b3IucHk=) | `91.90% <0.00%> (-0.41%)` | :arrow_down: |\n| [src/transformers/file\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6747/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.41% <0.00%> (-0.26%)` | :arrow_down: |\n| [src/transformers/tokenization\\_utils\\_base.py](https://codecov.io/gh/huggingface/transformers/pull/6747/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfYmFzZS5weQ==) | `93.90% <0.00%> (-0.14%)` | :arrow_down: |\n| ... and [10 more](https://codecov.io/gh/huggingface/transformers/pull/6747/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6747?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6747?src=pr&el=footer). Last update [02d09c8...7488b03](https://codecov.io/gh/huggingface/transformers/pull/6747?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "```diff\r\ndiff --git a/src/transformers/trainer.py b/src/transformers/trainer.py\r\nindex 3470a473..acf1503c 100755\r\n--- a/src/transformers/trainer.py\r\n+++ b/src/transformers/trainer.py\r\n@@ -544,7 +544,8 @@ class Trainer:\r\n if trial.should_prune():\r\n raise optuna.TrialPruned()\r\n elif self.hp_search_backend == HPSearchBackend.RAY:\r\n- self._tune_save_checkpoint()\r\n+ if self.global_step % self.args.save_steps == 0:\r\n+ self._tune_save_checkpoint()\r\n tune.report(objective=self.objective, **metrics)\r\n\r\n def _tune_save_checkpoint(self):\r\n@@ -911,6 +912,8 @@ class Trainer:\r\n # search.\r\n _tb_writer = self.tb_writer\r\n self.tb_writer = None\r\n+ _model = self.model\r\n+ self.model = None\r\n # Setup default `resources_per_trial` and `reporter`.\r\n if \"resources_per_trial\" not in kwargs and self.args.n_gpu > 0:\r\n n_jobs = int(kwargs.pop(\"n_jobs\", 1))\r\n```\r\n\r\nThis allows us to:\r\n\r\n1. Not die when tuning BERT and\r\n2. Not be dominated by saving latency.", "Thanks for your suggestions. I moved the bulk of the hp search code to `integrations`, including the objective, since it depends on the search space. Is this what you had in mind?", "Yes. I think we can split the function in two: one for ray, one for optuna and avoid a lot of tests this way to have some cleaner code (with a small duplication in the _objective function). I can do it in a separate PR if you want.", "That would be great, thanks!", "Merging and will follow up then." ]
"2024-03-21T21:25:49"
"2024-03-22T16:40:15"
"2024-03-22T16:28:40"
CONTRIBUTOR
null
There were a few fixes released recently, some DVC ecosystem packages require newer version of `fsspec`.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6747/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6747/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6747", "html_url": "https://github.com/huggingface/datasets/pull/6747", "diff_url": "https://github.com/huggingface/datasets/pull/6747.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6747.patch", "merged_at": "2024-03-22T16:28:40" }
https://api.github.com/repos/huggingface/datasets/issues/6746
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6746/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6746/comments
https://api.github.com/repos/huggingface/datasets/issues/6746/events
https://github.com/huggingface/datasets/issues/6746
2,198,993,949
I_kwDODunzps6DEfwd
6,746
ExpectedMoreSplits error when loading C4 dataset
{ "login": "billwang485", "id": 65165345, "node_id": "MDQ6VXNlcjY1MTY1MzQ1", "avatar_url": "https://avatars.githubusercontent.com/u/65165345?v=4", "gravatar_id": "", "url": "https://api.github.com/users/billwang485", "html_url": "https://github.com/billwang485", "followers_url": "https://api.github.com/users/billwang485/followers", "following_url": "https://api.github.com/users/billwang485/following{/other_user}", "gists_url": "https://api.github.com/users/billwang485/gists{/gist_id}", "starred_url": "https://api.github.com/users/billwang485/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/billwang485/subscriptions", "organizations_url": "https://api.github.com/users/billwang485/orgs", "repos_url": "https://api.github.com/users/billwang485/repos", "events_url": "https://api.github.com/users/billwang485/events{/privacy}", "received_events_url": "https://api.github.com/users/billwang485/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6746?src=pr&el=h1) Report\n> Merging [#6746](https://codecov.io/gh/huggingface/transformers/pull/6746?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/a75c64d80c76c3dc71f735d9197a4a601847e0cd?el=desc) will **decrease** coverage by `0.03%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6746/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6746?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6746 +/- ##\n==========================================\n- Coverage 78.96% 78.93% -0.04% \n==========================================\n Files 157 157 \n Lines 28486 28486 \n==========================================\n- Hits 22495 22485 -10 \n- Misses 5991 6001 +10 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6746?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6746/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `80.70% <0.00%> (-2.26%)` | :arrow_down: |\n| [src/transformers/file\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6746/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.41% <0.00%> (-0.26%)` | :arrow_down: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6746?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6746?src=pr&el=footer). Last update [a75c64d...0b9f1cd](https://codecov.io/gh/huggingface/transformers/pull/6746?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-03-21T02:53:04"
"2024-04-22T16:30:14"
null
NONE
null
### Describe the bug I encounter bug when running the example command line ```python python main.py \ --model decapoda-research/llama-7b-hf \ --prune_method wanda \ --sparsity_ratio 0.5 \ --sparsity_type unstructured \ --save out/llama_7b/unstructured/wanda/ ``` The bug occurred at these lines of code (when loading c4 dataset) ```python traindata = load_dataset('allenai/c4', 'allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train') valdata = load_dataset('allenai/c4', 'allenai--c4', data_files={'validation': 'en/c4-validation.00000-of-00008.json.gz'}, split='validation') ``` The error message states: ``` raise ExpectedMoreSplits(str(set(expected_splits) - set(recorded_splits))) datasets.utils.info_utils.ExpectedMoreSplits: {'validation'} ``` ### Steps to reproduce the bug 1. I encounter bug when running the example command line ### Expected behavior The error message states: ``` raise ExpectedMoreSplits(str(set(expected_splits) - set(recorded_splits))) datasets.utils.info_utils.ExpectedMoreSplits: {'validation'} ``` ### Environment info I'm using cuda 12.4, so I use ```pip install pytorch``` instead of conda provided in install.md Also, I've tried another environment using the same commands in install.md, but the same bug occured
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6746/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6746/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6745
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6745/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6745/comments
https://api.github.com/repos/huggingface/datasets/issues/6745/events
https://github.com/huggingface/datasets/issues/6745
2,198,541,732
I_kwDODunzps6DCxWk
6,745
Scraping the whole of github including private repos is bad; kindly stop
{ "login": "ghost", "id": 10137, "node_id": "MDQ6VXNlcjEwMTM3", "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ghost", "html_url": "https://github.com/ghost", "followers_url": "https://api.github.com/users/ghost/followers", "following_url": "https://api.github.com/users/ghost/following{/other_user}", "gists_url": "https://api.github.com/users/ghost/gists{/gist_id}", "starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ghost/subscriptions", "organizations_url": "https://api.github.com/users/ghost/orgs", "repos_url": "https://api.github.com/users/ghost/repos", "events_url": "https://api.github.com/users/ghost/events{/privacy}", "received_events_url": "https://api.github.com/users/ghost/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
closed
false
null
[]
null
[]
"2024-03-20T20:54:06"
"2024-03-21T12:28:04"
"2024-03-21T10:24:56"
NONE
null
### Feature request https://github.com/bigcode-project/opt-out-v2 - opt out is not consent. kindly quit this ridiculous nonsense. ### Motivation [EDITED: insults not tolerated] ### Your contribution [EDITED: insults not tolerated]
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6745/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6745/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6744
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6744/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6744/comments
https://api.github.com/repos/huggingface/datasets/issues/6744/events
https://github.com/huggingface/datasets/issues/6744
2,197,910,168
I_kwDODunzps6DAXKY
6,744
Option to disable file locking
{ "login": "VRehnberg", "id": 35767167, "node_id": "MDQ6VXNlcjM1NzY3MTY3", "avatar_url": "https://avatars.githubusercontent.com/u/35767167?v=4", "gravatar_id": "", "url": "https://api.github.com/users/VRehnberg", "html_url": "https://github.com/VRehnberg", "followers_url": "https://api.github.com/users/VRehnberg/followers", "following_url": "https://api.github.com/users/VRehnberg/following{/other_user}", "gists_url": "https://api.github.com/users/VRehnberg/gists{/gist_id}", "starred_url": "https://api.github.com/users/VRehnberg/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/VRehnberg/subscriptions", "organizations_url": "https://api.github.com/users/VRehnberg/orgs", "repos_url": "https://api.github.com/users/VRehnberg/repos", "events_url": "https://api.github.com/users/VRehnberg/events{/privacy}", "received_events_url": "https://api.github.com/users/VRehnberg/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6744?src=pr&el=h1) Report\n> Merging [#6744](https://codecov.io/gh/huggingface/transformers/pull/6744?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/42fddacd1cac3cc57c3326aa51a409f5090b1261?el=desc) will **increase** coverage by `1.13%`.\n> The diff coverage is `96.15%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6744/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6744?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6744 +/- ##\n==========================================\n+ Coverage 78.47% 79.60% +1.13% \n==========================================\n Files 157 157 \n Lines 28569 28595 +26 \n==========================================\n+ Hits 22420 22764 +344 \n+ Misses 6149 5831 -318 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6744?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/\\_\\_init\\_\\_.py](https://codecov.io/gh/huggingface/transformers/pull/6744/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9fX2luaXRfXy5weQ==) | `99.28% <ΓΈ> (ΓΈ)` | |\n| [src/transformers/pipelines.py](https://codecov.io/gh/huggingface/transformers/pull/6744/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9waXBlbGluZXMucHk=) | `80.46% <96.15%> (+0.51%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6744/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl90NS5weQ==) | `26.84% <0.00%> (-64.10%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_flaubert.py](https://codecov.io/gh/huggingface/transformers/pull/6744/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9mbGF1YmVydC5weQ==) | `24.53% <0.00%> (-63.81%)` | :arrow_down: |\n| [src/transformers/modeling\\_marian.py](https://codecov.io/gh/huggingface/transformers/pull/6744/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19tYXJpYW4ucHk=) | `60.00% <0.00%> (-30.00%)` | :arrow_down: |\n| [src/transformers/modeling\\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6744/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yb2JlcnRhLnB5) | `77.37% <0.00%> (-19.71%)` | :arrow_down: |\n| [src/transformers/activations.py](https://codecov.io/gh/huggingface/transformers/pull/6744/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9hY3RpdmF0aW9ucy5weQ==) | `85.00% <0.00%> (-5.00%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6744/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `85.01% <0.00%> (-2.29%)` | :arrow_down: |\n| [src/transformers/modeling\\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/6744/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19iYXJ0LnB5) | `95.05% <0.00%> (-0.35%)` | :arrow_down: |\n| [src/transformers/tokenization\\_utils\\_base.py](https://codecov.io/gh/huggingface/transformers/pull/6744/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfYmFzZS5weQ==) | `93.49% <0.00%> (-0.28%)` | :arrow_down: |\n| ... and [13 more](https://codecov.io/gh/huggingface/transformers/pull/6744/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6744?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6744?src=pr&el=footer). Last update [42fddac...201c854](https://codecov.io/gh/huggingface/transformers/pull/6744?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "Thanks @LysandreJik ! It was already in the doc at the bottom, now moved it below `TextGenerationPipeline`", "failing test doesn't look related to this PR" ]
"2024-03-20T15:59:45"
"2024-03-20T15:59:45"
null
NONE
null
### Feature request Commands such as `load_dataset` creates file locks with `filelock.FileLock`. It would be good if there was a way to disable this. ### Motivation File locking doesn't work on all file-systems (in my case NFS mounted Weka). If the `cache_dir` only had small files then it would be possible to point to local disk and the problem would be solved. However, as cache_dir is both where the small info files are written and the processed datasets are put this isn't a feasible solution. Considering https://github.com/huggingface/datasets/issues/6395 I still do think this is something that belongs in HuggingFace. The possibility to control packages separately is valuable. It might be that a user has their dataset on a file-system that doesn't support file-locking while they are using file locking on local disk to control some other type of access. ### Your contribution My suggested solution: ``` diff --git a/src/datasets/utils/_filelock.py b/src/datasets/utils/_filelock.py index 19620e6e..58f41a02 100644 --- a/src/datasets/utils/_filelock.py +++ b/src/datasets/utils/_filelock.py @@ -18,11 +18,15 @@ import os from filelock import FileLock as FileLock_ -from filelock import UnixFileLock +from filelock import SoftFileLock, UnixFileLock from filelock import __version__ as _filelock_version from packaging import version +if os.getenv('HF_USE_SOFTFILELOCK', 'false').lower() in ('true', '1'): + FileLock_ = SoftFileLock + + class FileLock(FileLock_): """ A `filelock.FileLock` initializer that handles long paths. ```
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6744/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6744/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6743
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6743/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6743/comments
https://api.github.com/repos/huggingface/datasets/issues/6743/events
https://github.com/huggingface/datasets/pull/6743
2,195,481,697
PR_kwDODunzps5qHeMZ
6,743
Allow null values in dict columns
{ "login": "mariosasko", "id": 47462742, "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mariosasko", "html_url": "https://github.com/mariosasko", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "repos_url": "https://api.github.com/users/mariosasko/repos", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "This should help: https://github.com/huggingface/transformers/issues/5096#issuecomment-645860271", "@sshleifer - think this is the 3rd issue about Bart pre-training -> maybe it would be a good idea to release a small notebook at some point.", "@patil-suraj you took a stab at this at some point? [this](https://github.com/huggingface/transformers/issues/5096#issuecomment-645848176) may have been optimistic :( ", "Yes, I was trying to port fairseq dataset here, same for t5, I'll try to focus more on it when I'm done with current PRs, should strat with a notebook as Patrick said, then try to include it in examples/", "@patrickvonplaten Does that mean I can train with Masked-input, input(label) and Decoder-input?", "yes, this should be possible", "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n", "@patil-suraj any news on the pretraining script for Bart?", "If anyone wants to train their MBART model then feel free to use this.\r\nhttps://github.com/prajdabre/yanmtt\r\n\r\nContributions are welcome!", "@patil-suraj excuse me, is there any news on the pretraining script for Bart? Thanks.", "@thomas-li-sjtu you can try my toolkit if you like. It's based on transformers and allows for Bart/mbart pretraining. https://github.com/prajdabre/yanmtt", "> @thomas-li-sjtu you can try my toolkit if you like. It's based on transformers and allows for Bart/mbart pretraining. https://github.com/prajdabre/yanmtt\r\n\r\nHi there, here is my problem. I hope to pretrain a bart model based on my own dataset and fine tune it for another task (not nmt). I noticed that your toolkit designs for nmt so maybe it is not the one I need. Anyway, thanks for your reply!", "@thomas-li-sjtu ok I understand. It's not just designed for NMT (despite its name). I've used it for summarisation and general NLG without problems. Good luck with your search.", "> @thomas-li-sjtu ok I understand. It's not just designed for NMT (despite its name). I've used it for summarisation and general NLG without problems. Good luck with your search.\r\n\r\nWow that is awesome. I will try it for my task!", "@thomas-li-sjtu cool. Feel free to raise issues as it helps me add new functionality that may be of use to people. If you want to know how to use it for summarisation (or generic nlg) then look here: https://github.com/AI4Bharat/indic-bart", "Sorry to only come back to this issue now. If anyone is interested in adding this example script in `Transformers`, I would be more than happy to help :) \r\n\r\nFor BART pre-training we need the text-infilling + sentence-permutation data collator which you could find here https://github.com/morganmcg1/rotobart/blob/main/data_collator.py#L223\r\n\r\nWith this collator you could then modify and use `run_summarization.py` script here https://github.com/huggingface/transformers/tree/master/examples/pytorch/summarization. \r\n\r\nLet me know if anyone is interested. :) cc @patrickvonplaten \r\n\r\n", "> Sorry to only come back to this issue now. If anyone is interested in adding this example script in `Transformers`, I would be more than happy to help :)\r\n> \r\n> For BART pre-training we need the text-infilling + sentence-permutation data collator which you could find here https://github.com/morganmcg1/rotobart/blob/main/data_collator.py#L223\r\n> \r\n> With this collator you could then modify and use `run_summarization.py` script here https://github.com/huggingface/transformers/tree/master/examples/pytorch/summarization.\r\n> \r\n> Let me know if anyone is interested. :) cc @patrickvonplaten\r\n\r\nI think the BART pre-training script is very useful for my work and many others. It is generous of you to add this example script in 'Transfromers' !!!", "> Sorry to only come back to this issue now. If anyone is interested in adding this example script in `Transformers`, I would be more than happy to help :)\r\n> \r\n> For BART pre-training we need the text-infilling + sentence-permutation data collator which you could find here https://github.com/morganmcg1/rotobart/blob/main/data_collator.py#L223\r\n> \r\n> With this collator you could then modify and use `run_summarization.py` script here https://github.com/huggingface/transformers/tree/master/examples/pytorch/summarization.\r\n> \r\n> Let me know if anyone is interested. :) cc @patrickvonplaten\r\n\r\nThanks for your reply and I think your method is absolutely feasible. But when I try it , I faced some errors that I can't fix. And could you please give me some help?\r\nHere is my changes to `run_summarization.py`(tag 4.11.0)\r\n\r\n1. Import some necessary packages in [https://github.com/morganmcg1/rotobart/blob/main/data_collator.py#L223](url)\r\n2. Add full codes of `DataCollatorForDenoisingTasks` and also let class `DataCollatorForDenoisingTasks` inherit class `DataCollatorForSeq2Seq` in this way: `class DataCollatorForDenoisingTasks(DataCollatorForSeq2Seq):`\r\n3. Use the new collator: `data_collator = DataCollatorForSeq2Seq(......)` -> `data_collator = DataCollatorForDenoisingTasks(.......)`\r\n\r\nRun the changed script and I get errors below.\r\n\r\nTraceback (most recent call last):\r\n File \"/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/IPython/core/interactiveshell.py\", line 3457, in run_code\r\n exec(code_obj, self.user_global_ns, self.user_ns)\r\n File \"<ipython-input-2-991cbc10c55c>\", line 1, in <module>\r\n runfile('/data/whq/tmp/SBartTry/fineBartPretrain.py', args=['--model_name_or_path', 'facebook/bart-base', '--do_train', '--do_eval', '--train_file', '/data/whq/tmp/SBartTry/tryData/clickbait_train.csv', '--validation_file', '/data/whq/tmp/SBartTry/tryData/clickbait_valid.csv', '--source_prefix', '', '--num_train_epochs=3', '--output_dir', '/data/whq/tmp/SBartTry/fineBartPretrain/clickbait', '--overwrite_output_dir', '--per_device_train_batch_size=16', '--per_device_eval_batch_size=16', '--predict_with_generate'], wdir='/data/whq/tmp/SBartTry')\r\n File \"/home/whq/.pycharm_helpers/pydev/_pydev_bundle/pydev_umd.py\", line 198, in runfile\r\n pydev_imports.execfile(filename, global_vars, local_vars) # execute the script\r\n File \"/home/whq/.pycharm_helpers/pydev/_pydev_imps/_pydev_execfile.py\", line 18, in execfile\r\n exec(compile(contents+\"\\n\", file, 'exec'), glob, loc)\r\n File \"/data/whq/tmp/SBartTry/fineBartPretrain.py\", line 823, in <module>\r\n main()\r\n File \"/data/whq/tmp/SBartTry/fineBartPretrain.py\", line 745, in main\r\n train_result = trainer.train(resume_from_checkpoint=checkpoint)\r\n File \"/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/transformers/trainer.py\", line 1325, in train\r\n tr_loss_step = self.training_step(model, inputs)\r\n File \"/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/transformers/trainer.py\", line 1884, in training_step\r\n loss = self.compute_loss(model, inputs)\r\n File \"/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/transformers/trainer.py\", line 1916, in compute_loss\r\n outputs = model(**inputs)\r\n File \"/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/torch/nn/modules/module.py\", line 1102, in _call_impl\r\n return forward_call(*input, **kwargs)\r\n File \"/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py\", line 168, in forward\r\n outputs = self.parallel_apply(replicas, inputs, kwargs)\r\n File \"/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py\", line 178, in parallel_apply\r\n return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])\r\n File \"/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py\", line 86, in parallel_apply\r\n output.reraise()\r\n File \"/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/torch/_utils.py\", line 434, in reraise\r\n raise exception\r\nTypeError: Caught TypeError in replica 0 on device 0.\r\nOriginal Traceback (most recent call last):\r\n File \"/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py\", line 61, in _worker\r\n output = module(*input, **kwargs)\r\n File \"/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/torch/nn/modules/module.py\", line 1102, in _call_impl\r\n return forward_call(*input, **kwargs)\r\n File \"/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/transformers/models/bart/modeling_bart.py\", line 1336, in forward\r\n return_dict=return_dict,\r\n File \"/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/torch/nn/modules/module.py\", line 1102, in _call_impl\r\n return forward_call(*input, **kwargs)\r\n File \"/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/transformers/models/bart/modeling_bart.py\", line 1200, in forward\r\n return_dict=return_dict,\r\n File \"/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/torch/nn/modules/module.py\", line 1102, in _call_impl\r\n return forward_call(*input, **kwargs)\r\n File \"/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/transformers/models/bart/modeling_bart.py\", line 769, in forward\r\n input_shape = input_ids.size()\r\nTypeError: 'int' object is not callable\r\n\r\nWaiting for your generous reply! @patil-suraj ", "@Eurus-W make sure you convert the numpy arrays in the batch returned by `data_collator()` into tensors.\r\n`batch[\"input_ids\"] = torch.LongTensor(batch[\"input_ids\"])`, for example." ]
"2024-03-19T16:54:22"
"2024-04-08T13:08:42"
"2024-03-19T20:05:19"
COLLABORATOR
null
Fix #6738
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6743/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6743/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6743", "html_url": "https://github.com/huggingface/datasets/pull/6743", "diff_url": "https://github.com/huggingface/datasets/pull/6743.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6743.patch", "merged_at": "2024-03-19T20:05:19" }
https://api.github.com/repos/huggingface/datasets/issues/6742
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6742/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6742/comments
https://api.github.com/repos/huggingface/datasets/issues/6742/events
https://github.com/huggingface/datasets/pull/6742
2,195,134,854
PR_kwDODunzps5qGSfG
6,742
Fix missing download_config in get_data_patterns
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "Hey @SuHe36,\r\n\r\nI'm currently working on adding support for batched generation. At the moment, this is the best answer we can give you: https://github.com/huggingface/transformers/issues/3021#issuecomment-591236688", "Thanks for your reply !", "Hey, @patrickvonplaten is batch generation available for T5conditiongeneration?", "Yes! Please take a look at this test, which does batch=4 generation for summarization using T5: https://github.com/huggingface/transformers/blob/55cb2ee62eb482787cff17585955f7193fe35dfa/tests/test_modeling_t5.py#L559", "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n" ]
"2024-03-19T14:29:25"
"2024-03-19T18:24:39"
"2024-03-19T18:15:13"
MEMBER
null
Reported in https://github.com/huggingface/datasets-server/issues/2607
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6742/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6742/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6742", "html_url": "https://github.com/huggingface/datasets/pull/6742", "diff_url": "https://github.com/huggingface/datasets/pull/6742.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6742.patch", "merged_at": "2024-03-19T18:15:13" }
https://api.github.com/repos/huggingface/datasets/issues/6741
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6741/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6741/comments
https://api.github.com/repos/huggingface/datasets/issues/6741/events
https://github.com/huggingface/datasets/pull/6741
2,194,626,108
PR_kwDODunzps5qEiu3
6,741
Fix offline mode with single config
{ "login": "lhoestq", "id": 42851186, "node_id": "MDQ6VXNlcjQyODUxMTg2", "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lhoestq", "html_url": "https://github.com/lhoestq", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "repos_url": "https://api.github.com/users/lhoestq/repos", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6741?src=pr&el=h1) Report\n> Merging [#6741](https://codecov.io/gh/huggingface/transformers/pull/6741?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/64c7c2bc158364ff5c53dce2f19698078b2f9d78?el=desc) will **decrease** coverage by `1.03%`.\n> The diff coverage is `100.00%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6741/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6741?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6741 +/- ##\n==========================================\n- Coverage 80.00% 78.96% -1.04% \n==========================================\n Files 156 156 \n Lines 28426 28426 \n==========================================\n- Hits 22741 22446 -295 \n- Misses 5685 5980 +295 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6741?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6741/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `84.69% <100.00%> (-2.61%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_electra.py](https://codecov.io/gh/huggingface/transformers/pull/6741/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9lbGVjdHJhLnB5) | `25.13% <0.00%> (-73.83%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6741/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl90NS5weQ==) | `26.84% <0.00%> (-64.10%)` | :arrow_down: |\n| [src/transformers/modeling\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6741/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190NS5weQ==) | `71.61% <0.00%> (-12.22%)` | :arrow_down: |\n| [src/transformers/configuration\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6741/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3Q1LnB5) | `85.71% <0.00%> (-10.72%)` | :arrow_down: |\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6741/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `81.45% <0.00%> (-5.02%)` | :arrow_down: |\n| [src/transformers/modeling\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6741/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `87.50% <0.00%> (-0.56%)` | :arrow_down: |\n| [src/transformers/tokenization\\_dpr.py](https://codecov.io/gh/huggingface/transformers/pull/6741/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fZHByLnB5) | `57.65% <0.00%> (+4.50%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_flaubert.py](https://codecov.io/gh/huggingface/transformers/pull/6741/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9mbGF1YmVydC5weQ==) | `88.34% <0.00%> (+63.80%)` | :arrow_up: |\n| ... and [1 more](https://codecov.io/gh/huggingface/transformers/pull/6741/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6741?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6741?src=pr&el=footer). Last update [64c7c2b...fb02d72](https://codecov.io/gh/huggingface/transformers/pull/6741?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-03-19T10:48:32"
"2024-03-25T16:35:21"
"2024-03-25T16:23:59"
MEMBER
null
Reported in https://github.com/huggingface/datasets/issues/4760 The cache was not able to reload a dataset with a single config form the cache if the config name is not specificed For example ```python from datasets import load_dataset, config config.HF_DATASETS_OFFLINE = True load_dataset("openai_humaneval") ``` This was due to a regression in https://github.com/huggingface/datasets/pull/6632
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6741/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6741/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6741", "html_url": "https://github.com/huggingface/datasets/pull/6741", "diff_url": "https://github.com/huggingface/datasets/pull/6741.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6741.patch", "merged_at": "2024-03-25T16:23:59" }
https://api.github.com/repos/huggingface/datasets/issues/6740
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6740/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6740/comments
https://api.github.com/repos/huggingface/datasets/issues/6740/events
https://github.com/huggingface/datasets/issues/6740
2,193,172,074
I_kwDODunzps6CuSZq
6,740
Support for loading geotiff files as a part of the ImageFolder
{ "login": "sunny1401", "id": 31362090, "node_id": "MDQ6VXNlcjMxMzYyMDkw", "avatar_url": "https://avatars.githubusercontent.com/u/31362090?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sunny1401", "html_url": "https://github.com/sunny1401", "followers_url": "https://api.github.com/users/sunny1401/followers", "following_url": "https://api.github.com/users/sunny1401/following{/other_user}", "gists_url": "https://api.github.com/users/sunny1401/gists{/gist_id}", "starred_url": "https://api.github.com/users/sunny1401/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sunny1401/subscriptions", "organizations_url": "https://api.github.com/users/sunny1401/orgs", "repos_url": "https://api.github.com/users/sunny1401/repos", "events_url": "https://api.github.com/users/sunny1401/events{/privacy}", "received_events_url": "https://api.github.com/users/sunny1401/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6740?src=pr&el=h1) Report\n> Merging [#6740](https://codecov.io/gh/huggingface/transformers/pull/6740?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/64c7c2bc158364ff5c53dce2f19698078b2f9d78?el=desc) will **decrease** coverage by `0.29%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6740/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6740?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6740 +/- ##\n==========================================\n- Coverage 80.00% 79.70% -0.30% \n==========================================\n Files 156 156 \n Lines 28426 28426 \n==========================================\n- Hits 22741 22656 -85 \n- Misses 5685 5770 +85 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6740?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/tokenization\\_marian.py](https://codecov.io/gh/huggingface/transformers/pull/6740/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fbWFyaWFuLnB5) | `66.66% <0.00%> (-32.50%)` | :arrow_down: |\n| [src/transformers/tokenization\\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/6740/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxuZXQucHk=) | `66.66% <0.00%> (-23.43%)` | :arrow_down: |\n| [src/transformers/tokenization\\_reformer.py](https://codecov.io/gh/huggingface/transformers/pull/6740/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fcmVmb3JtZXIucHk=) | `81.66% <0.00%> (-13.34%)` | :arrow_down: |\n| [src/transformers/tokenization\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6740/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fb3BlbmFpLnB5) | `71.21% <0.00%> (-12.88%)` | :arrow_down: |\n| [src/transformers/tokenization\\_dpr.py](https://codecov.io/gh/huggingface/transformers/pull/6740/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fZHByLnB5) | `57.65% <0.00%> (+4.50%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6740?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6740?src=pr&el=footer). Last update [64c7c2b...02d9292](https://codecov.io/gh/huggingface/transformers/pull/6740?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-03-18T20:00:39"
"2024-03-27T18:19:48"
"2024-03-27T18:19:20"
NONE
null
### Feature request Request for adding rasterio support to load geotiff as a part of ImageFolder, instead of using PIL ### Motivation As of now, there are many datasets in HuggingFace Hub which are predominantly focussed towards RemoteSensing or are from RemoteSensing. The current ImageFolder (if I have understood correctly) uses PIL. This is not really optimized because mostly these datasets have images with many channels and additional metadata. Using PIL makes one loose it unless we provide a custom script. Hence, maybe an API could be added to have this in common? ### Your contribution If the issue is accepted - i can contribute the code, because I would like to have it automated and generalised.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6740/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6740/timeline
null
not_planned
null
null
https://api.github.com/repos/huggingface/datasets/issues/6739
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6739/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6739/comments
https://api.github.com/repos/huggingface/datasets/issues/6739/events
https://github.com/huggingface/datasets/pull/6739
2,192,730,134
PR_kwDODunzps5p-Bwe
6,739
Transpose images with EXIF Orientation tag
{ "login": "mariosasko", "id": 47462742, "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mariosasko", "html_url": "https://github.com/mariosasko", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "repos_url": "https://api.github.com/users/mariosasko/repos", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6739?src=pr&el=h1) Report\n> Merging [#6739](https://codecov.io/gh/huggingface/transformers/pull/6739?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/64c7c2bc158364ff5c53dce2f19698078b2f9d78?el=desc) will **decrease** coverage by `1.00%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6739/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6739?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6739 +/- ##\n==========================================\n- Coverage 80.00% 78.99% -1.01% \n==========================================\n Files 156 156 \n Lines 28426 28426 \n==========================================\n- Hits 22741 22455 -286 \n- Misses 5685 5971 +286 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6739?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_tf\\_electra.py](https://codecov.io/gh/huggingface/transformers/pull/6739/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9lbGVjdHJhLnB5) | `25.13% <0.00%> (-73.83%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6739/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl90NS5weQ==) | `26.84% <0.00%> (-64.10%)` | :arrow_down: |\n| [src/transformers/modeling\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6739/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190NS5weQ==) | `71.61% <0.00%> (-12.22%)` | :arrow_down: |\n| [src/transformers/configuration\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6739/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3Q1LnB5) | `85.71% <0.00%> (-10.72%)` | :arrow_down: |\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6739/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `83.70% <0.00%> (-2.76%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6739/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `84.69% <0.00%> (-2.61%)` | :arrow_down: |\n| [src/transformers/modeling\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6739/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `87.50% <0.00%> (-0.56%)` | :arrow_down: |\n| [src/transformers/tokenization\\_dpr.py](https://codecov.io/gh/huggingface/transformers/pull/6739/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fZHByLnB5) | `57.65% <0.00%> (+4.50%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_flaubert.py](https://codecov.io/gh/huggingface/transformers/pull/6739/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9mbGF1YmVydC5weQ==) | `88.34% <0.00%> (+63.80%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/6739/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9hbGJlcnQucHk=) | `90.90% <0.00%> (+69.43%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6739?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6739?src=pr&el=footer). Last update [64c7c2b...b9f471b](https://codecov.io/gh/huggingface/transformers/pull/6739?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "@LysandreJik hey i have tried to add small script of convert BertForQuestionAnswering pytorch model to tensorflow like below file\r\nhttps://github.com/huggingface/transformers/blob/master/src/transformers/convert_bert_pytorch_checkpoint_to_original_tf.py\r\nplease look into it.", "This issue has been automatically marked as stale and been closed because it has not had recent activity. Thank you for your contributions.\n\nIf you think this still needs to be addressed please comment on this thread." ]
"2024-03-18T16:43:06"
"2024-03-19T15:35:57"
"2024-03-19T15:29:42"
COLLABORATOR
null
Closes https://github.com/huggingface/datasets/issues/6252
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6739/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6739/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6739", "html_url": "https://github.com/huggingface/datasets/pull/6739", "diff_url": "https://github.com/huggingface/datasets/pull/6739.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6739.patch", "merged_at": "2024-03-19T15:29:41" }
https://api.github.com/repos/huggingface/datasets/issues/6738
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6738/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6738/comments
https://api.github.com/repos/huggingface/datasets/issues/6738/events
https://github.com/huggingface/datasets/issues/6738
2,192,386,536
I_kwDODunzps6CrSno
6,738
Dict feature is non-nullable while nested dict feature is
{ "login": "polinaeterna", "id": 16348744, "node_id": "MDQ6VXNlcjE2MzQ4NzQ0", "avatar_url": "https://avatars.githubusercontent.com/u/16348744?v=4", "gravatar_id": "", "url": "https://api.github.com/users/polinaeterna", "html_url": "https://github.com/polinaeterna", "followers_url": "https://api.github.com/users/polinaeterna/followers", "following_url": "https://api.github.com/users/polinaeterna/following{/other_user}", "gists_url": "https://api.github.com/users/polinaeterna/gists{/gist_id}", "starred_url": "https://api.github.com/users/polinaeterna/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/polinaeterna/subscriptions", "organizations_url": "https://api.github.com/users/polinaeterna/orgs", "repos_url": "https://api.github.com/users/polinaeterna/repos", "events_url": "https://api.github.com/users/polinaeterna/events{/privacy}", "received_events_url": "https://api.github.com/users/polinaeterna/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892857, "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": "Something isn't working" } ]
closed
false
null
[]
null
[ "Hey @Krak91,\r\n\r\nThanks for this issue. The PR attached to this issue should fix it. \r\nNote that even though the new example code will work for Reformer, it won't yield any good results because there is no pretrained ReformerModel yet." ]
"2024-03-18T14:31:47"
"2024-03-20T10:24:15"
"2024-03-19T20:05:20"
CONTRIBUTOR
null
When i try to create a `Dataset` object with None values inside a dict column, like this: ```python from datasets import Dataset, Features, Value Dataset.from_dict( { "dict": [{"a": 0, "b": 0}, None], }, features=Features( {"dict": {"a": Value("int16"), "b": Value("int16")}} ) ) ``` i get `ValueError: Got None but expected a dictionary instead`. At the same time, having None in _nested_ dict feature works, for example, this doesn't throw any errors: ```python from datasets import Dataset, Features, Value, Sequence dataset = Dataset.from_dict( { "list_dict": [[{"a": 0, "b": 0}], None], "sequence_dict": [[{"a": 0, "b": 0}], None], }, features=Features({ "list_dict": [{"a": Value("int16"), "b": Value("int16")}], "sequence_dict": Sequence({"a": Value("int16"), "b": Value("int16")}), }) ) ``` Other types of features also seem to be nullable (but I haven't checked all of them). Version of `datasets` is the latest atm (2.18.0) Is this an expected behavior or a bug?
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6738/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6738/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6737
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6737/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6737/comments
https://api.github.com/repos/huggingface/datasets/issues/6737/events
https://github.com/huggingface/datasets/issues/6737
2,190,198,425
I_kwDODunzps6Ci8aZ
6,737
Invalid pattern: '**' can only be an entire path component
{ "login": "JPonsa", "id": 28976175, "node_id": "MDQ6VXNlcjI4OTc2MTc1", "avatar_url": "https://avatars.githubusercontent.com/u/28976175?v=4", "gravatar_id": "", "url": "https://api.github.com/users/JPonsa", "html_url": "https://github.com/JPonsa", "followers_url": "https://api.github.com/users/JPonsa/followers", "following_url": "https://api.github.com/users/JPonsa/following{/other_user}", "gists_url": "https://api.github.com/users/JPonsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/JPonsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JPonsa/subscriptions", "organizations_url": "https://api.github.com/users/JPonsa/orgs", "repos_url": "https://api.github.com/users/JPonsa/repos", "events_url": "https://api.github.com/users/JPonsa/events{/privacy}", "received_events_url": "https://api.github.com/users/JPonsa/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6737?src=pr&el=h1) Report\n> Merging [#6737](https://codecov.io/gh/huggingface/transformers/pull/6737?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/22933e661fe789874ef58b13d3a9bb2554ba5891?el=desc) will **decrease** coverage by `0.10%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6737/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6737?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6737 +/- ##\n==========================================\n- Coverage 80.02% 79.92% -0.11% \n==========================================\n Files 157 157 \n Lines 28586 28586 \n==========================================\n- Hits 22877 22848 -29 \n- Misses 5709 5738 +29 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6737?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/configuration\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6737/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX29wZW5haS5weQ==) | `34.28% <0.00%> (-62.86%)` | :arrow_down: |\n| [src/transformers/tokenization\\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/6737/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYWxiZXJ0LnB5) | `28.84% <0.00%> (-58.66%)` | :arrow_down: |\n| [src/transformers/modeling\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6737/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19vcGVuYWkucHk=) | `23.87% <0.00%> (-57.10%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_distilbert.py](https://codecov.io/gh/huggingface/transformers/pull/6737/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9kaXN0aWxiZXJ0LnB5) | `64.47% <0.00%> (-34.36%)` | :arrow_down: |\n| [src/transformers/tokenization\\_dpr.py](https://codecov.io/gh/huggingface/transformers/pull/6737/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fZHByLnB5) | `53.15% <0.00%> (-4.51%)` | :arrow_down: |\n| [src/transformers/configuration\\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/6737/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2JhcnQucHk=) | `90.00% <0.00%> (-4.00%)` | :arrow_down: |\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6737/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `84.96% <0.00%> (-1.76%)` | :arrow_down: |\n| [src/transformers/generation\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6737/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3V0aWxzLnB5) | `96.66% <0.00%> (-0.28%)` | :arrow_down: |\n| [src/transformers/file\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6737/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.66% <0.00%> (+0.25%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6737/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `87.29% <0.00%> (+0.32%)` | :arrow_up: |\n| ... and [13 more](https://codecov.io/gh/huggingface/transformers/pull/6737/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6737?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6737?src=pr&el=footer). Last update [22933e6...b4c1c2f](https://codecov.io/gh/huggingface/transformers/pull/6737?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-03-16T19:28:46"
"2024-05-13T14:03:18"
"2024-05-13T11:32:57"
NONE
null
### Describe the bug ValueError: Invalid pattern: '**' can only be an entire path component when loading any dataset ### Steps to reproduce the bug import datasets ds = datasets.load_dataset("TokenBender/code_instructions_122k_alpaca_style") ### Expected behavior loading the dataset successfully ### Environment info - `datasets` version: 2.18.0 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.7 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.12.2
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6737/reactions", "total_count": 7, "+1": 7, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6737/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6736
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6736/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6736/comments
https://api.github.com/repos/huggingface/datasets/issues/6736/events
https://github.com/huggingface/datasets/issues/6736
2,190,181,422
I_kwDODunzps6Ci4Qu
6,736
Mosaic Streaming (MDS) Support
{ "login": "siddk", "id": 2498509, "node_id": "MDQ6VXNlcjI0OTg1MDk=", "avatar_url": "https://avatars.githubusercontent.com/u/2498509?v=4", "gravatar_id": "", "url": "https://api.github.com/users/siddk", "html_url": "https://github.com/siddk", "followers_url": "https://api.github.com/users/siddk/followers", "following_url": "https://api.github.com/users/siddk/following{/other_user}", "gists_url": "https://api.github.com/users/siddk/gists{/gist_id}", "starred_url": "https://api.github.com/users/siddk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/siddk/subscriptions", "organizations_url": "https://api.github.com/users/siddk/orgs", "repos_url": "https://api.github.com/users/siddk/repos", "events_url": "https://api.github.com/users/siddk/events{/privacy}", "received_events_url": "https://api.github.com/users/siddk/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
[]
"2024-03-16T18:42:04"
"2024-03-18T15:13:34"
null
NONE
null
### Feature request I'm a huge fan of the current HF Datasets `webdataset` integration (especially the built-in streaming support). However, I'd love to upload some robotics and multimodal datasets I've processed for use with [Mosaic Streaming](https://docs.mosaicml.com/projects/streaming/en/stable/), specifically their [MDS Format](https://docs.mosaicml.com/projects/streaming/en/stable/fundamentals/dataset_format.html#mds). Because the shard files have similar semantics to WebDataset, I'm hoping that adding such support won't be too much trouble? ### Motivation One of the downsides with WebDataset is a lack of out-of-the-box determinism (especially for large-scale training and reproducibility), easy job resumption, and the ability to quickly debug / visualize individual examples. Mosaic Streaming provides a [great interface for this out of the box](https://docs.mosaicml.com/projects/streaming/en/stable/#key-features), so I'd love to see it supported in HF Datasets. ### Your contribution Happy to help test things / provide example data. Can potentially submit a PR if maintainers could point me to the necessary WebDataset logic / steps for adding a new streaming format!
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6736/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6736/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6735
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6735/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6735/comments
https://api.github.com/repos/huggingface/datasets/issues/6735/events
https://github.com/huggingface/datasets/pull/6735
2,189,132,932
PR_kwDODunzps5px84g
6,735
Add `mode` parameter to `Image` feature
{ "login": "mariosasko", "id": 47462742, "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mariosasko", "html_url": "https://github.com/mariosasko", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "repos_url": "https://api.github.com/users/mariosasko/repos", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6735?src=pr&el=h1) Report\n> Merging [#6735](https://codecov.io/gh/huggingface/transformers/pull/6735?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/a32d85f0d405be53117b96075eef2875d2185892?el=desc) will **decrease** coverage by `1.02%`.\n> The diff coverage is `78.33%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6735/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6735?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6735 +/- ##\n==========================================\n- Coverage 80.48% 79.46% -1.03% \n==========================================\n Files 157 157 \n Lines 28794 28822 +28 \n==========================================\n- Hits 23175 22903 -272 \n- Misses 5619 5919 +300 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6735?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/6735/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19iYXJ0LnB5) | `94.24% <50.00%> (-1.35%)` | :arrow_down: |\n| [src/transformers/modeling\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6735/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190NS5weQ==) | `76.70% <57.14%> (-7.14%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6735/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl90NS5weQ==) | `89.57% <70.27%> (-1.37%)` | :arrow_down: |\n| [src/transformers/modeling\\_encoder\\_decoder.py](https://codecov.io/gh/huggingface/transformers/pull/6735/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19lbmNvZGVyX2RlY29kZXIucHk=) | `92.00% <93.33%> (-0.40%)` | :arrow_down: |\n| [src/transformers/generation\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6735/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3V0aWxzLnB5) | `96.93% <100.00%> (+0.26%)` | :arrow_up: |\n| [src/transformers/modeling\\_gpt2.py](https://codecov.io/gh/huggingface/transformers/pull/6735/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19ncHQyLnB5) | `86.82% <100.00%> (+0.14%)` | :arrow_up: |\n| [src/transformers/modeling\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6735/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19vcGVuYWkucHk=) | `23.87% <100.00%> (-48.39%)` | :arrow_down: |\n| [src/transformers/modeling\\_outputs.py](https://codecov.io/gh/huggingface/transformers/pull/6735/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19vdXRwdXRzLnB5) | `100.00% <100.00%> (ΓΈ)` | |\n| [src/transformers/modeling\\_tf\\_gpt2.py](https://codecov.io/gh/huggingface/transformers/pull/6735/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9ncHQyLnB5) | `95.01% <100.00%> (ΓΈ)` | |\n| [src/transformers/modeling\\_tf\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6735/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9vcGVuYWkucHk=) | `22.58% <100.00%> (-72.26%)` | :arrow_down: |\n| ... and [17 more](https://codecov.io/gh/huggingface/transformers/pull/6735/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6735?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6735?src=pr&el=footer). Last update [a32d85f...190985c](https://codecov.io/gh/huggingface/transformers/pull/6735?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "> LGTM! Looks like we can now deprecate the `_use_cache` function in the `GenerationMixin`, no?\r\n\r\nyes!", "**IMPORTANT** This PR does a bigger renaming from \"decoder_past_key_values\" to \"past_key_values\" as suggested by @sshleifer. This required changes for `T5`, `TFT5` and `Bart`. For each of the three models it is made sure that `decoder_past_values` can still be used as an input to keep backwards compatibility. \r\n\r\nWould be great if @LysandreJik (and @sgugger, @sshleifer depending on time difference) can review this quickly one last time.", "@sshleifer - all EncoderDecoder Slow tests pass. There was one bart test that failed because of Broken Internet connection. I ran this single test again separately and it was fine. PR looks good to me now -> merging." ]
"2024-03-15T17:21:12"
"2024-03-18T15:47:48"
"2024-03-18T15:41:33"
COLLABORATOR
null
Fix https://github.com/huggingface/datasets/issues/6675
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6735/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6735/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6735", "html_url": "https://github.com/huggingface/datasets/pull/6735", "diff_url": "https://github.com/huggingface/datasets/pull/6735.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6735.patch", "merged_at": "2024-03-18T15:41:33" }
https://api.github.com/repos/huggingface/datasets/issues/6734
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6734/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6734/comments
https://api.github.com/repos/huggingface/datasets/issues/6734/events
https://github.com/huggingface/datasets/issues/6734
2,187,646,694
I_kwDODunzps6CZNbm
6,734
Tokenization slows towards end of dataset
{ "login": "ethansmith2000", "id": 98723285, "node_id": "U_kgDOBeJl1Q", "avatar_url": "https://avatars.githubusercontent.com/u/98723285?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ethansmith2000", "html_url": "https://github.com/ethansmith2000", "followers_url": "https://api.github.com/users/ethansmith2000/followers", "following_url": "https://api.github.com/users/ethansmith2000/following{/other_user}", "gists_url": "https://api.github.com/users/ethansmith2000/gists{/gist_id}", "starred_url": "https://api.github.com/users/ethansmith2000/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ethansmith2000/subscriptions", "organizations_url": "https://api.github.com/users/ethansmith2000/orgs", "repos_url": "https://api.github.com/users/ethansmith2000/repos", "events_url": "https://api.github.com/users/ethansmith2000/events{/privacy}", "received_events_url": "https://api.github.com/users/ethansmith2000/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "Not sure if the suggested rewrite to remove all those numbers is desirable - perhaps it's important to see those numbers, so I left it alone and just fixed the keys of `id2lang` to be int.\r\n\r\nhttps://github.com/huggingface/transformers/pull/7034" ]
"2024-03-15T03:27:36"
"2024-04-11T10:48:07"
null
NONE
null
### Describe the bug Mapped tokenization slows down substantially towards end of dataset. train set started off very slow, caught up to 20k then tapered off til the end. what's particularly strange is that the tokenization crashed a few times before due to errors with invalid tokens somewhere or corrupted downloads, and the speed ups/downs consistently happened the same times ```bash Running tokenizer on dataset (num_proc=48): 0%| | 847000/881416735 [12:18<252:45:45, 967.72 examples/s] Running tokenizer on dataset (num_proc=48): 0%| | 848000/881416735 [12:19<224:16:10, 1090.66 examples/s] Running tokenizer on dataset (num_proc=48): 10%|β–‰ | 84964000/881416735 [3:48:00<11:21:34, 19476.01 examples/s] Running tokenizer on dataset (num_proc=48): 10%|β–‰ | 84967000/881416735 [3:48:00<12:04:01, 18333.79 examples/s] Running tokenizer on dataset (num_proc=48): 61%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ | 538631977/881416735 [13:46:40<27:50:04, 3420.84 examples/s] Running tokenizer on dataset (num_proc=48): 61%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ | 538632977/881416735 [13:46:40<23:48:20, 3999.77 examples/s] Running tokenizer on dataset (num_proc=48): 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰| 881365886/881416735 [38:30:19<04:34, 185.10 examples/s] Running tokenizer on dataset (num_proc=48): 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰| 881366886/881416735 [38:30:25<04:36, 180.57 examples/s] ``` and validation set as well ```bash Running tokenizer on dataset (num_proc=48): 90%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰ | 41544000/46390354 [28:44<02:37, 30798.76 examples/s] Running tokenizer on dataset (num_proc=48): 90%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰ | 41550000/46390354 [28:44<02:08, 37698.08 examples/s] Running tokenizer on dataset (num_proc=48): 96%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹| 44747422/46390354 [2:15:48<12:22:44, 36.87 examples/s] Running tokenizer on dataset (num_proc=48): 96%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹| 44747422/46390354 [2:16:00<12:22:44, 36.87 examples/s] ``` ### Steps to reproduce the bug using the following kwargs ```python with accelerator.main_process_first(): lm_datasets = tokenized_datasets.map( group_texts, batched=True, num_proc=48 load_from_cache_file=True, desc=f"Grouping texts in chunks of {block_size}", ) ``` running through slurm script ```bash #SBATCH --partition=gpu-nvidia-a100 #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --gpus-per-task=8 #SBATCH --cpus-per-task=96 ``` using this dataset https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T ### Expected behavior Constant speed throughout ### Environment info - `datasets` version: 2.15.0 - Platform: Linux-5.15.0-1049-aws-x86_64-with-glibc2.10 - Python version: 3.8.18 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.0.3 - `fsspec` version: 2023.10.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6734/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6734/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6733
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6733/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6733/comments
https://api.github.com/repos/huggingface/datasets/issues/6733/events
https://github.com/huggingface/datasets/issues/6733
2,186,811,724
I_kwDODunzps6CWBlM
6,733
EmptyDatasetError when loading dataset downloaded with HuggingFace cli
{ "login": "StwayneXG", "id": 77196999, "node_id": "MDQ6VXNlcjc3MTk2OTk5", "avatar_url": "https://avatars.githubusercontent.com/u/77196999?v=4", "gravatar_id": "", "url": "https://api.github.com/users/StwayneXG", "html_url": "https://github.com/StwayneXG", "followers_url": "https://api.github.com/users/StwayneXG/followers", "following_url": "https://api.github.com/users/StwayneXG/following{/other_user}", "gists_url": "https://api.github.com/users/StwayneXG/gists{/gist_id}", "starred_url": "https://api.github.com/users/StwayneXG/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/StwayneXG/subscriptions", "organizations_url": "https://api.github.com/users/StwayneXG/orgs", "repos_url": "https://api.github.com/users/StwayneXG/repos", "events_url": "https://api.github.com/users/StwayneXG/events{/privacy}", "received_events_url": "https://api.github.com/users/StwayneXG/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "This issue has been automatically marked as stale and been closed because it has not had recent activity. Thank you for your contributions.\n\nIf you think this still needs to be addressed please comment on this thread." ]
"2024-03-14T16:41:27"
"2024-03-15T18:09:02"
null
NONE
null
### Describe the bug I am using a cluster that does not have access to the internet when given a job. I tried downloading the dataset using the huggingface-cli command and then loading it with load_dataset but I get an error: ```raise EmptyDatasetError(f"The directory at {base_path} doesn't contain any data files") from None``` The dataset I'm using is "lmsys/chatbot_arena_conversations". The folder structure is - README.md - data - train-00000-of-00001-cced8514c7ed782a.parquet ### Steps to reproduce the bug 1. Download dataset using HuggingFace CLI: ```huggingface-cli download lmsys/chatbot_arena_conversations --local-dir ./lmsys/chatbot_arena_conversations``` 2. In Python ``` from datasets import load_dataset load_dataset("lmsys/chatbot_arena_conversations") ``` ### Expected behavior Should return a Dataset Dict in the form of ``` DatasetDict({ train: Dataset({ features: [...], num_rows: 33,000 }) }) ``` ### Environment info Python 3.11.5 Datasets 2.18.0 Transformers 4.38.2 Pytorch 2.2.0 Pyarrow 15.0.1 Rocky Linux release 8.9 (Green Obsidian)
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6733/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6733/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6731
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6731/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6731/comments
https://api.github.com/repos/huggingface/datasets/issues/6731/events
https://github.com/huggingface/datasets/issues/6731
2,182,844,673
I_kwDODunzps6CG5EB
6,731
Unexpected behavior when using load_dataset with streaming=True in a for loop
{ "login": "uApiv", "id": 42908296, "node_id": "MDQ6VXNlcjQyOTA4Mjk2", "avatar_url": "https://avatars.githubusercontent.com/u/42908296?v=4", "gravatar_id": "", "url": "https://api.github.com/users/uApiv", "html_url": "https://github.com/uApiv", "followers_url": "https://api.github.com/users/uApiv/followers", "following_url": "https://api.github.com/users/uApiv/following{/other_user}", "gists_url": "https://api.github.com/users/uApiv/gists{/gist_id}", "starred_url": "https://api.github.com/users/uApiv/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/uApiv/subscriptions", "organizations_url": "https://api.github.com/users/uApiv/orgs", "repos_url": "https://api.github.com/users/uApiv/repos", "events_url": "https://api.github.com/users/uApiv/events{/privacy}", "received_events_url": "https://api.github.com/users/uApiv/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6731?src=pr&el=h1) Report\n> Merging [#6731](https://codecov.io/gh/huggingface/transformers/pull/6731?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/e11d923bfc61ed640bc7e696549578361126485e?el=desc) will **increase** coverage by `0.06%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6731/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6731?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6731 +/- ##\n==========================================\n+ Coverage 79.42% 79.48% +0.06% \n==========================================\n Files 156 156 \n Lines 28411 28411 \n==========================================\n+ Hits 22565 22583 +18 \n+ Misses 5846 5828 -18 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6731?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_tf\\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/6731/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl94bG5ldC5weQ==) | `21.12% <0.00%> (-71.05%)` | :arrow_down: |\n| [src/transformers/modeling\\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6731/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yb2JlcnRhLnB5) | `77.37% <0.00%> (-19.71%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6731/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `86.64% <0.00%> (-0.66%)` | :arrow_down: |\n| [src/transformers/file\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6731/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.66% <0.00%> (+0.25%)` | :arrow_up: |\n| [src/transformers/tokenization\\_xlm.py](https://codecov.io/gh/huggingface/transformers/pull/6731/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxtLnB5) | `82.93% <0.00%> (+66.66%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/6731/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9hbGJlcnQucHk=) | `90.90% <0.00%> (+69.43%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6731?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6731?src=pr&el=footer). Last update [e11d923...bfd52f8](https://codecov.io/gh/huggingface/transformers/pull/6731?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-03-12T23:26:43"
"2024-04-16T00:00:00"
"2024-04-16T00:00:00"
NONE
null
### Describe the bug ### My Code ``` from datasets import load_dataset res=[] for i in [0,1]: di=load_dataset( "json", data_files='path_to.json', split='train', streaming=True, ).map(lambda x: {"source": i}) res.append(di) for e in res[0]: print(e) ``` ### Unexpected Behavior Data in `res[0]` has `source=1`. However the expected value is 0. ### FYI I further switch `streaming` to `False`. And the output value is as expected (0). So there may exist bugs in setting `streaming=True` in a for loop. ### Environment Python 3.8.0 datasets==2.18.0 transformers==4.28.1 ### Steps to reproduce the bug 1. Create a Json file with any content. 2. Run the provided code. 3. Switch `streaming` to `False` and run again to see the expected behavior. ### Expected behavior The expected behavior is the data are mapped with its corresponding value in the for loop. ### Environment info Python 3.8.0 datasets==2.18.0 transformers==4.28.1 Ubuntu 20.04
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6731/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6731/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6730
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6730/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6730/comments
https://api.github.com/repos/huggingface/datasets/issues/6730/events
https://github.com/huggingface/datasets/pull/6730
2,181,881,499
PR_kwDODunzps5pZDsB
6,730
Deprecate Pandas builder
{ "login": "mariosasko", "id": 47462742, "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mariosasko", "html_url": "https://github.com/mariosasko", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "repos_url": "https://api.github.com/users/mariosasko/repos", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6730?src=pr&el=h1) Report\n> Merging [#6730](https://codecov.io/gh/huggingface/transformers/pull/6730?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/e11d923bfc61ed640bc7e696549578361126485e?el=desc) will **increase** coverage by `0.21%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6730/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6730?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6730 +/- ##\n==========================================\n+ Coverage 79.42% 79.63% +0.21% \n==========================================\n Files 156 156 \n Lines 28411 28411 \n==========================================\n+ Hits 22565 22626 +61 \n+ Misses 5846 5785 -61 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6730?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/6730/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ194bG5ldC5weQ==) | `60.81% <0.00%> (-22.62%)` | :arrow_down: |\n| [src/transformers/modeling\\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6730/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yb2JlcnRhLnB5) | `77.37% <0.00%> (-19.71%)` | :arrow_down: |\n| [src/transformers/modeling\\_transfo\\_xl\\_utilities.py](https://codecov.io/gh/huggingface/transformers/pull/6730/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190cmFuc2ZvX3hsX3V0aWxpdGllcy5weQ==) | `52.98% <0.00%> (-13.44%)` | :arrow_down: |\n| [src/transformers/modeling\\_transfo\\_xl.py](https://codecov.io/gh/huggingface/transformers/pull/6730/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190cmFuc2ZvX3hsLnB5) | `67.17% <0.00%> (-12.53%)` | :arrow_down: |\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6730/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `86.71% <0.00%> (+0.25%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/6730/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9hbGJlcnQucHk=) | `90.90% <0.00%> (+69.43%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6730?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6730?src=pr&el=footer). Last update [e11d923...1f0307a](https://codecov.io/gh/huggingface/transformers/pull/6730?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-03-12T15:12:13"
"2024-03-12T17:42:33"
"2024-03-12T17:36:24"
COLLABORATOR
null
The Pandas packaged builder is undocumented and relies on `pickle` to read the data, making it **unsafe**. Moreover, I haven't seen a single instance of this builder being used (not even using the GH/Hub search), so we should deprecate it.
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6730/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6730/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6730", "html_url": "https://github.com/huggingface/datasets/pull/6730", "diff_url": "https://github.com/huggingface/datasets/pull/6730.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6730.patch", "merged_at": "2024-03-12T17:36:24" }
https://api.github.com/repos/huggingface/datasets/issues/6729
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6729/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6729/comments
https://api.github.com/repos/huggingface/datasets/issues/6729/events
https://github.com/huggingface/datasets/issues/6729
2,180,237,159
I_kwDODunzps6B88dn
6,729
Support zipfiles that span multiple disks?
{ "login": "severo", "id": 1676121, "node_id": "MDQ6VXNlcjE2NzYxMjE=", "avatar_url": "https://avatars.githubusercontent.com/u/1676121?v=4", "gravatar_id": "", "url": "https://api.github.com/users/severo", "html_url": "https://github.com/severo", "followers_url": "https://api.github.com/users/severo/followers", "following_url": "https://api.github.com/users/severo/following{/other_user}", "gists_url": "https://api.github.com/users/severo/gists{/gist_id}", "starred_url": "https://api.github.com/users/severo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/severo/subscriptions", "organizations_url": "https://api.github.com/users/severo/orgs", "repos_url": "https://api.github.com/users/severo/repos", "events_url": "https://api.github.com/users/severo/events{/privacy}", "received_events_url": "https://api.github.com/users/severo/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892912, "node_id": "MDU6TGFiZWwxOTM1ODkyOTEy", "url": "https://api.github.com/repos/huggingface/datasets/labels/question", "name": "question", "color": "d876e3", "default": true, "description": "Further information is requested" } ]
open
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6729?src=pr&el=h1) Report\n> Merging [#6729](https://codecov.io/gh/huggingface/transformers/pull/6729?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/e11d923bfc61ed640bc7e696549578361126485e?el=desc) will **decrease** coverage by `0.44%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6729/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6729?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6729 +/- ##\n==========================================\n- Coverage 79.42% 78.97% -0.45% \n==========================================\n Files 156 156 \n Lines 28411 28411 \n==========================================\n- Hits 22565 22438 -127 \n- Misses 5846 5973 +127 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6729?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_tf\\_electra.py](https://codecov.io/gh/huggingface/transformers/pull/6729/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9lbGVjdHJhLnB5) | `25.13% <0.00%> (-73.83%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6729/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl90NS5weQ==) | `26.84% <0.00%> (-64.10%)` | :arrow_down: |\n| [src/transformers/modeling\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6729/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190NS5weQ==) | `71.61% <0.00%> (-12.22%)` | :arrow_down: |\n| [src/transformers/configuration\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6729/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3Q1LnB5) | `85.71% <0.00%> (-10.72%)` | :arrow_down: |\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6729/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `82.70% <0.00%> (-3.76%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6729/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `84.69% <0.00%> (-2.61%)` | :arrow_down: |\n| [src/transformers/modeling\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6729/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `87.50% <0.00%> (-0.56%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_flaubert.py](https://codecov.io/gh/huggingface/transformers/pull/6729/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9mbGF1YmVydC5weQ==) | `88.34% <0.00%> (+63.80%)` | :arrow_up: |\n| [src/transformers/tokenization\\_xlm.py](https://codecov.io/gh/huggingface/transformers/pull/6729/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxtLnB5) | `82.93% <0.00%> (+66.66%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/6729/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9hbGJlcnQucHk=) | `90.90% <0.00%> (+69.43%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6729?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6729?src=pr&el=footer). Last update [e11d923...242d1d0](https://codecov.io/gh/huggingface/transformers/pull/6729?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-03-11T21:07:41"
"2024-03-11T21:07:46"
null
CONTRIBUTOR
null
See https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream The dataset viewer gives the following error: ``` Error code: ConfigNamesError Exception: BadZipFile Message: zipfiles that span multiple disks are not supported Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 67, in compute_config_names_response get_dataset_config_names( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 347, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1871, in dataset_module_factory raise e1 from None File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1846, in dataset_module_factory return HubDatasetModuleFactoryWithoutScript( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1240, in get_module module_name, default_builder_kwargs = infer_module_for_data_files( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 584, in infer_module_for_data_files split_modules = { File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 585, in <dictcomp> split: infer_module_for_data_files_list(data_files_list, download_config=download_config) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 526, in infer_module_for_data_files_list return infer_module_for_data_files_list_in_archives(data_files_list, download_config=download_config) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 554, in infer_module_for_data_files_list_in_archives for f in xglob(extracted, recursive=True, download_config=download_config)[ File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 576, in xglob fs, *_ = fsspec.get_fs_token_paths(urlpath, storage_options=storage_options) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/core.py", line 622, in get_fs_token_paths fs = filesystem(protocol, **inkwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/registry.py", line 290, in filesystem return cls(**storage_options) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/spec.py", line 79, in __call__ obj = super().__call__(*args, **kwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/implementations/zip.py", line 57, in __init__ self.zip = zipfile.ZipFile( File "/usr/local/lib/python3.9/zipfile.py", line 1266, in __init__ self._RealGetContents() File "/usr/local/lib/python3.9/zipfile.py", line 1329, in _RealGetContents endrec = _EndRecData(fp) File "/usr/local/lib/python3.9/zipfile.py", line 286, in _EndRecData return _EndRecData64(fpin, -sizeEndCentDir, endrec) File "/usr/local/lib/python3.9/zipfile.py", line 232, in _EndRecData64 raise BadZipFile("zipfiles that span multiple disks are not supported") zipfile.BadZipFile: zipfiles that span multiple disks are not supported ``` The files (https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream/tree/main/data) are: <img width="629" alt="Capture d’écran 2024-03-11 aΜ€ 22 07 30" src="https://github.com/huggingface/datasets/assets/1676121/0bb15a51-d54f-4d73-8572-e427ea644b36">
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6729/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/6729/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6728
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6728/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6728/comments
https://api.github.com/repos/huggingface/datasets/issues/6728/events
https://github.com/huggingface/datasets/issues/6728
2,178,607,012
I_kwDODunzps6B2uek
6,728
Issue Downloading Certain Datasets After Setting Custom `HF_ENDPOINT`
{ "login": "padeoe", "id": 10057041, "node_id": "MDQ6VXNlcjEwMDU3MDQx", "avatar_url": "https://avatars.githubusercontent.com/u/10057041?v=4", "gravatar_id": "", "url": "https://api.github.com/users/padeoe", "html_url": "https://github.com/padeoe", "followers_url": "https://api.github.com/users/padeoe/followers", "following_url": "https://api.github.com/users/padeoe/following{/other_user}", "gists_url": "https://api.github.com/users/padeoe/gists{/gist_id}", "starred_url": "https://api.github.com/users/padeoe/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/padeoe/subscriptions", "organizations_url": "https://api.github.com/users/padeoe/orgs", "repos_url": "https://api.github.com/users/padeoe/repos", "events_url": "https://api.github.com/users/padeoe/events{/privacy}", "received_events_url": "https://api.github.com/users/padeoe/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6728?src=pr&el=h1) Report\n> Merging [#6728](https://codecov.io/gh/huggingface/transformers/pull/6728?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/e11d923bfc61ed640bc7e696549578361126485e?el=desc) will **decrease** coverage by `0.43%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6728/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6728?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6728 +/- ##\n==========================================\n- Coverage 79.42% 78.99% -0.44% \n==========================================\n Files 156 156 \n Lines 28411 28411 \n==========================================\n- Hits 22565 22442 -123 \n- Misses 5846 5969 +123 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6728?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_tf\\_electra.py](https://codecov.io/gh/huggingface/transformers/pull/6728/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9lbGVjdHJhLnB5) | `25.13% <0.00%> (-73.83%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6728/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl90NS5weQ==) | `26.84% <0.00%> (-64.10%)` | :arrow_down: |\n| [src/transformers/modeling\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6728/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190NS5weQ==) | `71.61% <0.00%> (-12.22%)` | :arrow_down: |\n| [src/transformers/configuration\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6728/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3Q1LnB5) | `85.71% <0.00%> (-10.72%)` | :arrow_down: |\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6728/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `83.70% <0.00%> (-2.76%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6728/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `84.69% <0.00%> (-2.61%)` | :arrow_down: |\n| [src/transformers/modeling\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6728/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `87.50% <0.00%> (-0.56%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_flaubert.py](https://codecov.io/gh/huggingface/transformers/pull/6728/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9mbGF1YmVydC5weQ==) | `88.34% <0.00%> (+63.80%)` | :arrow_up: |\n| [src/transformers/tokenization\\_xlm.py](https://codecov.io/gh/huggingface/transformers/pull/6728/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxtLnB5) | `82.93% <0.00%> (+66.66%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/6728/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9hbGJlcnQucHk=) | `90.90% <0.00%> (+69.43%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6728?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6728?src=pr&el=footer). Last update [e11d923...e3fc486](https://codecov.io/gh/huggingface/transformers/pull/6728?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-03-11T09:06:38"
"2024-03-15T14:52:07"
"2024-03-15T14:52:07"
NONE
null
### Describe the bug This bug is triggered under the following conditions: - datasets repo ids without organization names trigger errors, such as `bookcorpus`, `gsm8k`, `wikipedia`, rather than in the form of `A/B`. - If `HF_ENDPOINT` is set and the hostname is not in the form of `(hub-ci.)?huggingface.co`. - This issue occurs with `datasets>2.15.0` or `huggingface-hub>0.19.4`. For example, using the latest versions: `datasets==2.18.0` and `huggingface-hub==0.21.4`, ### Steps to reproduce the bug the issue can be reproduced with the following code: 1. install specific datasets and huggingface_hub. ```bash pip install datasets==2.18.0 pip install huggingface_hub==0.21.4 ``` 2. execute python code. ```Python import os os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com' from datasets import load_dataset bookcorpus = load_dataset('bookcorpus', split='train') ``` console output: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 2228, in load_dataset_builder dataset_module = dataset_module_factory( File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 1879, in dataset_module_factory raise e1 from None File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 1830, in dataset_module_factory with fs.open(f"datasets/{path}/{filename}", "r", encoding="utf-8") as f: File "/home/padeoe/.local/lib/python3.10/site-packages/fsspec/spec.py", line 1295, in open self.open( File "/home/padeoe/.local/lib/python3.10/site-packages/fsspec/spec.py", line 1307, in open f = self._open( File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 228, in _open return HfFileSystemFile(self, path, mode=mode, revision=revision, block_size=block_size, **kwargs) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 615, in __init__ self.resolved_path = fs.resolve_path(path, revision=revision) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 180, in resolve_path repo_and_revision_exist, err = self._repo_and_revision_exist(repo_type, repo_id, revision) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 117, in _repo_and_revision_exist self._api.repo_info(repo_id, revision=revision, repo_type=repo_type) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2413, in repo_info return method( File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2286, in dataset_info hf_raise_for_status(r) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 362, in hf_raise_for_status raise HfHubHTTPError(str(e), response=response) from e huggingface_hub.utils._errors.HfHubHTTPError: 401 Client Error: Unauthorized for url: https://hf-mirror.com/api/datasets/bookcorpus/bookcorpus.py (Request ID: Root=1-65ee8659-5ab10eec5960c63e71f2bb58;b00bdbea-fd6e-4a74-8fe0-bc4682ae090e) ``` ### Expected behavior The dataset was downloaded correctly without any errors. ### Environment info datasets==2.18.0 huggingface-hub==0.21.4
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6728/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/6728/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6727
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6727/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6727/comments
https://api.github.com/repos/huggingface/datasets/issues/6727/events
https://github.com/huggingface/datasets/pull/6727
2,177,826,110
PR_kwDODunzps5pLJyE
6,727
Using a registry instead of calling globals for fetching feature types
{ "login": "psmyth94", "id": 11325244, "node_id": "MDQ6VXNlcjExMzI1MjQ0", "avatar_url": "https://avatars.githubusercontent.com/u/11325244?v=4", "gravatar_id": "", "url": "https://api.github.com/users/psmyth94", "html_url": "https://github.com/psmyth94", "followers_url": "https://api.github.com/users/psmyth94/followers", "following_url": "https://api.github.com/users/psmyth94/following{/other_user}", "gists_url": "https://api.github.com/users/psmyth94/gists{/gist_id}", "starred_url": "https://api.github.com/users/psmyth94/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/psmyth94/subscriptions", "organizations_url": "https://api.github.com/users/psmyth94/orgs", "repos_url": "https://api.github.com/users/psmyth94/repos", "events_url": "https://api.github.com/users/psmyth94/events{/privacy}", "received_events_url": "https://api.github.com/users/psmyth94/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6727?src=pr&el=h1) Report\n> Merging [#6727](https://codecov.io/gh/huggingface/transformers/pull/6727?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/7e6397a7d8e7433aa4c4cafba98e08e5c73f087c?el=desc) will **decrease** coverage by `1.11%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6727/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6727?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6727 +/- ##\n==========================================\n- Coverage 80.10% 78.99% -1.12% \n==========================================\n Files 156 156 \n Lines 28411 28411 \n==========================================\n- Hits 22758 22442 -316 \n- Misses 5653 5969 +316 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6727?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_tf\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6727/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl90NS5weQ==) | `26.84% <0.00%> (-64.10%)` | :arrow_down: |\n| [src/transformers/configuration\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6727/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3Q1LnB5) | `85.71% <0.00%> (-10.72%)` | :arrow_down: |\n| [src/transformers/modeling\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6727/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190NS5weQ==) | `71.61% <0.00%> (-6.02%)` | :arrow_down: |\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6727/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `83.70% <0.00%> (-3.01%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6727/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `84.69% <0.00%> (-2.29%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6727/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9yb2JlcnRhLnB5) | `93.22% <0.00%> (+47.80%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6727?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6727?src=pr&el=footer). Last update [7e6397a...8d8b352](https://codecov.io/gh/huggingface/transformers/pull/6727?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-03-10T17:47:51"
"2024-03-13T12:08:49"
"2024-03-13T10:46:02"
CONTRIBUTOR
null
Hello, When working with bio-data, each feature often has metadata associated with it (e.g. species, lineage, snp position, etc). To store this, I like to use the feature classes with the added `metadata` attribute. However, when saving or loading with custom features, you get an error since that class doesn't exist in the global namespace in `datasets.features.features`. Take for example, ```python from dataclasses import dataclass, field from datasets import Dataset from datasets.features.features import Value, Features @dataclass class FeatureA(Value): metadata: dict = field(default=dict) _type: str = field(default="FeatureA", init=False, repr=False) @dataclass class FeatureB(Value): metadata: dict = field(default_factory=dict) _type: str = field(default="FeatureB", init=False, repr=False) test_data = { "a": [1, 2, 3], "b": [4, 5, 6], } test_data = Dataset.from_dict( test_data, features=Features({ "a": FeatureA("int32", metadata={"species": "lactobacillus acetotolerans"}), "b": FeatureB("int32", metadata={"species": "lactobacillus iners"}), }) ) # returns an error since FeatureA and FeatureB are not in the global namespace test_data.save_to_disk('./test_data') ``` Saving the dataset (0/1 shards): 0%| | 0/3 [00:00<?, ? examples/s] --------------------------------------------------------------------------- KeyError Traceback (most recent call last) Cell In[2], line 28 19 test_data = Dataset.from_dict( 20 test_data, 21 features=Features({ (...) 24 }) 25 ) 27 # returns an error since FeatureA and FeatureB are not in the global namespace ---> 28 test_data.save_to_disk('./test_data') ... File ~\Documents\datasets\src\datasets\features\features.py:1361, in generate_from_dict(obj) 1359 return {key: generate_from_dict(value) for key, value in obj.items()} 1360 obj = dict(obj) -> 1361 class_type = globals()[obj.pop("_type")] 1363 if class_type == Sequence: 1364 return Sequence(feature=generate_from_dict(obj["feature"]), length=obj.get("length", -1)) KeyError: 'FeatureA' We can avoid this by having a registry (like formatters) and doing ```python from datasets.features.features import register_feature register_feature(FeatureA, "FeatureA") register_feature(FeatureB, "FeatureB") test_data.save_to_disk('./test_data') ``` Saving the dataset (1/1 shards): 100%|------| 3/3 [00:00<00:00, 211.13 examples/s] and loading from disk returns with all metadata information ```python from datasets import load_from_disk test_data = load_from_disk('./test_data') test_data.features ``` {'a': FeatureA(dtype='int32', id=None, metadata={'species': 'lactobacillus acetotolerans'}), 'b': FeatureB(dtype='int32', id=None, metadata={'species': 'lactobacillus iners'})}
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6727/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/6727/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6727", "html_url": "https://github.com/huggingface/datasets/pull/6727", "diff_url": "https://github.com/huggingface/datasets/pull/6727.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6727.patch", "merged_at": "2024-03-13T10:46:02" }
https://api.github.com/repos/huggingface/datasets/issues/6726
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6726/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6726/comments
https://api.github.com/repos/huggingface/datasets/issues/6726/events
https://github.com/huggingface/datasets/issues/6726
2,177,097,232
I_kwDODunzps6Bw94Q
6,726
Profiling for HF Filesystem shows there are easy performance gains to be made
{ "login": "awgr", "id": 159512661, "node_id": "U_kgDOCYH4VQ", "avatar_url": "https://avatars.githubusercontent.com/u/159512661?v=4", "gravatar_id": "", "url": "https://api.github.com/users/awgr", "html_url": "https://github.com/awgr", "followers_url": "https://api.github.com/users/awgr/followers", "following_url": "https://api.github.com/users/awgr/following{/other_user}", "gists_url": "https://api.github.com/users/awgr/gists{/gist_id}", "starred_url": "https://api.github.com/users/awgr/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/awgr/subscriptions", "organizations_url": "https://api.github.com/users/awgr/orgs", "repos_url": "https://api.github.com/users/awgr/repos", "events_url": "https://api.github.com/users/awgr/events{/privacy}", "received_events_url": "https://api.github.com/users/awgr/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[]
"2024-03-09T07:08:45"
"2024-03-09T07:11:08"
null
NONE
null
### Describe the bug # Let's make it faster First, an evidence... ![image](https://github.com/huggingface/datasets/assets/159512661/a703a82c-43a0-426c-9d99-24c563d70965) Figure 1: CProfile for loading 3 files from cerebras/SlimPajama-627B train split, and 3 files from test split using streaming=True. X axis is 1106 seconds long. See? It's pretty slow. What is resolve pattern doing? ``` resolve_pattern called with **/train/** and hf://datasets/cerebras/SlimPajama-627B@2d0accdd58c5d5511943ca1f5ff0e3eb5e293543 resolve_pattern took 20.815081119537354 seconds ``` Makes sense. How to improve it? ## Bigger project, biggest payoff Databricks (and consequently, spark) store a compressed manifest file of the files contained in the remote filesystem. Then, you download one tiny file, decompress it, and all the operations are local instead of this shenanigans. It seems pretty straightforward to make dataset uploads compute a manifest and upload it alongside their data. This would make resolution time so fast that nobody would ever think about it again. It also means you either need to have the uploader compute it _every time_, or have a hook that computes it. ## Smaller project, immediate payoff: Be diligent in avoiding deepcopy Revise the _ls_tree method to avoid deepcopy: ``` def _ls_tree( self, path: str, recursive: bool = False, refresh: bool = False, revision: Optional[str] = None, expand_info: bool = True, ): ..... omitted ..... for path_info in tree: if isinstance(path_info, RepoFile): cache_path_info = { "name": root_path + "/" + path_info.path, "size": path_info.size, "type": "file", "blob_id": path_info.blob_id, "lfs": path_info.lfs, "last_commit": path_info.last_commit, "security": path_info.security, } else: cache_path_info = { "name": root_path + "/" + path_info.path, "size": 0, "type": "directory", "tree_id": path_info.tree_id, "last_commit": path_info.last_commit, } parent_path = self._parent(cache_path_info["name"]) self.dircache.setdefault(parent_path, []).append(cache_path_info) out.append(cache_path_info) return copy.deepcopy(out) # copy to not let users modify the dircache ``` Observe this deepcopy at the end. It is making a copy of a very simple data structure. We do not need to copy. We can simply generate the data structure twice instead. It will be much faster. ``` def _ls_tree( self, path: str, recursive: bool = False, refresh: bool = False, revision: Optional[str] = None, expand_info: bool = True, ): ..... omitted ..... def make_cache_path_info(path_info): if isinstance(path_info, RepoFile): return { "name": root_path + "/" + path_info.path, "size": path_info.size, "type": "file", "blob_id": path_info.blob_id, "lfs": path_info.lfs, "last_commit": path_info.last_commit, "security": path_info.security, } else: return { "name": root_path + "/" + path_info.path, "size": 0, "type": "directory", "tree_id": path_info.tree_id, "last_commit": path_info.last_commit, } for path_info in tree: cache_path_info = make_cache_path_info(path_info) out_cache_path_info = make_cache_path_info(path_info) # copy to not let users modify the dircache parent_path = self._parent(cache_path_info["name"]) self.dircache.setdefault(parent_path, []).append(cache_path_info) out.append(out_cache_path_info) return out ``` Note there is no longer a deepcopy in this method. We have replaced it with generating the output twice. This is substantially faster. For me, the entire resolution went from 1100s to 360s. ## Medium project, medium payoff After the above change, we have this profile: ![image](https://github.com/huggingface/datasets/assets/159512661/db7b83da-2dfc-4c2e-abab-0ede9477876c) Figure 2: x-axis is 355 seconds. Note that globbing and _ls_tree deep copy is gone. No surprise there. It's much faster now, but we still spend ~187seconds in get_fs_token_paths. Well get_fs_token_paths is part of fsspec. We don't need to fix that because we can trust their developers to write high performance code. Probably the caller has misconfigured something. Let's take a look at the storage_options being provided to the filesystem that is constructed during this call. Ah yes, streaming_download_manager::_prepare_single_hop_path_and_storage_options. We know streaming download manager is not compatible with async right now, but we really need this specific part of the code to be async. We're spending so much time checking isDir on the remote filesystem, it's a huge waste. We can make the call easily 20-30x faster by using async, removing this performance bottleneck almost entirely (and reducing the total time of this part of the code to <30s. There is no reason to block async isDir calls for streaming. I'm not going to mess w/ this one myself; I didn't write the streaming impl, and I don't know how it works, but I know the isDir check can be async. ### Steps to reproduce the bug ``` with cProfile.Profile() as pr: pr.enable() # Begin Data if not os.path.exists(data_cache_dir): os.makedirs(data_cache_dir, exist_ok=True) training_dataset = load_dataset(training_dataset_name, split=training_split, cache_dir=data_cache_dir, streaming=True).take(training_slice) eval_dataset = load_dataset(eval_dataset_name, split=eval_split, cache_dir=data_cache_dir, streaming=True).take(eval_slice) # End Data pr.disable() pr.create_stats() if not os.path.exists(profiling_path): os.makedirs(profiling_path, exist_ok=True) pr.dump_stats(os.path.join(profiling_path, "cprofile.prof")) ``` run this code for "cerebras/SlimPajama-627B" and whatever other params ### Expected behavior Something better. ### Environment info - `datasets` version: 2.18.0 - Platform: Linux-5.15.146.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 - Python version: 3.10.13 - `huggingface_hub` version: 0.21.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2024.2.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6726/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/6726/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6725
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6725/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6725/comments
https://api.github.com/repos/huggingface/datasets/issues/6725/events
https://github.com/huggingface/datasets/issues/6725
2,175,527,530
I_kwDODunzps6Bq-pq
6,725
Request for a comparison of huggingface datasets compared with other data format especially webdataset
{ "login": "Luciennnnnnn", "id": 20135317, "node_id": "MDQ6VXNlcjIwMTM1MzE3", "avatar_url": "https://avatars.githubusercontent.com/u/20135317?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Luciennnnnnn", "html_url": "https://github.com/Luciennnnnnn", "followers_url": "https://api.github.com/users/Luciennnnnnn/followers", "following_url": "https://api.github.com/users/Luciennnnnnn/following{/other_user}", "gists_url": "https://api.github.com/users/Luciennnnnnn/gists{/gist_id}", "starred_url": "https://api.github.com/users/Luciennnnnnn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Luciennnnnnn/subscriptions", "organizations_url": "https://api.github.com/users/Luciennnnnnn/orgs", "repos_url": "https://api.github.com/users/Luciennnnnnn/repos", "events_url": "https://api.github.com/users/Luciennnnnnn/events{/privacy}", "received_events_url": "https://api.github.com/users/Luciennnnnnn/received_events", "type": "User", "site_admin": false }
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
[ "As far as I can see there is currently no dataloader functionality to lazy load data into memory. \r\nIt should not be very hard to implement such a feature yourself, I think, see https://discuss.pytorch.org/t/loading-huge-data-functionality/346/2 .\r\nAlso cc @lhoestq @sgugger @thomwolf - Are we planning on providing more support for lazy data loading? ", "There is an [open PR #4009](https://github.com/huggingface/transformers/pull/4009) about this that was mostly close to being merged (cc @BramVanroy) and I must confess I kind of dropped the ball on it.\r\n\r\nShouldn't be a ton of work to complete it and get it merged.\r\n\r\nAs mentioned in that PR, the other option is to use `huggingface/nlp` which can load large text datasets lazily out of the box.", "@patrickvonplaten @julien-c Thanks a lot for your reply.\r\n\r\nShould we close this issue and focus on https://github.com/huggingface/transformers/pull/4009 ?", "The long-term solution is to use nlp for this IMO.", "I have checked NLP and it is slow, maybe I am doing something wrong.\r\nI made a simple python script to check it is speed, which loads 1.1 TB of textual data.\r\nIt has been 8 hours and still, it is on the loading steps.\r\nIt does work when the text dataset size is small about 1 GB, but it doesn't scale.\r\nIt also uses a single thread during the data loading step.\r\n\r\n```\r\ntrain_files = glob.glob(\"xxx/*.txt\",recursive=True)\r\nrandom.shuffle(train_files)\r\n\r\nprint(train_files)\r\n\r\ndataset = nlp.load_dataset('text', \r\n data_files=train_files,\r\n name=\"customDataset\",\r\n version=\"1.0.0\",\r\n cache_dir=\"xxx/nlp\")\r\n```", "You should open this issue on the nlp repo, to make sure it's not forgotten! In particular they are working a lot on performance right now :-)", "done:\r\nhttps://github.com/huggingface/nlp/issues/546\r\n", "I am closing this in favour of:\r\n- https://github.com/huggingface/transformers/pull/4009\r\n- https://github.com/huggingface/nlp/issues/546\r\n" ]
"2024-03-08T08:23:01"
"2024-03-08T08:23:01"
null
NONE
null
### Feature request Request for a comparison of huggingface datasets compared with other data format especially webdataset ### Motivation I see huggingface datasets uses Apache Arrow as its backend, it seems to be great, but I'm curious about how it is good compared with other dataset format, like webdataset, what's the pros/cons of them. ### Your contribution More information
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6725/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/6725/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6724
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6724/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6724/comments
https://api.github.com/repos/huggingface/datasets/issues/6724/events
https://github.com/huggingface/datasets/issues/6724
2,174,398,227
I_kwDODunzps6Bmq8T
6,724
Dataset with loading script does not work in renamed repos
{ "login": "BramVanroy", "id": 2779410, "node_id": "MDQ6VXNlcjI3Nzk0MTA=", "avatar_url": "https://avatars.githubusercontent.com/u/2779410?v=4", "gravatar_id": "", "url": "https://api.github.com/users/BramVanroy", "html_url": "https://github.com/BramVanroy", "followers_url": "https://api.github.com/users/BramVanroy/followers", "following_url": "https://api.github.com/users/BramVanroy/following{/other_user}", "gists_url": "https://api.github.com/users/BramVanroy/gists{/gist_id}", "starred_url": "https://api.github.com/users/BramVanroy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/BramVanroy/subscriptions", "organizations_url": "https://api.github.com/users/BramVanroy/orgs", "repos_url": "https://api.github.com/users/BramVanroy/repos", "events_url": "https://api.github.com/users/BramVanroy/events{/privacy}", "received_events_url": "https://api.github.com/users/BramVanroy/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6724?src=pr&el=h1) Report\n> Merging [#6724](https://codecov.io/gh/huggingface/transformers/pull/6724?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/074340339a6d6aede30c14c94ffe7b59a01786f1?el=desc) will **decrease** coverage by `0.43%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6724/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6724?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6724 +/- ##\n==========================================\n- Coverage 79.91% 79.47% -0.44% \n==========================================\n Files 156 156 \n Lines 28406 28406 \n==========================================\n- Hits 22701 22577 -124 \n- Misses 5705 5829 +124 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6724?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_tf\\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/6724/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl94bG5ldC5weQ==) | `21.12% <0.00%> (-71.05%)` | :arrow_down: |\n| [src/transformers/modeling\\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6724/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yb2JlcnRhLnB5) | `77.37% <0.00%> (-19.71%)` | :arrow_down: |\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6724/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `85.21% <0.00%> (-1.26%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6724/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `86.64% <0.00%> (-0.66%)` | :arrow_down: |\n| [src/transformers/tokenization\\_pegasus.py](https://codecov.io/gh/huggingface/transformers/pull/6724/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fcGVnYXN1cy5weQ==) | `95.31% <0.00%> (+50.00%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/6724/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9hbGJlcnQucHk=) | `90.90% <0.00%> (+69.43%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6724?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6724?src=pr&el=footer). Last update [0743403...332510c](https://codecov.io/gh/huggingface/transformers/pull/6724?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "Thanks for sharing, this looks awesome – did you want to review this @patrickvonplaten?", "Looks great! " ]
"2024-03-07T17:38:38"
"2024-03-07T20:06:25"
null
CONTRIBUTOR
null
### Describe the bug My data repository was first called `BramVanroy/hplt-mono-v1-2` but I then renamed to use underscores instead of dashes. However, it seems that `datasets` retrieves the old repo name when it checks whether the repo contains data loading scripts in this line. https://github.com/huggingface/datasets/blob/6fb6c834f008996c994b0a86c3808d0a33d44525/src/datasets/load.py#L1845 When I print `filename` it returns `hplt-mono-v1-2.py` but the files in the repo are of course `['.gitattributes', 'README.md', 'hplt_mono_v1_2.py']`. So the `filename` is the original reponame instead of the renamed one. I am not sure if this is a caching issue or not or how I can resolve it. ### Steps to reproduce the bug ``` from datasets import load_dataset ds = load_dataset( "BramVanroy/hplt-mono-v1-2", "ky", trust_remote_code=True ) ``` ### Expected behavior That the most recent repo name is used when `filename` is generated. ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.14.0-284.25.1.el9_2.x86_64-x86_64-with-glibc2.34 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.2 - PyArrow version: 14.0.1 - Pandas version: 2.1.3 - `fsspec` version: 2023.10.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6724/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/6724/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6723
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6723/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6723/comments
https://api.github.com/repos/huggingface/datasets/issues/6723/events
https://github.com/huggingface/datasets/pull/6723
2,174,344,456
PR_kwDODunzps5o_fPU
6,723
get_dataset_default_config_name docstring
{ "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
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6723?src=pr&el=h1) Report\n> Merging [#6723](https://codecov.io/gh/huggingface/transformers/pull/6723?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/a25c9fc8e14f3e8914116e6142af2a9589dc8e63?el=desc) will **decrease** coverage by `0.04%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6723/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6723?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6723 +/- ##\n==========================================\n- Coverage 79.00% 78.96% -0.05% \n==========================================\n Files 156 156 \n Lines 28405 28405 \n==========================================\n- Hits 22442 22429 -13 \n- Misses 5963 5976 +13 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6723?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6723/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `80.70% <0.00%> (-3.01%)` | :arrow_down: |\n| [src/transformers/file\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6723/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.41% <0.00%> (-0.26%)` | :arrow_down: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6723?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6723?src=pr&el=footer). Last update [a25c9fc...715d491](https://codecov.io/gh/huggingface/transformers/pull/6723?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "Merging so I can tweet, but lmk if anything is off and I'll update it.", "looks good! Fixed tiny typos in 3242e4d9", "Hi @joeddav! Could you share your hyperparameters for training the model (I assume you used the `run_glue`)? Would you say that the last phase of training helped significantly?" ]
"2024-03-07T17:09:29"
"2024-03-07T17:27:29"
"2024-03-07T17:21:20"
MEMBER
null
fix https://github.com/huggingface/datasets/pull/6722
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6723/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/6723/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6723", "html_url": "https://github.com/huggingface/datasets/pull/6723", "diff_url": "https://github.com/huggingface/datasets/pull/6723.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6723.patch", "merged_at": "2024-03-07T17:21:20" }
https://api.github.com/repos/huggingface/datasets/issues/6722
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6722/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6722/comments
https://api.github.com/repos/huggingface/datasets/issues/6722/events
https://github.com/huggingface/datasets/pull/6722
2,174,332,127
PR_kwDODunzps5o_ch0
6,722
Add details in docstring
{ "login": "severo", "id": 1676121, "node_id": "MDQ6VXNlcjE2NzYxMjE=", "avatar_url": "https://avatars.githubusercontent.com/u/1676121?v=4", "gravatar_id": "", "url": "https://api.github.com/users/severo", "html_url": "https://github.com/severo", "followers_url": "https://api.github.com/users/severo/followers", "following_url": "https://api.github.com/users/severo/following{/other_user}", "gists_url": "https://api.github.com/users/severo/gists{/gist_id}", "starred_url": "https://api.github.com/users/severo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/severo/subscriptions", "organizations_url": "https://api.github.com/users/severo/orgs", "repos_url": "https://api.github.com/users/severo/repos", "events_url": "https://api.github.com/users/severo/events{/privacy}", "received_events_url": "https://api.github.com/users/severo/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "Hey @sshleifer -- here is belated PR for AdaFactor. Please let me know how to edit this properly, and what tests or examples we should add. Thanks!", "We will integrate into examples/ in a separate PR I think.", "Thanks @sshleifer -- let me try to make those changes. \r\n\r\nAgree that I should be able to add a single test -- appreciate the link -- and you can add examples in separate PR.\r\n\r\nIf I don't get this figure out soon, yes happy for you to make the changes yourself :-)", "Hey @sshleifer -- think I got a test working finally. We can squash the commits. \r\n\r\nStill not sure what I need to clean up for the code standards/linter. \r\n\r\nPlease advise, thanks!", "For local style checking, you need: `pip install isort --upgrade` \r\nThen `make style` and `make quality` to both suggest you have no errors. \r\nThey should autofix things or at least give error messages. My workflow is to define\r\n```bash\r\nsty () {\r\n\tmake style\r\n\tflake8 examples templates tests src utils\r\n}\r\n```\r\nand then run `sty` a lot.", "Also squashing happens automatically at merge time, don't worry about that.", "> For local style checking, you need: `pip install isort --upgrade`\r\n> Then `make style` and `make quality` to both suggest you have no errors.\r\n> They should autofix things or at least give error messages. My workflow is to define\r\n> \r\n> ```shell\r\n> sty () {\r\n> \tmake style\r\n> \tflake8 examples templates tests src utils\r\n> }\r\n> ```\r\n> \r\n> and then run `sty` a lot.\r\n\r\nHmm. Is there a way for `style` to tell me the location in offending file? Output seems pretty minimal.", "if you also run the flake8 command it should just fix it.", "I think I fixed the formatting, as requested. Took a sec to figure that all out...", "@sshleifer -- any idea what happened with the `black` / code quality changes overnite? I'm very confused. Seems as if the standard changed from yesterday... ", "Yes they did, sorry about that. I did some cleanup on this branch.\r\nIf you are curious about the style change: I tried to future proof it here https://github.com/huggingface/transformers/pull/6748", "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6722?src=pr&el=h1) Report\n> Merging [#6722](https://codecov.io/gh/huggingface/transformers/pull/6722?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/a75c64d80c76c3dc71f735d9197a4a601847e0cd?el=desc) will **decrease** coverage by `0.02%`.\n> The diff coverage is `68.23%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6722/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6722?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6722 +/- ##\n==========================================\n- Coverage 78.96% 78.94% -0.03% \n==========================================\n Files 157 157 \n Lines 28486 28571 +85 \n==========================================\n+ Hits 22495 22555 +60 \n- Misses 5991 6016 +25 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6722?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/\\_\\_init\\_\\_.py](https://codecov.io/gh/huggingface/transformers/pull/6722/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9fX2luaXRfXy5weQ==) | `99.28% <ΓΈ> (ΓΈ)` | |\n| [src/transformers/optimization.py](https://codecov.io/gh/huggingface/transformers/pull/6722/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9vcHRpbWl6YXRpb24ucHk=) | `82.28% <68.23%> (-13.27%)` | :arrow_down: |\n| [src/transformers/file\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6722/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.41% <0.00%> (-0.26%)` | :arrow_down: |\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6722/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `83.70% <0.00%> (+0.75%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6722?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6722?src=pr&el=footer). Last update [a75c64d...8958b9f](https://codecov.io/gh/huggingface/transformers/pull/6722?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "Awesome. Thanks @sshleifer. I'll start working more on the other less mature PRs we discussed. And please ping me if/when you write tests or examples for this. Happy to contribute to that as well if you need.", "I've added Adafactor to the docs and slightly changed the style of the docstrings in https://github.com/huggingface/transformers/pull/6765", "Thanks! I'll add a `--adafactor` option lightning_base and trainer in 2 prs." ]
"2024-03-07T17:02:07"
"2024-03-07T17:21:10"
"2024-03-07T17:21:08"
CONTRIBUTOR
null
see https://github.com/huggingface/datasets-server/pull/2554#discussion_r1516516867
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6722/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/6722/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6722", "html_url": "https://github.com/huggingface/datasets/pull/6722", "diff_url": "https://github.com/huggingface/datasets/pull/6722.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6722.patch", "merged_at": null }
https://api.github.com/repos/huggingface/datasets/issues/6721
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6721/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6721/comments
https://api.github.com/repos/huggingface/datasets/issues/6721/events
https://github.com/huggingface/datasets/issues/6721
2,173,931,714
I_kwDODunzps6Bk5DC
6,721
Hi,do you know how to load the dataset from local file now?
{ "login": "Gera001", "id": 50232044, "node_id": "MDQ6VXNlcjUwMjMyMDQ0", "avatar_url": "https://avatars.githubusercontent.com/u/50232044?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Gera001", "html_url": "https://github.com/Gera001", "followers_url": "https://api.github.com/users/Gera001/followers", "following_url": "https://api.github.com/users/Gera001/following{/other_user}", "gists_url": "https://api.github.com/users/Gera001/gists{/gist_id}", "starred_url": "https://api.github.com/users/Gera001/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Gera001/subscriptions", "organizations_url": "https://api.github.com/users/Gera001/orgs", "repos_url": "https://api.github.com/users/Gera001/repos", "events_url": "https://api.github.com/users/Gera001/events{/privacy}", "received_events_url": "https://api.github.com/users/Gera001/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "@JetRunner same model but bert large version, thank you!!", "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6721?src=pr&el=h1) Report\n> Merging [#6721](https://codecov.io/gh/huggingface/transformers/pull/6721?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/d17cce227022594ba84dbb92bafc802fb41434df?el=desc) will **increase** coverage by `0.49%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6721/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6721?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6721 +/- ##\n==========================================\n+ Coverage 79.00% 79.50% +0.49% \n==========================================\n Files 156 156 \n Lines 28406 28406 \n==========================================\n+ Hits 22443 22583 +140 \n+ Misses 5963 5823 -140 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6721?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_tf\\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/6721/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl94bG5ldC5weQ==) | `21.12% <0.00%> (-71.05%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_flaubert.py](https://codecov.io/gh/huggingface/transformers/pull/6721/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9mbGF1YmVydC5weQ==) | `24.53% <0.00%> (-63.81%)` | :arrow_down: |\n| [src/transformers/modeling\\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6721/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yb2JlcnRhLnB5) | `77.37% <0.00%> (-19.71%)` | :arrow_down: |\n| [src/transformers/modeling\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6721/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `88.05% <0.00%> (+0.55%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6721/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `86.64% <0.00%> (+1.95%)` | :arrow_up: |\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6721/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `86.46% <0.00%> (+2.75%)` | :arrow_up: |\n| [src/transformers/configuration\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6721/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3Q1LnB5) | `96.42% <0.00%> (+10.71%)` | :arrow_up: |\n| [src/transformers/modeling\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6721/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190NS5weQ==) | `83.83% <0.00%> (+12.21%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6721/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl90NS5weQ==) | `90.93% <0.00%> (+64.09%)` | :arrow_up: |\n| [src/transformers/modeling\\_tf\\_electra.py](https://codecov.io/gh/huggingface/transformers/pull/6721/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9lbGVjdHJhLnB5) | `98.95% <0.00%> (+73.82%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6721?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6721?src=pr&el=footer). Last update [d17cce2...cd3dbfc](https://codecov.io/gh/huggingface/transformers/pull/6721?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-03-07T13:58:40"
"2024-03-31T08:09:25"
null
NONE
null
Hi, if I want to load the dataset from local file, then how to specify the configuration name? _Originally posted by @WHU-gentle in https://github.com/huggingface/datasets/issues/2976#issuecomment-1333455222_
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6721/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/6721/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6720
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6720/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6720/comments
https://api.github.com/repos/huggingface/datasets/issues/6720/events
https://github.com/huggingface/datasets/issues/6720
2,173,603,459
I_kwDODunzps6Bjo6D
6,720
TypeError: 'str' object is not callable
{ "login": "BramVanroy", "id": 2779410, "node_id": "MDQ6VXNlcjI3Nzk0MTA=", "avatar_url": "https://avatars.githubusercontent.com/u/2779410?v=4", "gravatar_id": "", "url": "https://api.github.com/users/BramVanroy", "html_url": "https://github.com/BramVanroy", "followers_url": "https://api.github.com/users/BramVanroy/followers", "following_url": "https://api.github.com/users/BramVanroy/following{/other_user}", "gists_url": "https://api.github.com/users/BramVanroy/gists{/gist_id}", "starred_url": "https://api.github.com/users/BramVanroy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/BramVanroy/subscriptions", "organizations_url": "https://api.github.com/users/BramVanroy/orgs", "repos_url": "https://api.github.com/users/BramVanroy/repos", "events_url": "https://api.github.com/users/BramVanroy/events{/privacy}", "received_events_url": "https://api.github.com/users/BramVanroy/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "Seems wrong indeed. Would you mind fixing with a PR?", "I'm embarrassed to say I'm not super familiar with git or open source collaboration in general, so even though it seems super trivial, I'm worried I'll mess something up. ", "I can fix this but it'll be next week as I'm off tonight and tying a few other loose ends.", "Thank you! I'm in no personal rush – I got my aborted training to resume. I just wanted someone on the project to know about the problem/solution I found. " ]
"2024-03-07T11:07:09"
"2024-03-08T07:34:53"
"2024-03-07T15:13:58"
CONTRIBUTOR
null
### Describe the bug I am trying to get the HPLT datasets on the hub. Downloading/re-uploading would be too time- and resource consuming so I wrote [a dataset loader script](https://huggingface.co/datasets/BramVanroy/hplt_mono_v1_2/blob/main/hplt_mono_v1_2.py). I think I am very close but for some reason I always get the error below. It happens during the clean-up phase where the directory cannot be removed because it is not empty. My only guess would be that this may have to do with zstandard ``` Traceback (most recent call last): File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1744, in _prepare_split_single writer.write(example, key) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 492, in write self.write_examples_on_file() File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 434, in write_examples_on_file if self.schema File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 409, in schema else (pa.schema(self._features.type) if self._features is not None else None) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1643, in type return get_nested_type(self) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in get_nested_type {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in <dictcomp> {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1221, in get_nested_type value_type = get_nested_type(schema.feature) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1228, in get_nested_type return schema() TypeError: 'str' object is not callable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1753, in _prepare_split_single num_examples, num_bytes = writer.finalize() File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 588, in finalize self.write_examples_on_file() File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 434, in write_examples_on_file if self.schema File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 409, in schema else (pa.schema(self._features.type) if self._features is not None else None) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1643, in type return get_nested_type(self) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in get_nested_type {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in <dictcomp> {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1221, in get_nested_type value_type = get_nested_type(schema.feature) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1228, in get_nested_type return schema() TypeError: 'str' object is not callable The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 959, in incomplete_dir yield tmp_dir File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1005, in download_and_prepare self._download_and_prepare( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1767, in _download_and_prepare super()._download_and_prepare( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1100, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1605, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1762, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pricie/vanroy/.config/JetBrains/PyCharm2023.3/scratches/scratch_5.py", line 4, in <module> ds = load_dataset( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/load.py", line 2549, in load_dataset builder_instance.download_and_prepare( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 985, in download_and_prepare with incomplete_dir(self._output_dir) as tmp_output_dir: File "/home/pricie/vanroy/.pyenv/versions/3.10.13/lib/python3.10/contextlib.py", line 153, in __exit__ self.gen.throw(typ, value, traceback) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 966, in incomplete_dir shutil.rmtree(tmp_dir) File "/home/pricie/vanroy/.pyenv/versions/3.10.13/lib/python3.10/shutil.py", line 731, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/home/pricie/vanroy/.pyenv/versions/3.10.13/lib/python3.10/shutil.py", line 729, in rmtree os.rmdir(path) OSError: [Errno 39] Directory not empty: '/home/pricie/vanroy/.cache/huggingface/datasets/BramVanroy___hplt_mono_v1_2/ky/1.2.0/7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47.incomplete' ``` Interestingly, though, this directory _does_ appear to be empty: ```shell > cd /home/pricie/vanroy/.cache/huggingface/datasets/BramVanroy___hplt_mono_v1_2/ky/1.2.0/7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47.incomplete > ls -lah total 0 drwxr-xr-x. 1 vanroy vanroy 0 Mar 7 12:01 . drwxr-xr-x. 1 vanroy vanroy 304 Mar 7 11:52 .. > cd .. > ls 7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47_builder.lock 7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47.incomplete ``` ### Steps to reproduce the bug ```python from datasets import load_dataset ds = load_dataset( "BramVanroy/hplt_mono_v1_2", "ky", trust_remote_code=True ) ``` ### Expected behavior No error. ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.14.0-284.25.1.el9_2.x86_64-x86_64-with-glibc2.34 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.2 - PyArrow version: 14.0.1 - Pandas version: 2.1.3 - `fsspec` version: 2023.10.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6720/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/6720/timeline
null
completed
null
null
https://api.github.com/repos/huggingface/datasets/issues/6719
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6719/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6719/comments
https://api.github.com/repos/huggingface/datasets/issues/6719/events
https://github.com/huggingface/datasets/issues/6719
2,169,585,727
I_kwDODunzps6BUUA_
6,719
Is there any way to solve hanging of IterableDataset using split by node + filtering during inference
{ "login": "ssharpe42", "id": 8136905, "node_id": "MDQ6VXNlcjgxMzY5MDU=", "avatar_url": "https://avatars.githubusercontent.com/u/8136905?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ssharpe42", "html_url": "https://github.com/ssharpe42", "followers_url": "https://api.github.com/users/ssharpe42/followers", "following_url": "https://api.github.com/users/ssharpe42/following{/other_user}", "gists_url": "https://api.github.com/users/ssharpe42/gists{/gist_id}", "starred_url": "https://api.github.com/users/ssharpe42/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ssharpe42/subscriptions", "organizations_url": "https://api.github.com/users/ssharpe42/orgs", "repos_url": "https://api.github.com/users/ssharpe42/repos", "events_url": "https://api.github.com/users/ssharpe42/events{/privacy}", "received_events_url": "https://api.github.com/users/ssharpe42/received_events", "type": "User", "site_admin": false }
[]
open
false
null
[]
null
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6719?src=pr&el=h1) Report\n> Merging [#6719](https://codecov.io/gh/huggingface/transformers/pull/6719?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/625318f52516b413126be1bb1cb6818231d2eca6?el=desc) will **decrease** coverage by `0.00%`.\n> The diff coverage is `100.00%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6719/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6719?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6719 +/- ##\n==========================================\n- Coverage 79.49% 79.48% -0.01% \n==========================================\n Files 156 156 \n Lines 28405 28406 +1 \n==========================================\n- Hits 22581 22579 -2 \n- Misses 5824 5827 +3 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6719?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/6719/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19hbGJlcnQucHk=) | `83.53% <100.00%> (+0.03%)` | :arrow_up: |\n| [src/transformers/generation\\_tf\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6719/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `85.71% <0.00%> (-0.76%)` | :arrow_down: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6719?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6719?src=pr&el=footer). Last update [625318f...8f67175](https://codecov.io/gh/huggingface/transformers/pull/6719?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-03-05T15:55:13"
"2024-03-05T15:55:13"
null
NONE
null
### Describe the bug I am using an iterable dataset in a multi-node setup, trying to do training/inference while filtering the data on the fly. I usually do not use `split_dataset_by_node` but it is very slow using the IterableDatasetShard in `accelerate` and `transformers`. When I filter after applying `split_dataset_by_node`, it results in shards that are not equal sizes due to unequal samples filtered from each one. The distributed process hangs when trying to accomplish this. Is there any way to resolve this or is it impossible to implement? ### Steps to reproduce the bug Here is a toy example of what I am trying to do that reproduces the behavior ``` # torchrun --nproc-per-node 2 file.py import os import pandas as pd import torch from accelerate import Accelerator from datasets import Features, Value, load_dataset from datasets.distributed import split_dataset_by_node from torch.utils.data import DataLoader accelerator = Accelerator(device_placement=True, dispatch_batches=False) if accelerator.is_main_process: if not os.path.exists("scratch_data"): os.mkdir("scratch_data") n_shards = 4 for i in range(n_shards): df = pd.DataFrame({"id": list(range(10 * i, 10 * (i + 1)))}) df.to_parquet(f"scratch_data/shard_{i}.parquet") world_size = accelerator.num_processes local_rank = accelerator.process_index def collate_fn(examples): input_ids = [] for example in examples: input_ids.append(example["id"]) return torch.LongTensor(input_ids) dataset = load_dataset( "parquet", data_dir="scratch_data", split="train", streaming=True ) dataset = ( split_dataset_by_node(dataset, rank=local_rank, world_size=world_size) .filter(lambda x: x["id"] < 35) .shuffle(seed=42, buffer_size=100) ) batch_size = 2 train_dataloader = DataLoader( dataset, batch_size=batch_size, collate_fn=collate_fn, num_workers=2 ) for x in train_dataloader: x = x.to(accelerator.device) print({"rank": local_rank, "id": x}) y = accelerator.gather_for_metrics(x) if accelerator.is_main_process: print("gathered", y) ``` ### Expected behavior Is there any way to continue training/inference on the GPUs that have remaining data left without waiting for the others? Is it impossible to filter when ### Environment info - `datasets` version: 2.18.0 - Platform: Linux-5.10.209-198.812.amzn2.x86_64-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.21.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.6.0
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6719/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/6719/timeline
null
null
null
null
https://api.github.com/repos/huggingface/datasets/issues/6718
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6718/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6718/comments
https://api.github.com/repos/huggingface/datasets/issues/6718/events
https://github.com/huggingface/datasets/pull/6718
2,169,468,488
PR_kwDODunzps5ouwwE
6,718
Fix concurrent script loading with force_redownload
{ "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
[ "# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6718?src=pr&el=h1) Report\n> Merging [#6718](https://codecov.io/gh/huggingface/transformers/pull/6718?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/625318f52516b413126be1bb1cb6818231d2eca6?el=desc) will **decrease** coverage by `0.05%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6718/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6718?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #6718 +/- ##\n==========================================\n- Coverage 79.49% 79.43% -0.06% \n==========================================\n Files 156 156 \n Lines 28405 28405 \n==========================================\n- Hits 22581 22564 -17 \n- Misses 5824 5841 +17 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6718?src=pr&el=tree) | Coverage Ξ” | |\n|---|---|---|\n| [src/transformers/modeling\\_tf\\_electra.py](https://codecov.io/gh/huggingface/transformers/pull/6718/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9lbGVjdHJhLnB5) | `25.13% <0.00%> (-73.83%)` | :arrow_down: |\n| [src/transformers/modeling\\_tf\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6718/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9vcGVuYWkucHk=) | `22.58% <0.00%> (-72.26%)` | :arrow_down: |\n| [src/transformers/tokenization\\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6718/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fcm9iZXJ0YS5weQ==) | `87.67% <0.00%> (-10.96%)` | :arrow_down: |\n| [src/transformers/tokenization\\_utils\\_base.py](https://codecov.io/gh/huggingface/transformers/pull/6718/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfYmFzZS5weQ==) | `86.58% <0.00%> (-7.19%)` | :arrow_down: |\n| [src/transformers/modeling\\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/6718/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190NS5weQ==) | `77.63% <0.00%> (-6.21%)` | :arrow_down: |\n| [src/transformers/tokenization\\_transfo\\_xl.py](https://codecov.io/gh/huggingface/transformers/pull/6718/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdHJhbnNmb194bC5weQ==) | `38.73% <0.00%> (-3.76%)` | :arrow_down: |\n| [src/transformers/tokenization\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6718/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fb3BlbmFpLnB5) | `82.57% <0.00%> (-1.52%)` | :arrow_down: |\n| [src/transformers/tokenization\\_utils\\_fast.py](https://codecov.io/gh/huggingface/transformers/pull/6718/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfZmFzdC5weQ==) | `92.85% <0.00%> (-1.43%)` | :arrow_down: |\n| [src/transformers/modeling\\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/6718/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19vcGVuYWkucHk=) | `80.96% <0.00%> (-1.30%)` | :arrow_down: |\n| [src/transformers/modeling\\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6718/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `87.50% <0.00%> (-0.56%)` | :arrow_down: |\n| ... and [7 more](https://codecov.io/gh/huggingface/transformers/pull/6718/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6718?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6718?src=pr&el=footer). Last update [625318f...c44165d](https://codecov.io/gh/huggingface/transformers/pull/6718?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n" ]
"2024-03-05T15:04:20"
"2024-03-07T14:05:53"
"2024-03-07T13:58:04"
MEMBER
null
I added `lock_importable_file` in `get_dataset_builder_class` and `extend_dataset_builder_for_streaming` to fix the issue, and I also added a test cc @clefourrier
{ "url": "https://api.github.com/repos/huggingface/datasets/issues/6718/reactions", "total_count": 2, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 2, "eyes": 0 }
https://api.github.com/repos/huggingface/datasets/issues/6718/timeline
null
null
false
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/6718", "html_url": "https://github.com/huggingface/datasets/pull/6718", "diff_url": "https://github.com/huggingface/datasets/pull/6718.diff", "patch_url": "https://github.com/huggingface/datasets/pull/6718.patch", "merged_at": "2024-03-07T13:58:04" }