id
int64 953M
3.35B
| number
int64 2.72k
7.75k
| title
stringlengths 1
290
| state
stringclasses 2
values | created_at
timestamp[s]date 2021-07-26 12:21:17
2025-08-23 00:18:43
| updated_at
timestamp[s]date 2021-07-26 13:27:59
2025-08-23 12:34:39
| closed_at
timestamp[s]date 2021-07-26 13:27:59
2025-08-20 16:35:55
⌀ | html_url
stringlengths 49
51
| pull_request
dict | user_login
stringlengths 3
26
| is_pull_request
bool 2
classes | comments
listlengths 0
30
|
|---|---|---|---|---|---|---|---|---|---|---|---|
1,078,543,625
| 3,424
|
Add RedCaps dataset
|
closed
| 2021-12-13T13:38:13
| 2022-01-12T14:13:16
| 2022-01-12T14:13:15
|
https://github.com/huggingface/datasets/pull/3424
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3424",
"html_url": "https://github.com/huggingface/datasets/pull/3424",
"diff_url": "https://github.com/huggingface/datasets/pull/3424.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3424.patch",
"merged_at": "2022-01-12T14:13:15"
}
|
mariosasko
| true
|
[
"Cool ! If you want you can include `dataset_infos.json` but only for the main configurations. That's what we do for example for translation datasets when there are too many configs",
"@lhoestq I've added an example that uses `map` to download the images."
] |
1,078,049,638
| 3,423
|
data duplicate when setting num_works > 1 with streaming data
|
closed
| 2021-12-13T03:43:17
| 2022-12-14T16:04:22
| 2022-12-14T16:04:22
|
https://github.com/huggingface/datasets/issues/3423
| null |
cloudyuyuyu
| false
|
[
"Hi ! Thanks for reporting :)\r\n\r\nWhen using a PyTorch's data loader with `num_workers>1` and an iterable dataset, each worker streams the exact same data by default, resulting in duplicate data when iterating using the data loader.\r\n\r\nWe can probably fix this in `datasets` by checking `torch.utils.data.get_worker_info()` which gives the worker id if it happens.",
"> Hi ! Thanks for reporting :)\r\n> \r\n> When using a PyTorch's data loader with `num_workers>1` and an iterable dataset, each worker streams the exact same data by default, resulting in duplicate data when iterating using the data loader.\r\n> \r\n> We can probably fix this in `datasets` by checking `torch.utils.data.get_worker_info()` which gives the worker id if it happens.\r\nHi ! Thanks for reply\r\n\r\nDo u have some plans to fix the problem?\r\n",
"Isn’t that somehow a bug on PyTorch side? (Just asking because this behavior seems quite general and maybe not what would be intended)",
"From PyTorch's documentation [here](https://pytorch.org/docs/stable/data.html#dataset-types):\r\n\r\n> When using an IterableDataset with multi-process data loading. The same dataset object is replicated on each worker process, and thus the replicas must be configured differently to avoid duplicated data. See [IterableDataset](https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset) documentations for how to achieve this.\r\n\r\nIt looks like an intended behavior from PyTorch\r\n\r\nAs suggested in the [docstring of the IterableDataset class](https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset), we could pass a `worker_init_fn` to the DataLoader to fix this. It could be called `streaming_worker_init_fn` for example.\r\n\r\nHowever, while this solution works, I'm worried that many users simply don't know about this parameter and just start their training with duplicate data without knowing it. That's why I'm more in favor of integrating the check on the worker id directly in `datasets` in our implementation of `IterableDataset.__iter__`.",
"Fixed by https://github.com/huggingface/datasets/pull/4375",
"> Fixed by #4375\r\n\r\nThanks!",
"Hi there @lhoestq @cloudyuyuyu \r\nI met that problem recently, and #4375 is really useful because I finally found out I am training with duplicate data.\r\nHowever, in multi-GPU training, I'm using DDP mode and IterableDataset, which still yields duplicate data for each progress. And this is dangerous because users maybe not realize this behavior.",
"If the worker_info.id is unique per process it should work fine, could you check that they're unique ?\r\n\r\nThe code to get the worker_info in each worker is `torch.utils.data.get_worker_info()`",
"test.py\r\n```python\r\nimport json\r\nimport os\r\n\r\nimport torch\r\nfrom torch.utils.data import IterableDataset, DataLoader\r\nfrom transformers import PreTrainedTokenizer, TrainingArguments\r\n\r\nfrom common.arguments import DataTrainingArguments, ModelArguments\r\n\r\n\r\nclass MyIterableDataset(IterableDataset):\r\n def __iter__(self):\r\n worker_info = torch.utils.data.get_worker_info()\r\n print(worker_info)\r\n return iter(range(3))\r\n\r\n\r\nif __name__ == '__main__':\r\n dataset = MyIterableDataset()\r\n dataloader = DataLoader(dataset, num_workers=1)\r\n for i in dataloader:\r\n print(i)\r\n\r\n```\r\n\r\n\r\n```sh\r\n$ python3 -m torch.distributed.launch \\\r\n --nproc_per_node=2 test.py\r\nWorkerInfo(id=0, num_workers=1, seed=5545685212307804959, dataset=<__main__.MyIterableDataset object at 0x7f92648cf6a0>)\r\nWorkerInfo(id=0, num_workers=1, seed=3174108029709729025, dataset=<__main__.MyIterableDataset object at 0x7f19ab961670>)\r\ntensor([0])\r\ntensor([1])\r\ntensor([2])\r\ntensor([0])\r\ntensor([1])\r\ntensor([2])\r\n```\r\n\r\n@lhoestq they are not unique",
"It looks like a bug from pytorch no ? How can we know which data should go in which process when using DDP ?\r\n\r\nI guess we need to check `torch.distributed.get_world_size()` and `torch.distributed.get_rank()` as well. Not fan of the design here tbh, but that's how it is",
"> It looks like a bug from pytorch no ? How can we know which data should go in which process when using DDP ?\r\n> \r\n> I guess we need to check `torch.distributed.get_world_size()` and `torch.distributed.get_rank()` as well. Not fan of the design here tbh, but that's how it is\r\n\r\nMaybe we should document it?",
"Never mind. After reading the code, `IterableDatasetShard` has solved this problem.",
"I'm re-opening this one since I think it should be supported by `datasets` natively",
"hmm actually let me open a new issue on DDP - original post was for single node"
] |
1,078,022,619
| 3,422
|
Error about load_metric
|
closed
| 2021-12-13T02:49:51
| 2022-01-07T14:06:47
| 2022-01-07T14:06:47
|
https://github.com/huggingface/datasets/issues/3422
| null |
jiacheng-ye
| false
|
[
"Hi ! I wasn't able to reproduce your error.\r\n\r\nCan you try to clear your cache at `~/.cache/huggingface/modules` and try again ?"
] |
1,077,966,571
| 3,421
|
Adding mMARCO dataset
|
closed
| 2021-12-13T00:56:43
| 2022-10-03T09:37:15
| 2022-10-03T09:37:15
|
https://github.com/huggingface/datasets/pull/3421
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3421",
"html_url": "https://github.com/huggingface/datasets/pull/3421",
"diff_url": "https://github.com/huggingface/datasets/pull/3421.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3421.patch",
"merged_at": null
}
|
lhbonifacio
| true
|
[
"Hi @albertvillanova we've made a major overhaul of the loading script including all configurations we're making available. Could you please review it again?",
"@albertvillanova :ping_pong: ",
"Thanks @lhbonifacio for adding this dataset.\r\nHi there, i got an error about mmarco:\r\nConnectionError: Couldn't reach 'unicamp-dl/mmarco' on the Hub (ConnectionError)\r\ncode:\r\n`from datasets import list_datasets, load_dataset\r\ndataset = load_dataset('unicamp-dl/mmarco', language='portuguese')`\r\n\r\nAny help will be appreciated!",
"Hi @catqaq, we updated the loading script. Now you can load the datasets with:\r\n\r\n```python\r\ndataset = load_dataset('unicamp-dl/mmarco', 'portuguese')\r\n```\r\n\r\nYou can check the list of supported languages and usage examples in [this link](https://huggingface.co/datasets/unicamp-dl/mmarco). Feel free to contact us if you have any issues.",
"\r\n\r\n\r\n> \r\n\r\n\r\n\r\n> Hi @catqaq, we updated the loading script. Now you can load the datasets with:\r\n> \r\n> ```python\r\n> dataset = load_dataset('unicamp-dl/mmarco', 'portuguese')\r\n> ```\r\n> \r\n> You can check the list of supported languages and usage examples in [this link](https://huggingface.co/datasets/unicamp-dl/mmarco). Feel free to contact us if you have any issues.\r\n\r\nThanks for your quick updates. So, how can i get the fixed version, install from the source? It seems that the merging is blocked.",
"@catqaq you can load mMARCO using the namespace `unicamp-dl/mmarco` while this PR remains under review.",
"Thanks for your contribution, @lhbonifacio and @hugoabonizio. And sorry for the late response.\r\n\r\nWe are removing the dataset scripts from this GitHub repo and moving them to the Hugging Face Hub: https://huggingface.co/datasets\r\n\r\nAs you already created this dataset under your organization namespace (https://huggingface.co/datasets/unicamp-dl/mmarco), I think we can safely close this PR.\r\n\r\nWe would suggest you complete your dataset card with the YAML tags, to make it searchable and discoverable.\r\n\r\nPlease, feel free to tell us if you need some help."
] |
1,077,913,468
| 3,420
|
Add eli5_category dataset
|
closed
| 2021-12-12T21:30:45
| 2021-12-14T17:53:03
| 2021-12-14T17:53:02
|
https://github.com/huggingface/datasets/pull/3420
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3420",
"html_url": "https://github.com/huggingface/datasets/pull/3420",
"diff_url": "https://github.com/huggingface/datasets/pull/3420.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3420.patch",
"merged_at": "2021-12-14T17:53:02"
}
|
jingshenSN2
| true
|
[
"> Thanks a lot for adding this dataset ! Good job with the dataset card and the dataset scripts - they're really good :)\r\n> \r\n> I just added minor changes\r\n\r\nThanks for fixing typos!"
] |
1,077,350,974
| 3,419
|
`.to_json` is extremely slow after `.select`
|
open
| 2021-12-11T01:36:31
| 2021-12-21T15:49:07
| null |
https://github.com/huggingface/datasets/issues/3419
| null |
eladsegal
| false
|
[
"Hi ! It's slower indeed because a datasets on which `select`/`shard`/`train_test_split`/`shuffle` has been called has to do additional steps to retrieve the data of the dataset table in the right order.\r\n\r\nIndeed, if you call `dataset.select([0, 5, 10])`, the underlying table of the dataset is not altered to keep the examples at index 0, 5, and 10. Instead, an indices mapping is added on top of the table, that says that the first example is at index 0, the second at index 5 and the last one at index 10.\r\n\r\nTherefore accessing the examples of the dataset is slower because of the additional step that uses the indices mapping.\r\n\r\nThe step that takes the most time is to query the dataset table from a list of indices here:\r\n\r\nhttps://github.com/huggingface/datasets/blob/047dc756ed20fbf06e6bcaf910464aba0e20610a/src/datasets/formatting/formatting.py#L61-L63\r\n\r\nIn your case it can be made significantly faster by checking if the indices are contiguous. If they're contiguous, we could pass a python `slice` or `range` instead of a list of integers to `_query_table`. This way `_query_table` will do only one lookup to get the queried batch instead of `batch_size` lookups.\r\n\r\nGiven that calling `select` with contiguous indices is a common use case I'm in favor of implementing such an optimization :)\r\nLet me know what you think",
"Hi, thanks for the response!\r\nI still don't understand why it is so much slower than iterating and saving:\r\n```python\r\nfrom datasets import load_dataset\r\n\r\noriginal = load_dataset(\"squad\", split=\"train\")\r\noriginal.to_json(\"from_original.json\") # Takes 0 seconds\r\n\r\nselected_subset1 = original.select([i for i in range(len(original))])\r\nselected_subset1.to_json(\"from_select1.json\") # Takes 99 seconds\r\n\r\nselected_subset2 = original.select([i for i in range(int(len(original) / 2))])\r\nselected_subset2.to_json(\"from_select2.json\") # Takes 47 seconds\r\n\r\nselected_subset3 = original.select([i for i in range(len(original)) if i % 2 == 0])\r\nselected_subset3.to_json(\"from_select3.json\") # Takes 49 seconds\r\n\r\nimport json\r\nimport time\r\ndef fast_to_json(dataset, path):\r\n start = time.time()\r\n with open(path, mode=\"w\") as f:\r\n for example in dataset:\r\n f.write(json.dumps(example, separators=(',', ':')) + \"\\n\")\r\n end = time.time()\r\n print(f\"Saved {len(dataset)} examples to {path} in {end - start} seconds.\")\r\n\r\nfast_to_json(original, \"from_original_fast.json\")\r\nfast_to_json(selected_subset1, \"from_select1_fast.json\")\r\nfast_to_json(selected_subset2, \"from_select2_fast.json\")\r\nfast_to_json(selected_subset3, \"from_select3_fast.json\")\r\n```\r\n```\r\nSaved 87599 examples to from_original_fast.json in 8 seconds.\r\nSaved 87599 examples to from_select1_fast.json in 10 seconds.\r\nSaved 43799 examples to from_select2_fast.json in 6 seconds.\r\nSaved 43800 examples to from_select3_fast.json in 5 seconds.\r\n```",
"There are slight differences between what you're doing and what `to_json` is actually doing.\r\nIn particular `to_json` currently converts batches of rows (as an arrow table) to a pandas dataframe, and then to JSON Lines. From your benchmark it looks like it's faster if we don't use pandas.\r\n\r\nThanks for investigating, I think we can optimize `to_json` significantly thanks to your test.",
"Thanks for your observations, @eladsegal! I spent some time with this and tried different approaches. Turns out that https://github.com/huggingface/datasets/blob/bb13373637b1acc55f8a468a8927a56cf4732230/src/datasets/io/json.py#L100 is giving the problem when we use `to_json` after `select`. This is when `indices` parameter in `query_table` is not `None` (if it is `None` then `to_json` should work as expected)\r\n\r\nIn order to circumvent this problem, I found out instead of doing Arrow Table -> Pandas-> JSON we can directly go to JSON by using `to_pydict()` which is a little slower than the current approach but at least `select` works properly now. Lmk what you guys think of it @lhoestq, @eladsegal?",
"Sounds good to me ! Feel free to also share your benchmarks for reference @bhavitvyamalik ",
"Posting it in @eladsegal's format:\r\n\r\nFor `squad`:\r\nSaving examples using current `to_json` in 3.63 secs\r\nSaving examples to `from_select1_fast.json` in 5.00 secs\r\nSaving examples to `from_select2_fast.json` in 2.45 secs\r\nSaving examples to `from_select3_fast.json` in 2.50 secs\r\n\r\nFor `squad_v2`:\r\nSaving examples using current `to_json` in 5.26 secs\r\nSaving examples to `from_select1_fast.json` in 7.54 secs\r\nSaving examples to `from_select2_fast.json` in 3.80 secs\r\nSaving examples to `from_select3_fast.json` in 3.67 secs"
] |
1,077,053,296
| 3,418
|
Add Wikisource dataset
|
closed
| 2021-12-10T17:04:44
| 2022-10-04T09:35:56
| 2022-10-03T09:37:20
|
https://github.com/huggingface/datasets/pull/3418
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3418",
"html_url": "https://github.com/huggingface/datasets/pull/3418",
"diff_url": "https://github.com/huggingface/datasets/pull/3418.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3418.patch",
"merged_at": null
}
|
albertvillanova
| true
|
[
"As we are removing the dataset scripts from GitHub and moving them to the Hugging Face Hub, I am going to transfer this script to the repo: https://huggingface.co/datasets/wikimedia/wikisource"
] |
1,076,943,343
| 3,417
|
Fix type of bridge field in QED
|
closed
| 2021-12-10T15:07:21
| 2021-12-14T14:39:06
| 2021-12-14T14:39:05
|
https://github.com/huggingface/datasets/pull/3417
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3417",
"html_url": "https://github.com/huggingface/datasets/pull/3417",
"diff_url": "https://github.com/huggingface/datasets/pull/3417.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3417.patch",
"merged_at": "2021-12-14T14:39:05"
}
|
mariosasko
| true
|
[] |
1,076,868,771
| 3,416
|
disaster_response_messages unavailable
|
closed
| 2021-12-10T13:49:17
| 2021-12-14T14:38:29
| 2021-12-14T14:38:29
|
https://github.com/huggingface/datasets/issues/3416
| null |
sacdallago
| false
|
[
"Hi, thanks for reporting! This is a duplicate of https://github.com/huggingface/datasets/issues/3240. We are working on a fix.\r\n\r\n"
] |
1,076,472,534
| 3,415
|
Non-deterministic tests: CI tests randomly fail
|
closed
| 2021-12-10T06:08:59
| 2022-03-31T16:38:51
| 2022-03-31T16:38:51
|
https://github.com/huggingface/datasets/issues/3415
| null |
albertvillanova
| false
|
[
"I think it might come from two different issues:\r\n1. Google Drive is an unreliable host, mainly because of quota limitations\r\n2. the staging environment can sometimes raise some errors\r\n\r\nFor Google Drive tests we could set up some retries with backup URLs if necessary I guess.\r\nFor staging on the other hand, I guess we can investigate what causes this and discuss with the back-end team",
"Closed by:\r\n- #3982"
] |
1,076,028,998
| 3,414
|
Skip None encoding (line deleted by accident in #3195)
|
closed
| 2021-12-09T21:17:33
| 2021-12-10T11:00:03
| 2021-12-10T11:00:02
|
https://github.com/huggingface/datasets/pull/3414
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3414",
"html_url": "https://github.com/huggingface/datasets/pull/3414",
"diff_url": "https://github.com/huggingface/datasets/pull/3414.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3414.patch",
"merged_at": "2021-12-10T11:00:02"
}
|
mariosasko
| true
|
[] |
1,075,854,325
| 3,413
|
Add WIDER FACE dataset
|
closed
| 2021-12-09T18:03:38
| 2022-01-12T14:13:47
| 2022-01-12T14:13:47
|
https://github.com/huggingface/datasets/pull/3413
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3413",
"html_url": "https://github.com/huggingface/datasets/pull/3413",
"diff_url": "https://github.com/huggingface/datasets/pull/3413.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3413.patch",
"merged_at": "2022-01-12T14:13:47"
}
|
mariosasko
| true
|
[] |
1,075,846,368
| 3,412
|
Fix flaky test again for s3 serialization
|
closed
| 2021-12-09T17:54:41
| 2021-12-09T18:00:52
| 2021-12-09T18:00:52
|
https://github.com/huggingface/datasets/pull/3412
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3412",
"html_url": "https://github.com/huggingface/datasets/pull/3412",
"diff_url": "https://github.com/huggingface/datasets/pull/3412.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3412.patch",
"merged_at": "2021-12-09T18:00:52"
}
|
lhoestq
| true
|
[] |
1,075,846,272
| 3,411
|
[chinese wwm] load_datasets behavior not as expected when using run_mlm_wwm.py script
|
open
| 2021-12-09T17:54:35
| 2021-12-22T11:21:33
| null |
https://github.com/huggingface/datasets/issues/3411
| null |
hyusterr
| false
|
[
"@LysandreJik not so sure who to @\r\nCould you help?",
"Hi @hyusterr, I believe it is @wlhgtc from https://github.com/huggingface/transformers/pull/9887"
] |
1,075,815,415
| 3,410
|
Fix dependencies conflicts in Windows CI after conda update to 4.11
|
closed
| 2021-12-09T17:19:11
| 2021-12-09T17:36:20
| 2021-12-09T17:36:19
|
https://github.com/huggingface/datasets/pull/3410
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3410",
"html_url": "https://github.com/huggingface/datasets/pull/3410",
"diff_url": "https://github.com/huggingface/datasets/pull/3410.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3410.patch",
"merged_at": "2021-12-09T17:36:19"
}
|
lhoestq
| true
|
[] |
1,075,684,593
| 3,409
|
Pass new_fingerprint in multiprocessing
|
closed
| 2021-12-09T15:12:00
| 2022-08-19T10:41:04
| 2021-12-09T17:38:43
|
https://github.com/huggingface/datasets/pull/3409
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3409",
"html_url": "https://github.com/huggingface/datasets/pull/3409",
"diff_url": "https://github.com/huggingface/datasets/pull/3409.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3409.patch",
"merged_at": "2021-12-09T17:38:43"
}
|
lhoestq
| true
|
[
"@lhoestq Hi~, does this support that `datasets.map(func, batched=True, batch_size, num_proc>1, new_fingerprint=\"func_v1\")` even if `func` can't pickle. I also notice that you said \"Unfortunately you need picklable mapping functions to make multiprocessing work :confused: Also feel free to open an issue or send me a dm if you are in a situation where the caching fails. I can help you with that :slight_smile:\" in [here](https://discuss.huggingface.co/t/how-to-deal-with-unpickable-objects-in-map/1547/8). So, I want to ask that is there a way for users to use multiprocessing in `datasets.map` when the `func` can't pickle? \r\nThanks in advance!",
"Yea you need your function to be picklable for multiprocessing, otherwise the main process is not able to pass your function to the child processes."
] |
1,075,642,915
| 3,408
|
Typo in Dataset viewer error message
|
closed
| 2021-12-09T14:34:02
| 2021-12-22T11:02:53
| 2021-12-22T11:02:53
|
https://github.com/huggingface/datasets/issues/3408
| null |
lewtun
| false
|
[
"Fixed, thanks\r\n<img width=\"661\" alt=\"Capture d’écran 2021-12-22 à 12 02 30\" src=\"https://user-images.githubusercontent.com/1676121/147082881-cf700e8d-0511-4431-b214-d6cf8137db10.png\">\r\n"
] |
1,074,502,225
| 3,407
|
Use max number of data files to infer module
|
closed
| 2021-12-08T14:58:43
| 2021-12-14T17:08:42
| 2021-12-14T17:08:42
|
https://github.com/huggingface/datasets/pull/3407
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3407",
"html_url": "https://github.com/huggingface/datasets/pull/3407",
"diff_url": "https://github.com/huggingface/datasets/pull/3407.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3407.patch",
"merged_at": "2021-12-14T17:08:41"
}
|
albertvillanova
| true
|
[
"Cool thanks :) Feel free to merge if it's all good for you"
] |
1,074,366,050
| 3,406
|
Fix module inference for archive with a directory
|
closed
| 2021-12-08T12:39:12
| 2021-12-08T13:03:30
| 2021-12-08T13:03:29
|
https://github.com/huggingface/datasets/pull/3406
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3406",
"html_url": "https://github.com/huggingface/datasets/pull/3406",
"diff_url": "https://github.com/huggingface/datasets/pull/3406.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3406.patch",
"merged_at": "2021-12-08T13:03:28"
}
|
albertvillanova
| true
|
[] |
1,074,360,362
| 3,405
|
ZIP format inference does not work when files located in a dir inside the archive
|
closed
| 2021-12-08T12:32:15
| 2021-12-08T13:03:29
| 2021-12-08T13:03:29
|
https://github.com/huggingface/datasets/issues/3405
| null |
albertvillanova
| false
|
[] |
1,073,657,561
| 3,404
|
Optimize ZIP format inference
|
closed
| 2021-12-07T18:44:49
| 2021-12-14T17:08:41
| 2021-12-14T17:08:41
|
https://github.com/huggingface/datasets/issues/3404
| null |
albertvillanova
| false
|
[] |
1,073,622,120
| 3,403
|
Cannot import name 'maybe_sync'
|
closed
| 2021-12-07T17:57:59
| 2021-12-17T07:00:35
| 2021-12-17T07:00:35
|
https://github.com/huggingface/datasets/issues/3403
| null |
KMFODA
| false
|
[
"Hi ! Can you try updating `fsspec` ? The minimum version is `2021.05.0`",
"hey @lhoestq. I'm using `fsspec-2021.11.1` but still getting that error.",
"Maybe this discussion can help:\r\n\r\nhttps://github.com/fsspec/filesystem_spec/issues/597#issuecomment-958646964",
"Thanks @lhoestq. Downgrading `fsspec and s3fs` to `2021.10` fixed this issue!"
] |
1,073,614,815
| 3,402
|
More robust first elem check in encode/cast example
|
closed
| 2021-12-07T17:48:16
| 2021-12-08T13:02:16
| 2021-12-08T13:02:15
|
https://github.com/huggingface/datasets/pull/3402
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3402",
"html_url": "https://github.com/huggingface/datasets/pull/3402",
"diff_url": "https://github.com/huggingface/datasets/pull/3402.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3402.patch",
"merged_at": "2021-12-08T13:02:15"
}
|
mariosasko
| true
|
[] |
1,073,603,508
| 3,401
|
Add Wikimedia pre-processed datasets
|
closed
| 2021-12-07T17:33:19
| 2024-10-09T16:10:47
| 2024-10-09T16:10:47
|
https://github.com/huggingface/datasets/issues/3401
| null |
albertvillanova
| false
|
[
"As we are planning to stop using Apache Beam (our `datasets.BeamBasedBuilder`) for the generation of some datasets (including [Wikipedia](https://huggingface.co/datasets/wikipedia/blob/main/wikipedia.py)), I have been working on [wikimedia/wikipedia](https://huggingface.co/datasets/wikimedia/wikipedia) to:\r\n- Port the Wikipedia generation script to use `datasets.GeneratorBasedBuilder` instead and place it under the \"script\" branch: https://huggingface.co/datasets/wikimedia/wikipedia/tree/script\r\n- Improve the efficiency of the code and make it highly parellizable. See:\r\n - [Parallelize dataset generation over multistreams](https://huggingface.co/datasets/wikimedia/wikipedia/commit/610c55864586dbdad7ac5a13c21a367bb000a1d3)\r\n - [Parallelize data downloading](https://huggingface.co/datasets/wikimedia/wikipedia/commit/b35d406bd9e81f08c68e7bf95d130d2f506dfe77)\r\n\r\n With these improvements, I can generate the English Wikipedia in 5h using 16 processors in a machine without needing a huge amount of RAM (the machine had 32 GB, but I think less can be used as well):\r\n ```python\r\n ds = load_dataset(\"wikimedia/wikipedia\", revision=\"script\", date=\"20231101\", language=\"en\", host=\"https://mirror.accum.se/mirror/wikimedia.org/dumps\", split=\"train\", num_proc=16)\r\n ```\r\n- Pre-process all Wikipedia languages for the latest 2023-11-01 dump and make them available to the entire community for easy use:\r\n ```python\r\n ds = load_dataset(\"wikimedia/wikipedia\", \"20231101.en\", split=\"train\", num_proc=16)\r\n ```\r\nCC: @geohci "
] |
1,073,600,382
| 3,400
|
Improve Wikipedia loading script
|
closed
| 2021-12-07T17:29:25
| 2022-03-22T16:52:28
| 2022-03-22T16:52:28
|
https://github.com/huggingface/datasets/issues/3400
| null |
albertvillanova
| false
|
[
"Thanks! See https://public.paws.wmcloud.org/User:Isaac_(WMF)/HuggingFace%20Wikipedia%20Processing.ipynb for more implementation details / some data around the overhead induced by adding the extra preprocessing steps (stripping link prefixes and magic words)",
"Closed by:\r\n- #3435"
] |
1,073,593,861
| 3,399
|
Add Wikisource dataset
|
closed
| 2021-12-07T17:21:31
| 2024-10-09T16:11:27
| 2024-10-09T16:11:26
|
https://github.com/huggingface/datasets/issues/3399
| null |
albertvillanova
| false
|
[
"See notebook by @geohci: https://public.paws.wmcloud.org/User:Isaac_(WMF)/HuggingFace%20Wikisource%20Processing.ipynb",
"See: https://huggingface.co/datasets/wikimedia/wikisource"
] |
1,073,590,384
| 3,398
|
Add URL field to Wikimedia dataset instances: wikipedia,...
|
closed
| 2021-12-07T17:17:27
| 2022-03-22T16:53:27
| 2022-03-22T16:53:27
|
https://github.com/huggingface/datasets/issues/3398
| null |
albertvillanova
| false
|
[
"@geohci, I think the field \"url\" does not appear in the Wikimedia dumps. Therefore I guess we should generate it, using the \"title\" field and making some transformation of it (replacing spaces with underscores) and prepending the domain (created using the language)?",
"Indeed:\r\n\r\n> To re-distribute text on Wikipedia in any form, provide credit to the authors either by including a) a [hyperlink](https://en.wikipedia.org/wiki/Hyperlink) (where possible) or [URL](https://en.wikipedia.org/wiki/URL) to the page or pages you are re-using, b) a hyperlink (where possible) or URL to an alternative, stable online copy which is freely accessible, which conforms with the license, and which provides credit to the authors in a manner equivalent to the credit given on this website, or c) a list of all authors. (Any list of authors may be filtered to exclude very small or irrelevant contributions.) This applies to text developed by the Wikipedia community. Text from external sources may attach additional attribution requirements to the work, which should be indicated on an article's face or on its talk page. For example, a page may have a banner or other notation indicating that some or all of its content was originally published somewhere else. Where such notations are visible in the page itself, they should generally be preserved by re-users.\r\n\r\nsource: https://en.wikipedia.org/wiki/Wikipedia:Copyrights\r\n\r\nI guess it's fine to add the URL field - it can be constructed easily from the title page IIRC.",
"yep, sorry forgot that that wasn't already in the dumps. specifically `f\"https://{language}.wikipedia.org/wiki/{title.replace(' ', '_')}` should do it",
"Thanks @geohci.\r\n\r\nI had already been looking for information about the conversion from title to URL and I found that apart from replacing blanks with underscores, some other special character must also be percent-encoded (e.g. `\"` to `%22`): https://meta.wikimedia.org/wiki/Help:URL\r\n\r\nTherefore, I have finally used `urllib.parse.quote` function. This additionally percent-encodes non-ASCII characters, but Wikimedia docs say these are equivalent:\r\n> For the other characters either the code or the character can be used in internal and external links, they are equivalent. The system does a conversion when needed.\r\n> [[%C3%80_propos_de_M%C3%A9ta]]\r\n> is rendered as [À_propos_de_Méta](https://meta.wikimedia.org/wiki/%C3%80_propos_de_M%C3%A9ta), almost like [À propos de Méta](https://meta.wikimedia.org/wiki/%C3%80_propos_de_M%C3%A9ta), which leads to this page on Meta with in the address bar the URL\r\n> [http://meta.wikipedia.org/wiki/%C3%80_propos_de_M%C3%A9ta](https://meta.wikipedia.org/wiki/%C3%80_propos_de_M%C3%A9ta)\r\n> while [http://meta.wikipedia.org/wiki/À_propos_de_Méta](https://meta.wikipedia.org/wiki/%C3%80_propos_de_M%C3%A9ta) leads to the same. ",
"Closed by:\r\n- #3789 "
] |
1,073,502,444
| 3,397
|
add BNL newspapers
|
closed
| 2021-12-07T15:43:21
| 2022-01-17T18:35:34
| 2022-01-17T18:35:34
|
https://github.com/huggingface/datasets/pull/3397
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3397",
"html_url": "https://github.com/huggingface/datasets/pull/3397",
"diff_url": "https://github.com/huggingface/datasets/pull/3397.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3397.patch",
"merged_at": "2022-01-17T18:35:34"
}
|
davanstrien
| true
|
[
"\r\n> Also, maybe calling the dataset as \"bnl_historical_newspapers\" and setting \"processed\" as one configuration name?\r\n\r\nThis sounds like a good idea but my only question around this is how easy it would be to use the same approach for processing the other newspaper collections [https://data.bnl.lu/data/historical-newspapers/](). \r\n\r\nFor example, the \"BIG DATA PACK\" is `257GB` of ALTO XML. This format is slightly more annoying to process because the metadata and text are contained in different files but the bigger issue might be that processing this XML using the Python XML libraries will probably be quite slow? I had thought for those larger datasets it might be more appropriate to use the Beam datasets? I don't have any experience using Beam so I'm not sure what that would involve and there is a reason to not include it in a dataset script alongside a non Beam dataset? \r\n\r\nIf there isn't an issue with potentially later adding other datasets (which may require Beam) into the same script I'll add one config for the processed version now which leaves open the option for later adding the other datasets. If this makes sense I'll also change the name as you suggest. \r\n\r\nThere is another dataset that could be a good candidate for inclusion here is the \"Monograph Text pack\" which is also processed into a simpler XML format however as the name suggests this isn't newspapers so might be confusing to include under a 'newspapers' script. One option would be to put everything under a `BNL` collection but it might be better to keep the monographs separate if they are added as a dataset so a single script doesn't end up including too much variety of content types? \r\n\r\n\r\n\r\n",
"> My initial idea was to contribute the script also as \"community\" datasets (instead of canonical), i.e. in this case, pushing the script to the repo [huggingface.co/datasets/bigscience-catalogue-data/bnl_historical_newspapers](https://huggingface.co/datasets/bigscience-catalogue-data/bnl_historical_newspapers)\r\n\r\nSorry to respond to this late - happy for this to go in the community datasets. I think it would be nice to include in the canonical datasets at some point but since there is less urgency with this I could try and first work on improving the Datacard before doing that (i.e. make this a draft PR) - let me know if you think that makes more sense? \r\n\r\n\r\n",
"> My initial idea was to contribute the script also as \"community\" datasets (instead of canonical), i.e. in this case, pushing the script to the repo https://huggingface.co/datasets/bigscience-catalogue-data/bnl_historical_newspapers\r\n> One of the advantages is that no dummy data is required, so the addition can be made faster\r\n> On the other hand, one disadvantage is that contributions cannot be made through PRs\r\n> Therefore, we should use the Issue page for discussions, reviews, decisions,...\r\n\r\nSure we can use the issues to discuss/review community datasets. Maybe let's have an issue template for that ?\r\nFor this dataset in particular I'll let @albertvillanova decide whether it's best as community dataset or not. IMO both are fine :)\r\n\r\n> I had thought for those larger datasets it might be more appropriate to use the Beam datasets? I don't have any experience using Beam so I'm not sure what that would involve and there is a reason to not include it in a dataset script alongside a non Beam dataset?\r\n\r\nBeam is nice to process a dataset once and for all and store the resulting processed data on the Hugging Face Hub or elsewhere. However for big datasets it must run on a distributed processing runtime like Google DataFlow, which is often inconvenient for many users. We've been using it though for datasets like Wikipedia and sharing the processed data in a GCS bucket.\r\n\r\nSo feel free to use the tools you like to process the datasets, but in the end I think we just need to host the processed data in a convenient format on the Hugging Face Hub to share it with the community. The processing script you used can also be shared with the community for reproducibility and documentation. But maybe @albertvillanova already has something in mind",
"> > My initial idea was to contribute the script also as \"community\" datasets (instead of canonical), i.e. in this case, pushing the script to the repo [huggingface.co/datasets/bigscience-catalogue-data/bnl_historical_newspapers](https://huggingface.co/datasets/bigscience-catalogue-data/bnl_historical_newspapers)\r\n> > One of the advantages is that no dummy data is required, so the addition can be made faster\r\n> > On the other hand, one disadvantage is that contributions cannot be made through PRs\r\n> > Therefore, we should use the Issue page for discussions, reviews, decisions,...\r\n> \r\n> Sure we can use the issues to discuss/review community datasets. Maybe let's have an issue template for that ? For this dataset in particular I'll let @albertvillanova decide whether it's best as community dataset or not. IMO both are fine :)\r\n\r\nThanks, I'll hold off and let @albertvillanova decide best place for this. \r\n\r\n> > I had thought for those larger datasets it might be more appropriate to use the Beam datasets? I don't have any experience using Beam so I'm not sure what that would involve and there is a reason to not include it in a dataset script alongside a non Beam dataset?\r\n> \r\n> Beam is nice to process a dataset once and for all and store the resulting processed data on the Hugging Face Hub or elsewhere. However for big datasets it must run on a distributed processing runtime like Google DataFlow, which is often inconvenient for many users. We've been using it though for datasets like Wikipedia and sharing the processed data in a GCS bucket.\r\n> \r\n> So feel free to use the tools you like to process the datasets, but in the end I think we just need to host the processed data in a convenient format on the Hugging Face Hub to share it with the community. The processing script you used can also be shared with the community for reproducibility and documentation. But maybe @albertvillanova already has something in mind\r\n\r\nThat's useful, my own 2 cents are that it would make sense to do as @albertvillanova suggested and:-\r\n\r\n- rename the dataset to 'bnl_newspapers' \r\n- make the 'processed dataset' a config \r\n\r\nI won't try and include all the other datasets now but this leaves open the option of adding those later. The actual ALTO processing should be okay to do but I think it makes sense to do this as a one-off process and make the plain text + some associated metadata available elsewere so the dataset script can be kept simple and the processing doesn't get done multiple times. \r\n\r\n@albertvillanova if that sounds okay I'll update pull request to include those changes. \r\n",
"@albertvillanova I've now created a config (currently with only one option) and renamed the dataset. This should keep the option to add other configs based on different bnl newspapers in the future. \r\n",
"@mariosasko thanks for those suggestions ",
"I just merged `master` into your branch to fix the CI :)",
"@albertvillanova do you have additional comments ? Otherwise I think this PR is ready to merge :)",
"> @davanstrien you did an awsome job!!! Thanks a lot!\r\n> \r\n> Just some very minor comments (mainly about the README documentation), and we merge this to master!\r\n\r\nThanks! Hopefully all addressed now. Thanks again for all the support with this pull request! "
] |
1,073,467,183
| 3,396
|
Install Audio dependencies to support audio decoding
|
closed
| 2021-12-07T15:11:36
| 2022-04-25T16:12:22
| 2022-04-25T16:12:01
|
https://github.com/huggingface/datasets/issues/3396
| null |
albertvillanova
| false
|
[
"https://huggingface.co/datasets/projecte-aina/parlament_parla -> works (but we still have to show an audio player)\r\n\r\nhttps://huggingface.co/datasets/openslr -> another issue: `Message: [Errno 2] No such file or directory: '/home/hf/datasets-preview-backend/zip:/asr_javanese/data/00/00004fe6aa.flac'`",
"Done",
"https://huggingface.co/datasets/projecte-aina/parlament_parla/viewer/clean/train works\r\n\r\n<img width=\"1535\" alt=\"Capture d’écran 2022-04-12 à 13 58 47\" src=\"https://user-images.githubusercontent.com/1676121/162957855-cb3d9e2e-4b61-488c-99ca-8065cd8fe377.png\">\r\n",
"But https://huggingface.co/datasets/openslr/viewer does not work\r\n\r\n<img width=\"678\" alt=\"Capture d’écran 2022-04-12 à 13 59 46\" src=\"https://user-images.githubusercontent.com/1676121/162958013-e31ef2ae-f886-47b7-9f27-664ed3d4b5a1.png\">\r\n\r\nSame issue as #4126:\r\n\r\n```\r\nStatus code: 400\r\nException: TypeError\r\nMessage: __init__() got an unexpected keyword argument 'audio_column'\r\n```",
"Fixed:\r\n<img width=\"1561\" alt=\"Capture d’écran 2022-04-25 à 18 11 51\" src=\"https://user-images.githubusercontent.com/1676121/165129813-018ece9e-8b20-4544-844d-4e88148e738f.png\">\r\n"
] |
1,073,432,650
| 3,395
|
Fix formatting in IterableDataset.map docs
|
closed
| 2021-12-07T14:41:01
| 2021-12-08T10:11:33
| 2021-12-08T10:11:33
|
https://github.com/huggingface/datasets/pull/3395
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3395",
"html_url": "https://github.com/huggingface/datasets/pull/3395",
"diff_url": "https://github.com/huggingface/datasets/pull/3395.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3395.patch",
"merged_at": "2021-12-08T10:11:32"
}
|
mariosasko
| true
|
[] |
1,073,396,308
| 3,394
|
Preserve all feature types when saving a dataset on the Hub with `push_to_hub`
|
closed
| 2021-12-07T14:08:30
| 2021-12-21T17:00:09
| 2021-12-21T17:00:09
|
https://github.com/huggingface/datasets/issues/3394
| null |
mariosasko
| false
|
[
"According to this [comment in the forum](https://discuss.huggingface.co/t/save-datasetdict-to-huggingface-hub/12075/8?u=lhoestq), using `push_to_hub` on a dataset with `ClassLabel` can also make the feature simply disappear when it's reloaded !",
"Maybe we can also fix https://github.com/huggingface/datasets/issues/3035 while working on this because, as pointed out in my initial post, `save_to_disk` also saves the `dataset_info.json` file."
] |
1,073,189,777
| 3,393
|
Common Voice Belarusian Dataset
|
open
| 2021-12-07T10:37:02
| 2021-12-09T15:56:03
| null |
https://github.com/huggingface/datasets/issues/3393
| null |
wiedymi
| false
|
[] |
1,073,073,408
| 3,392
|
Dataset viewer issue for `dansbecker/hackernews_hiring_posts`
|
closed
| 2021-12-07T08:41:01
| 2021-12-07T14:04:28
| 2021-12-07T14:04:28
|
https://github.com/huggingface/datasets/issues/3392
| null |
severo
| false
|
[
"This issue was fixed by me calling `all_datasets.push_to_hub(\"hackernews_hiring_posts\")`.\r\n\r\nThe previous problems were from calling `all_datasets.save_to_disk` and then pushing with `my_repo.git_add` and `my_repo.push_to_hub`.\r\n"
] |
1,072,849,055
| 3,391
|
method to select columns
|
closed
| 2021-12-07T02:44:19
| 2021-12-07T02:45:27
| 2021-12-07T02:45:27
|
https://github.com/huggingface/datasets/issues/3391
| null |
changjonathanc
| false
|
[
"duplicate of #2655"
] |
1,072,462,456
| 3,390
|
Loading dataset throws "KeyError: 'Field "builder_name" does not exist in table schema'"
|
closed
| 2021-12-06T18:22:49
| 2021-12-06T20:22:05
| 2021-12-06T20:22:05
|
https://github.com/huggingface/datasets/issues/3390
| null |
R4ZZ3
| false
|
[
"Got solved it with push_to_hub, closing"
] |
1,072,191,865
| 3,389
|
Add EDGAR
|
open
| 2021-12-06T14:06:11
| 2022-10-05T10:40:22
| null |
https://github.com/huggingface/datasets/issues/3389
| null |
philschmid
| false
|
[
"cc @juliensimon ",
"Datasets are not tracked in this repository anymore. But you can make your own dataset in the huggingface hub"
] |
1,072,022,021
| 3,388
|
Fix flaky test of the temporary directory used by load_from_disk
|
closed
| 2021-12-06T11:09:31
| 2021-12-06T11:25:03
| 2021-12-06T11:24:49
|
https://github.com/huggingface/datasets/pull/3388
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3388",
"html_url": "https://github.com/huggingface/datasets/pull/3388",
"diff_url": "https://github.com/huggingface/datasets/pull/3388.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3388.patch",
"merged_at": "2021-12-06T11:24:49"
}
|
lhoestq
| true
|
[
"CI failed because of a server error - merging"
] |
1,071,836,456
| 3,387
|
Create Language Modeling task
|
closed
| 2021-12-06T07:56:07
| 2021-12-17T17:18:28
| 2021-12-17T17:18:27
|
https://github.com/huggingface/datasets/pull/3387
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3387",
"html_url": "https://github.com/huggingface/datasets/pull/3387",
"diff_url": "https://github.com/huggingface/datasets/pull/3387.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3387.patch",
"merged_at": "2021-12-17T17:18:27"
}
|
albertvillanova
| true
|
[] |
1,071,813,141
| 3,386
|
Fix typos in dataset cards
|
closed
| 2021-12-06T07:20:40
| 2021-12-06T09:30:55
| 2021-12-06T09:30:54
|
https://github.com/huggingface/datasets/pull/3386
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3386",
"html_url": "https://github.com/huggingface/datasets/pull/3386",
"diff_url": "https://github.com/huggingface/datasets/pull/3386.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3386.patch",
"merged_at": "2021-12-06T09:30:54"
}
|
albertvillanova
| true
|
[] |
1,071,742,310
| 3,385
|
None batched `with_transform`, `set_transform`
|
open
| 2021-12-06T05:20:54
| 2022-01-17T15:25:01
| null |
https://github.com/huggingface/datasets/issues/3385
| null |
changjonathanc
| false
|
[
"Hi ! Thanks for the suggestion :)\r\nIt makes sense to me, and it can surely be implemented by wrapping the user's function to make it a batched function. However I'm not a big fan of the inconsistency it would create with `map`: `with_transform` is batched by default while `map` isn't.\r\n\r\nIs there something you would like to contribute ? I can give you some pointers if you want",
"Hi @lhoestq ,\r\nSorry I missed your reply.\r\n\r\nI would love to contribute. But I don't know which solution would be the best for this repo.\r\n\r\n> However I'm not a big fan of the inconsistency it would create with map: with_transform is batched by default while map isn't.\r\n\r\nI agree. What do you think about the alternative solutions?\r\n\r\n> * Convert a non-batched transform function to batched one myself.\r\n\r\nThis won't be able to use torch loader multi-worker.\r\n\r\n> * Wrap a 🤗 Dataset with torch Dataset, and add a __getitem__. 🙄\r\n\r\nThis is actually pretty simple.\r\n\r\n```python\r\nimport torch\r\n\r\nclass LazyMapTorchDataset(torch.utils.data.Dataset):\r\n def __init__(self, ds, fn):\r\n self.ds = ds\r\n self.fn = fn\r\n def __getitem__(self, i):\r\n return self.fn(self.ds[i])\r\n\r\nd = [{1:2, 2:3}, {1:3, 2:4}]\r\nds = LazyMapTorchDataset(d, lambda x:{k:v*2 for k,v in x.items()})\r\nfor i in range(2):\r\n print(f'before {d[i]}')\r\n print(f'after {ds[i]}')\r\n```\r\n```\r\nbefore {1: 2, 2: 3}\r\nafter {1: 4, 2: 6}\r\nbefore {1: 3, 2: 4}\r\nafter {1: 6, 2: 8}\r\n```\r\n\r\nBut this requires converting data to torch tensor myself. And this is really similar to `.map()`, why not just use it? So I have the next solution.\r\n\r\n> * Have lazy=False in Dataset.map, and returns a LazyDataset if lazy=True. This way the same map interface can be used, and existing code can be updated with one argument change.\r\n\r\nI think I like this solution best. Because `.with_transform` is entangled with `.with_format`, so seems more flexible to modify the `.map` than to modify `.with_transform`.\r\n\r\nThe usage looks nice, too.\r\n```python\r\n# lazy, one to one, can be parallelized via torch loader, no need to set `num_worker` beforehand.\r\ndataset = dataset.map(fn, lazy=True, batched=False)\r\n# collate_fn\r\ndataloader = Dataloader(dataset.with_format('torch'), collate_fn=collate_fn, num_workers=...) \r\n```\r\n\r\nThere are some minor decisions like whether a lazy map should be allowed before another map, but I think we can work it out later. The implementation can probably borrow from `IterableDataset`.",
"I like the idea of lazy map. On the other hand we should only have either lazy map or `with_transform` (not both). That's why I'd rather stick with `with_transform` for now (but maybe we can consider it for later major releases like `datasets` v2).\r\n\r\nI understand the issue with `with_transform` and `with_format` being exclusive, maybe we can separate them: first transform, them format.\r\n\r\nFinally I think what's also going to be important in the end will be the addition of multiprocessing to transforms"
] |
1,071,594,165
| 3,384
|
Adding mMARCO dataset
|
closed
| 2021-12-05T23:59:11
| 2021-12-12T15:27:36
| 2021-12-12T15:27:36
|
https://github.com/huggingface/datasets/pull/3384
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3384",
"html_url": "https://github.com/huggingface/datasets/pull/3384",
"diff_url": "https://github.com/huggingface/datasets/pull/3384.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3384.patch",
"merged_at": null
}
|
lhbonifacio
| true
|
[] |
1,071,551,884
| 3,383
|
add Georgian data in cc100.
|
closed
| 2021-12-05T20:38:09
| 2021-12-14T14:37:23
| 2021-12-14T14:37:22
|
https://github.com/huggingface/datasets/pull/3383
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3383",
"html_url": "https://github.com/huggingface/datasets/pull/3383",
"diff_url": "https://github.com/huggingface/datasets/pull/3383.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3383.patch",
"merged_at": "2021-12-14T14:37:22"
}
|
AnzorGozalishvili
| true
|
[] |
1,071,293,299
| 3,382
|
#3337 Add typing overloads to Dataset.__getitem__ for mypy
|
closed
| 2021-12-04T20:54:49
| 2021-12-14T10:28:55
| 2021-12-14T10:28:55
|
https://github.com/huggingface/datasets/pull/3382
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3382",
"html_url": "https://github.com/huggingface/datasets/pull/3382",
"diff_url": "https://github.com/huggingface/datasets/pull/3382.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3382.patch",
"merged_at": "2021-12-14T10:28:54"
}
|
Dref360
| true
|
[
"Locally the `make quality` passes with the same dependencies. I would suggest upgrading flake8. (I can take care of it in another PR)\r\ncc @lhoestq ",
"Thank you for fixing flake8! I think we are ready to merge then. "
] |
1,071,283,879
| 3,381
|
Unable to load audio_features from common_voice dataset
|
closed
| 2021-12-04T19:59:11
| 2021-12-06T17:52:42
| 2021-12-06T17:52:42
|
https://github.com/huggingface/datasets/issues/3381
| null |
ashu5644
| false
|
[
"Hi ! Feel free to access `batch[\"audio\"][\"array\"]` and `batch[\"audio\"][\"sampling_rate\"]` instead\r\n\r\n`datasets` 1.16 introduced some changes in `common_voice` and now the `path` field is no longer a path to a local file (but rather the path to the file in the archive it's extracted from)",
"Thanks for the information. It works.",
"Cool ! Closing this issue then"
] |
1,071,166,270
| 3,380
|
[Quick poll] Give your opinion on the future of the Hugging Face Open Source ecosystem!
|
closed
| 2021-12-04T09:18:33
| 2022-01-11T12:29:53
| 2022-01-11T12:29:53
|
https://github.com/huggingface/datasets/issues/3380
| null |
LysandreJik
| false
|
[] |
1,071,079,146
| 3,379
|
iter_archive on zipfiles with better compression type check
|
closed
| 2021-12-04T01:04:48
| 2023-01-24T13:00:19
| 2023-01-24T12:53:08
|
https://github.com/huggingface/datasets/pull/3379
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3379",
"html_url": "https://github.com/huggingface/datasets/pull/3379",
"diff_url": "https://github.com/huggingface/datasets/pull/3379.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3379.patch",
"merged_at": "2023-01-24T12:53:08"
}
|
Mehdi2402
| true
|
[
"Hello @lhoestq, thank you for your answer.\r\n\r\nI don't use pytest a lot so I think I might need some help on it :) but I tried some tests for `streaming_download_manager.py` only. I don't know how to test `download_manager.py` since we need to use local files.\r\n\r\n# Comments : \r\n* In **download_manager.py** I removed some unnecessary imports after the simplification of `_get_extraction_protocol_local`.\r\n* In **streaming_download_manager** I moved the raised Error as suggested.\r\n \r\n### I also started some tests on `StreamingDownloadManager()` :\r\n* Used an existing zipfile url and added a new one that has a folder and many files : \r\n```python\r\nTEST_GG_DRIVE_ZIPPED_URL = \"https://drive.google.com/uc?export=download&id=1k92sUfpHxKq8PXWRr7Y5aNHXwOCNUmqh\"\r\nTEST_GG_DRIVE2_ZIPPED_URL = \"https://drive.google.com/uc?export=download&id=1X4jyUBBbShyCRfD-vCO1ZvfqFXP3NEeU\"\r\n``` \r\n* **For now is being tested :**\r\n * Return type of the function : should be tuple\r\n * Files names\r\n * Files content\r\n * Added an `xfail` test for the gzip file, because I get a `zipfile.BadZipFile exception`.\r\n\r\n\r\n * And lastly, changed the test for `_get_extraction_protocol_throws` since it was moved to `_extract` : \r\n ```diff\r\n@pytest.mark.xfail(raises=NotImplementedError)\r\ndef test_streaming_dl_manager_get_extraction_protocol_throws(urlpath):\r\n- _get_extraction_protocol(urlpath)\r\n\r\n@pytest.mark.xfail(raises=NotImplementedError)\r\ndef test_streaming_dl_manager_get_extraction_protocol_throws(urlpath):\r\n+ StreamingDownloadManager()._extract(urlpath)\r\n```\r\n\r\n\r\n",
"Hello,\r\nIn this Commit was taken into account all the comment escept the `test_download _manager.py`.\r\nI will work on that for the next commit.\r\n\r\nSorry again for being inactive lately in this PR.\r\n\r\n",
"thanks a lot ! This CI seems to have import errors now though ?",
"> thanks a lot ! This CI seems to have import errors now though ?\r\n\r\nYes sorry about that, it's due to a cyclic import I didn't pay attention to.\r\n\r\nWill fix that in the next Commit along with adding the tests to download_manager.\r\n\r\n",
"Hello @Mehdi2402, are you still interested in working on this further? ",
"> Hello @Mehdi2402, are you still interested in working on this further?\r\n\r\nHello @albertvillanova, yes I would like to resume work on this.",
"Great, we would like to have this feature.\r\n\r\nFirst, you should resolve the conflicts with the main branch, by merging main into your feature branch and then fixing the conflicts by hand. Let us know if you would need some help on this: we can resolve the conflicts for you, so that you can continue your contribution afterwards.",
"_The documentation is not available anymore as the PR was closed or merged._",
"I refactored the code to make this PR ready for the final review.",
"<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==6.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.009475 / 0.011353 (-0.001878) | 0.005249 / 0.011008 (-0.005759) | 0.099713 / 0.038508 (0.061205) | 0.036328 / 0.023109 (0.013219) | 0.295955 / 0.275898 (0.020057) | 0.368779 / 0.323480 (0.045299) | 0.007796 / 0.007986 (-0.000190) | 0.005635 / 0.004328 (0.001306) | 0.077351 / 0.004250 (0.073100) | 0.045290 / 0.037052 (0.008238) | 0.306634 / 0.258489 (0.048145) | 0.345025 / 0.293841 (0.051184) | 0.038241 / 0.128546 (-0.090306) | 0.012338 / 0.075646 (-0.063308) | 0.335184 / 0.419271 (-0.084088) | 0.047737 / 0.043533 (0.004204) | 0.295092 / 0.255139 (0.039953) | 0.319810 / 0.283200 (0.036610) | 0.102777 / 0.141683 (-0.038906) | 1.399444 / 1.452155 (-0.052711) | 1.450239 / 1.492716 (-0.042478) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.202919 / 0.018006 (0.184912) | 0.447493 / 0.000490 (0.447003) | 0.004187 / 0.000200 (0.003987) | 0.000083 / 0.000054 (0.000029) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.028570 / 0.037411 (-0.008841) | 0.113536 / 0.014526 (0.099010) | 0.120525 / 0.176557 (-0.056031) | 0.162732 / 0.737135 (-0.574404) | 0.130195 / 0.296338 (-0.166144) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.408831 / 0.215209 (0.193622) | 4.094929 / 2.077655 (2.017274) | 1.810356 / 1.504120 (0.306236) | 1.618532 / 1.541195 (0.077337) | 1.681310 / 1.468490 (0.212820) | 0.705157 / 4.584777 (-3.879620) | 3.789040 / 3.745712 (0.043327) | 2.121842 / 5.269862 (-3.148020) | 1.522505 / 4.565676 (-3.043171) | 0.085443 / 0.424275 (-0.338832) | 0.012065 / 0.007607 (0.004458) | 0.521176 / 0.226044 (0.295132) | 5.201899 / 2.268929 (2.932970) | 2.303055 / 55.444624 (-53.141569) | 1.971721 / 6.876477 (-4.904756) | 2.053827 / 2.142072 (-0.088245) | 0.864810 / 4.805227 (-3.940418) | 0.168040 / 6.500664 (-6.332624) | 0.063332 / 0.075469 (-0.012138) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.208105 / 1.841788 (-0.633683) | 14.722757 / 8.074308 (6.648449) | 14.396695 / 10.191392 (4.205303) | 0.152702 / 0.680424 (-0.527722) | 0.028828 / 0.534201 (-0.505373) | 0.439573 / 0.579283 (-0.139710) | 0.438891 / 0.434364 (0.004527) | 0.509043 / 0.540337 (-0.031295) | 0.603531 / 1.386936 (-0.783405) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.007337 / 0.011353 (-0.004016) | 0.005080 / 0.011008 (-0.005929) | 0.097916 / 0.038508 (0.059408) | 0.032722 / 0.023109 (0.009612) | 0.338925 / 0.275898 (0.063027) | 0.372945 / 0.323480 (0.049465) | 0.005464 / 0.007986 (-0.002522) | 0.004031 / 0.004328 (-0.000297) | 0.076761 / 0.004250 (0.072511) | 0.046804 / 0.037052 (0.009752) | 0.336088 / 0.258489 (0.077599) | 0.403704 / 0.293841 (0.109863) | 0.036928 / 0.128546 (-0.091618) | 0.012204 / 0.075646 (-0.063442) | 0.335467 / 0.419271 (-0.083804) | 0.049158 / 0.043533 (0.005625) | 0.342040 / 0.255139 (0.086901) | 0.356729 / 0.283200 (0.073530) | 0.101280 / 0.141683 (-0.040403) | 1.432540 / 1.452155 (-0.019614) | 1.545228 / 1.492716 (0.052512) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.226003 / 0.018006 (0.207997) | 0.445601 / 0.000490 (0.445112) | 0.000408 / 0.000200 (0.000208) | 0.000057 / 0.000054 (0.000003) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.028861 / 0.037411 (-0.008551) | 0.112083 / 0.014526 (0.097557) | 0.130843 / 0.176557 (-0.045713) | 0.159275 / 0.737135 (-0.577861) | 0.127582 / 0.296338 (-0.168756) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.446357 / 0.215209 (0.231148) | 4.448568 / 2.077655 (2.370914) | 2.197861 / 1.504120 (0.693741) | 2.004675 / 1.541195 (0.463480) | 2.052082 / 1.468490 (0.583592) | 0.710770 / 4.584777 (-3.874007) | 3.868936 / 3.745712 (0.123224) | 2.095008 / 5.269862 (-3.174854) | 1.363064 / 4.565676 (-3.202613) | 0.086734 / 0.424275 (-0.337541) | 0.012272 / 0.007607 (0.004665) | 0.546378 / 0.226044 (0.320334) | 5.475189 / 2.268929 (3.206260) | 2.702742 / 55.444624 (-52.741882) | 2.335880 / 6.876477 (-4.540597) | 2.396194 / 2.142072 (0.254121) | 0.856249 / 4.805227 (-3.948978) | 0.170466 / 6.500664 (-6.330198) | 0.063585 / 0.075469 (-0.011884) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.236981 / 1.841788 (-0.604807) | 15.046616 / 8.074308 (6.972307) | 14.551781 / 10.191392 (4.360389) | 0.144485 / 0.680424 (-0.535939) | 0.017774 / 0.534201 (-0.516427) | 0.446274 / 0.579283 (-0.133010) | 0.436871 / 0.434364 (0.002507) | 0.504503 / 0.540337 (-0.035834) | 0.602014 / 1.386936 (-0.784922) |\n\n</details>\n</details>\n\n\n"
] |
1,070,580,126
| 3,378
|
Add The Pile subsets
|
closed
| 2021-12-03T13:14:54
| 2021-12-09T18:11:25
| 2021-12-09T18:11:23
|
https://github.com/huggingface/datasets/pull/3378
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3378",
"html_url": "https://github.com/huggingface/datasets/pull/3378",
"diff_url": "https://github.com/huggingface/datasets/pull/3378.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3378.patch",
"merged_at": "2021-12-09T18:11:23"
}
|
albertvillanova
| true
|
[] |
1,070,562,907
| 3,377
|
COCO 🥥 on the 🤗 Hub?
|
closed
| 2021-12-03T12:55:27
| 2021-12-20T14:14:01
| 2021-12-20T14:14:00
|
https://github.com/huggingface/datasets/pull/3377
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3377",
"html_url": "https://github.com/huggingface/datasets/pull/3377",
"diff_url": "https://github.com/huggingface/datasets/pull/3377.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3377.patch",
"merged_at": null
}
|
merveenoyan
| true
|
[
"@mariosasko I fixed couple of bugs",
"TO-DO: \r\n- [x] Add unlabeled 2017 splits, train and validation splits of 2015\r\n- [x] Add Class Labels as list instead",
"@mariosasko added fine & coarse grained labels, will fix the bugs (currently getting set up with VM, my internet is too slow to run the tests and download the data 🥲)",
"migrated to here https://github.com/huggingface/datasets/tree/coco"
] |
1,070,522,979
| 3,376
|
Update clue benchmark
|
closed
| 2021-12-03T12:06:01
| 2021-12-08T14:14:42
| 2021-12-08T14:14:41
|
https://github.com/huggingface/datasets/pull/3376
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3376",
"html_url": "https://github.com/huggingface/datasets/pull/3376",
"diff_url": "https://github.com/huggingface/datasets/pull/3376.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3376.patch",
"merged_at": "2021-12-08T14:14:41"
}
|
mariosasko
| true
|
[
"The CI error is due to missing tags in the CLUE dataset card - merging !"
] |
1,070,454,913
| 3,375
|
Support streaming zipped dataset repo by passing only repo name
|
closed
| 2021-12-03T10:43:05
| 2021-12-16T18:03:32
| 2021-12-16T18:03:31
|
https://github.com/huggingface/datasets/pull/3375
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3375",
"html_url": "https://github.com/huggingface/datasets/pull/3375",
"diff_url": "https://github.com/huggingface/datasets/pull/3375.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3375.patch",
"merged_at": "2021-12-16T18:03:31"
}
|
albertvillanova
| true
|
[
"I just tested and I think this only opens one file ? If there are several files in the ZIP, only the first one is opened. To open several files from a ZIP, one has to call `open` several times.\r\n\r\nWhat about updating the CSV loader to make it `download_and_extract` zip files, and open each extracted file ?",
"I have implemented the glob of ZIP files in the packaged modules:\r\n- csv\r\n- json\r\n- text",
"Also for streaming and non-streaming.",
"In https://github.com/huggingface/datasets/pull/3375/commits/c10275fe36085601cb7bdb9daee9a8f1fc734f48, there were 3 failing tests, only on Linux:\r\n```\r\n=========================== short test summary info ============================\r\nFAILED tests/test_streaming_download_manager.py::test_streaming_dl_manager_get_extraction_protocol[https://drive.google.com/uc?export=download&id=1k92sUfpHxKq8PXWRr7Y5aNHXwOCNUmqh-zip]\r\nFAILED tests/test_streaming_download_manager.py::test_streaming_gg_drive - Fi...\r\nFAILED tests/test_streaming_download_manager.py::test_streaming_gg_drive_zipped\r\n= 3 failed, 3553 passed, 2950 skipped, 2 xfailed, 1 xpassed, 125 warnings in 192.79s (0:03:12) =\r\n```\r\n\r\nAfter re-running the CI in https://github.com/huggingface/datasets/pull/3375/commits/57bfe1f342cd3c59d2510b992d5f06a0761eb147, there was only 1 failing test:\r\n- On Linux:\r\n```\r\n=========================== short test summary info ============================\r\nFAILED tests/test_streaming_download_manager.py::test_streaming_gg_drive_zipped\r\n= 1 failed, 3555 passed, 2950 skipped, 2 xfailed, 1 xpassed, 125 warnings in 199.76s (0:03:19) =\r\n```\r\n- On Windows:\r\n```\r\n=========================== short test summary info ===========================\r\nFAILED tests/test_load.py::test_load_dataset_builder_for_community_dataset_without_script\r\n= 1 failed, 3551 passed, 2954 skipped, 2 xfailed, 1 xpassed, 121 warnings in 478.58s (0:07:58) =\r\n```\r\n\r\nThe test `tests/test_streaming_download_manager.py::test_streaming_gg_drive_zipped` passes locally.\r\n\r\nI guess the issue is caused by those tests and has nothing to do with this PR.",
"@lhoestq my final proposed solution:\r\n- I have added the method `iter_files` to DownloadManager and StreamingDownloadManager\r\n- I use this in modules: \"csv\", \"json\", \"text\"\r\n- I test for CSV/JSONL/TXT zipped (and non-zipped) files, both in streaming and non-streaming modes",
"> Note that at one point we might consider switching to using `iter_archive` for ZIP files in the json/text/csv loaders since it should be faster.\r\n\r\nAs far as the functionality is kept... ;)"
] |
1,070,426,462
| 3,374
|
NonMatchingChecksumError for the CLUE:cluewsc2020, chid, c3 and tnews
|
closed
| 2021-12-03T10:10:54
| 2021-12-08T14:14:41
| 2021-12-08T14:14:41
|
https://github.com/huggingface/datasets/issues/3374
| null |
Namco0816
| false
|
[
"Seems like the issue still exists,:\r\n`Downloading and preparing dataset clue/chid (download: 127.15 MiB, generated: 259.71 MiB, post-processed: Unknown size, total: 386.86 MiB) to /mnt/cache/tanhaochen/.cache/huggingface/datasets/clue/chid/1.0.0/e55b490cb7809dcd8db31b9a87119f2e2ec87cdc060da8a9ac070b070ca3e379...\r\nTraceback (most recent call last):\r\n File \"/mnt/cache/tanhaochen/PromptCLUE/test_datasets.py\", line 3, in <module>\r\n cluewsc2020 = datasets.load_dataset(\"clue\",\"chid\")\r\n File \"/mnt/cache/tanhaochen/dependencies/datasets/src/datasets/load.py\", line 1667, in load_dataset\r\n builder_instance.download_and_prepare(\r\n File \"/mnt/cache/tanhaochen/dependencies/datasets/src/datasets/builder.py\", line 593, in download_and_prepare\r\n self._download_and_prepare(\r\n File \"/mnt/cache/tanhaochen/dependencies/datasets/src/datasets/builder.py\", line 663, in _download_and_prepare\r\n verify_checksums(\r\n File \"/mnt/cache/tanhaochen/dependencies/datasets/src/datasets/utils/info_utils.py\", line 40, in verify_checksums\r\n raise NonMatchingChecksumError(error_msg + str(bad_urls))\r\ndatasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files:\r\n['https://storage.googleapis.com/cluebenchmark/tasks/chid_public.zip']\r\n`",
"Hi,\r\n\r\nthe fix hasn't been merged yet (it should be merged early next week)."
] |
1,070,406,391
| 3,373
|
Support streaming zipped CSV dataset repo by passing only repo name
|
closed
| 2021-12-03T09:48:24
| 2021-12-16T18:03:31
| 2021-12-16T18:03:31
|
https://github.com/huggingface/datasets/issues/3373
| null |
albertvillanova
| false
|
[] |
1,069,948,178
| 3,372
|
[SEO improvement] Add Dataset Metadata to make datasets indexable
|
closed
| 2021-12-02T20:21:07
| 2022-03-18T09:36:48
| 2022-03-18T09:36:48
|
https://github.com/huggingface/datasets/issues/3372
| null |
cakiki
| false
|
[] |
1,069,821,335
| 3,371
|
New: Americas NLI dataset
|
closed
| 2021-12-02T17:44:59
| 2021-12-08T13:58:12
| 2021-12-08T13:58:11
|
https://github.com/huggingface/datasets/pull/3371
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3371",
"html_url": "https://github.com/huggingface/datasets/pull/3371",
"diff_url": "https://github.com/huggingface/datasets/pull/3371.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3371.patch",
"merged_at": "2021-12-08T13:58:11"
}
|
fdschmidt93
| true
|
[] |
1,069,735,423
| 3,370
|
Document a training loop for streaming dataset
|
closed
| 2021-12-02T16:17:00
| 2021-12-03T13:34:35
| 2021-12-03T13:34:34
|
https://github.com/huggingface/datasets/pull/3370
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3370",
"html_url": "https://github.com/huggingface/datasets/pull/3370",
"diff_url": "https://github.com/huggingface/datasets/pull/3370.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3370.patch",
"merged_at": "2021-12-03T13:34:34"
}
|
lhoestq
| true
|
[] |
1,069,587,674
| 3,369
|
[Audio] Allow resampling for audio datasets in streaming mode
|
closed
| 2021-12-02T14:04:57
| 2021-12-16T15:55:19
| 2021-12-16T15:55:19
|
https://github.com/huggingface/datasets/issues/3369
| null |
patrickvonplaten
| false
|
[
"This requires implementing `cast_column` for iterable datasets, it could be a very nice addition !\r\n\r\n<s>It can also be useful to be able to disable the audio/image decoding for the dataset viewer (see PR https://github.com/huggingface/datasets/pull/3430) cc @severo </s>\r\nEDIT: actually following https://github.com/huggingface/datasets/issues/3145 the dataset viewer might not need it anymore",
"Just to clarify a bit. This feature is **always** needed when using the common voice dataset in streaming mode. So I think it's quite important"
] |
1,069,403,624
| 3,368
|
Fix dict source_datasets tagset validator
|
closed
| 2021-12-02T10:52:20
| 2021-12-02T15:48:38
| 2021-12-02T15:48:37
|
https://github.com/huggingface/datasets/pull/3368
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3368",
"html_url": "https://github.com/huggingface/datasets/pull/3368",
"diff_url": "https://github.com/huggingface/datasets/pull/3368.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3368.patch",
"merged_at": "2021-12-02T15:48:37"
}
|
albertvillanova
| true
|
[] |
1,069,241,274
| 3,367
|
Fix typo in other-structured-to-text task tag
|
closed
| 2021-12-02T08:02:27
| 2021-12-02T16:07:14
| 2021-12-02T16:07:13
|
https://github.com/huggingface/datasets/pull/3367
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3367",
"html_url": "https://github.com/huggingface/datasets/pull/3367",
"diff_url": "https://github.com/huggingface/datasets/pull/3367.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3367.patch",
"merged_at": "2021-12-02T16:07:13"
}
|
albertvillanova
| true
|
[] |
1,069,214,022
| 3,366
|
Add multimodal datasets
|
open
| 2021-12-02T07:24:04
| 2023-02-28T16:29:22
| null |
https://github.com/huggingface/datasets/issues/3366
| null |
albertvillanova
| false
|
[] |
1,069,195,887
| 3,365
|
Add task tags for multimodal datasets
|
closed
| 2021-12-02T06:58:20
| 2023-07-25T18:21:33
| 2023-07-25T18:21:32
|
https://github.com/huggingface/datasets/issues/3365
| null |
albertvillanova
| false
|
[
"The Hub pulls these tags from [here](https://github.com/huggingface/hub-docs/blob/main/js/src/lib/interfaces/Types.ts) (allows multimodal tasks) now, so I'm closing this issue."
] |
1,068,851,196
| 3,364
|
Use the Audio feature in the AutomaticSpeechRecognition template
|
closed
| 2021-12-01T20:42:26
| 2022-03-24T14:34:09
| 2022-03-24T14:34:08
|
https://github.com/huggingface/datasets/pull/3364
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3364",
"html_url": "https://github.com/huggingface/datasets/pull/3364",
"diff_url": "https://github.com/huggingface/datasets/pull/3364.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3364.patch",
"merged_at": null
}
|
anton-l
| true
|
[
"Cool !\r\n\r\nI noticed that you removed the `audio_file_path_column` field of the template, note that you also have to update all the dataset_infos.json file that still contain this outdated field. For example in the common_voice you can find this:\r\n```\r\n\"task_templates\": [{\"task\": \"automatic-speech-recognition\", \"audio_file_path_column\": \"path\", \"transcription_column\": \"sentence\"}]\r\n```",
"Yes, will do that. I'm just busy with the bigscience task.",
"After we merge this, we should also update the following dataset scripts: https://huggingface.co/datasets?task_ids=task_ids:automatic-speech-recognition",
"Closing in favor of https://github.com/huggingface/datasets/pull/4006"
] |
1,068,824,340
| 3,363
|
Update URL of Jeopardy! dataset
|
closed
| 2021-12-01T20:08:10
| 2022-10-06T13:45:49
| 2021-12-03T12:35:01
|
https://github.com/huggingface/datasets/pull/3363
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3363",
"html_url": "https://github.com/huggingface/datasets/pull/3363",
"diff_url": "https://github.com/huggingface/datasets/pull/3363.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3363.patch",
"merged_at": null
}
|
mariosasko
| true
|
[
"Closing this PR in favor of #3266.",
"I think you should also close this branch"
] |
1,068,809,768
| 3,362
|
Adapt image datasets
|
closed
| 2021-12-01T19:52:01
| 2021-12-09T18:37:42
| 2021-12-09T18:37:41
|
https://github.com/huggingface/datasets/pull/3362
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3362",
"html_url": "https://github.com/huggingface/datasets/pull/3362",
"diff_url": "https://github.com/huggingface/datasets/pull/3362.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3362.patch",
"merged_at": "2021-12-09T18:37:41"
}
|
mariosasko
| true
|
[
"This PR can be merged after #3163 is merged (this PR is pretty big because I was working on the forked branch).\r\n\r\n@lhoestq @albertvillanova Could you please take a look at the changes in `src/datasets/utils/streaming_download_manager.py`? These changes were required to support streaming of the `cats_vs_dogs` and the `beans` datasets.",
"The CI failures are due to the missing fields in the README files.",
"and thanks for adding support for Path.name and Path.parent for streaming :)"
] |
1,068,736,268
| 3,361
|
Jeopardy _URL access denied
|
closed
| 2021-12-01T18:21:33
| 2021-12-11T12:50:23
| 2021-12-06T11:16:31
|
https://github.com/huggingface/datasets/issues/3361
| null |
tianjianjiang
| false
|
[
"Just a side note: duplicate #3264"
] |
1,068,724,697
| 3,360
|
Add The Pile USPTO subset
|
closed
| 2021-12-01T18:08:05
| 2021-12-03T11:45:29
| 2021-12-03T11:45:28
|
https://github.com/huggingface/datasets/pull/3360
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3360",
"html_url": "https://github.com/huggingface/datasets/pull/3360",
"diff_url": "https://github.com/huggingface/datasets/pull/3360.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3360.patch",
"merged_at": "2021-12-03T11:45:27"
}
|
albertvillanova
| true
|
[] |
1,068,638,213
| 3,359
|
Add The Pile Free Law subset
|
closed
| 2021-12-01T16:46:04
| 2021-12-06T10:12:17
| 2021-12-01T17:30:44
|
https://github.com/huggingface/datasets/pull/3359
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3359",
"html_url": "https://github.com/huggingface/datasets/pull/3359",
"diff_url": "https://github.com/huggingface/datasets/pull/3359.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3359.patch",
"merged_at": "2021-12-01T17:30:43"
}
|
albertvillanova
| true
|
[
"@albertvillanova Is there a specific reason you’re adding the Pile under “the” instead of under “pile”? That does not appear to be consistent with other datasets.",
"Hi @StellaAthena,\r\n\r\nI asked myself the same question, but at the end I decided to be consistent with previously added Pile subsets:\r\n- #2817\r\n\r\nI guess the reason is to stress that the definite article is always used before the name of the dataset (your site says: \"The Pile. An 800GB Dataset of Diverse Text for Language Modeling\"). Other datasets are not usually preceded by the definite article, like \"the SQuAD\" or \"the GLUE\" or \"the Common Voice\"...\r\n\r\nCC: @lhoestq ",
"> I guess the reason is to stress that the definite article is always used before the name of the dataset (your site says: \"The Pile. An 800GB Dataset of Diverse Text for Language Modeling\").\r\n\r\nYes that's because of this that it starts with \"the\""
] |
1,068,623,216
| 3,358
|
add new field, and get errors
|
closed
| 2021-12-01T16:35:38
| 2021-12-02T02:26:22
| 2021-12-02T02:26:22
|
https://github.com/huggingface/datasets/issues/3358
| null |
PatricYan
| false
|
[
"Hi, \r\n\r\ncould you please post this question on our [Forum](https://discuss.huggingface.co/) as we keep issues for bugs and feature requests? ",
"> Hi,\r\n> \r\n> could you please post this question on our [Forum](https://discuss.huggingface.co/) as we keep issues for bugs and feature requests?\r\n\r\nok."
] |
1,068,607,382
| 3,357
|
Update languages in aeslc dataset card
|
closed
| 2021-12-01T16:20:46
| 2022-09-23T13:16:49
| 2022-09-23T13:16:49
|
https://github.com/huggingface/datasets/pull/3357
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3357",
"html_url": "https://github.com/huggingface/datasets/pull/3357",
"diff_url": "https://github.com/huggingface/datasets/pull/3357.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3357.patch",
"merged_at": "2022-09-23T13:16:48"
}
|
apergo-ai
| true
|
[] |
1,068,503,932
| 3,356
|
to_tf_dataset() refactor
|
closed
| 2021-12-01T14:54:30
| 2021-12-09T10:26:53
| 2021-12-09T10:26:53
|
https://github.com/huggingface/datasets/pull/3356
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3356",
"html_url": "https://github.com/huggingface/datasets/pull/3356",
"diff_url": "https://github.com/huggingface/datasets/pull/3356.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3356.patch",
"merged_at": "2021-12-09T10:26:53"
}
|
Rocketknight1
| true
|
[
"Also, please don't merge yet - I need to make sure all the code samples and notebooks have a collate_fn specified, since we're removing the ability for this method to work without one!",
"Hi @lhoestq @mariosasko, the other PRs this was depending on in Transformers and huggingface/notebooks are now merged, so this is ready to go. Do you want to take one more look at it, or are you happy at this point?",
"The documentation for the method is fine, it doesn't need to be changed, but the tutorial notebook definitely looks a little out of date. Let me see what I can do!",
"@lhoestq I rewrote the last bit of the notebook - let me know what you think!",
"Cool thank you ! It's much nicer that what we had :)\r\n\r\nI also spotted other things I'd like to update in the notebook (especially the beginning) but it can be fixed later"
] |
1,068,468,573
| 3,355
|
Extend support for streaming datasets that use pd.read_excel
|
closed
| 2021-12-01T14:22:43
| 2021-12-17T07:24:19
| 2021-12-17T07:24:18
|
https://github.com/huggingface/datasets/pull/3355
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3355",
"html_url": "https://github.com/huggingface/datasets/pull/3355",
"diff_url": "https://github.com/huggingface/datasets/pull/3355.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3355.patch",
"merged_at": "2021-12-17T07:24:18"
}
|
albertvillanova
| true
|
[
"TODO in the future: https://github.com/huggingface/datasets/pull/3355#discussion_r761138011\r\n- If we finally find a use case where the `pd.read_excel()` can work in streaming mode (using fsspec), that is, without using the `.read()`, I propose to try this first, catch the ValueError and then try with `.read`, but all implemented in `xpandas_read_excel`. "
] |
1,068,307,271
| 3,354
|
Remove duplicate name from dataset cards
|
closed
| 2021-12-01T11:45:40
| 2021-12-01T13:14:30
| 2021-12-01T13:14:29
|
https://github.com/huggingface/datasets/pull/3354
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3354",
"html_url": "https://github.com/huggingface/datasets/pull/3354",
"diff_url": "https://github.com/huggingface/datasets/pull/3354.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3354.patch",
"merged_at": "2021-12-01T13:14:29"
}
|
albertvillanova
| true
|
[] |
1,068,173,783
| 3,353
|
add one field "example_id", but I can't see it in the "comput_loss" function
|
closed
| 2021-12-01T09:35:09
| 2021-12-01T16:02:39
| 2021-12-01T16:02:39
|
https://github.com/huggingface/datasets/issues/3353
| null |
PatricYan
| false
|
[
"Hi ! Your function looks fine, I used to map `squad` locally and it indeed added the `example_id` field correctly.\r\n\r\nHowever I think that in the `compute_loss` method only a subset of the fields are available: the model inputs. Since `example_id` is not a model input (it's not passed as a parameter to the model), the data loader doesn't need to return it by default.\r\n\r\nHowever you can disable this behavior by setting `remove_unused_columns` to `False` to your training arguments. In this case in `compute_loss` you will get the full item with all the fields.\r\n\r\nNote that since the model doesn't take `example_id` as input, you will have to remove it from the inputs when `model(**inputs)` is called",
"Hi, I have set **args.remove_unused_columns=False** and **training_args.remove_unused_columns=False**, but the field doesn't been contained yet.\r\n```\r\ndef main():\r\n argp = HfArgumentParser(TrainingArguments)\r\n # The HfArgumentParser object collects command-line arguments into an object (and provides default values for unspecified arguments).\r\n # In particular, TrainingArguments has several keys that you'll need/want to specify (when you call run.py from the command line):\r\n # --do_train\r\n # When included, this argument tells the script to train a model.\r\n # See docstrings for \"--task\" and \"--dataset\" for how the training dataset is selected.\r\n # --do_eval\r\n # When included, this argument tells the script to evaluate the trained/loaded model on the validation split of the selected dataset.\r\n # --per_device_train_batch_size <int, default=8>\r\n # This is the training batch size.\r\n # If you're running on GPU, you should try to make this as large as you can without getting CUDA out-of-memory errors.\r\n # For reference, with --max_length=128 and the default ELECTRA-small model, a batch size of 32 should fit in 4gb of GPU memory.\r\n # --num_train_epochs <float, default=3.0>\r\n # How many passes to do through the training data.\r\n # --output_dir <path>\r\n # Where to put the trained model checkpoint(s) and any eval predictions.\r\n # *This argument is required*.\r\n\r\n argp.add_argument('--model', type=str,\r\n default='google/electra-small-discriminator',\r\n help=\"\"\"This argument specifies the base model to fine-tune.\r\n This should either be a HuggingFace model ID (see https://huggingface.co/models)\r\n or a path to a saved model checkpoint (a folder containing config.json and pytorch_model.bin).\"\"\")\r\n argp.add_argument('--task', type=str, choices=['nli', 'qa'], required=True,\r\n help=\"\"\"This argument specifies which task to train/evaluate on.\r\n Pass \"nli\" for natural language inference or \"qa\" for question answering.\r\n By default, \"nli\" will use the SNLI dataset, and \"qa\" will use the SQuAD dataset.\"\"\")\r\n argp.add_argument('--dataset', type=str, default=None,\r\n help=\"\"\"This argument overrides the default dataset used for the specified task.\"\"\")\r\n argp.add_argument('--max_length', type=int, default=128,\r\n help=\"\"\"This argument limits the maximum sequence length used during training/evaluation.\r\n Shorter sequence lengths need less memory and computation time, but some examples may end up getting truncated.\"\"\")\r\n argp.add_argument('--max_train_samples', type=int, default=None,\r\n help='Limit the number of examples to train on.')\r\n argp.add_argument('--max_eval_samples', type=int, default=None,\r\n help='Limit the number of examples to evaluate on.')\r\n\r\n argp.remove_unused_columns = False\r\n training_args, args = argp.parse_args_into_dataclasses()\r\n args.remove_unused_columns=False\r\n training_args.remove_unused_columns=False\r\n```\r\n\r\n\r\n```\r\n**************** train_dataset: Dataset({\r\n features: ['id', 'title', 'context', 'question', 'answers'],\r\n num_rows: 87599\r\n})\r\n\r\n\r\n**************** train_dataset_featurized: Dataset({\r\n features: ['attention_mask', 'end_positions', 'input_ids', 'start_positions', 'token_type_ids'],\r\n num_rows: 87714\r\n})\r\n```",
"Hi, I print the value, all are set to False, but don't work.\r\n```\r\n********************* training_args: TrainingArguments(\r\n_n_gpu=1,\r\nadafactor=False,\r\nadam_beta1=0.9,\r\nadam_beta2=0.999,\r\nadam_epsilon=1e-08,\r\ndataloader_drop_last=False,\r\ndataloader_num_workers=0,\r\ndataloader_pin_memory=True,\r\nddp_find_unused_parameters=None,\r\ndebug=[],\r\ndeepspeed=None,\r\ndisable_tqdm=False,\r\ndo_eval=False,\r\ndo_predict=False,\r\ndo_train=True,\r\neval_accumulation_steps=None,\r\neval_steps=None,\r\nevaluation_strategy=IntervalStrategy.NO,\r\nfp16=False,\r\nfp16_backend=auto,\r\nfp16_full_eval=False,\r\nfp16_opt_level=O1,\r\ngradient_accumulation_steps=1,\r\ngreater_is_better=None,\r\ngroup_by_length=False,\r\nignore_data_skip=False,\r\nlabel_names=None,\r\nlabel_smoothing_factor=0.0,\r\nlearning_rate=5e-05,\r\nlength_column_name=length,\r\nload_best_model_at_end=False,\r\nlocal_rank=-1,\r\nlog_level=-1,\r\nlog_level_replica=-1,\r\nlog_on_each_node=True,\r\nlogging_dir=./re_trained_model/runs/Dec01_14-15-08_399b9290604c,\r\nlogging_first_step=False,\r\nlogging_steps=500,\r\nlogging_strategy=IntervalStrategy.STEPS,\r\nlr_scheduler_type=SchedulerType.LINEAR,\r\nmax_grad_norm=1.0,\r\nmax_steps=-1,\r\nmetric_for_best_model=None,\r\nmp_parameters=,\r\nno_cuda=False,\r\nnum_train_epochs=3.0,\r\noutput_dir=./re_trained_model,\r\noverwrite_output_dir=False,\r\npast_index=-1,\r\nper_device_eval_batch_size=8,\r\nper_device_train_batch_size=8,\r\nprediction_loss_only=False,\r\npush_to_hub=False,\r\npush_to_hub_model_id=re_trained_model,\r\npush_to_hub_organization=None,\r\npush_to_hub_token=None,\r\nremove_unused_columns=False,\r\nreport_to=['tensorboard'],\r\nresume_from_checkpoint=None,\r\nrun_name=./re_trained_model,\r\nsave_on_each_node=False,\r\nsave_steps=500,\r\nsave_strategy=IntervalStrategy.STEPS,\r\nsave_total_limit=None,\r\nseed=42,\r\nsharded_ddp=[],\r\nskip_memory_metrics=True,\r\ntpu_metrics_debug=False,\r\ntpu_num_cores=None,\r\nuse_legacy_prediction_loop=False,\r\nwarmup_ratio=0.0,\r\nwarmup_steps=0,\r\nweight_decay=0.0,\r\n)\r\n```\r\n```\r\n********************* args: Namespace(dataset='squad', max_eval_samples=None, max_length=128, max_train_samples=None, model='google/electra-small-discriminator', remove_unused_columns=False, task='qa')\r\n2021-12-01 14:15:10,048 - WARNING - datasets.builder - Reusing dataset squad (/root/.cache/huggingface/datasets/squad/plain_text/1.0.0/d6ec3ceb99ca480ce37cdd35555d6cb2511d223b9150cce08a837ef62ffea453)\r\nSome weights of the model checkpoint at google/electra-small-discriminator were not used when initializing ElectraForQuestionAnswering: ['discriminator_predictions.dense_prediction.weight', 'discriminator_predictions.dense_prediction.bias', 'discriminator_predictions.dense.weight', 'discriminator_predictions.dense.bias']\r\n- This IS expected if you are initializing ElectraForQuestionAnswering from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\r\n- This IS NOT expected if you are initializing ElectraForQuestionAnswering from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\r\nSome weights of ElectraForQuestionAnswering were not initialized from the model checkpoint at google/electra-small-discriminator and are newly initialized: ['qa_outputs.bias', 'qa_outputs.weight']\r\nYou should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\r\nPreprocessing data... (this takes a little bit, should only happen once per dataset)\r\n```",
"Hmmm, it might be because the default data collator removes all the fields with `string` type:\r\n\r\nhttps://github.com/huggingface/transformers/blob/4c0dd199c8305903564c2edeae23d294edd4b321/src/transformers/data/data_collator.py#L107-L112\r\n\r\nI guess you also need a custom data collator that doesn't remove them.",
"can you give a tutorial about how to do this?",
"I overwrite **get_train_dataloader**, and remove **_remove_unused_columns**, but it doesn't work.\r\n\r\n```\r\n def get_train_dataloader(self) -> DataLoader:\r\n \"\"\"\r\n Returns the training :class:`~torch.utils.data.DataLoader`.\r\n\r\n Will use no sampler if :obj:`self.train_dataset` does not implement :obj:`__len__`, a random sampler (adapted\r\n to distributed training if necessary) otherwise.\r\n\r\n Subclass and override this method if you want to inject some custom behavior.\r\n \"\"\"\r\n if self.train_dataset is None:\r\n raise ValueError(\"Trainer: training requires a train_dataset.\")\r\n\r\n train_dataset = self.train_dataset\r\n # if is_datasets_available() and isinstance(train_dataset, datasets.Dataset):\r\n # train_dataset = self._remove_unused_columns(train_dataset, description=\"training\")\r\n\r\n if isinstance(train_dataset, torch.utils.data.IterableDataset):\r\n if self.args.world_size > 1:\r\n train_dataset = IterableDatasetShard(\r\n train_dataset,\r\n batch_size=self.args.train_batch_size,\r\n drop_last=self.args.dataloader_drop_last,\r\n num_processes=self.args.world_size,\r\n process_index=self.args.process_index,\r\n )\r\n\r\n return DataLoader(\r\n train_dataset,\r\n batch_size=self.args.train_batch_size,\r\n collate_fn=self.data_collator,\r\n num_workers=self.args.dataloader_num_workers,\r\n pin_memory=self.args.dataloader_pin_memory,\r\n )\r\n\r\n train_sampler = self._get_train_sampler()\r\n\r\n return DataLoader(\r\n train_dataset,\r\n batch_size=self.args.train_batch_size,\r\n sampler=train_sampler,\r\n collate_fn=self.data_collator,\r\n drop_last=self.args.dataloader_drop_last,\r\n num_workers=self.args.dataloader_num_workers,\r\n pin_memory=self.args.dataloader_pin_memory,\r\n )\r\n```",
"Hi, it works now, thank you.\r\n1. **args.remove_unused_columns=False** and **training_args.remove_unused_columns=False**\r\n2. overwrite **get_train_dataloader**, and remove **_remove_unused_columns**\r\n3. add new fields, and can be got in **inputs**. "
] |
1,068,102,994
| 3,352
|
Make LABR dataset streamable
|
closed
| 2021-12-01T08:22:27
| 2021-12-01T10:49:02
| 2021-12-01T10:49:01
|
https://github.com/huggingface/datasets/pull/3352
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3352",
"html_url": "https://github.com/huggingface/datasets/pull/3352",
"diff_url": "https://github.com/huggingface/datasets/pull/3352.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3352.patch",
"merged_at": "2021-12-01T10:49:01"
}
|
albertvillanova
| true
|
[] |
1,068,094,873
| 3,351
|
Add VCTK dataset
|
closed
| 2021-12-01T08:13:17
| 2022-02-28T09:22:03
| 2021-12-28T15:05:08
|
https://github.com/huggingface/datasets/pull/3351
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3351",
"html_url": "https://github.com/huggingface/datasets/pull/3351",
"diff_url": "https://github.com/huggingface/datasets/pull/3351.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3351.patch",
"merged_at": "2021-12-28T15:05:07"
}
|
jaketae
| true
|
[
"Hello @patrickvonplaten, I hope it's okay to ping you with a (dumb) question!\r\n\r\nI've been trying to get `dl_manager.download_and_extract(_DL_URL)` to work with no avail. I verified that this is a problem on two different machines (lab server, GCP), so I doubt it's an issue with network connectivity. Here is the full trace.\r\n\r\n```\r\n(venv) (base) jaketae@jake-gpu1:~/documents/datasets$ datasets-cli test datasets/vctk --save_infos --all_configs\r\nTesting builder 'main' (1/1)\r\nDownloading and preparing dataset vctk/main to /home/jaketae/.cache/huggingface/datasets/vctk/main/0.9.2/2bfa52a93469fa9d6d4b1831c6511db5442b9f4e48620aef2bc3890d7a5268a8...\r\nTraceback (most recent call last):\r\n File \"/home/jaketae/documents/datasets/venv/bin/datasets-cli\", line 33, in <module>\r\n sys.exit(load_entry_point('datasets', 'console_scripts', 'datasets-cli')())\r\n File \"/home/jaketae/documents/datasets/src/datasets/commands/datasets_cli.py\", line 33, in main\r\n service.run()\r\n File \"/home/jaketae/documents/datasets/src/datasets/commands/test.py\", line 146, in run\r\n builder.download_and_prepare(\r\n File \"/home/jaketae/documents/datasets/src/datasets/builder.py\", line 593, in download_and_prepare\r\n self._download_and_prepare(\r\n File \"/home/jaketae/documents/datasets/src/datasets/builder.py\", line 659, in _download_and_prepare\r\n split_generators = self._split_generators(dl_manager, **split_generators_kwargs)\r\n File \"/home/jaketae/.cache/huggingface/modules/datasets_modules/datasets/vctk/2bfa52a93469fa9d6d4b1831c6511db5442b9f4e48620aef2bc3890d7a5268a8/vctk.py\", line 76, in _split_generators\r\n root_path = dl_manager.download_and_extract(_DL_URL)\r\n File \"/home/jaketae/documents/datasets/src/datasets/utils/download_manager.py\", line 283, in download_and_extract\r\n return self.extract(self.download(url_or_urls))\r\n File \"/home/jaketae/documents/datasets/src/datasets/utils/download_manager.py\", line 195, in download\r\n downloaded_path_or_paths = map_nested(\r\n File \"/home/jaketae/documents/datasets/src/datasets/utils/py_utils.py\", line 234, in map_nested\r\n return function(data_struct)\r\n File \"/home/jaketae/documents/datasets/src/datasets/utils/download_manager.py\", line 216, in _download\r\n return cached_path(url_or_filename, download_config=download_config)\r\n File \"/home/jaketae/documents/datasets/src/datasets/utils/file_utils.py\", line 298, in cached_path\r\n output_path = get_from_cache(\r\n File \"/home/jaketae/documents/datasets/src/datasets/utils/file_utils.py\", line 608, in get_from_cache\r\n raise ConnectionError(f\"Couldn't reach {url}\")\r\nConnectionError: Couldn't reach https://datashare.is.ed.ac.uk/bitstream/handle/10283/3443/VCTK-Corpus-0.92.zip\r\n```\r\n\r\nOn my local, however, the URL correctly points to the download zip file. My admittedly naive guess is that the website is web-crawler or scraper proof (requiring specific headers, etc.), but I also think I might have just missed a very basic step in the process.\r\n\r\nApologies for the delayed PR, and TIA for the help!",
"Hey @jaketae, \r\n\r\nHmm, yeah I don't know really either - the link also works correctly for me when doing:\r\n\r\n```\r\nwget https://datashare.is.ed.ac.uk/bitstream/handle/10283/3443/VCTK-Corpus-0.92.zip\r\n```\r\n\r\nI think however that I had a similar problem previously with Edinburgh's (`.ed.ac.uk`) websites which I solved with the following hack. Not sure if this could be the same problem here...\r\nhttps://github.com/huggingface/datasets/blob/e1104ad5d3e83f8b1571e0d6fef4fdabf0a1fde5/datasets/ami/ami.py#L364\r\n\r\n",
"The AMI dataset is stored under a different website though it seems: `\"https://groups.inf.ed.ac.uk/ami/AMICorpusMirror//amicorpus/{}/audio/{}\"`\r\n\r\nso not 100p sure if this solves the problem",
"Hi @patrickvonplaten,\r\n\r\nThanks for the feedback! Sadly, disabling multi-processing didn't cut it for me. \r\n\r\nI've been looking at VCTK code in [`torchaudio`](https://pytorch.org/audio/stable/_modules/torchaudio/datasets/vctk.html) and [`tfds`](https://github.com/tensorflow/datasets/blob/master/tensorflow_datasets/audio/vctk.py). I don't think they're using a hack to accomplish this, so I'll try to look into it to see if I can pinpoint the cause. I'll keep you in the loop here. Thank you!",
"Hi @patrickvonplaten, \r\n\r\nAfter more investigation, I found that simply increasing `etag_timeout` in `get_from_cache` from 10 to 100 solved it. However, unless I'm missing something, an issue is that `etag_timeout` is basically hard-coded as a default parameter because `cached_path`, which calls `get_from_cache` has no way of modifying the default. \r\n\r\nhttps://github.com/huggingface/datasets/blob/b25ac1d62670e7b339ed552ecc37846d2abd30c7/src/datasets/utils/file_utils.py#L298-L310\r\n\r\nhttps://github.com/huggingface/datasets/blob/b25ac1d62670e7b339ed552ecc37846d2abd30c7/src/datasets/utils/file_utils.py#L497-L510\r\n\r\n\r\nI can think of two solutions.\r\n\r\n* Simply increase the default to 100\r\n* Allow `etag_timeout` to be modifiable on a per-dataset basis by integrating it to `download_config` (maybe this is already supported?)\r\n\r\nThank you!",
"I think in this case we can increase the `etag_timeout` - what do you think @lhoestq @albertvillanova ?",
"Yes let's increase it to 100 for the moment. Later we can see if it really needed to move it into `download_config` or not",
"Thanks for the feedback @patrickvonplaten @lhoestq, I'll continue working on this in that direction!",
"Hello @patrickvonplaten, VCTK is ready for review! \r\n\r\n```python\r\n>>> from datasets import load_dataset\r\n>>> ds = load_dataset(\"vctk\")\r\nUsing the latest cached version of the module from /home/lily/jt856/.cache/huggingface/modules/datasets_modules/datasets/vctk/b7aa278182de3a7aa2897cbd12c1e19f1af9840a2ead69a6d710fdbc1d2df02a (last modified on Sat Dec 25 00:47:31 2021) since it couldn't be found locally at vctk., or remotely on the Hugging Face Hub.\r\nReusing dataset vctk (/home/lily/jt856/.cache/huggingface/datasets/vctk/main/0.9.2/b7aa278182de3a7aa2897cbd12c1e19f1af9840a2ead69a6d710fdbc1d2df02a)\r\n100%|████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 198.35it/s]\r\n>>> len(ds[\"train\"])\r\n88156\r\n>>> ds[\"train\"][0]\r\n{'speaker_id': 'p225', 'audio': {'path': '/home/lily/jt856/.cache/huggingface/datasets/downloads/extracted/8ed7dad05dfffdb552a3699777442af8e8ed11e656feb277f35bf9aea448f49e/wav48_silence_trimmed/p225/p225_001_mic1.flac', 'array': array([0.00485229, 0.00689697, 0.00619507, ..., 0.00811768, 0.00836182,\r\n 0.00854492], dtype=float32), 'sampling_rate': 48000}, 'file': '/home/lily/jt856/.cache/huggingface/datasets/downloads/extracted/8ed7dad05dfffdb552a3699777442af8e8ed11e656feb277f35bf9aea448f49e/wav48_silence_trimmed/p225/p225_001_mic1.flac', 'text': 'Please call Stella.', 'text_id': '001', 'age': '23', 'gender': 'F', 'accent': 'English', 'region': 'Southern England', 'comment': ''}\r\n```\r\nA number of tests are failing on CircleCI, but from my limited knowledge they appear to be complaining about `conda` and `pip`/`wheel`-related incompatibilities. But if I'm reading them wrong and it's an issue with this PR, please let me know and I'll try to fix them.\r\n\r\nBelated merry Christmas and a happy new year!"
] |
1,068,078,160
| 3,350
|
Avoid content-encoding issue while streaming datasets
|
closed
| 2021-12-01T07:56:48
| 2021-12-01T08:15:01
| 2021-12-01T08:15:00
|
https://github.com/huggingface/datasets/pull/3350
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3350",
"html_url": "https://github.com/huggingface/datasets/pull/3350",
"diff_url": "https://github.com/huggingface/datasets/pull/3350.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3350.patch",
"merged_at": "2021-12-01T08:15:00"
}
|
albertvillanova
| true
|
[] |
1,067,853,601
| 3,349
|
raise exception instead of using assertions.
|
closed
| 2021-12-01T01:37:51
| 2021-12-20T16:07:27
| 2021-12-20T16:07:27
|
https://github.com/huggingface/datasets/pull/3349
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3349",
"html_url": "https://github.com/huggingface/datasets/pull/3349",
"diff_url": "https://github.com/huggingface/datasets/pull/3349.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3349.patch",
"merged_at": "2021-12-20T16:07:27"
}
|
manisnesan
| true
|
[
"@mariosasko - Thanks for the review & suggestions. Updated as per the suggestions. ",
"@mariosasko - Hello, Are there any additional changes required from my end??. Wondering if this PR can be merged or still pending on additional steps.",
"@mariosasko - The approved changes in the PR now has conflicts with the master branch. Would you like me to resolve the conflicts??. Let me know. ",
"@mariosasko @lhoestq - Gentle reminder about my previous question. ",
"Hi ! Thanks for the heads up :)\r\nI just resolved the conflicts, it should be alright now",
"Merging, thanks for the help @manisnesan !"
] |
1,067,831,113
| 3,348
|
BLEURT: Match key names to correspond with filename
|
closed
| 2021-12-01T01:01:18
| 2021-12-07T16:06:57
| 2021-12-07T16:06:57
|
https://github.com/huggingface/datasets/pull/3348
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3348",
"html_url": "https://github.com/huggingface/datasets/pull/3348",
"diff_url": "https://github.com/huggingface/datasets/pull/3348.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3348.patch",
"merged_at": "2021-12-07T16:06:57"
}
|
jaehlee
| true
|
[
"Thanks for the suggestion! I think the current checked-in `CHECKPOINT_URLS` is already not working. I believe anyone who tried using the new ckpts (`BLEURT-20-X`) can't unless this fix is in. The zip file from bleurt side unzips to directory name matching the filename (capitalized for new ones). For example without current changes I'd get the following error\r\n\r\n```\r\n---------------------------------------------------------------------------\r\nAssertionError Traceback (most recent call last)\r\n<ipython-input-5-f6832fe20f84> in <module>()\r\n 1 predictions = [\"hello there\", \"general kenobi\"]\r\n 2 references = [\"hello there\", \"general kenobi\"]\r\n----> 3 bleurt = datasets.load_metric(\"bleurt\", \"bleurt-20\")\r\n 4 results = bleurt.compute(predictions=predictions, references=references)\r\n\r\n4 frames\r\n/usr/local/lib/python3.7/dist-packages/bleurt/checkpoint.py in read_bleurt_config(path)\r\n 84 \"\"\"Reads and checks config file from a BLEURT checkpoint.\"\"\"\r\n 85 assert tf.io.gfile.exists(path), \\\r\n---> 86 \"Could not find BLEURT checkpoint {}\".format(path)\r\n 87 config_path = os.path.join(path, CONFIG_FILE)\r\n 88 assert tf.io.gfile.exists(config_path), \\\r\n\r\nAssertionError: Could not find BLEURT checkpoint /root/.cache/huggingface/metrics/bleurt/bleurt-20/downloads/extracted/e34c60f1a05394ecda54e253a10413ca7b5d59f9a23f3cc73258c6b78ffa2f50/bleurt-20\r\n```\r\ninspecting specified path I see that directory name is `BLEURT-20` instead of `bleurt-20`. \r\nOther solution similar to your suggestion is meddle with `dl_manager.download_and_extract` to unzip to paths with lowering all the paths but I imagine this will affect other parts of the library. ",
"Indeed, good catch ! Your solution that fixes `CHECKPOINT_URLS ` is simple and works well, thanks :)\r\n\r\nFurthermore to avoid breaking changes though we could also keep the support for the lowercase one:\r\n```python\r\n if self.config_name.lower() in CHECKPOINT_URLS:\r\n checkpoint_name = self.config_name.lower()\r\n elif self.config_name.upper() in CHECKPOINT_URLS:\r\n checkpoint_name = self.config_name.upper()\r\n else:\r\n raise KeyError(\r\n f\"{self.config_name} model not found. You should supply the name of a model checkpoint for bleurt in {CHECKPOINT_URLS.keys()}\"\r\n )\r\n```\r\nand then we can use `checkpoint_name` instead of `self.config_name` to download and instantiate the model:\r\n```python\r\n model_path = dl_manager.download_and_extract(CHECKPOINT_URLS[checkpoint_name])\r\n self.scorer = score.BleurtScorer(os.path.join(model_path, checkpoint_name))\r\n```\r\n\r\nPlease let me know if that sounds reasonable to you !",
"Thanks for the suggestion! I believe your suggestion should work to make keys case insensitive. Changes are committed to the PR now. "
] |
1,067,738,902
| 3,347
|
iter_archive for zip files
|
closed
| 2021-11-30T22:34:17
| 2021-12-04T00:22:22
| 2021-12-04T00:22:11
|
https://github.com/huggingface/datasets/pull/3347
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3347",
"html_url": "https://github.com/huggingface/datasets/pull/3347",
"diff_url": "https://github.com/huggingface/datasets/pull/3347.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3347.patch",
"merged_at": null
}
|
Mehdi2402
| true
|
[
"And also don't always try streaming with Google Drive - it can have issues because of how Google Drive works (with quotas, restrictions, etc.) and it can indeed cause `BlockSizeError`.\r\n\r\nFeel free to host your test data elsewhere, such as in a dataset repository on https://huggingface.co (see [here](https://huggingface.co/docs/datasets/upload_dataset.html#upload-your-files) for a tutorial on how to upload files)"
] |
1,067,632,365
| 3,346
|
Failed to convert `string` with pyarrow for QED since 1.15.0
|
closed
| 2021-11-30T20:11:42
| 2021-12-14T14:39:05
| 2021-12-14T14:39:05
|
https://github.com/huggingface/datasets/issues/3346
| null |
tianjianjiang
| false
|
[
"Scratch that, probably the old and incompatible usage of dataset builder from promptsource.",
"Actually, re-opening this issue cause the error persists\r\n\r\n```python\r\n>>> load_dataset(\"qed\")\r\nDownloading and preparing dataset qed/qed (download: 13.43 MiB, generated: 9.70 MiB, post-processed: Unknown size, total: 23.14 MiB) to /home/victor_huggingface_co/.cache/huggingface/datasets/qed/qed/1.0.0/47d8b6f033393aa520a8402d4baf2d6bdc1b2fbde3dc156e595d2ef34caf7d75...\r\n100%|███████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2228.64it/s]\r\nTraceback (most recent call last): \r\n File \"<stdin>\", line 1, in <module>\r\n File \"/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/load.py\", line 1669, in load_dataset\r\n use_auth_token=use_auth_token,\r\n File \"/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/builder.py\", line 594, in download_and_prepare\r\n dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs\r\n File \"/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/builder.py\", line 681, in _download_and_prepare\r\n self._prepare_split(split_generator, **prepare_split_kwargs)\r\n File \"/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/builder.py\", line 1083, in _prepare_split\r\n num_examples, num_bytes = writer.finalize()\r\n File \"/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/arrow_writer.py\", line 468, in finalize\r\n self.write_examples_on_file()\r\n File \"/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/arrow_writer.py\", line 339, in write_examples_on_file\r\n pa_array = pa.array(typed_sequence)\r\n File \"pyarrow/array.pxi\", line 229, in pyarrow.lib.array\r\n File \"pyarrow/array.pxi\", line 110, in pyarrow.lib._handle_arrow_array_protocol\r\n File \"/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/arrow_writer.py\", line 125, in __arrow_array__\r\n out = pa.array(cast_to_python_objects(self.data, only_1d_for_numpy=True), type=type)\r\n File \"pyarrow/array.pxi\", line 315, in pyarrow.lib.array\r\n File \"pyarrow/array.pxi\", line 39, in pyarrow.lib._sequence_to_array\r\n File \"pyarrow/error.pxi\", line 143, in pyarrow.lib.pyarrow_internal_check_status\r\n File \"pyarrow/error.pxi\", line 99, in pyarrow.lib.check_status\r\npyarrow.lib.ArrowInvalid: Could not convert 'in' with type str: tried to convert to boolean\r\n```\r\n\r\nEnvironment (datasets and pyarrow):\r\n\r\n```bash\r\n(promptsource) victor_huggingface_co@victor-dev:~/promptsource$ datasets-cli env\r\n\r\nCopy-and-paste the text below in your GitHub issue.\r\n\r\n- `datasets` version: 1.16.1\r\n- Platform: Linux-5.0.0-1020-gcp-x86_64-with-debian-buster-sid\r\n- Python version: 3.7.11\r\n- PyArrow version: 6.0.1\r\n```\r\n```bash\r\n(promptsource) victor_huggingface_co@victor-dev:~/promptsource$ pip show pyarrow\r\nName: pyarrow\r\nVersion: 6.0.1\r\nSummary: Python library for Apache Arrow\r\nHome-page: https://arrow.apache.org/\r\nAuthor: \r\nAuthor-email: \r\nLicense: Apache License, Version 2.0\r\nLocation: /home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages\r\nRequires: numpy\r\nRequired-by: streamlit, datasets\r\n```"
] |
1,067,622,951
| 3,345
|
Failed to download species_800 from Google Drive zip file
|
closed
| 2021-11-30T20:00:28
| 2021-12-01T17:53:15
| 2021-12-01T17:53:15
|
https://github.com/huggingface/datasets/issues/3345
| null |
tianjianjiang
| false
|
[
"Hi,\r\n\r\nthe dataset is downloaded normally on my machine. Maybe the URL was down at the time of your download. Could you try again?",
"> Hi,\r\n> \r\n> the dataset is downloaded normally on my machine. Maybe the URL was down at the time of your download. Could you try again?\r\n\r\nI have tried that many times with both load_dataset() and a browser almost simultaneously. The browser always works for me while load_dataset() fails.",
"@mariosasko \r\n> the dataset is downloaded normally on my machine. Maybe the URL was down at the time of your download. Could you try again?\r\n\r\nI've tried yet again just a moment ago. This time I realize that, the step `(... post-processed: Unknown size, total: 20.89 MiB) to /Users/mike/.cache/huggingface/datasets/species800/species_800/1.0.0/532167f0bb8fbc0d77d6d03c4fd642c8c55527b9c5f2b1da77f3d00b0e559976...` and the one after seem unstable. If I want to retry, I will have to delete it (and probably other cache lock files). It **_sometimes_** works.\r\n\r\nBut I didn't try `download_mode=\"force_redownload\"` yet.\r\n\r\nAnyway, I suppose this isn't really a pressing issue for the time being, so I'm going to close this. Thank you.\r\n\r\n"
] |
1,067,567,603
| 3,344
|
Add ArrayXD docs
|
closed
| 2021-11-30T18:53:31
| 2021-12-01T20:16:03
| 2021-12-01T19:35:32
|
https://github.com/huggingface/datasets/pull/3344
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3344",
"html_url": "https://github.com/huggingface/datasets/pull/3344",
"diff_url": "https://github.com/huggingface/datasets/pull/3344.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3344.patch",
"merged_at": "2021-12-01T19:35:32"
}
|
stevhliu
| true
|
[] |
1,067,505,507
| 3,343
|
Better error message when download fails
|
closed
| 2021-11-30T17:38:50
| 2021-12-01T11:27:59
| 2021-12-01T11:27:58
|
https://github.com/huggingface/datasets/pull/3343
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3343",
"html_url": "https://github.com/huggingface/datasets/pull/3343",
"diff_url": "https://github.com/huggingface/datasets/pull/3343.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3343.patch",
"merged_at": "2021-12-01T11:27:58"
}
|
lhoestq
| true
|
[] |
1,067,481,390
| 3,342
|
Fix ASSET dataset data URLs
|
closed
| 2021-11-30T17:13:30
| 2021-12-14T14:50:00
| 2021-12-14T14:50:00
|
https://github.com/huggingface/datasets/pull/3342
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3342",
"html_url": "https://github.com/huggingface/datasets/pull/3342",
"diff_url": "https://github.com/huggingface/datasets/pull/3342.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3342.patch",
"merged_at": "2021-12-14T14:50:00"
}
|
tianjianjiang
| true
|
[
"> Hi @tianjianjiang, thanks for the fix.\r\n> The links should also be updated in the `dataset_infos.json` file.\r\n> The failing tests are due to the missing tag in the header of the `README.md` file:\r\n\r\nHi @albertvillanova, thank you for the info! My apologies for the messy PR.\r\n"
] |
1,067,449,569
| 3,341
|
Mirror the canonical datasets to the Hugging Face Hub
|
closed
| 2021-11-30T16:42:05
| 2022-01-26T14:47:37
| 2022-01-26T14:47:37
|
https://github.com/huggingface/datasets/issues/3341
| null |
severo
| false
|
[
"I created a GitHub project to keep track of what needs to be done:\r\nhttps://github.com/huggingface/datasets/projects/3\r\n\r\nI also store my code in a (private for now) repository at https://github.com/huggingface/mirror_canonical_datasets_on_hub",
"I understand that the datasets are mirrored on the Hub now, right? Might I close @lhoestq @SBrandeis?"
] |
1,067,292,636
| 3,340
|
Fix JSON ClassLabel casting for integers
|
closed
| 2021-11-30T14:19:54
| 2021-12-01T11:27:30
| 2021-12-01T11:27:30
|
https://github.com/huggingface/datasets/pull/3340
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3340",
"html_url": "https://github.com/huggingface/datasets/pull/3340",
"diff_url": "https://github.com/huggingface/datasets/pull/3340.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3340.patch",
"merged_at": "2021-12-01T11:27:30"
}
|
lhoestq
| true
|
[] |
1,066,662,477
| 3,339
|
to_tf_dataset fails on TPU
|
open
| 2021-11-30T00:50:52
| 2021-12-02T14:21:27
| null |
https://github.com/huggingface/datasets/issues/3339
| null |
nbroad1881
| false
|
[
"This might be related to https://github.com/tensorflow/tensorflow/issues/38762 , what do you think @Rocketknight1 ?\r\n> Dataset.from_generator is expected to not work with TPUs as it uses py_function underneath which is incompatible with Cloud TPU 2VM setup. If you would like to read from large datasets, maybe try to materialize it on disk and use TFRecordDataest instead.",
"Hi @lhoestq @nbroad1881, I think it's very similar, yes. Unfortunately `to_tf_dataset` uses `tf.numpy_function` which can't be compiled - this is a necessary evil to load from the underlying Arrow dataset. We need to update the notebooks/examples to clarify that this won't work, or to identify a workaround. You may be able to get it to work on an actual cloud TPU VM, but those are quite new and we haven't tested it yet. ",
"Thank you for the explanation. I didn't realize the nuances of `tf.numpy_function`. In this scenario, would it be better to use `export(format='tfrecord')` ? It's not quite the same, but for very large datasets that don't fit in memory it looks like it is the only option. I haven't used `export` before, but I do recall reading that there are suggestions for how big and how many tfrecords there should be to not bottleneck the TPU. It might be nice if there were a way for the `export` method to split the files up into appropriate chunk sizes depending on the size of the dataset and the number of devices. And if that is too much, it would be nice to be able to specify the number of files that would be created when using `export`. Well... maybe the user should just do the chunking themselves and call `export` a bunch of times. Whatever the case, you have been helpful. Thanks Tensorflow boy ;-) ",
"Yeah, this is something we really should have a proper guide on. I'll make a note to test some things and make a 'TF TPU best practices' notebook at some point, but in the meantime I think your solution of exporting TFRecords will probably work. ",
"Also: I knew that tweet would haunt me"
] |
1,066,371,235
| 3,338
|
[WIP] Add doctests for tutorials
|
closed
| 2021-11-29T18:40:46
| 2023-05-05T17:18:20
| 2023-05-05T17:18:15
|
https://github.com/huggingface/datasets/pull/3338
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3338",
"html_url": "https://github.com/huggingface/datasets/pull/3338",
"diff_url": "https://github.com/huggingface/datasets/pull/3338.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3338.patch",
"merged_at": null
}
|
stevhliu
| true
|
[
"I manage to remove the mentions of ellipsis in the code by launching the command as follows:\r\n\r\n```\r\npython -m doctest -v docs/source/load_hub.rst -o=ELLIPSIS\r\n```\r\n\r\nThe way you put your ellipsis will only work on mac, I've adapted it for linux as well with the following:\r\n\r\n```diff\r\n >>> from datasets import load_dataset_builder\r\n >>> dataset_builder = load_dataset_builder('imdb')\r\n- >>> print(dataset_builder.cache_dir) #doctest: +ELLIPSIS\r\n- /Users/.../.cache/huggingface/datasets/imdb/plain_text/1.0.0/...\r\n+ >>> print(dataset_builder.cache_dir)\r\n+ /.../.cache/huggingface/datasets/imdb/plain_text/1.0.0/...\r\n```\r\n\r\nThis passes on my machine:\r\n\r\n```\r\nTrying:\r\n print(dataset_builder.cache_dir)\r\nExpecting:\r\n /.../.cache/huggingface/datasets/imdb/plain_text/1.0.0/...\r\nok\r\n```\r\n\r\nI'm getting a last error:\r\n\r\n```py\r\nExpected:\r\n DatasetDict({\r\n train: Dataset({\r\n features: ['sentence1', 'sentence2', 'label', 'idx'],\r\n num_rows: 3668\r\n })\r\n validation: Dataset({\r\n features: ['sentence1', 'sentence2', 'label', 'idx'],\r\n num_rows: 408\r\n })\r\n test: Dataset({\r\n features: ['sentence1', 'sentence2', 'label', 'idx'],\r\n num_rows: 1725\r\n })\r\n })\r\nGot:\r\n DatasetDict({\r\n train: Dataset({\r\n features: ['idx', 'label', 'sentence1', 'sentence2'],\r\n num_rows: 3668\r\n })\r\n validation: Dataset({\r\n features: ['idx', 'label', 'sentence1', 'sentence2'],\r\n num_rows: 408\r\n })\r\n test: Dataset({\r\n features: ['idx', 'label', 'sentence1', 'sentence2'],\r\n num_rows: 1725\r\n })\r\n })\r\n```\r\n\r\nBut this is due to `doctest` looking for an exact match and the list having an unordered print order. I wish `doctest` would be a bit more flexible with that."
] |
1,066,232,936
| 3,337
|
Typing of Dataset.__getitem__ could be improved.
|
closed
| 2021-11-29T16:20:11
| 2021-12-14T10:28:54
| 2021-12-14T10:28:54
|
https://github.com/huggingface/datasets/issues/3337
| null |
Dref360
| false
|
[
"Hi ! Thanks for the suggestion, I didn't know about this decorator.\r\n\r\nIf you are interesting in contributing, feel free to open a pull request to add the overload methods for each typing combination :) To assign you to this issue, you can comment `#self-assign` in this thread.\r\n\r\n`Dataset.__getitem__` is defined right here: https://github.com/huggingface/datasets/blob/e6f1352fe19679de897f3d962e616936a17094f5/src/datasets/arrow_dataset.py#L1840",
"#self-assign"
] |
1,066,208,436
| 3,336
|
Add support for multiple dynamic dimensions and to_pandas conversion for dynamic arrays
|
closed
| 2021-11-29T15:58:59
| 2023-09-24T09:53:52
| 2023-05-16T18:24:46
|
https://github.com/huggingface/datasets/pull/3336
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3336",
"html_url": "https://github.com/huggingface/datasets/pull/3336",
"diff_url": "https://github.com/huggingface/datasets/pull/3336.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3336.patch",
"merged_at": null
}
|
mariosasko
| true
|
[] |
1,066,064,126
| 3,335
|
add Speech commands dataset
|
closed
| 2021-11-29T13:52:47
| 2021-12-10T10:37:21
| 2021-12-10T10:30:15
|
https://github.com/huggingface/datasets/pull/3335
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3335",
"html_url": "https://github.com/huggingface/datasets/pull/3335",
"diff_url": "https://github.com/huggingface/datasets/pull/3335.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3335.patch",
"merged_at": "2021-12-10T10:30:15"
}
|
polinaeterna
| true
|
[
"@anton-l ping",
"@lhoestq \r\nHi Quentin! Thank you for your feedback and suggestions! 🤗\r\n\r\nYes, that was actually what I wanted to do next - I mean the steaming stuff :)\r\nAlso, I need to make some changes to the readme (to account for the updated features set).\r\n\r\nHopefully, I will be done by tomorrow afternoon if that's ok. \r\n",
"@lhoestq Hi Quentin!\r\n\r\nI've implemented (hopefully, correctly) the streaming compatibility but the problem with the current approach is that we first need to iterate over the full archive anyway to get the list of filenames for train and validation sets (see [this](https://github.com/huggingface/datasets/pull/3335/files#diff-aeea540d136025e30a842856779e9c6485a5dc6fc9eb7fd6d3be2acd2f49b8e3R186), the same approach is implemented in TFDS version). Only after that, we can generate examples, so we cannot stream the dataset before the first iteration ends and it takes some time. It's probably not the most effective way. \r\n\r\nIf the streaming mode is turned off, this approach (with two iterations) is actually slower than the previous implementation (with archive extraction). \r\n\r\nMy suggestion is to host separate archives for each split prepared in advance. That way there would be no need for iterating over the common archive to collect train and validation filenames. @anton-l suggested to make AWS mirrors for them. I've prepared these archives, for now you can take a look at them [here](https://drive.google.com/drive/folders/1oMrZHzPgHAKprKJuvih91CM8KMSzh_pL?usp=sharing). I simplified their structure a bit so if we switch to using them, the code then should be changed (and simplified) a bit too.\r\n",
"Hi ! Thanks for the changes :)\r\n\r\n> My suggestion is to host separate archives for each split prepared in advance. That way there would be no need for iterating over the common archive to collect train and validation filenames. @anton-l suggested to make AWS mirrors for them. I've prepared these archives, for now you can take a look at them here. I simplified their structure a bit so if we switch to using them, the code then should be changed (and simplified) a bit too.\r\n\r\nI agree, I just uploaded them on AWS\r\n\r\nhttps://s3.amazonaws.com/datasets.huggingface.co/SpeechCommands/v0.01/v0.01_test.tar.gz\r\nhttps://s3.amazonaws.com/datasets.huggingface.co/SpeechCommands/v0.01/v0.01_train.tar.gz\r\nhttps://s3.amazonaws.com/datasets.huggingface.co/SpeechCommands/v0.01/v0.01_validation.tar.gz\r\nhttps://s3.amazonaws.com/datasets.huggingface.co/SpeechCommands/v0.02/v0.02_test.tar.gz\r\nhttps://s3.amazonaws.com/datasets.huggingface.co/SpeechCommands/v0.02/v0.02_validation.tar.gz\r\n\r\nNote that in the future we can move those files to actual repositories on the Hugging Face Hub, since we are migrating the datasets from this repository to the Hugging Face Hub (as mirrors), to make them more accessible to the community.",
"@lhoestq Thank you! Gonna look at this tomorrow :)",
"@lhoestq I've modified the code to fit new data format, now it works for v0.01 but doesn't work for v0.02 as the training archive is missing. Could you please create a mirror for that one too? You can find it [here](https://drive.google.com/file/d/1mPjnVMYb-VhPprGlOX8v9TBT1GT-rtcp/view?usp=sharing)\r\n\r\nAnd when it's done I'll need to regenerate all the meta / dummy stuff, and this version will be ready for a review :)",
"Here you go :)\r\nhttps://s3.amazonaws.com/datasets.huggingface.co/SpeechCommands/v0.02/v0.02_train.tar.gz",
"FYI I juste merged a fix for the Windows CI error on `master`, feel free to merge `master` again into your branch",
"All green ! I had to fix some minor stuff in the CI but it's good now\r\n\r\nNext step is to mark it as ready for review, and I think it's all good so we can merge 🚀 ",
"@lhoestq 🤗",
":tada: "
] |
1,065,983,923
| 3,334
|
Integrate Polars library
|
closed
| 2021-11-29T12:31:54
| 2024-08-31T05:31:28
| 2024-08-31T05:31:27
|
https://github.com/huggingface/datasets/issues/3334
| null |
albertvillanova
| false
|
[
"If possible, a neat API could be something like `Dataset.to_polars()`, as well as `Dataset.set_format(\"polars\")`",
"Note they use a \"custom\" implementation of Arrow: [Arrow2](https://github.com/jorgecarleitao/arrow2).",
"Polars has grown rapidly in popularity over the last year - could you consider integrating the Polars functionality again?\r\n\r\nI don't think the \"custom\" implementation should be a barrier, it still conforms to the Arrow specification ",
"Is there some direction regarding this from the HF team @lewtun ? Can conversion from polars to HF dataset be implemented with limited/zero copy? So, something like ``Dataset.from_polars()`` and ``Dataset.to_polars()`` like you mentioned. Happy to contribute if I can get some pointers on how this may be implemented.",
"Hi, is there any updates? Thanks!",
"> Hi, is there any updates? Thanks!\r\n\r\nThe feature has been there for a bit 😊 You can call `dataset.to_polars()` (on a `Dataset`, not a `DatasetDict`). The issue can be closed, I guess! @lhoestq ",
"Looks great and thanks!",
"Thank you."
] |
1,065,346,919
| 3,333
|
load JSON files, get the errors
|
closed
| 2021-11-28T14:29:58
| 2021-12-01T09:34:31
| 2021-12-01T03:57:48
|
https://github.com/huggingface/datasets/issues/3333
| null |
PatricYan
| false
|
[
"Hi ! The message you're getting is not an error. It simply says that your JSON dataset is being prepared to a location in `/root/.cache/huggingface/datasets`",
"> \r\n\r\nbut I want to load local JSON file by command\r\n`python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`\r\n\r\n**squad-retrain-data/train-v2.0.json** is the local JSON file, how to load it and map it to a special structure?",
"You can load it with `dataset = datasets.load_dataset('json', data_files=args.dataset)` as you said.\r\nThen if you need to apply additional processing to map it to a special structure, you can use rename columns or use `dataset.map`. For more information, you can check the documentation here: https://huggingface.co/docs/datasets/process.html\r\n\r\nAlso feel free to share your `run.py` code so we can take a look",
"```\r\n# Dataset selection\r\n if args.dataset.endswith('.json') or args.dataset.endswith('.jsonl'):\r\n dataset_id = None\r\n # Load from local json/jsonl file\r\n dataset = datasets.load_dataset('json', data_files=args.dataset)\r\n # By default, the \"json\" dataset loader places all examples in the train split,\r\n # so if we want to use a jsonl file for evaluation we need to get the \"train\" split\r\n # from the loaded dataset\r\n eval_split = 'train'\r\n else:\r\n default_datasets = {'qa': ('squad',), 'nli': ('snli',)}\r\n dataset_id = tuple(args.dataset.split(':')) if args.dataset is not None else \\\r\n default_datasets[args.task]\r\n # MNLI has two validation splits (one with matched domains and one with mismatched domains). Most datasets just have one \"validation\" split\r\n eval_split = 'validation_matched' if dataset_id == ('glue', 'mnli') else 'validation'\r\n # Load the raw data\r\n dataset = datasets.load_dataset(*dataset_id)\r\n```\r\n\r\nI want to load JSON squad dataset instead `dataset = datasets.load_dataset('squad')` to retrain the model. \r\n",
"If your JSON has the same format as the SQuAD dataset, then you need to pass `field=\"data\"` to `load_dataset`, since the SQuAD format is one big JSON object in which the \"data\" field contains the list of questions and answers.\r\n```python\r\ndataset = datasets.load_dataset('json', data_files=args.dataset, field=\"data\")\r\n```\r\n\r\nLet me know if that helps :)\r\n\r\n",
"Yes, code works. but the format is not as expected.\r\n```\r\ndataset = datasets.load_dataset('json', data_files=args.dataset, field=\"data\")\r\n```\r\n```\r\npython3 run.py --do_train --task qa --dataset squad --output_dir ./re_trained_model/\r\n```\r\n************ train_dataset: Dataset({\r\n features: ['id', 'title', 'context', 'question', 'answers'],\r\n num_rows: 87599\r\n})\r\n\r\n\r\n```\r\npython3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/\r\n```\r\n************ train_dataset: Dataset({\r\n features: ['title', 'paragraphs'],\r\n num_rows: 442\r\n})\r\n\r\nI want the JSON to have the same format as before features. https://github.com/huggingface/datasets/blob/master/datasets/squad_v2/squad_v2.py is the script dealing with **squad** but how can I apply it by using JSON? ",
"Ok I see, you have the paragraphs so you just need to process them to extract the questions and answers. I think you can process the SQuAD-like data this way:\r\n```python\r\ndef process_squad(articles):\r\n out = {\r\n \"title\": [],\r\n \"context\": [],\r\n \"question\": [],\r\n \"id\": [],\r\n \"answers\": [],\r\n }\r\n for title, paragraphs in zip(articles[\"title\"], articles[\"paragraphs\"]):\r\n for paragraph in paragraphs:\r\n for qa in paragraph[\"qas\"]:\r\n out[\"title\"].append(title)\r\n out[\"context\"].append(paragraph[\"context\"])\r\n out[\"question\"].append(qa[\"question\"])\r\n out[\"id\"].append(qa[\"id\"])\r\n out[\"answers\"].append({\r\n \"answer_start\": [answer[\"answer_start\"] for answer in qa[\"answers\"]],\r\n \"text\": [answer[\"text\"] for answer in qa[\"answers\"]],\r\n })\r\n return out\r\n\r\ndataset = dataset.map(process_squad, batched=True, remove_columns=[\"paragraphs\"])\r\n```\r\n\r\nI adapted the code from [squad.py](https://github.com/huggingface/datasets/blob/master/datasets/squad/squad.py). The code takes as input a batch of articles (title + paragraphs) and gets all the questions and answers from the JSON structure.\r\n\r\nThe output is a dataset with `features: ['answers', 'context', 'id', 'question', 'title']`\r\n\r\nLet me know if that helps !\r\n",
"Yes, this works. But how to get the training output during training the squad by **Trainer** \r\nfor example https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/trainer_qa.py \r\nI want the training inputs, labels, outputs for every epoch and step to produce the training dynamic graph",
"I think you may need to implement your own Trainer, from the `QuestionAnsweringTrainer` for example.\r\nThis way you can have the flexibility of saving all the inputs/output used at each step",
"does there have any function to be overwritten to do this?",
"> does there have any function to be overwritten to do this?\r\n\r\nok, I overwrote the compute_loss, thank you.",
"Hi, I add one field **example_id**, but I can't see it in the **comput_loss** function, how can I do this? below is the information of inputs\r\n\r\n```\r\n*********************** inputs: {'attention_mask': tensor([[1, 1, 1, ..., 0, 0, 0],\r\n [1, 1, 1, ..., 0, 0, 0],\r\n [1, 1, 1, ..., 0, 0, 0],\r\n ...,\r\n [1, 1, 1, ..., 0, 0, 0],\r\n [1, 1, 1, ..., 0, 0, 0],\r\n [1, 1, 1, ..., 0, 0, 0]], device='cuda:0'), 'end_positions': tensor([ 25, 97, 93, 44, 25, 112, 109, 134], device='cuda:0'), 'input_ids': tensor([[ 101, 2054, 2390, ..., 0, 0, 0],\r\n [ 101, 2054, 2515, ..., 0, 0, 0],\r\n [ 101, 2054, 2106, ..., 0, 0, 0],\r\n ...,\r\n [ 101, 2339, 2001, ..., 0, 0, 0],\r\n [ 101, 2054, 2515, ..., 0, 0, 0],\r\n [ 101, 2054, 2003, ..., 0, 0, 0]], device='cuda:0'), 'start_positions': tensor([ 20, 90, 89, 41, 25, 96, 106, 132], device='cuda:0'), 'token_type_ids': tensor([[0, 0, 0, ..., 0, 0, 0],\r\n [0, 0, 0, ..., 0, 0, 0],\r\n [0, 0, 0, ..., 0, 0, 0],\r\n ...,\r\n [0, 0, 0, ..., 0, 0, 0],\r\n [0, 0, 0, ..., 0, 0, 0],\r\n [0, 0, 0, ..., 0, 0, 0]], device='cuda:0')} \r\n```\r\n\r\n```\r\n# This function preprocesses a question answering dataset, tokenizing the question and context text\r\n# and finding the right offsets for the answer spans in the tokenized context (to use as labels).\r\n# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py\r\ndef prepare_train_dataset_qa(examples, tokenizer, max_seq_length=None):\r\n questions = [q.lstrip() for q in examples[\"question\"]]\r\n max_seq_length = tokenizer.model_max_length\r\n # tokenize both questions and the corresponding context\r\n # if the context length is longer than max_length, we split it to several\r\n # chunks of max_length\r\n tokenized_examples = tokenizer(\r\n questions,\r\n examples[\"context\"],\r\n truncation=\"only_second\",\r\n max_length=max_seq_length,\r\n stride=min(max_seq_length // 2, 128),\r\n return_overflowing_tokens=True,\r\n return_offsets_mapping=True,\r\n padding=\"max_length\"\r\n )\r\n\r\n # Since one example might give us several features if it has a long context,\r\n # we need a map from a feature to its corresponding example.\r\n sample_mapping = tokenized_examples.pop(\"overflow_to_sample_mapping\")\r\n # The offset mappings will give us a map from token to character position\r\n # in the original context. This will help us compute the start_positions\r\n # and end_positions to get the final answer string.\r\n offset_mapping = tokenized_examples.pop(\"offset_mapping\")\r\n\r\n tokenized_examples[\"start_positions\"] = []\r\n tokenized_examples[\"end_positions\"] = []\r\n\r\n tokenized_examples[\"example_id\"] = []\r\n\r\n for i, offsets in enumerate(offset_mapping):\r\n input_ids = tokenized_examples[\"input_ids\"][i]\r\n # We will label features not containing the answer the index of the CLS token.\r\n cls_index = input_ids.index(tokenizer.cls_token_id)\r\n sequence_ids = tokenized_examples.sequence_ids(i)\r\n # from the feature idx to sample idx\r\n sample_index = sample_mapping[i]\r\n # get the answer for a feature\r\n answers = examples[\"answers\"][sample_index]\r\n\r\n tokenized_examples[\"example_id\"].append(examples[\"id\"][sample_index])\r\n\r\n if len(answers[\"answer_start\"]) == 0:\r\n tokenized_examples[\"start_positions\"].append(cls_index)\r\n tokenized_examples[\"end_positions\"].append(cls_index)\r\n else:\r\n # Start/end character index of the answer in the text.\r\n start_char = answers[\"answer_start\"][0]\r\n end_char = start_char + len(answers[\"text\"][0])\r\n\r\n # Start token index of the current span in the text.\r\n token_start_index = 0\r\n while sequence_ids[token_start_index] != 1:\r\n token_start_index += 1\r\n\r\n # End token index of the current span in the text.\r\n token_end_index = len(input_ids) - 1\r\n while sequence_ids[token_end_index] != 1:\r\n token_end_index -= 1\r\n\r\n # Detect if the answer is out of the span (in which case this feature is labeled with the CLS index).\r\n if not (offsets[token_start_index][0] <= start_char and\r\n offsets[token_end_index][1] >= end_char):\r\n tokenized_examples[\"start_positions\"].append(cls_index)\r\n tokenized_examples[\"end_positions\"].append(cls_index)\r\n else:\r\n # Otherwise move the token_start_index and token_end_index to the two ends of the answer.\r\n # Note: we could go after the last offset if the answer is the last word (edge case).\r\n while token_start_index < len(offsets) and \\\r\n offsets[token_start_index][0] <= start_char:\r\n token_start_index += 1\r\n tokenized_examples[\"start_positions\"].append(\r\n token_start_index - 1)\r\n while offsets[token_end_index][1] >= end_char:\r\n token_end_index -= 1\r\n tokenized_examples[\"end_positions\"].append(token_end_index + 1)\r\n\r\n return tokenized_examples\r\n```"
] |
1,065,345,853
| 3,332
|
Fix error message and add extension fallback
|
closed
| 2021-11-28T14:25:29
| 2021-11-29T13:34:15
| 2021-11-29T13:34:14
|
https://github.com/huggingface/datasets/pull/3332
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3332",
"html_url": "https://github.com/huggingface/datasets/pull/3332",
"diff_url": "https://github.com/huggingface/datasets/pull/3332.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3332.patch",
"merged_at": "2021-11-29T13:34:14"
}
|
mariosasko
| true
|
[] |
1,065,275,896
| 3,331
|
AttributeError: 'CommunityDatasetModuleFactoryWithoutScript' object has no attribute 'path'
|
closed
| 2021-11-28T08:54:05
| 2021-11-29T13:49:44
| 2021-11-29T13:34:14
|
https://github.com/huggingface/datasets/issues/3331
| null |
luozhouyang
| false
|
[
"Hi,\r\n\r\nthe fix was merged and will be available in the next release of `datasets`.\r\nIn the meantime, you can use it by installing `datasets` directly from master as follows:\r\n```\r\npip install git+https://github.com/huggingface/datasets.git\r\n```"
] |
1,065,176,619
| 3,330
|
Change TriviaQA license (#3313)
|
closed
| 2021-11-28T03:26:45
| 2021-11-29T11:24:21
| 2021-11-29T11:24:21
|
https://github.com/huggingface/datasets/pull/3330
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3330",
"html_url": "https://github.com/huggingface/datasets/pull/3330",
"diff_url": "https://github.com/huggingface/datasets/pull/3330.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3330.patch",
"merged_at": "2021-11-29T11:24:21"
}
|
avinashsai
| true
|
[] |
1,065,096,971
| 3,329
|
Map function: Type error on iter #999
|
closed
| 2021-11-27T17:53:05
| 2021-11-29T20:40:15
| 2021-11-29T20:40:15
|
https://github.com/huggingface/datasets/issues/3329
| null |
josephkready666
| false
|
[
"Hi, thanks for reporting.\r\n\r\nIt would be really helpful if you could provide the actual code of the `text_numbers_to_int` function so we can reproduce the error.",
"```\r\ndef text_numbers_to_int(text, column=\"\"):\r\n \"\"\"\r\n Convert text numbers to int.\r\n\r\n :param text: text numbers\r\n :return: int\r\n \"\"\"\r\n try:\r\n numbers = find_numbers(text)\r\n if not numbers:\r\n return text\r\n result = \"\"\r\n i, j = 0, 0\r\n while i < len(text):\r\n if j < len(numbers) and i == numbers[j][1]:\r\n n = int(numbers[j][0]) if numbers[j][0] % 1 == 0 else float(numbers[j][0])\r\n result += str(n)\r\n i = numbers[j][2] #end\r\n j += 1\r\n else:\r\n result += text[i]\r\n i += 1\r\n if column:\r\n return{column: result}\r\n else:\r\n return {column: result}\r\n except Exception as e:\r\n print(e)\r\n return {column: result}\r\n```",
"Maybe this is because of the `return text` line ? I think it should return a dictionary rather than a string",
"Yes that was it, good catch! Thanks"
] |
1,065,015,262
| 3,328
|
Quick fix error formatting
|
closed
| 2021-11-27T11:47:48
| 2021-11-29T13:32:42
| 2021-11-29T13:32:42
|
https://github.com/huggingface/datasets/pull/3328
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3328",
"html_url": "https://github.com/huggingface/datasets/pull/3328",
"diff_url": "https://github.com/huggingface/datasets/pull/3328.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3328.patch",
"merged_at": "2021-11-29T13:32:42"
}
|
NouamaneTazi
| true
|
[] |
1,064,675,888
| 3,327
|
"Shape of query is incorrect, it has to be either a 1D array or 2D (1, N)"
|
closed
| 2021-11-26T16:26:36
| 2021-11-26T16:44:11
| 2021-11-26T16:44:11
|
https://github.com/huggingface/datasets/issues/3327
| null |
eliasws
| false
|
[
"#3323 "
] |
1,064,664,479
| 3,326
|
Fix import `datasets` on python 3.10
|
closed
| 2021-11-26T16:10:00
| 2021-11-26T16:31:23
| 2021-11-26T16:31:23
|
https://github.com/huggingface/datasets/pull/3326
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3326",
"html_url": "https://github.com/huggingface/datasets/pull/3326",
"diff_url": "https://github.com/huggingface/datasets/pull/3326.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3326.patch",
"merged_at": "2021-11-26T16:31:23"
}
|
lhoestq
| true
|
[] |
1,064,663,075
| 3,325
|
Update conda dependencies
|
closed
| 2021-11-26T16:08:07
| 2021-11-26T16:20:37
| 2021-11-26T16:20:36
|
https://github.com/huggingface/datasets/pull/3325
|
{
"url": "https://api.github.com/repos/huggingface/datasets/pulls/3325",
"html_url": "https://github.com/huggingface/datasets/pull/3325",
"diff_url": "https://github.com/huggingface/datasets/pull/3325.diff",
"patch_url": "https://github.com/huggingface/datasets/pull/3325.patch",
"merged_at": "2021-11-26T16:20:36"
}
|
lhoestq
| true
|
[] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.