id
int64
599M
3.26B
number
int64
1
7.7k
title
stringlengths
1
290
body
stringlengths
0
228k
state
stringclasses
2 values
html_url
stringlengths
46
51
created_at
timestamp[s]date
2020-04-14 10:18:02
2025-07-23 08:04:53
updated_at
timestamp[s]date
2020-04-27 16:04:17
2025-07-23 18:53:44
closed_at
timestamp[s]date
2020-04-14 12:01:40
2025-07-23 16:44:42
user
dict
labels
listlengths
0
4
is_pull_request
bool
2 classes
comments
listlengths
0
0
1,024,856,745
3,070
Fix Windows CI with FileNotFoundError when stting up s3_base fixture
Fix #3069.
closed
https://github.com/huggingface/datasets/pull/3070
2021-10-13T06:49:01
2021-10-13T08:55:13
2021-10-13T06:49:48
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,024,818,680
3,069
CI fails on Windows with FileNotFoundError when stting up s3_base fixture
## Describe the bug After commit 9353fc863d0c99ab0427f83cc5a4f04fcf52f1df, the CI fails on Windows with FileNotFoundError when stting up s3_base fixture. See: https://app.circleci.com/pipelines/github/huggingface/datasets/8151/workflows/5db8d154-badd-4d3d-b202-ca7a318997a2/jobs/50321 Error summary: ``` ERROR tests/test_arrow_dataset.py::test_dummy_dataset_serialize_s3 - FileNotF... ERROR tests/test_dataset_dict.py::test_dummy_dataset_serialize_s3 - FileNotFo... ``` Stack trace: ``` ______________ ERROR at setup of test_dummy_dataset_serialize_s3 ______________ [gw0] win32 -- Python 3.6.8 C:\tools\miniconda3\python.exe @pytest.fixture() def s3_base(): # writable local S3 system import shlex import subprocess # Mocked AWS Credentials for moto. old_environ = os.environ.copy() os.environ.update(S3_FAKE_ENV_VARS) > proc = subprocess.Popen(shlex.split("moto_server s3 -p %s" % s3_port)) tests\s3_fixtures.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\tools\miniconda3\lib\subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <subprocess.Popen object at 0x0000012BB8A4B908> args = 'moto_server s3 -p 5555', executable = None, preexec_fn = None close_fds = True, pass_fds = (), cwd = None, env = None startupinfo = <subprocess.STARTUPINFO object at 0x0000012BB8177630> creationflags = 0, shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1 c2pwrite = -1, errread = -1, errwrite = -1, unused_restore_signals = True unused_start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session): """Execute program (MS Windows version)""" assert not pass_fds, "pass_fds not supported on Windows." if not isinstance(args, str): args = list2cmdline(args) # Process startup details if startupinfo is None: startupinfo = STARTUPINFO() if -1 not in (p2cread, c2pwrite, errwrite): startupinfo.dwFlags |= _winapi.STARTF_USESTDHANDLES startupinfo.hStdInput = p2cread startupinfo.hStdOutput = c2pwrite startupinfo.hStdError = errwrite if shell: startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW startupinfo.wShowWindow = _winapi.SW_HIDE comspec = os.environ.get("COMSPEC", "cmd.exe") args = '{} /c "{}"'.format (comspec, args) # Start the process try: hp, ht, pid, tid = _winapi.CreateProcess(executable, args, # no special security None, None, int(not close_fds), creationflags, env, os.fspath(cwd) if cwd is not None else None, > startupinfo) E FileNotFoundError: [WinError 2] The system cannot find the file specified C:\tools\miniconda3\lib\subprocess.py:1017: FileNotFoundError ```
closed
https://github.com/huggingface/datasets/issues/3069
2021-10-13T05:52:26
2021-10-13T08:05:49
2021-10-13T06:49:48
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,024,681,264
3,068
feat: increase streaming retry config
Increase streaming config parameters: * retry interval set to 5 seconds * max retries set to 20 (so 1mn 40s)
closed
https://github.com/huggingface/datasets/pull/3068
2021-10-13T02:00:50
2021-10-13T09:25:56
2021-10-13T09:25:54
{ "login": "borisdayma", "id": 715491, "type": "User" }
[]
true
[]
1,024,023,185
3,067
add story_cloze
null
closed
https://github.com/huggingface/datasets/pull/3067
2021-10-12T16:36:53
2021-10-13T13:48:13
2021-10-13T13:48:13
{ "login": "zaidalyafeai", "id": 15667714, "type": "User" }
[]
true
[]
1,024,005,311
3,066
Add iter_archive
Added the `iter_archive` method for the StreamingDownloadManager. It was already implemented in the regular DownloadManager. Now it can be used to stream from TAR archives as mentioned in https://github.com/huggingface/datasets/issues/2829 I also updated the `food101` dataset as an example. Any image/audio dataset using TAR archives can be updated to use `iter_archive` in order to be streamable :) cc @severo Fix #2829.
closed
https://github.com/huggingface/datasets/pull/3066
2021-10-12T16:17:16
2022-09-21T14:10:10
2021-10-18T09:12:46
{ "login": "lhoestq", "id": 42851186, "type": "User" }
[]
true
[]
1,023,951,322
3,065
Fix test command after refac
Fix the `datasets-cli` test command after the `prepare_module` change in #2986
closed
https://github.com/huggingface/datasets/pull/3065
2021-10-12T15:23:30
2021-10-12T15:28:47
2021-10-12T15:28:46
{ "login": "lhoestq", "id": 42851186, "type": "User" }
[]
true
[]
1,023,900,075
3,064
Make `interleave_datasets` more robust
**Is your feature request related to a problem? Please describe.** Right now there are few hiccups using `interleave_datasets`. Interleaved dataset iterates until the smallest dataset completes it's iterator. In this way larger datasets may not complete full epoch of iteration. It creates new problems in calculation of epoch since there are no way to track which dataset from `interleave_datasets` completes how many epoch. **Describe the solution you'd like** For `interleave_datasets` module, - [ ] Add a boolean argument `--stop-iter` in `interleave_datasets` that enables dataset to either iterate infinite amount of time or not. That means it should not return `StopIterator` exception in case `--stop-iter=False`. - [ ] Internal list variable `iter_cnt` that explains how many times (in steps/epochs) each dataset iterates at a given point. - [ ] Add an argument `--max-iter` (list type) that explain maximum amount of time each of the dataset can iterate. After complete `--max-iter` of one dataset, other dataset should continue sampling and when all the dataset finish their respective `--max-iter`, only then return `StopIterator` Note: I'm new to `datasets` api. May be these features are already there in the datasets. Since multitask training is the latest trends, I believe this feature would make the `datasets` api more popular. @lhoestq
open
https://github.com/huggingface/datasets/issues/3064
2021-10-12T14:34:53
2022-07-30T08:47:26
null
{ "login": "sbmaruf", "id": 32699797, "type": "User" }
[ { "name": "enhancement", "color": "a2eeef" } ]
false
[]
1,023,588,297
3,063
Windows CI is unable to test streaming properly because of SSL issues
In https://github.com/huggingface/datasets/pull/3041 the windows tests were skipped because of SSL issues with moon-staging.huggingface.co:443 The issue appears only on windows with asyncio. On Linux it works. With requests it works as well. And with the production environment huggingface.co it also works. to reproduce on windows: ```python import fsspec # use any URL to a file in a dataset repo url = "https://moon-staging.huggingface.co/datasets/__DUMMY_TRANSFORMERS_USER__/my-dataset-16242824690709/resolve/main/.gitattributes" fsspec.open(url).open() ``` raises ```python FileNotFoundError: https://moon-staging.huggingface.co/datasets/__DUMMY_TRANSFORMERS_USER__/my-dataset-16242824690709/resolve/main/.gitattributes ``` because of ```python aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host moon-staging.huggingface.co:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1131)')] ```
closed
https://github.com/huggingface/datasets/issues/3063
2021-10-12T09:33:40
2022-08-24T14:59:29
2022-08-24T14:59:29
{ "login": "lhoestq", "id": 42851186, "type": "User" }
[ { "name": "streaming", "color": "fef2c0" } ]
false
[]
1,023,209,592
3,062
Update summary on PyPi beyond NLP
More than just NLP now
closed
https://github.com/huggingface/datasets/pull/3062
2021-10-11T23:27:46
2021-10-13T08:55:54
2021-10-13T08:55:54
{ "login": "thomwolf", "id": 7353373, "type": "User" }
[]
true
[]
1,023,103,119
3,061
Feature request : add leave=True to dataset.map to enable tqdm nested bars (and whilst we're at it couldn't we get a way to access directly tqdm underneath?)
**A clear and concise description of what you want to happen.** It would be so nice to be able to nest HuggingFace `Datasets.map() ` progress bars in the grander scheme of things and whilst we're at it why not other functions. **Describe alternatives you've considered** By the way is there not a way to directly interact with underlying tqdm module ? **kwargs-ish? **Additional context** Furthering tqdm integration #2374 and huggingface/transformers#11797 solutioned by huggingface/transformers#12226 provided with tqdm description as `desc=` @sgugger @bhavitvyamalik
open
https://github.com/huggingface/datasets/issues/3061
2021-10-11T20:49:49
2021-10-22T09:34:10
null
{ "login": "BenoitDalFerro", "id": 69694610, "type": "User" }
[ { "name": "enhancement", "color": "a2eeef" } ]
false
[]
1,022,936,396
3,060
load_dataset('openwebtext') yields "Compressed file ended before the end-of-stream marker was reached"
## Describe the bug When I try `load_dataset('openwebtext')`, I receive a "EOFError: Compressed file ended before the end-of-stream marker was reached" error. ## Steps to reproduce the bug ``` from datasets import load_dataset dataset = load_dataset('openwebtext') ``` ## Expected results I expect the `dataset` variable to be properly constructed. ## Actual results ``` File "/home/rschaef/CoCoSci-Language-Distillation/distillation_v2/ratchet_learning/tasks/base.py", line 37, in create_dataset dataset_str, File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/load.py", line 1117, in load_dataset use_auth_token=use_auth_token, File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/builder.py", line 637, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/builder.py", line 704, in _download_and_prepare split_generators = self._split_generators(dl_manager, **split_generators_kwargs) File "/home/rschaef/.cache/huggingface/modules/datasets_modules/datasets/openwebtext/85b3ae7051d2d72e7c5fdf6dfb462603aaa26e9ed506202bf3a24d261c6c40a1/openwebtext.py", line 61, in _split_generators dl_dir = dl_manager.download_and_extract(_URL) File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/download_manager.py", line 284, in download_and_extract return self.extract(self.download(url_or_urls)) File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/download_manager.py", line 261, in extract partial(cached_path, download_config=download_config), path_or_paths, num_proc=num_proc, disable_tqdm=False File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/py_utils.py", line 197, in map_nested return function(data_struct) File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 316, in cached_path output_path, force_extract=download_config.force_extract File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/extract.py", line 40, in extract self.extractor.extract(input_path, output_path, extractor=extractor) File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/extract.py", line 179, in extract return extractor.extract(input_path, output_path) File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/extract.py", line 53, in extract tar_file.extractall(output_path) File "/usr/lib/python3.6/tarfile.py", line 2010, in extractall numeric_owner=numeric_owner) File "/usr/lib/python3.6/tarfile.py", line 2052, in extract numeric_owner=numeric_owner) File "/usr/lib/python3.6/tarfile.py", line 2122, in _extract_member self.makefile(tarinfo, targetpath) File "/usr/lib/python3.6/tarfile.py", line 2171, in makefile copyfileobj(source, target, tarinfo.size, ReadError, bufsize) File "/usr/lib/python3.6/tarfile.py", line 249, in copyfileobj buf = src.read(bufsize) File "/usr/lib/python3.6/lzma.py", line 200, in read return self._buffer.read(size) File "/usr/lib/python3.6/_compression.py", line 68, in readinto data = self.read(len(byte_view)) File "/usr/lib/python3.6/_compression.py", line 99, in read raise EOFError("Compressed file ended before the " python-BaseException EOFError: Compressed file ended before the end-of-stream marker was reached ``` ## Environment info - `datasets` version: 1.12.1 - Platform: Linux-4.4.0-173-generic-x86_64-with-Ubuntu-16.04-xenial - Python version: 3.6.10 - PyArrow version: 5.0.0
closed
https://github.com/huggingface/datasets/issues/3060
2021-10-11T17:05:27
2021-10-28T05:52:21
2021-10-28T05:52:21
{ "login": "RylanSchaeffer", "id": 8942987, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,022,620,057
3,059
Fix task reloading from cache
When reloading a dataset from the cache when doing `map`, the tasks templates were kept instead of being updated regarding the output of the `map` function. This is an issue because we drop the tasks templates that are not compatible anymore after `map`, for example if a column of the template was removed. This PR fixes this and for convenience introduces a decorator `@transmit_tasks` that takes care of doing this verification, similar to the `@transmit_format` decorator. This should fix issue https://github.com/huggingface/datasets/issues/3047 cc @sgugger
closed
https://github.com/huggingface/datasets/pull/3059
2021-10-11T12:03:04
2021-10-11T12:23:39
2021-10-11T12:23:39
{ "login": "lhoestq", "id": 42851186, "type": "User" }
[]
true
[]
1,022,612,664
3,058
Dataset wikipedia and Bookcorpusopen cannot be fetched from dataloader.
## Describe the bug I have used the previous version of `transformers` and `datasets`. The dataset `wikipedia` can be successfully used. Recently, I upgrade them to the newest version and find it raises errors. I also tried other datasets. The `wikitext` works and the `bookcorpusopen` raises the same errors as `wikipedia`. ## Steps to reproduce the bug Run the `run_mlm_no_trainer.py` and the given script on this [link](https://github.com/huggingface/transformers/tree/master/examples/pytorch/language-modeling). Change the dataset from wikitext to wikipedia or bookcorpusopen. BTW, the library transformers is of version 4.11.3. ## Expected results The data batchs are fetched from the data loader and train. ## Actual results The first time to fetch data batch occurs error. `Traceback (most recent call last): File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 705, in convert_to_tensors tensor = as_tensor(value) ValueError: too many dimensions 'str' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "src/original_run_mlm_no_trainer.py", line 528, in <module> main() File "src/original_run_mlm_no_trainer.py", line 488, in main for step, batch in enumerate(train_dataloader): File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/accelerate/data_loader.py", line 303, in __iter__ for batch in super().__iter__(): File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 517, in __next__ data = self._next_data() File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 557, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch return self.collate_fn(data) File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/data/data_collator.py", line 41, in __call__ return self.torch_call(features) File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/data/data_collator.py", line 671, in torch_call batch = self.tokenizer.pad(examples, return_tensors="pt", pad_to_multiple_of=self.pad_to_multiple_of) File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 2774, in pad return BatchEncoding(batch_outputs, tensor_type=return_tensors) File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 210, in __init__ self.convert_to_tensors(tensor_type=tensor_type, prepend_batch_axis=prepend_batch_axis) File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 722, in convert_to_tensors "Unable to create tensor, you should probably activate truncation and/or padding " ValueError: Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' 'truncation=True' to have batched tensors with the same length. ` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.12.1 - Platform: Linux-5.8.0-59-generic-x86_64-with-debian-bullseye-sid - Python version: 3.7.6 - PyArrow version: 5.0.0
closed
https://github.com/huggingface/datasets/issues/3058
2021-10-11T11:54:59
2022-01-19T14:03:49
2022-01-19T14:03:49
{ "login": "hobbitlzy", "id": 35392624, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,022,508,315
3,057
Error in per class precision computation
## Describe the bug When trying to get the per class precision values by providing `average=None`, following error is thrown `ValueError: can only convert an array of size 1 to a Python scalar` ## Steps to reproduce the bug ```python from datasets import load_dataset, load_metric precision_metric = load_metric("precision") predictions = [0, 2, 1, 0, 0, 1] references = [0, 1, 2, 0, 1, 2] results = precision_metric.compute(predictions=predictions, references=references, average=None) ``` ## Expected results ` {'precision': array([0.66666667, 0. , 0. ])}` as per https://github.com/huggingface/datasets/blob/master/metrics/precision/precision.py ## Actual results ``` output = self._compute(predictions=predictions, references=references, **kwargs) File "~/.cache/huggingface/modules/datasets_modules/metrics/precision/94709a71c6fe37171ef49d3466fec24dee9a79846c9f176dff66a649e9811690/precision.py", line 110, in _compute sample_weight=sample_weight, ValueError: can only convert an array of size 1 to a Python scalar ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.12.1 - Platform: linux - Python version: 3.6.9 - PyArrow version: 5.0.0
closed
https://github.com/huggingface/datasets/issues/3057
2021-10-11T10:05:19
2021-10-11T10:17:44
2021-10-11T10:16:16
{ "login": "tidhamecha2", "id": 38906722, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,022,345,564
3,056
Fix meteor metric for version >= 3.6.4
After `nltk` update, the meteor metric expects pre-tokenized inputs (breaking change). This PR fixes this issue, while maintaining compatibility with older versions.
closed
https://github.com/huggingface/datasets/pull/3056
2021-10-11T07:11:44
2021-10-11T07:29:20
2021-10-11T07:29:19
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,022,319,238
3,055
CI test suite fails after meteor metric update
## Describe the bug CI test suite fails: https://app.circleci.com/pipelines/github/huggingface/datasets/8110/workflows/f059ba43-9154-4632-bebb-82318447ddc9/jobs/50010 Stack trace: ``` ___________________ LocalMetricTest.test_load_metric_meteor ____________________ [gw1] linux -- Python 3.6.15 /home/circleci/.pyenv/versions/3.6.15/bin/python3.6 self = <tests.test_metric_common.LocalMetricTest testMethod=test_load_metric_meteor> metric_name = 'meteor' def test_load_metric(self, metric_name): doctest.ELLIPSIS_MARKER = "[...]" metric_module = importlib.import_module(datasets.load.prepare_module(os.path.join("metrics", metric_name))[0]) metric = datasets.load.import_main_class(metric_module.__name__, dataset=False) # check parameters parameters = inspect.signature(metric._compute).parameters self.assertTrue("predictions" in parameters) self.assertTrue("references" in parameters) self.assertTrue(all([p.kind != p.VAR_KEYWORD for p in parameters.values()])) # no **kwargs # run doctest with self.patch_intensive_calls(metric_name, metric_module.__name__): with self.use_local_metrics(): > results = doctest.testmod(metric_module, verbose=True, raise_on_error=True) tests/test_metric_common.py:75: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.pyenv/versions/3.6.15/lib/python3.6/doctest.py:1951: in testmod runner.run(test) ../.pyenv/versions/3.6.15/lib/python3.6/doctest.py:1839: in run r = DocTestRunner.run(self, test, compileflags, out, False) ../.pyenv/versions/3.6.15/lib/python3.6/doctest.py:1476: in run return self.__run(test, compileflags, out) ../.pyenv/versions/3.6.15/lib/python3.6/doctest.py:1382: in __run exception) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <doctest.DebugRunner object at 0x7f4c26bd3da0> out = <built-in method write of _io.TextIOWrapper object at 0x7f51a21852d0> test = <DocTest datasets_modules.datasets.meteor.6201bb45d2c144ea7963680949d20f523d74a741fa0f8a806f836e6caa5245d7.meteor.Mete...ets_modules/datasets/meteor/6201bb45d2c144ea7963680949d20f523d74a741fa0f8a806f836e6caa5245d7/meteor.py:87 (5 examples)> example = <doctest.Example object at 0x7f4c26bd3eb8> exc_info = (<class 'TypeError'>, TypeError('"hypothesis" expects pre-tokenized hypothesis (Iterable[str]): It is a guide to action which ensures that the military always obeys the commands of the party',), <traceback object at 0x7f4cd01afec8>) def report_unexpected_exception(self, out, test, example, exc_info): > raise UnexpectedException(test, example, exc_info) E doctest.UnexpectedException: <DocTest datasets_modules.datasets.meteor.6201bb45d2c144ea7963680949d20f523d74a741fa0f8a806f836e6caa5245d7.meteor.Meteor from /tmp/pytest-of-circleci/pytest-0/popen-gw1/cache/modules/datasets_modules/datasets/meteor/6201bb45d2c144ea7963680949d20f523d74a741fa0f8a806f836e6caa5245d7/meteor.py:87 (5 examples)> ../.pyenv/versions/3.6.15/lib/python3.6/doctest.py:1845: UnexpectedException ```
closed
https://github.com/huggingface/datasets/issues/3055
2021-10-11T06:37:12
2021-10-11T07:30:31
2021-10-11T07:30:31
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,022,108,186
3,054
Update Biosses
Fix variable naming
closed
https://github.com/huggingface/datasets/pull/3054
2021-10-10T22:25:12
2021-10-13T09:04:27
2021-10-13T09:04:27
{ "login": "bwang482", "id": 6764450, "type": "User" }
[]
true
[]
1,022,076,905
3,053
load_dataset('the_pile_openwebtext2') produces ArrowInvalid, value too large to fit in C integer type
## Describe the bug When loading `the_pile_openwebtext2`, we get the error `pyarrow.lib.ArrowInvalid: Value 2111 too large to fit in C integer type` ## Steps to reproduce the bug ```python import datasets ds = datasets.load_dataset('the_pile_openwebtext2') ``` ## Expected results Should download the dataset, convert it to an arrow file, and return a working Dataset object. ## Actual results The download works, but conversion to the arrow file fails as follows: ``` >>> ds = datasets.load_dataset('the_pile_openwebtext2') Downloading and preparing dataset openwebtext2/plain_text (download: 27.33 GiB, generated: 63.86 GiB , post-processed: Unknown size, total: 91.19 GiB) to /home/davidbau/.cache/huggingface/datasets/open webtext2/plain_text/1.0.0/c48ec73ba3483bac673463f48f67e9a4fd8cb49a9d6ec4fb957f0b424b97cf25... Traceback (most recent call last): File "/home/davidbau/.conda/envs/tenv/lib/python3.9/site-packages/datasets/builder.py", line 1133, in _prepare_split writer.write(example, key) File "/home/davidbau/.conda/envs/tenv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 366, in write self.write_examples_on_file() File "/home/davidbau/.conda/envs/tenv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 311, in write_examples_on_file pa_array = pa.array(typed_sequence) File "pyarrow/array.pxi", line 222, in pyarrow.lib.array File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol File "/home/davidbau/.conda/envs/tenv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 115, in __arrow_array__ out = pa.array(cast_to_python_objects(self.data, only_1d_for_numpy=True), type=type) File "pyarrow/array.pxi", line 305, in pyarrow.lib.array File "pyarrow/array.pxi", line 39, in pyarrow.lib._sequence_to_array File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Value 2111 too large to fit in C integer type ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: ``` - Platform: Ubuntu 20.04 - Python version: python 3.9 - PyArrow version: 3.0.0
closed
https://github.com/huggingface/datasets/issues/3053
2021-10-10T19:55:21
2023-02-24T14:02:20
2023-02-24T14:02:20
{ "login": "davidbau", "id": 3458792, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,021,944,435
3,052
load_dataset cannot download the data and hangs on forever if cache dir specified
## Describe the bug After updating datasets, a code that ran just fine for ages began to fail. Specifying _datasets.load_dataset_'s _cache_dir_ optional argument on Windows 10 machine results in data download to hang on forever. Same call without cache_dir works just fine. Surprisingly exact same code just runs perfectly fine on Linux docker instance running in cloud. Unfortunately I updated Windows also at the same time and I can't remember which version of datasets was running in my conda environment prior to the update otherwise I would have tried both to check this out. :( ## Steps to reproduce the bug ```python # Sample code to reproduce the bug ``` cache_dir = 'c:/data/datasets' dataset = load_dataset('wikipedia', '20200501.en', split='train',cache_dir=cache_dir) ``` Note that exact same code without specifying _cache_dir_ argument works perfectly fine. ``` cache_dir = 'c:/data/datasets' dataset = load_dataset('wikipedia', '20200501.en', split='train') ``` ## Expected results Downloads the dataset and cache is handled in the _cache_dir_ directory ## Actual results Data download keeps hanging on forever, **NO TRACEBACK**! ## Environment info - `datasets` version: 1.12.1 - Platform: Windows-10-10.0.19042-SP0 - Python version: 3.8.11 - PyArrow version: 3.0.0
closed
https://github.com/huggingface/datasets/issues/3052
2021-10-10T10:31:36
2021-10-11T10:57:09
2021-10-11T10:56:36
{ "login": "BenoitDalFerro", "id": 69694610, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,021,852,234
3,051
Non-Matching Checksum Error with crd3 dataset
## Describe the bug When I try loading the crd3 dataset (https://huggingface.co/datasets/crd3), an error is thrown. ## Steps to reproduce the bug ```python dataset = load_dataset('crd3', split='train') ``` ## Expected results I expect no error to be thrown. ## Actual results A non-matching checksum error is thrown. ``` datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://github.com/RevanthRameshkumar/CRD3/archive/master.zip'] ``` ## Environment info - `datasets` version: 1.12.1 - Platform: Linux-4.4.0-173-generic-x86_64-with-Ubuntu-16.04-xenial - Python version: 3.6.10 - PyArrow version: 5.0.0
closed
https://github.com/huggingface/datasets/issues/3051
2021-10-10T01:32:43
2022-03-15T15:54:26
2022-03-15T15:54:26
{ "login": "RylanSchaeffer", "id": 8942987, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,021,772,622
3,050
Fix streaming: catch Timeout error
Catches Timeout error during streaming. fix #3049
closed
https://github.com/huggingface/datasets/pull/3050
2021-10-09T18:19:20
2021-10-12T15:28:18
2021-10-11T09:35:38
{ "login": "borisdayma", "id": 715491, "type": "User" }
[]
true
[]
1,021,770,008
3,049
TimeoutError during streaming
## Describe the bug I got a TimeoutError after streaming for about 10h. ## Steps to reproduce the bug Very long code but we could do a test of streaming indefinitely data, though error may take a while to appear. ## Expected results This error was not expected in the code which considers only `ClientError` but not `TimeoutError`. See [this line](https://github.com/huggingface/datasets/blob/2814fbd0e18150be409f10804670e98d9ecb87d4/src/datasets/utils/streaming_download_manager.py#L129). Based on the traceback, it looks like the `TimeoutError` was not captured. ## Actual results ``` File "/home/koush/.pyenv/versions/dev/lib/python3.9/site-packages/fsspec/asyn.py", line 25, in _runner result[0] = await coro File "/home/koush/.pyenv/versions/dev/lib/python3.9/site-packages/fsspec/implementations/http.py", line 614, in async_fetch_range out = await r.read() File "/home/koush/.pyenv/versions/dev/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1032, in read self._body = await self.content.read() File "/home/koush/.pyenv/versions/dev/lib/python3.9/site-packages/aiohttp/streams.py", line 370, in read block = await self.readany() File "/home/koush/.pyenv/versions/dev/lib/python3.9/site-packages/aiohttp/streams.py", line 392, in readany await self._wait("readany") File "/home/koush/.pyenv/versions/dev/lib/python3.9/site-packages/aiohttp/streams.py", line 306, in _wait await waiter File "/home/koush/.pyenv/versions/dev/lib/python3.9/site-packages/aiohttp/helpers.py", line 656, in __exit__ raise asyncio.TimeoutError from None asyncio.exceptions.TimeoutError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/koush/dalle-mini/dev/seq2seq/run_seq2seq_flax.py", line 1027, in <module> main() File "/home/koush/dalle-mini/dev/seq2seq/run_seq2seq_flax.py", line 991, in main for batch in tqdm( File "/home/koush/.pyenv/versions/dev/lib/python3.9/site-packages/tqdm/std.py", line 1180, in __iter__ for obj in iterable: File "/home/koush/dalle-mini/dev/seq2seq/run_seq2seq_flax.py", line 376, in data_loader_streaming for item in dataset: File "/home/koush/datasets/src/datasets/iterable_dataset.py", line 341, in __iter__ for key, example in self._iter(): File "/home/koush/datasets/src/datasets/iterable_dataset.py", line 338, in _iter yield from ex_iterable File "/home/koush/datasets/src/datasets/iterable_dataset.py", line 179, in __iter__ key_examples_list = [(key, example)] + [ File "/home/koush/datasets/src/datasets/iterable_dataset.py", line 179, in <listcomp> key_examples_list = [(key, example)] + [ File "/home/koush/datasets/src/datasets/iterable_dataset.py", line 176, in __iter__ for key, example in iterator: File "/home/koush/datasets/src/datasets/iterable_dataset.py", line 225, in __iter__ for x in self.ex_iterable: File "/home/koush/datasets/src/datasets/iterable_dataset.py", line 99, in __iter__ for key, example in self.generate_examples_fn(**kwargs_with_shuffled_shards): File "/home/koush/datasets/src/datasets/iterable_dataset.py", line 287, in wrapper for key, table in generate_tables_fn(**kwargs): File "/home/koush/datasets/src/datasets/packaged_modules/json/json.py", line 107, in _generate_tables batch = f.read(self.config.chunksize) File "/home/koush/datasets/src/datasets/utils/streaming_download_manager.py", line 126, in read_with_retries out = read(*args, **kwargs) File "/home/koush/.pyenv/versions/dev/lib/python3.9/site-packages/fsspec/implementations/http.py", line 572, in read return super().read(length) File "/home/koush/.pyenv/versions/dev/lib/python3.9/site-packages/fsspec/spec.py", line 1533, in read out = self.cache._fetch(self.loc, self.loc + length) File "/home/koush/.pyenv/versions/dev/lib/python3.9/site-packages/fsspec/caching.py", line 390, in _fetch self.cache = self.fetcher(start, bend) File "/home/koush/.pyenv/versions/dev/lib/python3.9/site-packages/fsspec/asyn.py", line 91, in wrapper return sync(self.loop, func, *args, **kwargs) File "/home/koush/.pyenv/versions/dev/lib/python3.9/site-packages/fsspec/asyn.py", line 69, in sync raise FSTimeoutError from return_result fsspec.exceptions.FSTimeoutError ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.12.2.dev0 - Platform: Linux-5.4.0-1043-gcp-x86_64-with-glibc2.31 - Python version: 3.9.7 - PyArrow version: 5.0.0
closed
https://github.com/huggingface/datasets/issues/3049
2021-10-09T18:06:51
2021-10-11T09:35:38
2021-10-11T09:35:38
{ "login": "borisdayma", "id": 715491, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,021,765,661
3,048
Identify which shard data belongs to
**Is your feature request related to a problem? Please describe.** I'm training on a large dataset made of multiple sub-datasets. During training I can observe some jumps in loss which may correspond to different shards. ![image](https://user-images.githubusercontent.com/715491/136668758-521263aa-a9b2-4ad2-8d22-060b6bf86a1c.png) My suspicion is that either: * some of the sub-datasets are harder for the model than others * some of the sub-datasets are not formatted properly I'd like to identify which shards correspond to those jumps. **Describe the solution you'd like** It would be nice to have a key associated to each data sample or data batch containing details on where the data comes from (shard idx + item idx within the shard). This should be supported both in local and streaming mode. **Describe alternatives you've considered** A fix would be for me to add myself details (shard id, sample id) as part of each data sample. The inconvenient is that it requires users to process/reupload every dataset when they need this feature.
open
https://github.com/huggingface/datasets/issues/3048
2021-10-09T17:46:35
2021-10-09T20:24:17
null
{ "login": "borisdayma", "id": 715491, "type": "User" }
[ { "name": "enhancement", "color": "a2eeef" } ]
false
[]
1,021,360,616
3,047
Loading from cache a dataset for LM built from a text classification dataset sometimes errors
## Describe the bug Yes, I know, that description sucks. So the problem is arising in the course when we build a masked language modeling dataset using the IMDB dataset. To reproduce (or try since it's a bit fickle). Create a dataset for masled-language modeling from the IMDB dataset. ```python from datasets import load_dataset from transformers import Autotokenizer tokenizer = AutoTokenizer.from_pretrained("distilbert-base-cased) imdb_dataset = load_dataset("imdb", split="train") def tokenize_function(examples): return tokenizer(examples["text"]) tokenized_dataset = imdb_dataset.map( tokenize_function, batched=True, remove_columns=["text", "label"] ) chunk_size = 128 def group_texts(examples): # Concatenate all texts. concatenated_examples = {k: sum(examples[k], []) for k in examples.keys()} # Compute length of concatenated texts total_length = len(concatenated_examples[list(examples.keys())[0]]) # We drop the last chunk if it's smaller than chunk_size total_length = (total_length // chunk_size) * chunk_size # Split by chunks of max_len. result = { k: [t[i : i + chunk_size] for i in range(0, total_length, chunk_size)] for k, t in concatenated_examples.items() } # Create a new labels column result["labels"] = result["input_ids"].copy() return result lm_dataset = tokenized_dataset.map(group_texts, batched=True) ``` Until now, all is well. The problem comes when you re-execute that code, more specifically: ```python tokenized_dataset = imdb_dataset.map( tokenize_function, batched=True, remove_columns=["text", "label"] ) lm_dataset = tokenized_dataset.map(group_texts, batched=True) ``` Try several times if the bug doesn't appear instantly, or just each line at a time, ideally in a notebook/Colab and you should get at some point: ```python --------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-40-357a56ee3d53> in <module> ----> 1 lm_dataset = tokenized_dataset.map(group_texts, batched=True) ~/git/datasets/src/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1947 new_fingerprint=new_fingerprint, 1948 disable_tqdm=disable_tqdm, -> 1949 desc=desc, 1950 ) 1951 else: ~/git/datasets/src/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 424 } 425 # apply actual function --> 426 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 427 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 428 # re-apply format to the output ~/git/datasets/src/datasets/fingerprint.py in wrapper(*args, **kwargs) 404 # Call actual function 405 --> 406 out = func(self, *args, **kwargs) 407 408 # Update fingerprint of in-place transforms + update in-place history of transforms ~/git/datasets/src/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, disable_tqdm, desc, cache_only) 2138 if os.path.exists(cache_file_name) and load_from_cache_file: 2139 logger.warning("Loading cached processed dataset at %s", cache_file_name) -> 2140 info = self.info.copy() 2141 info.features = features 2142 return Dataset.from_file(cache_file_name, info=info, split=self.split) ~/git/datasets/src/datasets/info.py in copy(self) 278 279 def copy(self) -> "DatasetInfo": --> 280 return self.__class__(**{k: copy.deepcopy(v) for k, v in self.__dict__.items()}) 281 282 ~/git/datasets/src/datasets/info.py in __init__(self, description, citation, homepage, license, features, post_processed, supervised_keys, task_templates, builder_name, config_name, version, splits, download_checksums, download_size, post_processing_size, dataset_size, size_in_bytes) ~/git/datasets/src/datasets/info.py in __post_init__(self) 177 for idx, template in enumerate(self.task_templates): 178 if isinstance(template, TextClassification): --> 179 labels = self.features[template.label_column].names 180 self.task_templates[idx] = TextClassification( 181 text_column=template.text_column, label_column=template.label_column, labels=labels KeyError: 'label' ``` It seems that when loading the cache, the dataset tries to access some kind of text classification template (which I imagine comes from the original dataset) and to look at a key that has since been removed.
closed
https://github.com/huggingface/datasets/issues/3047
2021-10-08T18:23:11
2021-11-03T17:13:08
2021-11-03T17:13:08
{ "login": "sgugger", "id": 35901082, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,021,021,368
3,046
Fix MedDialog metadata JSON
Fix #2969.
closed
https://github.com/huggingface/datasets/pull/3046
2021-10-08T12:04:40
2021-10-11T07:46:43
2021-10-11T07:46:42
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,020,968,704
3,045
Fix inconsistent caching behaviour in Dataset.map() with multiprocessing #3044
Fix #3044 1. A rough unit test that fails without the fix. It probably doesn't comply with your code standards, but that just to draft the idea. 2. A one liner fix
closed
https://github.com/huggingface/datasets/pull/3045
2021-10-08T10:59:21
2021-10-21T16:58:32
2021-10-21T14:22:44
{ "login": "vlievin", "id": 9859840, "type": "User" }
[]
true
[]
1,020,869,778
3,044
Inconsistent caching behaviour when using `Dataset.map()` with a `new_fingerprint` and `num_proc>1`
## Describe the bug Caching does not work when using `Dataset.map()` with: 1. a function that cannot be deterministically fingerprinted 2. `num_proc>1` 3. using a custom fingerprint set with the argument `new_fingerprint`. This means that the dataset will be mapped with the function for each and every call, which does not happen if `num_proc==1`. In that case (`num_proc==1`) subsequent calls will load the transformed dataset from the cache, which is the expected behaviour. The example can easily be translated into a unit test. I have a fix and will submit a pull request asap. ## Steps to reproduce the bug ```python import hashlib import json import os from typing import Dict, Any import numpy as np from datasets import load_dataset, Dataset Batch = Dict[str, Any] filename = 'example.json' class Transformation(): """A transformation with a random state that cannot be fingerprinted""" def __init__(self): self.state = np.random.random() def __call__(self, batch: Batch) -> Batch: batch['x'] = [np.random.random() for _ in batch['x']] return batch def generate_dataset(): """generate a simple dataset""" rgn = np.random.RandomState(24) data = { 'data': [{'x': float(y), 'y': -float(y)} for y in rgn.random(size=(1000,))]} if not os.path.exists(filename): with open(filename, 'w') as f: f.write(json.dumps(data)) return filename def process_dataset_with_cache(num_proc=1, remove_cache=False, cache_expected_to_exist=False): # load the generated dataset dset: Dataset = next( iter(load_dataset('json', data_files=filename, field='data').values())) new_fingerprint = hashlib.md5("static-id".encode("utf8")).hexdigest() # get the expected cached path cache_path = dset._get_cache_file_path(new_fingerprint) if remove_cache and os.path.exists(cache_path): os.remove(cache_path) # check that the cache exists, and print a statement # if was actually expected to exist cache_exist = os.path.exists(cache_path) print(f"> cache file exists={cache_exist}") if cache_expected_to_exist and not cache_exist: print("=== Cache does not exist! ====") # apply the transformation with the new fingerprint dset = dset.map( Transformation(), batched=True, num_proc=num_proc, new_fingerprint=new_fingerprint, desc="mapping dataset with transformation") generate_dataset() for num_proc in [1, 2]: print(f"# num_proc={num_proc}, first pass") # first pass to generate the cache (always create a new cache here) process_dataset_with_cache(remove_cache=True, num_proc=num_proc, cache_expected_to_exist=False) print(f"# num_proc={num_proc}, second pass") # second pass, expects the cache to exist process_dataset_with_cache(remove_cache=False, num_proc=num_proc, cache_expected_to_exist=True) os.remove(filename) ``` ## Expected results In the above python example, with `num_proc=2`, the **cache file should exist in the second call** of `process_dataset_with_cache` ("=== Cache does not exist! ====" should not be printed). When the cache is successfully created, `map()` is called only one time. ## Actual results In the above python example, with `num_proc=2`, the **cache does not exist in the second call** of `process_dataset_with_cache` (this results in printing "=== Cache does not exist! ===="). Because the cache doesn't exist, the `map()` method is executed a second time and the dataset is not loaded from the cache. ## Environment info - `datasets` version: 1.12.1 - Platform: macOS-10.16-x86_64-i386-64bit - Python version: 3.8.8 - PyArrow version: 5.0.0
open
https://github.com/huggingface/datasets/issues/3044
2021-10-08T09:07:10
2025-03-04T07:16:00
null
{ "login": "vlievin", "id": 9859840, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,020,252,114
3,043
Add PASS dataset
## Adding a Dataset - **Name:** PASS - **Description:** An ImageNet replacement for self-supervised pretraining without humans - **Data:** https://www.robots.ox.ac.uk/~vgg/research/pass/ https://github.com/yukimasano/PASS Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
closed
https://github.com/huggingface/datasets/issues/3043
2021-10-07T16:43:43
2022-01-20T16:50:47
2022-01-20T16:50:47
{ "login": "osanseviero", "id": 7246357, "type": "User" }
[ { "name": "dataset request", "color": "e99695" }, { "name": "vision", "color": "bfdadc" } ]
false
[]
1,020,047,289
3,042
Improving elasticsearch integration
- adding murmurhash signature to sample in index - adding optional credentials for remote elasticsearch server - enabling sample update in index - upgrade the elasticsearch 7.10.1 python client - adding ElasticsearchBulider to instantiate a dataset from an index and a filtering query
open
https://github.com/huggingface/datasets/pull/3042
2021-10-07T13:28:35
2022-07-06T15:19:48
null
{ "login": "ggdupont", "id": 5583410, "type": "User" }
[]
true
[]
1,018,911,385
3,041
Load private data files + use glob on ZIP archives for json/csv/etc. module inference
As mentioned in https://github.com/huggingface/datasets/issues/3032 loading data files from private repository isn't working correctly because of the data files resolved. #2986 did a refactor of the data files resolver. I added authentication to it. I also improved it to glob inside ZIP archives to look for json/csv/etc. files and infer which dataset builder (json/csv/etc.) to use. Fix https://github.com/huggingface/datasets/issues/3032 Note that #2986 needs to get merged first
closed
https://github.com/huggingface/datasets/pull/3041
2021-10-06T18:16:36
2021-10-12T15:25:48
2021-10-12T15:25:46
{ "login": "lhoestq", "id": 42851186, "type": "User" }
[]
true
[]
1,018,782,475
3,040
[save_to_disk] Using `select()` followed by `save_to_disk` saves complete dataset making it hard to create dummy dataset
## Describe the bug When only keeping a dummy size of a dataset (say the first 100 samples), and then saving it to disk to upload it in the following to the hub for easy demo/use - not just the small dataset is saved but the whole dataset with an indices file. The problem with this is that the dataset is still very big. ## Steps to reproduce the bug E.g. run the following: ```python from datasets import load_dataset, save_to_disk nlp = load_dataset("glue", "mnli", split="train") nlp.save_to_disk("full") nlp = nlp.select(range(100)) nlp.save_to_disk("dummy") ``` Now one can see that both `"dummy"` and `"full"` have the same size. This shouldn't be the case IMO. ## Expected results IMO `"dummy"` should be much smaller so that one can easily play around with the dataset on the hub. ## Actual results Specify the actual results or traceback. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.12.2.dev0 - Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.10 - Python version: 3.8.5 - PyArrow version: 5.0.0
closed
https://github.com/huggingface/datasets/issues/3040
2021-10-06T17:08:47
2021-11-02T15:41:08
2021-11-02T15:41:08
{ "login": "patrickvonplaten", "id": 23423619, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,018,219,800
3,039
Add sberquad dataset
null
closed
https://github.com/huggingface/datasets/pull/3039
2021-10-06T12:32:02
2021-10-13T10:19:11
2021-10-13T10:16:04
{ "login": "Alenush", "id": 13781234, "type": "User" }
[]
true
[]
1,018,113,499
3,038
add sberquad dataset
null
closed
https://github.com/huggingface/datasets/pull/3038
2021-10-06T11:33:39
2021-10-06T11:58:01
2021-10-06T11:58:01
{ "login": "Alenush", "id": 13781234, "type": "User" }
[]
true
[]
1,018,091,919
3,037
SberQuad
null
closed
https://github.com/huggingface/datasets/pull/3037
2021-10-06T11:21:08
2021-10-06T11:33:08
2021-10-06T11:33:08
{ "login": "Alenush", "id": 13781234, "type": "User" }
[]
true
[]
1,017,687,944
3,036
Protect master branch to force contributions via Pull Requests
In order to have a clearer Git history in the master branch, I propose to protect it so that all contributions must be done through a Pull Request and no direct commits to master are allowed. - The Pull Request allows to give context, discuss any potential issues and improve the quality of the contribution - The Pull Request will eventually be squashed and merged into master with a single commit that links to the Pull Request page (with all the context/discussions) Note that we already implemented a protection in the master branch to avoid *merge* commits and ensure a linear history. This proposal goes one step further by avoiding all kind of direct commits and forcing contributions **only** through Pull Requests. Please note that we can temporarily deactivate this protection if we need to make a direct commit, e.g. at each new version release. The only way GitHub allows this kind or protection is by requiring a minimal number (at least one) of approvals of the Pull Request. The inconvenient is that the PR creator cannot approve their own PR: another person must approve it before it can be merged into master. To circumvent this, we could eventually disable this protection in the master branch when an urgent commit is needed (e.g. for a hotfix) and there is no other person available at that time to approve the PR.
closed
https://github.com/huggingface/datasets/issues/3036
2021-10-06T07:34:17
2021-10-07T06:51:47
2021-10-07T06:49:52
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[ { "name": "enhancement", "color": "a2eeef" } ]
false
[]
1,016,770,071
3,035
`load_dataset` does not work with uploaded arrow file
## Describe the bug I've preprocessed and uploaded a dataset here: https://huggingface.co/datasets/ami-wav2vec2/ami_headset_single_preprocessed . The dataset is in `.arrow` format. The dataset can correctly be loaded when doing: ```bash git lfs install git clone https://huggingface.co/datasets/ami-wav2vec2/ami_headset_single_preprocessed ``` followed by ```python from datasets import load_from_disk ds = load_from_disk("./ami_headset_single_preprocessed") ``` However when I try to directly download the dataset as follows: ```python from datasets import load_dataset ds = load_dataset("ami-wav2vec2/ami_headset_single_preprocessed") ``` the following error occurs: ```bash /usr/local/lib/python3.7/dist-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, task, streaming, **config_kwargs) 1115 ignore_verifications=ignore_verifications, 1116 try_from_hf_gcs=try_from_hf_gcs, -> 1117 use_auth_token=use_auth_token, 1118 ) 1119 /usr/local/lib/python3.7/dist-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs) 635 if not downloaded_from_gcs: 636 self._download_and_prepare( --> 637 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 638 ) 639 # Sync info /usr/local/lib/python3.7/dist-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 724 try: 725 # Prepare split will record examples associated to the split --> 726 self._prepare_split(split_generator, **prepare_split_kwargs) 727 except OSError as e: 728 raise OSError( /usr/local/lib/python3.7/dist-packages/datasets/builder.py in _prepare_split(self, split_generator) 1186 generator, unit=" tables", leave=False, disable=bool(logging.get_verbosity() == logging.NOTSET) 1187 ): -> 1188 writer.write_table(table) 1189 num_examples, num_bytes = writer.finalize() 1190 /usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in write_table(self, pa_table, writer_batch_size) 424 # reorder the arrays if necessary + cast to self._schema 425 # we can't simply use .cast here because we may need to change the order of the columns --> 426 pa_table = pa.Table.from_arrays([pa_table[name] for name in self._schema.names], schema=self._schema) 427 batches: List[pa.RecordBatch] = pa_table.to_batches(max_chunksize=writer_batch_size) 428 self._num_bytes += sum(batch.nbytes for batch in batches) /usr/local/lib/python3.7/dist-packages/pyarrow/table.pxi in pyarrow.lib.Table.from_arrays() /usr/local/lib/python3.7/dist-packages/pyarrow/table.pxi in pyarrow.lib._sanitize_arrays() /usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib.asarray() /usr/local/lib/python3.7/dist-packages/pyarrow/table.pxi in pyarrow.lib.ChunkedArray.cast() /usr/local/lib/python3.7/dist-packages/pyarrow/compute.py in cast(arr, target_type, safe) 279 else: 280 options = CastOptions.unsafe(target_type) --> 281 return call_function("cast", [arr], options) 282 283 /usr/local/lib/python3.7/dist-packages/pyarrow/_compute.pyx in pyarrow._compute.call_function() /usr/local/lib/python3.7/dist-packages/pyarrow/_compute.pyx in pyarrow._compute.Function.call() /usr/local/lib/python3.7/dist-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() /usr/local/lib/python3.7/dist-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowNotImplementedError: Unsupported cast from struct<train: struct<name: string, num_bytes: int64, num_examples: int64, dataset_name: string>, validation: struct<name: string, num_bytes: int64, num_examples: int64, dataset_name: string>, test: struct<name: string, num_bytes: int64, num_examples: int64, dataset_name: string>> to list using function cast_list ``` ## Expected results The dataset should be correctly loaded with `load_dataset` IMO. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.12.2.dev0 - Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.10 - Python version: 3.8.5 - PyArrow version: 5.0.0
open
https://github.com/huggingface/datasets/issues/3035
2021-10-05T20:15:10
2021-10-06T17:01:37
null
{ "login": "patrickvonplaten", "id": 23423619, "type": "User" }
[ { "name": "enhancement", "color": "a2eeef" } ]
false
[]
1,016,759,202
3,034
Errors loading dataset using fs = a gcsfs.GCSFileSystem
## Describe the bug Cannot load dataset using a `gcsfs.GCSFileSystem`. I'm not sure if this should be a bug in `gcsfs` or here... Basically what seems to be happening is that since datasets saves datasets as folders and folders aren't "real objects" in gcs, gcsfs raises a 404 error. There are workarounds if you use gcsfs directly to download the file, but as is I can't get `load_from_disk` to work. ## Steps to reproduce the bug ```python from datasets import load_dataset # load some dataset dataset = load_dataset("squad", split="train") # save it to gcs import gcsfs fs = gcsfs.GCSFileSystem(project="my-gs-project") dataset.save_to_disk("gs://my-bucket/squad", fs=fs) # try to load it from gcs from datasets import load_from_disk dataset2 = load_from_disk("my-bucket/squad", fs=fs) ``` ## Expected results `dataset2` would be a copy of `dataset` but loaded from my bucket. ## Actual results Long traceback but essentially it's a 404 error from gcsfs saying the object `my-bucket/squad` doesn't exist when this is called: https://github.com/huggingface/datasets/blob/9c81b7d2e6d9feae69a084a3abda265a4ca07fb5/src/datasets/arrow_dataset.py#L977 This is because there is no actual object called `my-bucket/squad`, there are objects called `my-bucket/squad/dataset.arrow`, etc. Note that *this* works fine, since it's explicitly saying "download all the objects with this prefix": ```python fs.download(src_dataset_path + "/*", dataset_path.as_posix(), recursive=True) ``` For example, I can do a workaround this way: ```python import tempfile with tempfile.TemporaryDirectory() as temppath: fs.download("gs://my-bucket/squad/*", temppath) dataset2 = load_from_disk(temppath) ``` It's unclear to me if it's `gcsfs`'s responsibility to say "hey that's folder not a file, I should try to get objects inside of it not the object itself", or if that's `datasets`'s responsibility... I'm leaning towards the latter since you're never loading a dataset from one file using this function/method, only a dataset folder? Another minor thing that should maybe should be rolled into this bug... https://github.com/huggingface/datasets/blob/9c81b7d2e6d9feae69a084a3abda265a4ca07fb5/src/datasets/arrow_dataset.py#L968 These fail if you pass in a `gs://` path, e.g. ```python dataset2 = load_from_disk("gs://my-bucket/squad", fs=fs) ``` Because at this point, `dataset_info_path` is `gs:/my-bucket/squad/dataset_info.json`, gcsfs throws a: ``` Invalid bucket name: 'gs:' ``` error ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.12.1 - Platform: macOS Big Sur 11.6 - Python version: 3.7.12 - PyArrow version: 5.0.0
open
https://github.com/huggingface/datasets/issues/3034
2021-10-05T20:07:08
2021-10-05T20:26:39
null
{ "login": "dconatha", "id": 74556552, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,016,619,572
3,033
Actual "proper" install of ruamel.yaml in the windows CI
It was impossible to update the package directly with `pip`. Indeed it was installed with `distutils` which prevents `pip` or `conda` to uninstall it. I had to `rm` a directory from the `site-packages` python directory, and then do `pip install ruamel.yaml` It's not that "proper" but I couldn't find better solutions
closed
https://github.com/huggingface/datasets/pull/3033
2021-10-05T17:52:07
2021-10-05T17:54:57
2021-10-05T17:54:57
{ "login": "lhoestq", "id": 42851186, "type": "User" }
[]
true
[]
1,016,488,475
3,032
Error when loading private dataset with "data_files" arg
## Describe the bug A clear and concise description of what the bug is. Private datasets with no loading script can't be loaded using `data_files` parameter. ## Steps to reproduce the bug ```python from datasets import load_dataset data_files = {"train": "**/train/*/*.jsonl", "valid": "**/valid/*/*.jsonl"} dataset = load_dataset('dalle-mini/encoded', data_files=data_files, use_auth_token=True, streaming=True) ``` Same error happens in non-streaming mode. ## Expected results Files should be loaded (whether in streaming or not). ## Actual results Error: ``` --------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) /usr/local/lib/python3.7/dist-packages/datasets/load.py in prepare_module(path, script_version, download_config, download_mode, dataset, force_local_path, dynamic_modules_path, return_resolved_file_path, return_associated_base_path, data_files, **download_kwargs) 539 try: --> 540 local_path = cached_path(file_path, download_config=download_config) 541 except FileNotFoundError: 8 frames FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/dalle-mini/encoded/resolve/main/encoded.py During handling of the above exception, another exception occurred: HTTPError Traceback (most recent call last) HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/api/datasets/dalle-mini/encoded?full=true During handling of the above exception, another exception occurred: FileNotFoundError Traceback (most recent call last) /usr/local/lib/python3.7/dist-packages/datasets/load.py in prepare_module(path, script_version, download_config, download_mode, dataset, force_local_path, dynamic_modules_path, return_resolved_file_path, return_associated_base_path, data_files, **download_kwargs) 547 except Exception: 548 raise FileNotFoundError( --> 549 f"Couldn't find a directory or a {resource_type} named '{path}'. " 550 f"It doesn't exist locally at {expected_dir_for_combined_path_abs} or remotely on {hf_api.endpoint}/datasets" 551 ) FileNotFoundError: Couldn't find a directory or a dataset named 'dalle-mini/encoded'. It doesn't exist locally at /content/dalle-mini/encoded or remotely on https://huggingface.co/datasets ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.12.1 - Platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.12 - PyArrow version: 3.0.0 @lhoestq
closed
https://github.com/huggingface/datasets/issues/3032
2021-10-05T15:46:27
2021-10-12T15:26:22
2021-10-12T15:25:46
{ "login": "borisdayma", "id": 715491, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,016,458,496
3,031
Align tqdm control with cache control
Currently, once disabled with `disable_progress_bar`, progress bars cannot be re-enabled again. To overcome this limitation, this PR introduces the `set_progress_bar_enabled` function that accepts a boolean indicating whether to display progress bars. The goal is to provide a similar API to the existing cache control API. Following the Zen of Python (😄), there should be one and preferably only one obvious way to do it, so I'm also deprecating the aforementioned `disable_progress_bar` function. Additionally, I justify the deprecation with the fact that this function has never been in the docs. Moreover, similar API changes have recently been introduced to [`tfds`](https://github.com/tensorflow/datasets/blob/a1e8b98f45b0214082b546cc967c67c43fffda55/tensorflow_datasets/core/utils/tqdm_utils.py#L98-L112). Considering the popularity of the [comment](https://github.com/huggingface/datasets/issues/1627#issuecomment-751383559) I made a while ago, this API (`set_progress_bar_enabled` and `is_progress_bar_enabled`) should be mentioned in the docs, but I'm not sure where to put it exactly. Maybe we can replace the `logging_methods` page under `package_reference` with `utility_methods` and then introduce two subsections on that page: `Logging methods` and `tqdm control`. Additionally, this PR: * adds the `disable_tqdm` keyword arg of `Dataset._map_single` to the `ignore_kwargs` list to ignore it when computing the fingerprint (forgot to add it in #2696) * deletes the unused components in `tqdm_utils.py`, which seem to be inherited from `tfds` * disables the tqdm output in the test suite. As I see it, this output doesn't seem informative, but let me know if this is not a good idea
closed
https://github.com/huggingface/datasets/pull/3031
2021-10-05T15:18:49
2021-10-18T15:00:21
2021-10-18T14:59:30
{ "login": "mariosasko", "id": 47462742, "type": "User" }
[]
true
[]
1,016,435,324
3,030
Add `remove_columns` to `IterableDataset`
Fixes #2944 WIP * Not tested yet. * We might want to allow batched remove for efficiency. @lhoestq Do you think it should have `batched=` and `batch_size=`?
closed
https://github.com/huggingface/datasets/pull/3030
2021-10-05T14:58:33
2021-10-08T15:33:15
2021-10-08T15:31:53
{ "login": "changjonathanc", "id": 31893406, "type": "User" }
[]
true
[]
1,016,389,901
3,029
Use standard open-domain validation split in nq_open
The nq_open dataset originally drew the validation set from this file: https://github.com/google-research-datasets/natural-questions/blob/master/nq_open/NQ-open.efficientqa.dev.1.1.sample.jsonl However, that's the dev set used specifically and only for the efficientqa competition, and it's not the same dev set as is used in every open-domain question answering paper (including the Lee et al paper that introduced the open-domain variant of NQ, cited at the top of the dataset file). This PR changes nq_open to use the standard validation split and bumps the version to 2.0.0 since this is a breaking change.
closed
https://github.com/huggingface/datasets/pull/3029
2021-10-05T14:19:27
2021-10-05T14:56:46
2021-10-05T14:56:45
{ "login": "craffel", "id": 417568, "type": "User" }
[]
true
[]
1,016,230,272
3,028
Properly install ruamel-yaml for windows CI
null
closed
https://github.com/huggingface/datasets/pull/3028
2021-10-05T11:51:15
2021-10-05T14:02:12
2021-10-05T11:51:22
{ "login": "lhoestq", "id": 42851186, "type": "User" }
[]
true
[]
1,016,150,117
3,027
Resolve data_files by split name
This issue is about discussing the default behavior when someone loads a dataset that consists in data files. For example: ```python load_dataset("lhoestq/demo1") ``` should return two splits "train" and "test" since the dataset repostiory is like ``` data/ ├── train.csv └── test.csv ``` Currently it returns only one split "train" which contains the data of both files I started playing with this idea on this branch btw: `resolve-data_files-by-split-name` Basically the idea is that if you named you data files after split names then the default pattern is ```python { "train": ["*train*"], "test": ["*test*"], "validation": ["*dev*", "valid"], } ``` otherwise it's ```python { "train": ["*"] } ``` Let me know what you think ! cc @albertvillanova @LysandreJik @vblagoje
closed
https://github.com/huggingface/datasets/issues/3027
2021-10-05T10:24:36
2021-11-05T17:49:58
2021-11-05T17:49:57
{ "login": "lhoestq", "id": 42851186, "type": "User" }
[]
false
[]
1,016,067,794
3,026
added arxiv paper inswiss_judgment_prediction dataset card
null
closed
https://github.com/huggingface/datasets/pull/3026
2021-10-05T09:02:01
2021-10-08T16:01:44
2021-10-08T16:01:24
{ "login": "JoelNiklaus", "id": 3775944, "type": "User" }
[]
true
[]
1,016,061,222
3,025
Fix Windows test suite
Try a hotfix to restore Windows test suite. Fix #3024.
closed
https://github.com/huggingface/datasets/pull/3025
2021-10-05T08:55:22
2021-10-05T09:58:28
2021-10-05T09:58:27
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,016,052,911
3,024
Windows test suite fails
## Describe the bug There is an error during installation of tests dependencies for Windows: https://app.circleci.com/pipelines/github/huggingface/datasets/7981/workflows/9b6a0114-2b8e-4069-94e5-e844dbbdba4e/jobs/49206 ``` ERROR: Cannot uninstall 'ruamel-yaml'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. ```
closed
https://github.com/huggingface/datasets/issues/3024
2021-10-05T08:46:46
2021-10-05T09:58:27
2021-10-05T09:58:27
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,015,923,031
3,023
Fix typo
null
closed
https://github.com/huggingface/datasets/pull/3023
2021-10-05T06:06:11
2021-10-05T11:56:55
2021-10-05T11:56:55
{ "login": "qqaatw", "id": 24835382, "type": "User" }
[]
true
[]
1,015,750,221
3,022
MeDAL dataset: Add further description and update download URL
Added more details in the following sections: * Dataset Structure * Data Instances * Data Splits * Source Data * Annotations * Discussions of Biases * LIcensing Information
closed
https://github.com/huggingface/datasets/pull/3022
2021-10-05T00:13:28
2021-10-13T09:03:09
2021-10-13T09:03:09
{ "login": "xhluca", "id": 21180505, "type": "User" }
[]
true
[]
1,015,444,094
3,021
Support loading dataset from multiple zipped CSV data files
Fix partially #3018. CC: @lewtun
closed
https://github.com/huggingface/datasets/pull/3021
2021-10-04T17:33:57
2021-10-06T08:36:46
2021-10-06T08:36:45
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,015,406,105
3,020
Add a metric for the MATH dataset (competition_math).
This metric computes accuracy for the MATH dataset (https://arxiv.org/abs/2103.03874) after canonicalizing the prediction and the reference (e.g., converting "1/2" to "\\\\frac{1}{2}").
closed
https://github.com/huggingface/datasets/pull/3020
2021-10-04T16:52:16
2021-10-22T10:29:31
2021-10-22T10:29:31
{ "login": "hacobe", "id": 91226467, "type": "User" }
[]
true
[]
1,015,339,983
3,019
Fix filter leaking
If filter is called after using a first transform `shuffle`, `select`, `shard`, `train_test_split`, or `filter`, then it could not work as expected and return examples from before the first transform. This is because the indices mapping was not taken into account when saving the indices to keep when doing the filtering Affected versions: 1.12.0 and 1.12.1 This should fix #3010
closed
https://github.com/huggingface/datasets/pull/3019
2021-10-04T15:42:58
2022-06-03T08:28:14
2021-10-05T08:33:07
{ "login": "lhoestq", "id": 42851186, "type": "User" }
[]
true
[]
1,015,311,877
3,018
Support multiple zipped CSV data files
As requested by @lewtun, support loading multiple zipped CSV data files. ```python from datasets import load_dataset url = "https://domain.org/filename.zip" data_files = {"train": "train_filename.csv", "test": "test_filename.csv"} dataset = load_dataset("csv", data_dir=url, data_files=data_files) ```
open
https://github.com/huggingface/datasets/issues/3018
2021-10-04T15:16:59
2021-10-05T14:32:57
null
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[ { "name": "enhancement", "color": "a2eeef" } ]
false
[]
1,015,215,528
3,017
Remove unused parameter in xdirname
Minor fix to remove unused args `*p` in `xdirname`.
closed
https://github.com/huggingface/datasets/pull/3017
2021-10-04T13:55:53
2021-10-05T11:37:01
2021-10-05T11:37:00
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,015,208,654
3,016
Fix Windows paths in LJ Speech dataset
Minor fix in LJ Speech dataset for Windows pathname component separator. Related to #1878.
closed
https://github.com/huggingface/datasets/pull/3016
2021-10-04T13:49:37
2021-10-04T15:23:05
2021-10-04T15:23:04
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,015,130,845
3,015
Extend support for streaming datasets that use glob.glob
This PR extends the support in streaming mode for datasets that use `glob`, by patching the function `glob.glob`. Related to #2880, #2876, #2874
closed
https://github.com/huggingface/datasets/pull/3015
2021-10-04T12:42:37
2021-10-05T13:46:39
2021-10-05T13:46:38
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,015,070,751
3,014
Fix Windows path in MATH dataset
Minor fix in MATH dataset for Windows pathname component separator. Related to #2982.
closed
https://github.com/huggingface/datasets/pull/3014
2021-10-04T11:41:07
2021-10-04T12:46:44
2021-10-04T12:46:44
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,014,960,419
3,013
Improve `get_dataset_infos`?
Using the dedicated function `get_dataset_infos` on a dataset that has no dataset-info.json file returns an empty info: ``` >>> from datasets import get_dataset_infos >>> get_dataset_infos('wit') {} ``` While it's totally possible to get it (regenerate it) with: ``` >>> from datasets import load_dataset_builder >>> builder = load_dataset_builder('wit') >>> builder.info DatasetInfo(description='Wikipedia-based Image Text (WIT) Dataset is a large multimodal multilingual dataset. WIT is composed of a curated set\n of 37.6 million entity rich image-text examples with 11.5 million unique images across 108 Wikipedia languages. Its\n size enables WIT to be used as a pretraining dataset for multimodal machine learning models.\n', citation='@article{srinivasan2021wit,\n title={WIT: Wikipedia-based Image Text Dataset for Multimodal Multilingual Machine Learning},\n author={Srinivasan, Krishna and Raman, Karthik and Chen, Jiecao and Bendersky, Michael and Najork, Marc},\n journal={arXiv preprint arXiv:2103.01913},\n year={2021}\n}\n', homepage='https://github.com/google-research-datasets/wit', license='', features={'b64_bytes': Value(dtype='string', id=None), 'embedding': Sequence(feature=Value(dtype='float64', id=None), length=-1, id=None), 'image_url': Value(dtype='string', id=None), 'metadata_url': Value(dtype='string', id=None), 'original_height': Value(dtype='int32', id=None), 'original_width': Value(dtype='int32', id=None), 'mime_type': Value(dtype='string', id=None), 'caption_attribution_description': Value(dtype='string', id=None), 'wit_features': Sequence(feature={'language': Value(dtype='string', id=None), 'page_url': Value(dtype='string', id=None), 'attribution_passes_lang_id': Value(dtype='string', id=None), 'caption_alt_text_description': Value(dtype='string', id=None), 'caption_reference_description': Value(dtype='string', id=None), 'caption_title_and_reference_description': Value(dtype='string', id=None), 'context_page_description': Value(dtype='string', id=None), 'context_section_description': Value(dtype='string', id=None), 'hierarchical_section_title': Value(dtype='string', id=None), 'is_main_image': Value(dtype='string', id=None), 'page_changed_recently': Value(dtype='string', id=None), 'page_title': Value(dtype='string', id=None), 'section_title': Value(dtype='string', id=None)}, length=-1, id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name='wit', config_name='default', version=0.0.0, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None) ``` Should we test if info is empty, and in that case regenerate it? Or always generate it?
closed
https://github.com/huggingface/datasets/issues/3013
2021-10-04T09:47:04
2022-02-21T15:57:10
2022-02-21T15:57:10
{ "login": "severo", "id": 1676121, "type": "User" }
[ { "name": "question", "color": "d876e3" }, { "name": "dataset-viewer", "color": "E5583E" } ]
false
[]
1,014,958,931
3,012
Replace item with float in metrics
As pointed out by @mariosasko in #3001, calling `float()` instad of `.item()` is faster. Moreover, it might avoid potential issues if any of the third-party functions eventually returns a `float` instead of an `np.float64`. Related to #3001.
closed
https://github.com/huggingface/datasets/pull/3012
2021-10-04T09:45:28
2021-10-04T11:30:34
2021-10-04T11:30:33
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,014,935,713
3,011
load_dataset_builder should error if "name" does not exist?
``` import datasets as ds builder = ds.load_dataset_builder('sent_comp', name="doesnotexist") builder.info.config_name ``` returns ``` 'doesnotexist' ``` Shouldn't it raise an error instead? For this dataset, the only valid values for `name` should be: `"default"` or `None` (ie. argument not passed)
open
https://github.com/huggingface/datasets/issues/3011
2021-10-04T09:20:46
2022-09-20T13:05:07
null
{ "login": "severo", "id": 1676121, "type": "User" }
[ { "name": "bug", "color": "d73a4a" }, { "name": "dataset-viewer", "color": "E5583E" } ]
false
[]
1,014,918,470
3,010
Chain filtering is leaking
## Describe the bug As there's no support for lists within dataset fields, I convert my lists to json-string format. However, the bug described is occurring even when the data format is 'string'. These samples show that filtering behavior diverges from what's expected when chaining filterings. On sample 2 the second filtering leads to "leaking" of data that should've been filtered on the first filtering into the results. ## Steps to reproduce the bug Sample 1: ```python import datasets import json items = [[1, 2], [3], [4]] jsoned_items = map(json.dumps, [[1, 2], [3], [4]]) ds = datasets.Dataset.from_dict({'a': jsoned_items}) print(list(ds)) # > Prints: [{'a': '[1, 2]'}, {'a': '[3]'}, {'a': '[4]'}] as expected filtered = ds # get all lists that are shorter than 2 filtered = filtered.filter(lambda x: len(json.loads(x['a'])) < 2, load_from_cache_file=False) print(list(filtered)) # > Prints: [{'a': '[3]'}, {'a': '[4]'}] as expected # get all lists, which have a value bigger than 3 on its zero index filtered = filtered.filter(lambda x: json.loads(x['a'])[0] > 3, load_from_cache_file=False) print(list(filtered)) # > Should be: [{'a': [4]}] # > Prints: [{'a': [3]}] ``` Sample 2: ```python import datasets import json items = [[1, 2], [3], [4]] jsoned_items = map(json.dumps, [[1, 2], [3], [4]]) ds = datasets.Dataset.from_dict({'a': jsoned_items}) print(list(ds)) # > Prints: [{'a': '[1, 2]'}, {'a': '[3]'}, {'a': '[4]'}] filtered = ds # get all lists, which have a value bigger than 3 on its zero index filtered = filtered.filter(lambda x: json.loads(x['a'])[0] > 3, load_from_cache_file=False) print(list(filtered)) # > Prints: [{'a': '[4]'}] as expected # get all lists that are shorter than 2 filtered = filtered.filter(lambda x: len(json.loads(x['a'])) < 2, load_from_cache_file=False) print(list(filtered)) # > Prints: [{'a': '[1, 2]'}] # > Should be: [{'a': '[4]'}] (remain intact) ``` ## Expected results Expected and actual results are attached to the code snippets. ## Actual results Expected and actual results are attached to the code snippets. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.12.1 - Platform: Windows-10-10.0.19042-SP0 - Python version: 3.9.7 - PyArrow version: 5.0.0
closed
https://github.com/huggingface/datasets/issues/3010
2021-10-04T09:04:55
2022-06-01T17:36:44
2022-06-01T17:36:44
{ "login": "DrMatters", "id": 22641583, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,014,868,235
3,009
Fix Windows paths in SUPERB benchmark datasets
Minor fix in SUPERB benchmark datasets for Windows pathname component separator. Related to #2884, #2783 and #2619.
closed
https://github.com/huggingface/datasets/pull/3009
2021-10-04T08:13:49
2021-10-04T13:43:25
2021-10-04T13:43:25
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,014,849,163
3,008
Fix precision/recall metrics with None average
Related to issue #2979 and PR #2992.
closed
https://github.com/huggingface/datasets/pull/3008
2021-10-04T07:54:15
2021-10-04T09:29:37
2021-10-04T09:29:36
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,014,775,450
3,007
Correct a typo
null
closed
https://github.com/huggingface/datasets/pull/3007
2021-10-04T06:15:47
2021-10-04T09:27:57
2021-10-04T09:27:57
{ "login": "Yann21", "id": 35955430, "type": "User" }
[]
true
[]
1,014,770,821
3,006
Fix Windows paths in CommonLanguage dataset
Minor fix in CommonLanguage dataset for Windows pathname component separator. Related to #2989.
closed
https://github.com/huggingface/datasets/pull/3006
2021-10-04T06:08:58
2021-10-04T09:07:58
2021-10-04T09:07:58
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,014,615,420
3,005
DatasetDict.filter and Dataset.filter crashes with any "fn_kwargs" argument
## Describe the bug The ".filter" method of DatasetDict or Dataset objects fails when passing any "fn_kwargs" argument ## Steps to reproduce the bug ```python import datasets example_dataset = datasets.Dataset.from_dict({"a": {1, 2, 3, 4}}) def filter_value(example, value): return example['a'] == value filtered = example_dataset.filter(filter_value, fn_kwargs={'value': 3}) ``` ## Expected results `filtered` is a dataset containing {"a": {3}} ## Actual results > Traceback (most recent call last): > File "C:\Users\qsemi\Documents\git\nlp_experiments\gpt_celebrity\src\test_faulty_filter.py", line 8, in <module> > filtered = example_dataset.filter(filter_value, fn_kwargs={'value': 3}) > File "C:\Users\qsemi\miniconda3\envs\main\lib\site-packages\datasets\arrow_dataset.py", line 185, in wrapper > out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) > File "C:\Users\qsemi\miniconda3\envs\main\lib\site-packages\datasets\fingerprint.py", line 398, in wrapper > out = func(self, *args, **kwargs) > File "C:\Users\qsemi\miniconda3\envs\main\lib\site-packages\datasets\arrow_dataset.py", line 2169, in filter > indices = self.map( > File "C:\Users\qsemi\miniconda3\envs\main\lib\site-packages\datasets\arrow_dataset.py", line 1686, in map > return self._map_single( > File "C:\Users\qsemi\miniconda3\envs\main\lib\site-packages\datasets\arrow_dataset.py", line 185, in wrapper > out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) > File "C:\Users\qsemi\miniconda3\envs\main\lib\site-packages\datasets\fingerprint.py", line 398, in wrapper > out = func(self, *args, **kwargs) > File "C:\Users\qsemi\miniconda3\envs\main\lib\site-packages\datasets\arrow_dataset.py", line 2048, in _map_single > batch = apply_function_on_filtered_inputs( > File "C:\Users\qsemi\miniconda3\envs\main\lib\site-packages\datasets\arrow_dataset.py", line 1939, in apply_function_on_filtered_inputs > function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) > TypeError: get_indices_from_mask_function() got an unexpected keyword argument 'value' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.12.1 - Platform: Windows-10-10.0.19042-SP0 - Python version: 3.9.7 - PyArrow version: 5.0.0
closed
https://github.com/huggingface/datasets/issues/3005
2021-10-04T00:49:29
2021-10-11T10:18:01
2021-10-04T08:46:13
{ "login": "DrMatters", "id": 22641583, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,014,336,617
3,004
LexGLUE: A Benchmark Dataset for Legal Language Understanding in English.
Inspired by the recent widespread use of the GLUE multi-task benchmark NLP dataset (Wang et al., 2018), the subsequent more difficult SuperGLUE (Wang et al., 2019), other previous multi-task NLP benchmarks (Conneau and Kiela, 2018; McCann et al., 2018), and similar initiatives in other domains (Peng et al., 2019), we introduce the Legal General Language Understanding Evaluation (LexGLUE) benchmark, a benchmark dataset to evaluate the performance of NLP methods in legal tasks. LexGLUE is based on seven existing legal NLP datasets, selected using criteria largely from SuperGLUE. As in GLUE and SuperGLUE (Wang et al., 2019b,a), one of our goals is to push towards generic (or ‘foundation’) models that can cope with multiple NLP tasks, in our case legal NLP tasks possibly with limited task-specific fine-tuning. Another goal is to provide a convenient and informative entry point for NLP researchers and practitioners wishing to explore or develop methods for legalNLP. Having these goals in mind, the datasets we include in LexGLUE and the tasks they address have been simplified in several ways to make it easier for newcomers and generic models to address all tasks. LexGLUE benchmark is accompanied by experimental infrastructure that relies on Hugging Face Transformers library and resides at: https://github.com/coastalcph/lex-glue.
closed
https://github.com/huggingface/datasets/pull/3004
2021-10-03T10:03:25
2021-10-13T13:37:02
2021-10-13T13:37:01
{ "login": "iliaschalkidis", "id": 1626984, "type": "User" }
[]
true
[]
1,014,137,933
3,003
common_language: Fix license in README.md
...it's correct elsewhere
closed
https://github.com/huggingface/datasets/pull/3003
2021-10-02T18:47:37
2021-10-04T09:27:01
2021-10-04T09:27:01
{ "login": "jimregan", "id": 227350, "type": "User" }
[]
true
[]
1,014,120,524
3,002
Remove a reference to the open Arrow file when deleting a TF dataset created with to_tf_dataset
This [comment](https://github.com/huggingface/datasets/issues/2934#issuecomment-922970919) explains the issue. This PR fixes that with a `weakref` callback, and additionally: * renames `TensorflowDatasetMixIn` to `TensorflowDatasetMixin` for consistency * correctly indents `TensorflowDatasetMixin`'s docstring * replaces `tf.data.AUTOTUNE` with `tf.data.experimental.AUTOTUNE` (we support TF>=2.2 according to the [setup.py](https://github.com/huggingface/datasets/blob/fc46bba66ba4f432cc10501c16a677112e13984c/setup.py#L188) and `AUTOTUNE` has been moved to the experimental part of `tf.data` in 1.X if I'm not mistaken) Fixes #2934
closed
https://github.com/huggingface/datasets/pull/3002
2021-10-02T17:44:09
2021-10-13T11:48:00
2021-10-13T09:03:23
{ "login": "mariosasko", "id": 47462742, "type": "User" }
[]
true
[]
1,014,024,982
3,001
Fix cast to Python scalar in Matthews Correlation metric
This PR is motivated by issue #2964. The Matthews Correlation metric relies on sklearn's `matthews_corrcoef` function to compute the result. This function returns either `float` or `np.float64` (see the [source](https://github.com/scikit-learn/scikit-learn/blob/844b4be24d20fc42cc13b957374c718956a0db39/sklearn/metrics/_classification.py#L906-L909)). Obviously, calling `.item()` on the float value will fail, so I'm fixing this with the built-in `float()` function, which covers both cases. Surprisingly, on my machine, casting `np.float64` to a Python scalar with `float()` is even faster than with the `.item()` method.
closed
https://github.com/huggingface/datasets/pull/3001
2021-10-02T11:44:59
2021-10-04T09:54:04
2021-10-04T09:26:12
{ "login": "mariosasko", "id": 47462742, "type": "User" }
[]
true
[]
1,013,613,219
3,000
Fix json loader when conversion not implemented
Sometimes the arrow json parser fails if the `block_size` is too small and returns an `ArrowNotImplementedError: JSON conversion to struct...` error. By increasing the block size it makes it work again. Hopefully it should help with https://github.com/huggingface/datasets/issues/2799 I tried with the file mentioned in the issue and it worked for me cc @lewtun can you try again from this branch ?
closed
https://github.com/huggingface/datasets/pull/3000
2021-10-01T17:47:22
2021-10-01T18:05:00
2021-10-01T17:54:23
{ "login": "lhoestq", "id": 42851186, "type": "User" }
[]
true
[]
1,013,536,933
2,999
Set trivia_qa writer batch size
Save some RAM when generating trivia_qa
closed
https://github.com/huggingface/datasets/pull/2999
2021-10-01T16:23:26
2021-10-01T16:34:55
2021-10-01T16:34:55
{ "login": "lhoestq", "id": 42851186, "type": "User" }
[]
true
[]
1,013,372,871
2,998
cannot shuffle dataset loaded from disk
## Describe the bug dataset loaded from disk cannot be shuffled. ## Steps to reproduce the bug ``` my_dataset = load_from_disk('s3://my_file/validate', fs=s3) sample = my_dataset.select(range(100)).shuffle(seed=1234) ``` ## Actual results ``` sample = my_dataset .select(range(100)).shuffle(seed=1234) File "/home/ubuntu/anaconda3/envs/pytorch_p37/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/ubuntu/anaconda3/envs/pytorch_p37/lib/python3.7/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "/home/ubuntu/anaconda3/envs/pytorch_p37/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2494, in shuffle new_fingerprint=new_fingerprint, File "/home/ubuntu/anaconda3/envs/pytorch_p37/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/ubuntu/anaconda3/envs/pytorch_p37/lib/python3.7/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "/home/ubuntu/anaconda3/envs/pytorch_p37/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2303, in select tmp_file = tempfile.NamedTemporaryFile("wb", dir=os.path.dirname(indices_cache_file_name), delete=False) File "/home/ubuntu/anaconda3/envs/pytorch_p37/lib/python3.7/tempfile.py", line 547, in NamedTemporaryFile (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type) File "/home/ubuntu/anaconda3/envs/pytorch_p37/lib/python3.7/tempfile.py", line 258, in _mkstemp_inner fd = _os.open(file, flags, 0o600) FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpnnu5uhnx/my_file/validate/tmpy76d70g4' ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.12.1 - Python version: 3.7 - PyArrow version: 5.0.0
open
https://github.com/huggingface/datasets/issues/2998
2021-10-01T13:49:52
2021-10-01T13:49:52
null
{ "login": "pya25", "id": 54274249, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,013,270,069
2,997
Dataset has incorrect labels
The dataset https://huggingface.co/datasets/turkish_product_reviews has incorrect labels - all reviews are labelled with "1" (positive sentiment). None of the reviews is labelled with "0". See screenshot attached: ![Capture](https://user-images.githubusercontent.com/63367770/135617428-14ce0b27-5208-4e66-a3ee-71542e3257b4.PNG)
closed
https://github.com/huggingface/datasets/issues/2997
2021-10-01T12:09:06
2021-10-01T15:32:00
2021-10-01T13:54:34
{ "login": "heiko-hotz", "id": 63367770, "type": "User" }
[]
false
[]
1,013,266,373
2,996
Remove all query parameters when extracting protocol
Fix `_get_extraction_protocol` to remove all query parameters, like `?raw=true`, `?dl=1`,...
closed
https://github.com/huggingface/datasets/pull/2996
2021-10-01T12:05:34
2021-10-04T08:48:13
2021-10-04T08:48:13
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,013,143,868
2,995
Fix trivia_qa unfiltered
Fix https://github.com/huggingface/datasets/issues/2993
closed
https://github.com/huggingface/datasets/pull/2995
2021-10-01T09:53:43
2021-10-01T10:04:11
2021-10-01T10:04:10
{ "login": "lhoestq", "id": 42851186, "type": "User" }
[]
true
[]
1,013,000,475
2,994
Fix loading compressed CSV without streaming
When implementing support to stream CSV files (https://github.com/huggingface/datasets/commit/ad489d4597381fc2d12c77841642cbeaecf7a2e0#diff-6f60f8d0552b75be8b3bfd09994480fd60dcd4e7eb08d02f721218c3acdd2782), a regression was introduced preventing loading compressed CSV files in non-streaming mode. This PR fixes it, allowing loading compressed/uncompressed CSV files in streaming/non-streaming mode. Fix #2977.
closed
https://github.com/huggingface/datasets/pull/2994
2021-10-01T07:28:59
2021-10-01T15:53:16
2021-10-01T15:53:16
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,012,702,665
2,993
Can't download `trivia_qa/unfiltered`
## Describe the bug For some reason, I can't download `trivia_qa/unfilted`. A file seems to be missing... I am able to see it fine though the viewer tough... ## Steps to reproduce the bug ```python >>> from datasets import load_dataset >>> load_dataset("trivia_qa", "unfiltered") Downloading and preparing dataset trivia_qa/unfiltered (download: 3.07 GiB, generated: 27.23 GiB, post-processed: Unknown size, total: 30.30 GiB) to /gpfsscratch/rech/six/commun/datasets/trivia_qa/unfiltered/1.1.0/9977a5d6f72acfd92f587de052403e8138b43bb0d1ce595016c3baf7e14deba6... Traceback (most recent call last): File "/gpfswork/rech/six/commun/modules/datasets_modules/datasets/trivia_qa/9977a5d6f72acfd92f587de052403e8138b43bb0d1ce595016c3baf7e14deba6/trivia_qa.py", line 251, in _add_context with open(os.path.join(file_dir, fname), encoding="utf-8") as f: FileNotFoundError: [Errno 2] No such file or directory: '/gpfsscratch/rech/six/commun/datasets/downloads/extracted/9fcb7eddc6afd46fd074af3c5128931dfe4b548f933c925a23847faf4c1995ad/evidence/wikipedia/Peanuts.txt' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/gpfswork/rech/six/commun/conda/victor/lib/python3.7/site-packages/datasets/load.py", line 852, in load_dataset use_auth_token=use_auth_token, File "/gpfswork/rech/six/commun/conda/victor/lib/python3.7/site-packages/datasets/builder.py", line 616, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/gpfswork/rech/six/commun/conda/victor/lib/python3.7/site-packages/datasets/builder.py", line 693, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/gpfswork/rech/six/commun/conda/victor/lib/python3.7/site-packages/datasets/builder.py", line 1107, in _prepare_split disable=bool(logging.get_verbosity() == logging.NOTSET), File "/gpfswork/rech/six/commun/conda/victor/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__ for obj in iterable: File "/gpfswork/rech/six/commun/modules/datasets_modules/datasets/trivia_qa/9977a5d6f72acfd92f587de052403e8138b43bb0d1ce595016c3baf7e14deba6/trivia_qa.py", line 303, in _generate_examples example = parse_example(article) File "/gpfswork/rech/six/commun/modules/datasets_modules/datasets/trivia_qa/9977a5d6f72acfd92f587de052403e8138b43bb0d1ce595016c3baf7e14deba6/trivia_qa.py", line 274, in parse_example _add_context(article.get("EntityPages", []), "WikiContext", wiki_dir), File "/gpfswork/rech/six/commun/modules/datasets_modules/datasets/trivia_qa/9977a5d6f72acfd92f587de052403e8138b43bb0d1ce595016c3baf7e14deba6/trivia_qa.py", line 253, in _add_context except (IOError, datasets.Value("errors").NotFoundError): File "<string>", line 5, in __init__ File "/gpfswork/rech/six/commun/conda/victor/lib/python3.7/site-packages/datasets/features.py", line 265, in __post_init__ self.pa_type = string_to_arrow(self.dtype) File "/gpfswork/rech/six/commun/conda/victor/lib/python3.7/site-packages/datasets/features.py", line 134, in string_to_arrow f"Neither {datasets_dtype} nor {datasets_dtype + '_'} seems to be a pyarrow data type. " ValueError: Neither errors nor errors_ seems to be a pyarrow data type. Please make sure to use a correct data type, see: https://arrow.apache.org/docs/python/api/datatypes.html#factory-functions ``` ## Expected results I am able to load another subset (`rc`), but unable to load. I am not sure why the try/except doesn't catch it... https://github.com/huggingface/datasets/blob/9675a5a1e7b99a86f9c250f6ea5fa5d1e6d5cc7d/datasets/trivia_qa/trivia_qa.py#L253 ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.11.0 - Platform: Linux-4.18.0-147.51.2.el8_1.x86_64-x86_64-with-redhat-8.1-Ootpa - Python version: 3.7.10 - PyArrow version: 3.0.0
closed
https://github.com/huggingface/datasets/issues/2993
2021-09-30T23:00:18
2021-10-01T19:07:23
2021-10-01T19:07:22
{ "login": "VictorSanh", "id": 16107619, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,012,325,594
2,992
Fix f1 metric with None average
Fix #2979.
closed
https://github.com/huggingface/datasets/pull/2992
2021-09-30T15:31:57
2021-10-01T14:17:39
2021-10-01T14:17:38
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,012,174,823
2,991
add docmentation for the `Unix style pattern` matching feature that can be leverage for `data_files` into `load_dataset`
Unless I'm mistaken, it seems that in the new documentation it is no longer mentioned that you can use Unix style pattern matching in the `data_files` argument of the `load_dataset` method. This feature was mentioned [here](https://huggingface.co/docs/datasets/loading_datasets.html#from-a-community-dataset-on-the-hugging-face-hub) in the previous documentation. I'd love to hear your opinion @lhoestq , @albertvillanova and @stevhliu
open
https://github.com/huggingface/datasets/issues/2991
2021-09-30T13:22:01
2021-09-30T13:22:01
null
{ "login": "SaulLu", "id": 55560583, "type": "User" }
[ { "name": "enhancement", "color": "a2eeef" } ]
false
[]
1,012,097,418
2,990
Make Dataset.map accept list of np.array
Fix #2987.
closed
https://github.com/huggingface/datasets/pull/2990
2021-09-30T12:08:54
2021-10-01T13:57:46
2021-10-01T13:57:46
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,011,220,375
2,989
Add CommonLanguage
This PR adds the Common Language dataset (https://zenodo.org/record/5036977) The dataset is intended for language-identification speech classifiers and is already used by models on the Hub: * https://huggingface.co/speechbrain/lang-id-commonlanguage_ecapa * https://huggingface.co/anton-l/wav2vec2-base-langid cc @patrickvonplaten
closed
https://github.com/huggingface/datasets/pull/2989
2021-09-29T17:21:30
2021-10-01T17:36:39
2021-10-01T17:00:03
{ "login": "anton-l", "id": 26864830, "type": "User" }
[]
true
[]
1,011,148,017
2,988
IndexError: Invalid key: 14 is out of bounds for size 0
## Describe the bug A clear and concise description of what the bug is. Hi. I am trying to implement stochastic weighted averaging optimizer with transformer library as described here https://pytorch.org/blog/pytorch-1.6-now-includes-stochastic-weight-averaging/ , for this I am using a run_clm.py codes which is working fine before adding SWA optimizer, the moment I modify the model with `swa_model = AveragedModel(model)` in this script, I am getting the below error, since I am NOT touching the dataloader part, I am confused why this is occurring, I very much appreciate your opinion on this @lhoestq ## Steps to reproduce the bug ``` Traceback (most recent call last): File "run_clm.py", line 723, in <module> main() File "run_clm.py", line 669, in main train_result = trainer.train(resume_from_checkpoint=checkpoint) File "/user/dara/libs/anaconda3/envs/success/lib/python3.7/site-packages/transformers/trainer.py", line 1258, in train for step, inputs in enumerate(epoch_iterator): File "/user/dara/libs/anaconda3/envs/success/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in __next__ data = self._next_data() File "/user/dara/libs/anaconda3/envs/success/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 475, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "/user/dara/libs/anaconda3/envs/success/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/user/dara/libs/anaconda3/envs/success/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "/user/dara/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1530, in __getitem__ format_kwargs=self._format_kwargs, File "/user/dara/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1517, in _getitem pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) File "/user/dara/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets/formatting/formatting.py", line 368, in query_table _check_valid_index_key(key, size) File "/user/dara/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets/formatting/formatting.py", line 311, in _check_valid_index_key raise IndexError(f"Invalid key: {key} is out of bounds for size {size}") IndexError: Invalid key: 14 is out of bounds for size 0 ``` ## Expected results not getting the index error ## Actual results Please see the above ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: datasets 1.12.1 - Platform: linux - Python version: 3.7.11 - PyArrow version: 5.0.0
closed
https://github.com/huggingface/datasets/issues/2988
2021-09-29T16:04:24
2022-04-10T14:49:49
2022-04-10T14:49:49
{ "login": "dorost1234", "id": 79165106, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,011,026,141
2,987
ArrowInvalid: Can only convert 1-dimensional array values
## Describe the bug For the ViT and LayoutLMv2 demo notebooks in my [Transformers-Tutorials repo](https://github.com/NielsRogge/Transformers-Tutorials), people reported an ArrowInvalid issue after applying the following function to a Dataset: ``` def preprocess_data(examples): images = [Image.open(path).convert("RGB") for path in examples['image_path']] words = examples['words'] boxes = examples['bboxes'] word_labels = examples['ner_tags'] encoded_inputs = processor(images, words, boxes=boxes, word_labels=word_labels, padding="max_length", truncation=True) return encoded_inputs ``` ``` Full trace: --------------------------------------------------------------------------- ArrowInvalid Traceback (most recent call last) <ipython-input-8-0fc3efc6f0c2> in <module>() 27 28 train_dataset = datasets['train'].map(preprocess_data, batched=True, remove_columns=datasets['train'].column_names, ---> 29 features=features) 30 test_dataset = datasets['test'].map(preprocess_data, batched=True, remove_columns=datasets['test'].column_names, 31 features=features) 13 frames /usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1701 new_fingerprint=new_fingerprint, 1702 disable_tqdm=disable_tqdm, -> 1703 desc=desc, 1704 ) 1705 else: /usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 183 } 184 # apply actual function --> 185 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 186 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 187 # re-apply format to the output /usr/local/lib/python3.7/dist-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 396 # Call actual function 397 --> 398 out = func(self, *args, **kwargs) 399 400 # Update fingerprint of in-place transforms + update in-place history of transforms /usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, disable_tqdm, desc, cache_only) 2063 writer.write_table(batch) 2064 else: -> 2065 writer.write_batch(batch) 2066 if update_data and writer is not None: 2067 writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file /usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size) 409 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col) 410 typed_sequence_examples[col] = typed_sequence --> 411 pa_table = pa.Table.from_pydict(typed_sequence_examples) 412 self.write_table(pa_table, writer_batch_size) 413 /usr/local/lib/python3.7/dist-packages/pyarrow/table.pxi in pyarrow.lib.Table.from_pydict() /usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib.asarray() /usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib.array() /usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol() /usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in __arrow_array__(self, type) 106 storage = numpy_to_pyarrow_listarray(self.data, type=type.value_type) 107 else: --> 108 storage = pa.array(self.data, type.storage_dtype) 109 out = pa.ExtensionArray.from_storage(type, storage) 110 elif isinstance(self.data, np.ndarray): /usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib.array() /usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array() /usr/local/lib/python3.7/dist-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() /usr/local/lib/python3.7/dist-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowInvalid: Can only convert 1-dimensional array values ``` It can be fixed by adding the following line: ```diff def preprocess_data(examples): images = [Image.open(path).convert("RGB") for path in examples['image_path']] words = examples['words'] boxes = examples['bboxes'] word_labels = examples['ner_tags'] encoded_inputs = processor(images, words, boxes=boxes, word_labels=word_labels, padding="max_length", truncation=True) + encoded_inputs["image"] = np.array(encoded_inputs["image"]) return encoded_inputs ``` However, would be great if this can be fixed within Datasets itself.
closed
https://github.com/huggingface/datasets/issues/2987
2021-09-29T14:18:52
2021-10-01T13:57:45
2021-10-01T13:57:45
{ "login": "NielsRogge", "id": 48327001, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,010,792,783
2,986
Refac module factory + avoid etag requests for hub datasets
## Refactor the module factory When trying to extend the `data_files` logic to avoid doing unnecessary ETag requests, I noticed that the module preparation mechanism needed a refactor: - the function was 600 lines long - it was not readable - it contained many different cases that made it complex to maintain - it was hard to properly test it - it was hard to extend without breaking anything The module preparation mechanism is in charge of taking the name of a dataset or a metric given by the user (ex: "squad", "accuracy", "lhoestq/test", "path/to/my/script.py", "path/to/my/data/directory", "json", "csv") and return a module (possibly downloaded from the Hub) that contains the dataset builder or the metric class to use. ### Implementation details I decided to separate all these use cases into different dataset/metric module factories. First, the metric module factories: - **CanonicalMetricModuleFactory**: "accuracy", "rouge", ... - **LocalMetricModuleFactory**: "path/to/my/metric.py" Then, the dataset module factories: - **CanonicalDatasetModuleFactory**: "squad", "glue", ... - **CommunityDatasetModuleFactoryWithScript**: "lhoestq/test" - **CommunityDatasetModuleFactoryWithoutScript**: "lhoestq/demo1" - **PackagedDatasetModuleFactory**: "json", "csv", ... - **LocalDatasetModuleFactoryWithScript**: "path/to/my/script.py" - **LocalDatasetModuleFactoryWithoutScript**: "path/to/my/data/directory" And finally, additional factories when users have no internet: - **CachedDatasetModuleFactory** - **CachedMetricModuleFactory** ### Breaking changes One thing is that I still don't know at what extent we want to keep backward compatibility for `prepare_module`. For now I just kept it (except I removed two parameters) just in case, but it's not used anywhere anymore. ## Avoid etag requests for hub datasets To do this I added a class `DataFilesDict` that can be hashed to define the cache directory of the dataset. It contains the usual data files formatted as `{"train": ["train.txt"]}` for example. But each list of file is a `DataFilesList` that also has a `origin_metadata` attribute that contains metadata about the origin of each file: - for URLs: it stores the ETags of the files - for local files: it stores the last modification data - for files from a Hugging Face repository on the Hub: it stores the pattern (`*`, `*.csv`, "train.txt", etc.) and the commit sha of the repository (so there're no ETag requests !) This way if any file changes, the hash of the `DataFilesDict` changes too ! You can instantiate a `DataFilesDict` by using patterns for local/remote files or files in a HF repository: - for local/remote files: `DataFilesDict.from_local_or_remote(patterns)` - for files in a HF repository: `DataFilesDict.from_hf_repo(patterns, dataset_info)` Fix #2859 ## TODO Fix the latest test: - [x] fix the call to dataset_info in offline mode (related to https://github.com/huggingface/huggingface_hub/issues/372) Add some more tests: - [x] test all the factories - [x] test the new data files logic Other: - [x] docstrings - [x] comments
closed
https://github.com/huggingface/datasets/pull/2986
2021-09-29T10:42:00
2021-10-11T11:05:53
2021-10-11T11:05:52
{ "login": "lhoestq", "id": 42851186, "type": "User" }
[]
true
[]
1,010,500,433
2,985
add new dataset kan_hope
## Adding a Dataset - **Name:** *KanHope* - **Description:** *A code-mixed English-Kannada dataset for Hope speech detection* - **Task:** *Binary Text Classification* - **Paper:** *https://arxiv.org/abs/2108.04616* - **Data:** *https://github.com/adeepH/kan_hope/tree/main/dataset* - **Motivation:** *The dataset is amongst the very few resources available for code-mixed low-resourced Dravidian languages of India*
closed
https://github.com/huggingface/datasets/pull/2985
2021-09-29T05:20:28
2021-10-01T16:55:19
2021-10-01T16:55:19
{ "login": "adeepH", "id": 46108405, "type": "User" }
[]
true
[]
1,010,484,326
2,984
Exceeded maximum rows when reading large files
## Describe the bug A clear and concise description of what the bug is. When using `load_dataset` with json files, if the files are too large, there will be "Exceeded maximum rows" error. ## Steps to reproduce the bug ```python dataset = load_dataset('json', data_files=data_files) # data files have 3M rows in a single file ``` ## Expected results No error ## Actual results ``` ~/anaconda3/envs/python/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py in _generate_tables(self, files) 134 with open(file, encoding="utf-8") as f: --> 135 dataset = json.load(f) 136 except json.JSONDecodeError: ~/anaconda3/envs/python/lib/python3.9/json/__init__.py in load(fp, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw) 292 """ --> 293 return loads(fp.read(), 294 cls=cls, object_hook=object_hook, ~/anaconda3/envs/python/lib/python3.9/json/__init__.py in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw) 345 parse_constant is None and object_pairs_hook is None and not kw): --> 346 return _default_decoder.decode(s) 347 if cls is None: ~/anaconda3/envs/python/lib/python3.9/json/decoder.py in decode(self, s, _w) 339 if end != len(s): --> 340 raise JSONDecodeError("Extra data", s, end) 341 return obj JSONDecodeError: Extra data: line 2 column 1 (char 20321) During handling of the above exception, another exception occurred: ArrowInvalid Traceback (most recent call last) <ipython-input-20-ab3718a6482f> in <module> ----> 1 dataset = load_dataset('json', data_files=data_files) ~/anaconda3/envs/python/lib/python3.9/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, task, streaming, **config_kwargs) 841 842 # Download and prepare data --> 843 builder_instance.download_and_prepare( 844 download_config=download_config, 845 download_mode=download_mode, ~/anaconda3/envs/python/lib/python3.9/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs) 606 logger.warning("HF google storage unreachable. Downloading and preparing it from source") 607 if not downloaded_from_gcs: --> 608 self._download_and_prepare( 609 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 610 ) ~/anaconda3/envs/python/lib/python3.9/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 684 try: 685 # Prepare split will record examples associated to the split --> 686 self._prepare_split(split_generator, **prepare_split_kwargs) 687 except OSError as e: 688 raise OSError( ~/anaconda3/envs/python/lib/python3.9/site-packages/datasets/builder.py in _prepare_split(self, split_generator) 1153 generator = self._generate_tables(**split_generator.gen_kwargs) 1154 with ArrowWriter(features=self.info.features, path=fpath) as writer: -> 1155 for key, table in utils.tqdm( 1156 generator, unit=" tables", leave=False, disable=bool(logging.get_verbosity() == logging.NOTSET) 1157 ): ~/anaconda3/envs/python/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py in _generate_tables(self, files) 135 dataset = json.load(f) 136 except json.JSONDecodeError: --> 137 raise e 138 raise ValueError( 139 f"Not able to read records in the JSON file at {file}. " ~/anaconda3/envs/python/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py in _generate_tables(self, files) 114 while True: 115 try: --> 116 pa_table = paj.read_json( 117 BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size) 118 ) ~/anaconda3/envs/python/lib/python3.9/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json() ~/anaconda3/envs/python/lib/python3.9/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() ~/anaconda3/envs/python/lib/python3.9/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowInvalid: Exceeded maximum rows ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: - Platform: Linux - Python version: 3.9 - PyArrow version: 4.0.1
closed
https://github.com/huggingface/datasets/issues/2984
2021-09-29T04:49:22
2021-10-12T06:05:42
2021-10-12T06:05:42
{ "login": "zijwang", "id": 25057983, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,010,263,058
2,983
added SwissJudgmentPrediction dataset
null
closed
https://github.com/huggingface/datasets/pull/2983
2021-09-28T22:17:56
2021-10-01T16:03:05
2021-10-01T16:03:05
{ "login": "JoelNiklaus", "id": 3775944, "type": "User" }
[]
true
[]
1,010,118,418
2,982
Add the Math Aptitude Test of Heuristics dataset.
null
closed
https://github.com/huggingface/datasets/pull/2982
2021-09-28T19:18:37
2021-10-01T19:51:23
2021-10-01T12:21:00
{ "login": "hacobe", "id": 91226467, "type": "User" }
[]
true
[]
1,009,969,310
2,981
add wit dataset
Resolves #2902 based on conversation there - would also close #2810. Open to suggestions/help 😀 CC @hassiahk @lhoestq @yjernite
closed
https://github.com/huggingface/datasets/pull/2981
2021-09-28T16:34:49
2022-05-05T14:26:41
2022-05-05T14:26:41
{ "login": "nateraw", "id": 32437151, "type": "User" }
[]
true
[]
1,009,873,482
2,980
OpenSLR 25: ASR data for Amharic, Swahili and Wolof
## Adding a Dataset - **Name:** *SLR25* - **Description:** *Subset 25 from OpenSLR. Other subsets have been added to https://huggingface.co/datasets/openslr, 25 covers Amharic, Swahili and Wolof data* - **Paper:** *https://www.openslr.org/25/ has citations for each of the three subsubsets. * - **Data:** *Currently the three links to the .tar.bz2 files can be found a thttps://www.openslr.org/25/* - **Motivation:** *Increase ASR data for underrepresented African languages. Also, other subsets of OpenSLR speech recognition have been uploaded, so this would be easy.* https://github.com/huggingface/datasets/blob/master/datasets/openslr/openslr.py already has been created for various other OpenSLR subsets, this should be relatively straightforward to do.
open
https://github.com/huggingface/datasets/issues/2980
2021-09-28T15:04:36
2021-09-29T17:25:14
null
{ "login": "cdleong", "id": 4109253, "type": "User" }
[ { "name": "dataset request", "color": "e99695" } ]
false
[]
1,009,634,147
2,979
ValueError when computing f1 metric with average None
## Describe the bug When I try to compute the f1 score for each class in a multiclass classification problem, I get a ValueError. The same happens with recall and precision. I traced the error to the `.item()` in these scripts, which is probably there for the other averages. E.g. from f1.py: ```python return { "f1": f1_score( references, predictions, labels=labels, pos_label=pos_label, average=average, sample_weight=sample_weight, ).item(), } ``` Since the result is an array with more than one item, the `.item()` throws the error. I didn't submit a PR because this might be needed for the other averages, I'm not very familiar with the library ## Steps to reproduce the bug ```python from datasets import load_metric metric = load_metric("f1") metric.add_batch(predictions=[2,34,1,34,1,2,3], references=[23,52,1,3,523,5,8]) metric.compute(average=None) ``` ## Expected results `array([0.66666667, 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ])` ## Actual results ValueError: can only convert an array of size 1 to a Python scalar ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.12.1 - Platform: Windows-10-10.0.19041-SP0 - Python version: 3.9.5 - PyArrow version: 5.0.0
closed
https://github.com/huggingface/datasets/issues/2979
2021-09-28T11:34:53
2021-10-01T14:17:38
2021-10-01T14:17:38
{ "login": "asofiaoliveira", "id": 74454835, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,009,521,419
2,978
Run CI tests against non-production server
Currently, the CI test suite performs requests to the HF production server. As discussed with @elishowk, we should refactor our tests to use the HF staging server instead, like `huggingface_hub` and `transformers`.
open
https://github.com/huggingface/datasets/issues/2978
2021-09-28T09:41:26
2021-09-28T15:23:50
null
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
false
[]
1,009,378,692
2,977
Impossible to load compressed csv
## Describe the bug It is not possible to load from a compressed csv anymore. ## Steps to reproduce the bug ```python load_dataset('csv', data_files=['/path/to/csv.bz2']) ``` ## Problem and possible solution This used to work, but the commit that broke it is [this one](https://github.com/huggingface/datasets/commit/ad489d4597381fc2d12c77841642cbeaecf7a2e0#diff-6f60f8d0552b75be8b3bfd09994480fd60dcd4e7eb08d02f721218c3acdd2782). `pandas` usually gets the compression information from the filename itself (which was previously directly passed). Now, since it gets a file descriptor, it might be good to auto-infer the compression or let the user pass the `compression` kwarg to `load_dataset` (or maybe warn the user if the file ends with a commonly known compression scheme?). ## Environment info - `datasets` version: 1.10.0 (and over) - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.17 - Python version: 3.8.10 - PyArrow version: 3.0.0
closed
https://github.com/huggingface/datasets/issues/2977
2021-09-28T07:18:54
2021-10-01T15:53:16
2021-10-01T15:53:15
{ "login": "Valahaar", "id": 19476123, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,008,647,889
2,976
Can't load dataset
I'm trying to load a wikitext dataset ``` from datasets import load_dataset raw_datasets = load_dataset("wikitext") ``` ValueError: Config name is missing. Please pick one among the available configs: ['wikitext-103-raw-v1', 'wikitext-2-raw-v1', 'wikitext-103-v1', 'wikitext-2-v1'] Example of usage: `load_dataset('wikitext', 'wikitext-103-raw-v1')`. If I try ``` from datasets import load_dataset raw_datasets = load_dataset("wikitext-2-v1") ``` FileNotFoundError: Couldn't find file at https://raw.githubusercontent.com/huggingface/datasets/1.12.1/datasets/wikitext-2-v1/wikitext-2-v1.py #### Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.12.1 - Platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic (colab) - Python version: 3.7.12 - PyArrow version: 3.0.0
closed
https://github.com/huggingface/datasets/issues/2976
2021-09-27T21:38:14
2024-04-08T03:27:29
2021-09-28T06:53:01
{ "login": "mskovalova", "id": 77006774, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,008,444,654
2,975
ignore dummy folder and dataset_infos.json
Fixes #2877 Added the `dataset_infos.json` to the ignored files list and also added check to ignore files which have parent directory as `dummy`. Let me know if it is correct. Thanks :)
closed
https://github.com/huggingface/datasets/pull/2975
2021-09-27T18:09:03
2021-09-29T09:45:38
2021-09-29T09:05:38
{ "login": "Ishan-Kumar2", "id": 46553104, "type": "User" }
[]
true
[]
1,008,247,787
2,974
Actually disable dummy labels by default
So I might have just changed the docstring instead of the actual default argument value and not realized. @lhoestq I'm sorry >.>
closed
https://github.com/huggingface/datasets/pull/2974
2021-09-27T14:50:20
2021-09-29T09:04:42
2021-09-29T09:04:41
{ "login": "Rocketknight1", "id": 12866554, "type": "User" }
[]
true
[]
1,007,894,592
2,973
Fix JSON metadata of masakhaner dataset
Fix #2971.
closed
https://github.com/huggingface/datasets/pull/2973
2021-09-27T09:09:08
2021-09-27T12:59:59
2021-09-27T12:59:59
{ "login": "albertvillanova", "id": 8515462, "type": "User" }
[]
true
[]
1,007,808,714
2,972
OSError: Not enough disk space.
## Describe the bug I'm trying to download `natural_questions` dataset from the Internet, and I've specified the cache_dir which locates in a mounted disk and has enough disk space. However, even though the space is enough, the disk space checking function still reports the space of root `/` disk having no enough space. The file system structure is like below. The root `/` has `115G` disk space available, and the `sda1` is mounted to `/mnt`, which has `1.2T` disk space available: ``` / /mnt/sda1/path/to/args.dataset_cache_dir ``` ## Steps to reproduce the bug ```python dataset_config = DownloadConfig( cache_dir=os.path.abspath(args.dataset_cache_dir), resume_download=True, ) dataset = load_dataset("natural_questions", download_config=dataset_config) ``` ## Expected results Can download the dataset without an error. ## Actual results The following error raised: ``` OSError: Not enough disk space. Needed: 134.92 GiB (download: 41.97 GiB, generated: 92.95 GiB, post-processed: Unknown size) ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.0 - Platform: Ubuntu 18.04 - Python version: 3.8.10 - PyArrow version:
closed
https://github.com/huggingface/datasets/issues/2972
2021-09-27T07:41:22
2024-12-04T02:56:19
2021-09-28T06:43:15
{ "login": "qqaatw", "id": 24835382, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]
1,007,696,522
2,971
masakhaner dataset load problem
## Describe the bug Masakhaner dataset is not loading ## Steps to reproduce the bug ``` from datasets import load_dataset dataset = load_dataset("masakhaner",'amh') ``` ## Expected results Expected the return of a dataset ## Actual results ``` NonMatchingSplitsSizesError Traceback (most recent call last) <ipython-input-3-a6abc1161d4c> in <module>() 1 from datasets import load_dataset 2 ----> 3 dataset = load_dataset("masakhaner",'amh') 3 frames /usr/local/lib/python3.7/dist-packages/datasets/utils/info_utils.py in verify_splits(expected_splits, recorded_splits) 72 ] 73 if len(bad_splits) > 0: ---> 74 raise NonMatchingSplitsSizesError(str(bad_splits)) 75 logger.info("All the splits matched successfully.") 76 NonMatchingSplitsSizesError: [{'expected': SplitInfo(name='train', num_bytes=639927, num_examples=1751, dataset_name='masakhaner'), 'recorded': SplitInfo(name='train', num_bytes=639911, num_examples=1750, dataset_name='masakhaner')}, {'expected': SplitInfo(name='validation', num_bytes=92768, num_examples=251, dataset_name='masakhaner'), 'recorded': SplitInfo(name='validation', num_bytes=92753, num_examples=250, dataset_name='masakhaner')}, {'expected': SplitInfo(name='test', num_bytes=184286, num_examples=501, dataset_name='masakhaner'), 'recorded': SplitInfo(name='test', num_bytes=184271, num_examples=500, dataset_name='masakhaner')}] ``` ## Environment info Google Colab
closed
https://github.com/huggingface/datasets/issues/2971
2021-09-27T04:59:07
2021-09-27T12:59:59
2021-09-27T12:59:59
{ "login": "huu4ontocord", "id": 8900094, "type": "User" }
[ { "name": "bug", "color": "d73a4a" } ]
false
[]