id
int64
599M
3.48B
number
int64
1
7.8k
title
stringlengths
1
290
state
stringclasses
2 values
comments
listlengths
0
30
created_at
timestamp[s]date
2020-04-14 10:18:02
2025-10-05 06:37:50
updated_at
timestamp[s]date
2020-04-27 16:04:17
2025-10-05 10:32:43
closed_at
timestamp[s]date
2020-04-14 12:01:40
2025-10-01 13:56:03
body
stringlengths
0
228k
user
stringlengths
3
26
html_url
stringlengths
46
51
pull_request
dict
is_pull_request
bool
2 classes
700,235,308
623
Custom feature types in `load_dataset` from CSV
closed
[]
2020-09-12T13:21:34
2020-09-30T19:51:43
2020-09-30T08:39:54
I am trying to load a local file with the `load_dataset` function and I want to predefine the feature types with the `features` argument. However, the types are always the same independent of the value of `features`. I am working with the local files from the emotion dataset. To get the data you can use the following code: ```Python from pathlib import Path import wget EMOTION_PATH = Path("./data/emotion") DOWNLOAD_URLS = [ "https://www.dropbox.com/s/1pzkadrvffbqw6o/train.txt?dl=1", "https://www.dropbox.com/s/2mzialpsgf9k5l3/val.txt?dl=1", "https://www.dropbox.com/s/ikkqxfdbdec3fuj/test.txt?dl=1", ] if not Path.is_dir(EMOTION_PATH): Path.mkdir(EMOTION_PATH) for url in DOWNLOAD_URLS: wget.download(url, str(EMOTION_PATH)) ``` The first five lines of the train set are: ``` i didnt feel humiliated;sadness i can go from feeling so hopeless to so damned hopeful just from being around someone who cares and is awake;sadness im grabbing a minute to post i feel greedy wrong;anger i am ever feeling nostalgic about the fireplace i will know that it is still on the property;love i am feeling grouchy;anger ``` Here the code to reproduce the issue: ```Python from datasets import Features, Value, ClassLabel, load_dataset class_names = ["sadness", "joy", "love", "anger", "fear", "surprise"] emotion_features = Features({'text': Value('string'), 'label': ClassLabel(names=class_names)}) file_dict = {'train': EMOTION_PATH/'train.txt'} dataset = load_dataset('csv', data_files=file_dict, delimiter=';', column_names=['text', 'label'], features=emotion_features) ``` **Observed behaviour:** ```Python dataset['train'].features ``` ```Python {'text': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)} ``` **Expected behaviour:** ```Python dataset['train'].features ``` ```Python {'text': Value(dtype='string', id=None), 'label': ClassLabel(num_classes=6, names=['sadness', 'joy', 'love', 'anger', 'fear', 'surprise'], names_file=None, id=None)} ``` **Things I've tried:** - deleting the cache - trying other types such as `int64` Am I missing anything? Thanks for any pointer in the right direction.
lvwerra
https://github.com/huggingface/datasets/issues/623
null
false
700,225,826
622
load_dataset for text files not working
closed
[]
2020-09-12T12:49:28
2020-10-28T11:07:31
2020-10-28T11:07:30
Trying the following snippet, I get different problems on Linux and Windows. ```python dataset = load_dataset("text", data_files="data.txt") # or dataset = load_dataset("text", data_files=["data.txt"]) ``` (ps [This example](https://huggingface.co/docs/datasets/loading_datasets.html#json-files) shows that you can use a string as input for data_files, but the signature is `Union[Dict, List]`.) The problem on Linux is that the script crashes with a CSV error (even though it isn't a CSV file). On Windows the script just seems to freeze or get stuck after loading the config file. Linux stack trace: ``` PyTorch version 1.6.0+cu101 available. Checking /home/bram/.cache/huggingface/datasets/b1d50a0e74da9a7b9822cea8ff4e4f217dd892e09eb14f6274a2169e5436e2ea.30c25842cda32b0540d88b7195147decf9671ee442f4bc2fb6ad74016852978e.py for additional imports. Found main folder for dataset https://raw.githubusercontent.com/huggingface/datasets/1.0.1/datasets/text/text.py at /home/bram/.cache/huggingface/modules/datasets_modules/datasets/text Found specific version folder for dataset https://raw.githubusercontent.com/huggingface/datasets/1.0.1/datasets/text/text.py at /home/bram/.cache/huggingface/modules/datasets_modules/datasets/text/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7 Found script file from https://raw.githubusercontent.com/huggingface/datasets/1.0.1/datasets/text/text.py to /home/bram/.cache/huggingface/modules/datasets_modules/datasets/text/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/text.py Couldn't find dataset infos file at https://raw.githubusercontent.com/huggingface/datasets/1.0.1/datasets/text/dataset_infos.json Found metadata file for dataset https://raw.githubusercontent.com/huggingface/datasets/1.0.1/datasets/text/text.py at /home/bram/.cache/huggingface/modules/datasets_modules/datasets/text/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/text.json Using custom data configuration default Generating dataset text (/home/bram/.cache/huggingface/datasets/text/default-0907112cc6cd2a38/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7) Downloading and preparing dataset text/default-0907112cc6cd2a38 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/bram/.cache/huggingface/datasets/text/default-0907112cc6cd2a38/0.0.0/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7... Dataset not on Hf google storage. Downloading and preparing it from source Downloading took 0.0 min Checksum Computation took 0.0 min Unable to verify checksums. Generating split train Traceback (most recent call last): File "/home/bram/Python/projects/dutch-simplification/utils.py", line 45, in prepare_data dataset = load_dataset("text", data_files=dataset_f) File "/home/bram/.local/share/virtualenvs/dutch-simplification-NcpPZtDF/lib/python3.8/site-packages/datasets/load.py", line 608, in load_dataset builder_instance.download_and_prepare( File "/home/bram/.local/share/virtualenvs/dutch-simplification-NcpPZtDF/lib/python3.8/site-packages/datasets/builder.py", line 468, in download_and_prepare self._download_and_prepare( File "/home/bram/.local/share/virtualenvs/dutch-simplification-NcpPZtDF/lib/python3.8/site-packages/datasets/builder.py", line 546, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/bram/.local/share/virtualenvs/dutch-simplification-NcpPZtDF/lib/python3.8/site-packages/datasets/builder.py", line 888, in _prepare_split for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose): File "/home/bram/.local/share/virtualenvs/dutch-simplification-NcpPZtDF/lib/python3.8/site-packages/tqdm/std.py", line 1130, in __iter__ for obj in iterable: File "/home/bram/.cache/huggingface/modules/datasets_modules/datasets/text/7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7/text.py", line 100, in _generate_tables pa_table = pac.read_csv( File "pyarrow/_csv.pyx", line 714, in pyarrow._csv.read_csv 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: CSV parse error: Expected 1 columns, got 2 ``` Windows just seems to get stuck. Even with a tiny dataset of 10 lines, it has been stuck for 15 minutes already at this message: ``` Checking C:\Users\bramv\.cache\huggingface\datasets\b1d50a0e74da9a7b9822cea8ff4e4f217dd892e09eb14f6274a2169e5436e2ea.30c25842cda32b0540d88b7195147decf9671ee442f4bc2fb6ad74016852978e.py for additional imports. Found main folder for dataset https://raw.githubusercontent.com/huggingface/datasets/1.0.1/datasets/text/text.py at C:\Users\bramv\.cache\huggingface\modules\datasets_modules\datasets\text Found specific version folder for dataset https://raw.githubusercontent.com/huggingface/datasets/1.0.1/datasets/text/text.py at C:\Users\bramv\.cache\huggingface\modules\datasets_modules\datasets\text\7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7 Found script file from https://raw.githubusercontent.com/huggingface/datasets/1.0.1/datasets/text/text.py to C:\Users\bramv\.cache\huggingface\modules\datasets_modules\datasets\text\7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7\text.py Couldn't find dataset infos file at https://raw.githubusercontent.com/huggingface/datasets/1.0.1/datasets/text\dataset_infos.json Found metadata file for dataset https://raw.githubusercontent.com/huggingface/datasets/1.0.1/datasets/text/text.py at C:\Users\bramv\.cache\huggingface\modules\datasets_modules\datasets\text\7e13bc0fa76783d4ef197f079dc8acfe54c3efda980f2c9adfab046ede2f0ff7\text.json Using custom data configuration default ```
BramVanroy
https://github.com/huggingface/datasets/issues/622
null
false
700,171,097
621
[docs] Index: The native emoji looks kinda ugly in large size
closed
[]
2020-09-12T09:48:40
2020-09-15T06:20:03
2020-09-15T06:20:02
julien-c
https://github.com/huggingface/datasets/pull/621
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/621", "html_url": "https://github.com/huggingface/datasets/pull/621", "diff_url": "https://github.com/huggingface/datasets/pull/621.diff", "patch_url": "https://github.com/huggingface/datasets/pull/621.patch", "merged_at": "2020-09-15T06:20:02" }
true
699,815,135
620
map/filter multiprocessing raises errors and corrupts datasets
closed
[]
2020-09-11T22:30:06
2020-10-08T16:31:47
2020-10-08T16:31:46
After upgrading to the 1.0 started seeing errors in my data loading script after enabling multiprocessing. ```python ... ner_ds_dict = ner_ds.train_test_split(test_size=test_pct, shuffle=True, seed=seed) ner_ds_dict["validation"] = ner_ds_dict["test"] rel_ds_dict = rel_ds.train_test_split(test_size=test_pct, shuffle=True, seed=seed) rel_ds_dict["validation"] = rel_ds_dict["test"] return ner_ds_dict, rel_ds_dict ``` The first train_test_split, `ner_ds`/`ner_ds_dict`, returns a `train` and `test` split that are iterable. The second, `rel_ds`/`rel_ds_dict` in this case, returns a Dataset dict that has rows but if selected from or sliced into into returns an empty dictionary. eg `rel_ds_dict['train'][0] == {}` and `rel_ds_dict['train'][0:100] == {}`. Ok I think I know the problem -- the rel_ds was mapped though a mapper with `num_proc=12`. If I remove `num_proc`. The dataset loads. I also see errors with other map and filter functions when `num_proc` is set. ``` Done writing 67 indices in 536 bytes . Done writing 67 indices in 536 bytes . Fatal Python error: PyCOND_WAIT(gil_cond) failed ```
timothyjlaurent
https://github.com/huggingface/datasets/issues/620
null
false
699,733,612
619
Mistakes in MLQA features names
closed
[]
2020-09-11T20:46:23
2020-09-16T06:59:19
2020-09-16T06:59:19
I think the following features in MLQA shouldn't be named the way they are: 1. `questions` (should be `question`) 2. `ids` (should be `id`) 3. `start` (should be `answer_start`) The reasons I'm suggesting these features be renamed are: * To make them consistent with other QA datasets like SQuAD, XQuAD, TyDiQA etc. and hence make it easier to concatenate multiple QA datasets. * The features names are not the same as the ones provided in the original MLQA datasets (it uses the names I suggested). I know these columns can be renamed using using `Dataset.rename_column_`, `questions` and `ids` can be easily renamed but `start` on the other hand is annoying to rename since it's nested inside the feature `answers`.
M-Salti
https://github.com/huggingface/datasets/issues/619
null
false
699,684,831
618
sync logging utils with transformers
closed
[]
2020-09-11T19:46:13
2020-09-17T15:40:59
2020-09-17T09:53:47
sync the docs/code with the recent changes in transformers' `logging` utils: 1. change the default level to `WARNING` 2. add `DATASETS_VERBOSITY` env var 3. expand docs
stas00
https://github.com/huggingface/datasets/pull/618
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/618", "html_url": "https://github.com/huggingface/datasets/pull/618", "diff_url": "https://github.com/huggingface/datasets/pull/618.diff", "patch_url": "https://github.com/huggingface/datasets/pull/618.patch", "merged_at": null }
true
699,472,596
617
Compare different Rouge implementations
closed
[]
2020-09-11T15:49:32
2023-03-22T12:08:44
2020-10-02T09:52:18
I used RougeL implementation provided in `datasets` [here](https://github.com/huggingface/datasets/blob/master/metrics/rouge/rouge.py) and it gives numbers that match those reported in the pegasus paper but very different from those reported in other papers, [this](https://arxiv.org/pdf/1909.03186.pdf) for example. Can you make sure the google-research implementation you are using matches the official perl implementation? There are a couple of python wrappers around the perl implementation, [this](https://pypi.org/project/pyrouge/) has been commonly used, and [this](https://github.com/pltrdy/files2rouge) is used in fairseq). There's also a python reimplementation [here](https://github.com/pltrdy/rouge) but its RougeL numbers are way off.
ibeltagy
https://github.com/huggingface/datasets/issues/617
null
false
699,462,293
616
UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors
open
[]
2020-09-11T15:39:16
2021-07-22T21:12:21
null
I am trying out the library and want to load in pickled data with `from_dict`. In that dict, one column `text` should be tokenized and the other (an embedding vector) should be retained. All other columns should be removed. When I eventually try to set the format for the columns with `set_format` I am getting this strange Userwarning without a stack trace: > Set __getitem__(key) output type to torch for ['input_ids', 'sembedding'] columns (when key is int or slice) and don't output other (un-formatted) columns. > C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\datasets\arrow_dataset.py:835: UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors. This means you can write to the underlying (supposedly non-writeable) NumPy array using the tensor. You may want to copy the array to protect its data or make it writeable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at ..\torch\csrc\utils\tensor_numpy.cpp:141.) > return torch.tensor(x, **format_kwargs) The first one might not be related to the warning, but it is odd that it is shown, too. It is unclear whether that is something that I should do or something that that the program is doing at that moment. Snippet: ``` dataset = Dataset.from_dict(torch.load("data/dummy.pt.pt")) print(dataset) tokenizer = AutoTokenizer.from_pretrained("bert-base-cased") keys_to_retain = {"input_ids", "sembedding"} dataset = dataset.map(lambda example: tokenizer(example["text"], padding='max_length'), batched=True) dataset.remove_columns_(set(dataset.column_names) - keys_to_retain) dataset.set_format(type="torch", columns=["input_ids", "sembedding"]) dataloader = torch.utils.data.DataLoader(dataset, batch_size=2) print(next(iter(dataloader))) ``` PS: the input type for `remove_columns_` should probably be an Iterable rather than just a List.
BramVanroy
https://github.com/huggingface/datasets/issues/616
null
false
699,410,773
615
Offset overflow when slicing a big dataset with an array of indices in Pyarrow >= 1.0.0
closed
[]
2020-09-11T14:50:38
2024-05-02T06:53:15
2020-09-19T16:46:31
How to reproduce: ```python from datasets import load_dataset wiki = load_dataset("wikipedia", "20200501.en", split="train") wiki[[0]] --------------------------------------------------------------------------- ArrowInvalid Traceback (most recent call last) <ipython-input-13-381aedc9811b> in <module> ----> 1 wikipedia[[0]] ~/Desktop/hf/nlp/src/datasets/arrow_dataset.py in __getitem__(self, key) 1069 format_columns=self._format_columns, 1070 output_all_columns=self._output_all_columns, -> 1071 format_kwargs=self._format_kwargs, 1072 ) 1073 ~/Desktop/hf/nlp/src/datasets/arrow_dataset.py in _getitem(self, key, format_type, format_columns, output_all_columns, format_kwargs) 1037 ) 1038 else: -> 1039 data_subset = self._data.take(indices_array) 1040 1041 if format_type is not None: ~/.virtualenvs/hf-datasets/lib/python3.7/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.take() ~/.virtualenvs/hf-datasets/lib/python3.7/site-packages/pyarrow/compute.py in take(data, indices, boundscheck) 266 """ 267 options = TakeOptions(boundscheck) --> 268 return call_function('take', [data, indices], options) 269 270 ~/.virtualenvs/hf-datasets/lib/python3.7/site-packages/pyarrow/_compute.pyx in pyarrow._compute.call_function() ~/.virtualenvs/hf-datasets/lib/python3.7/site-packages/pyarrow/_compute.pyx in pyarrow._compute.Function.call() ~/.virtualenvs/hf-datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() ~/.virtualenvs/hf-datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowInvalid: offset overflow while concatenating arrays ``` It seems to work fine with small datasets or with pyarrow 0.17.1
lhoestq
https://github.com/huggingface/datasets/issues/615
null
false
699,177,110
614
[doc] Update deploy.sh
closed
[]
2020-09-11T11:06:13
2020-09-14T08:49:19
2020-09-14T08:49:17
thomwolf
https://github.com/huggingface/datasets/pull/614
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/614", "html_url": "https://github.com/huggingface/datasets/pull/614", "diff_url": "https://github.com/huggingface/datasets/pull/614.diff", "patch_url": "https://github.com/huggingface/datasets/pull/614.patch", "merged_at": "2020-09-14T08:49:17" }
true
699,117,070
613
Add CoNLL-2003 shared task dataset
closed
[]
2020-09-11T10:02:30
2020-10-05T10:43:05
2020-09-17T10:36:38
Please consider adding CoNLL-2003 shared task dataset as it's beneficial for token classification tasks. The motivation behind this PR is the [PR](https://github.com/huggingface/transformers/pull/7041) in the transformers project. This dataset would be not only useful for the usual run-of-the-mill NER tasks but also for syntactic chunking and part-of-speech (POS) tagging.
vblagoje
https://github.com/huggingface/datasets/pull/613
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/613", "html_url": "https://github.com/huggingface/datasets/pull/613", "diff_url": "https://github.com/huggingface/datasets/pull/613.diff", "patch_url": "https://github.com/huggingface/datasets/pull/613.patch", "merged_at": "2020-09-17T10:36:38" }
true
699,008,644
612
add multi-proc to dataset dict
closed
[]
2020-09-11T08:18:13
2020-09-11T10:20:13
2020-09-11T10:20:11
Add multi-proc to `DatasetDict`
thomwolf
https://github.com/huggingface/datasets/pull/612
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/612", "html_url": "https://github.com/huggingface/datasets/pull/612", "diff_url": "https://github.com/huggingface/datasets/pull/612.diff", "patch_url": "https://github.com/huggingface/datasets/pull/612.patch", "merged_at": "2020-09-11T10:20:11" }
true
698,863,988
611
ArrowCapacityError: List array cannot contain more than 2147483646 child elements, have 2147483648
closed
[]
2020-09-11T05:29:12
2022-06-01T15:11:43
2022-06-01T15:11:43
Hi, I'm trying to load a dataset from Dataframe, but I get the error: ```bash --------------------------------------------------------------------------- ArrowCapacityError Traceback (most recent call last) <ipython-input-7-146b6b495963> in <module> ----> 1 dataset = Dataset.from_pandas(emb) ~/miniconda3/envs/dev/lib/python3.7/site-packages/nlp/arrow_dataset.py in from_pandas(cls, df, features, info, split) 223 info.features = features 224 pa_table: pa.Table = pa.Table.from_pandas( --> 225 df=df, schema=pa.schema(features.type) if features is not None else None 226 ) 227 return cls(pa_table, info=info, split=split) ~/miniconda3/envs/dev/lib/python3.7/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.from_pandas() ~/miniconda3/envs/dev/lib/python3.7/site-packages/pyarrow/pandas_compat.py in dataframe_to_arrays(df, schema, preserve_index, nthreads, columns, safe) 591 for i, maybe_fut in enumerate(arrays): 592 if isinstance(maybe_fut, futures.Future): --> 593 arrays[i] = maybe_fut.result() 594 595 types = [x.type for x in arrays] ~/miniconda3/envs/dev/lib/python3.7/concurrent/futures/_base.py in result(self, timeout) 426 raise CancelledError() 427 elif self._state == FINISHED: --> 428 return self.__get_result() 429 430 self._condition.wait(timeout) ~/miniconda3/envs/dev/lib/python3.7/concurrent/futures/_base.py in __get_result(self) 382 def __get_result(self): 383 if self._exception: --> 384 raise self._exception 385 else: 386 return self._result ~/miniconda3/envs/dev/lib/python3.7/concurrent/futures/thread.py in run(self) 55 56 try: ---> 57 result = self.fn(*self.args, **self.kwargs) 58 except BaseException as exc: 59 self.future.set_exception(exc) ~/miniconda3/envs/dev/lib/python3.7/site-packages/pyarrow/pandas_compat.py in convert_column(col, field) 557 558 try: --> 559 result = pa.array(col, type=type_, from_pandas=True, safe=safe) 560 except (pa.ArrowInvalid, 561 pa.ArrowNotImplementedError, ~/miniconda3/envs/dev/lib/python3.7/site-packages/pyarrow/array.pxi in pyarrow.lib.array() ~/miniconda3/envs/dev/lib/python3.7/site-packages/pyarrow/array.pxi in pyarrow.lib._ndarray_to_array() ~/miniconda3/envs/dev/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowCapacityError: List array cannot contain more than 2147483646 child elements, have 2147483648 ``` My code is : ```python from nlp import Dataset dataset = Dataset.from_pandas(emb) ```
sangyx
https://github.com/huggingface/datasets/issues/611
null
false
698,349,388
610
Load text file for RoBERTa pre-training.
closed
[]
2020-09-10T18:41:38
2022-11-22T13:51:24
2022-11-22T13:51:23
I migrate my question from https://github.com/huggingface/transformers/pull/4009#issuecomment-690039444 I tried to train a Roberta from scratch using transformers. But I got OOM issues with loading a large text file. According to the suggestion from @thomwolf , I tried to implement `datasets` to load my text file. This test.txt is a simple sample where each line is a sentence. ``` from datasets import load_dataset dataset = load_dataset('text', data_files='test.txt',cache_dir="./") dataset.set_format(type='torch',columns=["text"]) dataloader = torch.utils.data.DataLoader(dataset, batch_size=8) next(iter(dataloader)) ``` But dataload cannot yield sample and error is: ``` --------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-12-388aca337e2f> in <module> ----> 1 next(iter(dataloader)) /Library/Python/3.7/site-packages/torch/utils/data/dataloader.py in __next__(self) 361 362 def __next__(self): --> 363 data = self._next_data() 364 self._num_yielded += 1 365 if self._dataset_kind == _DatasetKind.Iterable and \ /Library/Python/3.7/site-packages/torch/utils/data/dataloader.py in _next_data(self) 401 def _next_data(self): 402 index = self._next_index() # may raise StopIteration --> 403 data = self._dataset_fetcher.fetch(index) # may raise StopIteration 404 if self._pin_memory: 405 data = _utils.pin_memory.pin_memory(data) /Library/Python/3.7/site-packages/torch/utils/data/_utils/fetch.py in fetch(self, possibly_batched_index) 42 def fetch(self, possibly_batched_index): 43 if self.auto_collation: ---> 44 data = [self.dataset[idx] for idx in possibly_batched_index] 45 else: 46 data = self.dataset[possibly_batched_index] /Library/Python/3.7/site-packages/torch/utils/data/_utils/fetch.py in <listcomp>(.0) 42 def fetch(self, possibly_batched_index): 43 if self.auto_collation: ---> 44 data = [self.dataset[idx] for idx in possibly_batched_index] 45 else: 46 data = self.dataset[possibly_batched_index] KeyError: 0 ``` `dataset.set_format(type='torch',columns=["text"])` returns a log says: ``` Set __getitem__(key) output type to torch for ['text'] columns (when key is int or slice) and don't output other (un-formatted) columns. ``` I noticed the dataset is `DatasetDict({'train': Dataset(features: {'text': Value(dtype='string', id=None)}, num_rows: 44)})`. Each sample can be accessed by `dataset["train"]["text"]` instead of `dataset["text"]`. Could you please give me any suggestions on how to modify this code to load the text file? Versions: Python version 3.7.3 PyTorch version 1.6.0 TensorFlow version 2.3.0 datasets version: 1.0.1
chiyuzhang94
https://github.com/huggingface/datasets/issues/610
null
false
698,323,989
609
Update GLUE URLs (now hosted on FB)
closed
[]
2020-09-10T18:16:32
2020-09-14T19:06:02
2020-09-14T19:06:01
NYU is switching dataset hosting from Google to FB. This PR closes https://github.com/huggingface/datasets/issues/608 and is necessary for https://github.com/jiant-dev/jiant/issues/161. This PR updates the data URLs based on changes made in https://github.com/nyu-mll/jiant/pull/1112.
jeswan
https://github.com/huggingface/datasets/pull/609
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/609", "html_url": "https://github.com/huggingface/datasets/pull/609", "diff_url": "https://github.com/huggingface/datasets/pull/609.diff", "patch_url": "https://github.com/huggingface/datasets/pull/609.patch", "merged_at": null }
true
698,291,156
608
Don't use the old NYU GLUE dataset URLs
closed
[]
2020-09-10T17:47:02
2020-09-16T06:53:18
2020-09-16T06:53:18
NYU is switching dataset hosting from Google to FB. Initial changes to `datasets` are in https://github.com/jeswan/nlp/commit/b7d4a071d432592ded971e30ef73330529de25ce. What tests do you suggest I run before opening a PR? See: https://github.com/jiant-dev/jiant/issues/161 and https://github.com/nyu-mll/jiant/pull/1112
jeswan
https://github.com/huggingface/datasets/issues/608
null
false
698,094,442
607
Add transmit_format wrapper and tests
closed
[]
2020-09-10T15:03:50
2020-09-10T15:21:48
2020-09-10T15:21:47
Same as #605 but using a decorator on-top of dataset transforms that are not in place
lhoestq
https://github.com/huggingface/datasets/pull/607
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/607", "html_url": "https://github.com/huggingface/datasets/pull/607", "diff_url": "https://github.com/huggingface/datasets/pull/607.diff", "patch_url": "https://github.com/huggingface/datasets/pull/607.patch", "merged_at": "2020-09-10T15:21:47" }
true
698,050,442
606
Quick fix :)
closed
[]
2020-09-10T14:32:06
2020-09-10T16:18:32
2020-09-10T16:18:30
`nlp` => `datasets`
thomwolf
https://github.com/huggingface/datasets/pull/606
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/606", "html_url": "https://github.com/huggingface/datasets/pull/606", "diff_url": "https://github.com/huggingface/datasets/pull/606.diff", "patch_url": "https://github.com/huggingface/datasets/pull/606.patch", "merged_at": "2020-09-10T16:18:30" }
true
697,887,401
605
[Datasets] Transmit format to children
closed
[]
2020-09-10T12:30:18
2023-09-24T09:49:47
2020-09-10T16:15:21
Transmit format to children obtained when processing a dataset. Added a test. When concatenating datasets, if the formats are disparate, the concatenated dataset has a format reset to defaults.
thomwolf
https://github.com/huggingface/datasets/pull/605
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/605", "html_url": "https://github.com/huggingface/datasets/pull/605", "diff_url": "https://github.com/huggingface/datasets/pull/605.diff", "patch_url": "https://github.com/huggingface/datasets/pull/605.patch", "merged_at": null }
true
697,774,581
604
Update bucket prefix
closed
[]
2020-09-10T11:01:13
2020-09-10T12:45:33
2020-09-10T12:45:32
cc @julien-c
lhoestq
https://github.com/huggingface/datasets/pull/604
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/604", "html_url": "https://github.com/huggingface/datasets/pull/604", "diff_url": "https://github.com/huggingface/datasets/pull/604.diff", "patch_url": "https://github.com/huggingface/datasets/pull/604.patch", "merged_at": "2020-09-10T12:45:32" }
true
697,758,750
603
Set scripts version to master
closed
[]
2020-09-10T10:47:44
2020-09-10T11:02:05
2020-09-10T11:02:04
By default the scripts version is master, so that if the library is installed with ``` pip install git+http://github.com/huggingface/nlp.git ``` or ``` git clone http://github.com/huggingface/nlp.git pip install -e ./nlp ``` will use the latest scripts, and not the ones from the previous version.
lhoestq
https://github.com/huggingface/datasets/pull/603
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/603", "html_url": "https://github.com/huggingface/datasets/pull/603", "diff_url": "https://github.com/huggingface/datasets/pull/603.diff", "patch_url": "https://github.com/huggingface/datasets/pull/603.patch", "merged_at": "2020-09-10T11:02:04" }
true
697,636,605
602
apply offset to indices in multiprocessed map
closed
[]
2020-09-10T08:54:30
2020-09-10T11:03:39
2020-09-10T11:03:37
Fix #597 I fixed the indices by applying an offset. I added the case to our tests to make sure it doesn't happen again. I also added the message proposed by @thomwolf in #597 ```python >>> d.select(range(10)).map(fn, with_indices=True, batched=True, num_proc=2, load_from_cache_file=False) Done writing 10 indices in 80 bytes . Testing the mapped function outputs [0, 1] Testing finished, running the mapping function on the dataset Done writing 5 indices in 41 bytes . Done writing 5 indices in 41 bytes . Spawning 2 processes [0, 1, 2, 3, 4] [5, 6, 7, 8, 9] #0: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 377.90ba/s] #1: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 378.92ba/s] Concatenating 2 shards from multiprocessing # Dataset(features: {'label': ClassLabel(num_classes=2, names=['neg', 'pos'], names_file=None, id=None), 'text': Value(dtype='string', id=None)}, num_rows: 10) ```
lhoestq
https://github.com/huggingface/datasets/pull/602
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/602", "html_url": "https://github.com/huggingface/datasets/pull/602", "diff_url": "https://github.com/huggingface/datasets/pull/602.diff", "patch_url": "https://github.com/huggingface/datasets/pull/602.patch", "merged_at": "2020-09-10T11:03:37" }
true
697,574,848
601
check if trasnformers has PreTrainedTokenizerBase
closed
[]
2020-09-10T07:54:56
2020-09-10T11:01:37
2020-09-10T11:01:36
Fix #598
lhoestq
https://github.com/huggingface/datasets/pull/601
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/601", "html_url": "https://github.com/huggingface/datasets/pull/601", "diff_url": "https://github.com/huggingface/datasets/pull/601.diff", "patch_url": "https://github.com/huggingface/datasets/pull/601.patch", "merged_at": "2020-09-10T11:01:36" }
true
697,496,913
600
Pickling error when loading dataset
closed
[]
2020-09-10T06:28:08
2020-09-25T14:31:54
2020-09-25T14:31:54
Hi, I modified line 136 in the original [run_language_modeling.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py) as: ``` # line 136: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with transformers (3.1.0) and nlp (0.4.0), I get the following error: ``` Traceback (most recent call last): File "src/run_language_modeling.py", line 319, in <module> main() File "src/run_language_modeling.py", line 248, in main get_dataset(data_args, tokenizer=tokenizer, cache_dir=model_args.cache_dir) if training_args.do_train else None File "src/run_language_modeling.py", line 139, in get_dataset dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) File "/data/nlp/src/nlp/arrow_dataset.py", line 1136, in map new_fingerprint=new_fingerprint, File "/data/nlp/src/nlp/fingerprint.py", line 158, in wrapper self._fingerprint, transform, kwargs_for_fingerprint File "/data/nlp/src/nlp/fingerprint.py", line 105, in update_fingerprint hasher.update(transform_args[key]) File "/data/nlp/src/nlp/fingerprint.py", line 57, in update self.m.update(self.hash(value).encode("utf-8")) File "/data/nlp/src/nlp/fingerprint.py", line 53, in hash return cls.hash_default(value) File "/data/nlp/src/nlp/fingerprint.py", line 46, in hash_default return cls.hash_bytes(dumps(value)) File "/data/nlp/src/nlp/utils/py_utils.py", line 362, in dumps dump(obj, file) File "/data/nlp/src/nlp/utils/py_utils.py", line 339, in dump Pickler(file, recurse=True).dump(obj) File "/root/miniconda3/envs/py3.6/lib/python3.6/site-packages/dill/_dill.py", line 446, in dump StockPickler.dump(self, obj) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 409, in dump self.save(obj) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/root/miniconda3/envs/py3.6/lib/python3.6/site-packages/dill/_dill.py", line 1438, in save_function obj.__dict__, fkwdefaults), obj=obj) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 736, in save_tuple save(element) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/root/miniconda3/envs/py3.6/lib/python3.6/site-packages/dill/_dill.py", line 1170, in save_cell pickler.save_reduce(_create_cell, (f,), obj=obj) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 736, in save_tuple save(element) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 521, in save self.save_reduce(obj=obj, *rv) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 605, in save_reduce save(cls) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/root/miniconda3/envs/py3.6/lib/python3.6/site-packages/dill/_dill.py", line 1365, in save_type obj.__bases__, _dict), obj=obj) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/root/miniconda3/envs/py3.6/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/root/miniconda3/envs/py3.6/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 507, in save self.save_global(obj, rv) File "/root/miniconda3/envs/py3.6/lib/python3.6/pickle.py", line 927, in save_global (obj, module_name, name)) _pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union ```
kandorm
https://github.com/huggingface/datasets/issues/600
null
false
697,377,786
599
Add MATINF dataset
closed
[]
2020-09-10T03:31:09
2023-09-24T09:50:08
2020-09-17T12:17:25
@lhoestq The command to create metadata failed. I guess it's because the zip is not downloaded from a remote address? How to solve that? Also the CI fails and I don't know how to fix that :(
JetRunner
https://github.com/huggingface/datasets/pull/599
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/599", "html_url": "https://github.com/huggingface/datasets/pull/599", "diff_url": "https://github.com/huggingface/datasets/pull/599.diff", "patch_url": "https://github.com/huggingface/datasets/pull/599.patch", "merged_at": null }
true
697,156,501
598
The current version of the package on github has an error when loading dataset
closed
[]
2020-09-09T21:03:23
2020-09-10T06:25:21
2020-09-09T22:57:28
Instead of downloading the package from pip, downloading the version from source will result in an error when loading dataset (the pip version is completely fine): To recreate the error: First, installing nlp directly from source: ``` git clone https://github.com/huggingface/nlp.git cd nlp pip install -e . ``` Then run: ``` from nlp import load_dataset dataset = load_dataset('wikitext', 'wikitext-2-v1',split = 'train') ``` will give error: ``` >>> dataset = load_dataset('wikitext', 'wikitext-2-v1',split = 'train') Checking /home/zeyuy/.cache/huggingface/datasets/84a754b488511b109e2904672d809c041008416ae74e38f9ee0c80a8dffa1383.2e21f48d63b5572d19c97e441fbb802257cf6a4c03fbc5ed8fae3d2c2273f59e.py for additional imports. Found main folder for dataset https://raw.githubusercontent.com/huggingface/nlp/0.4.0/datasets/wikitext/wikitext.py at /home/zeyuy/.cache/huggingface/modules/nlp_modules/datasets/wikitext Found specific version folder for dataset https://raw.githubusercontent.com/huggingface/nlp/0.4.0/datasets/wikitext/wikitext.py at /home/zeyuy/.cache/huggingface/modules/nlp_modules/datasets/wikitext/5de6e79516446f747fcccc09aa2614fa159053b75909594d28d262395f72d89d Found script file from https://raw.githubusercontent.com/huggingface/nlp/0.4.0/datasets/wikitext/wikitext.py to /home/zeyuy/.cache/huggingface/modules/nlp_modules/datasets/wikitext/5de6e79516446f747fcccc09aa2614fa159053b75909594d28d262395f72d89d/wikitext.py Found dataset infos file from https://raw.githubusercontent.com/huggingface/nlp/0.4.0/datasets/wikitext/dataset_infos.json to /home/zeyuy/.cache/huggingface/modules/nlp_modules/datasets/wikitext/5de6e79516446f747fcccc09aa2614fa159053b75909594d28d262395f72d89d/dataset_infos.json Found metadata file for dataset https://raw.githubusercontent.com/huggingface/nlp/0.4.0/datasets/wikitext/wikitext.py at /home/zeyuy/.cache/huggingface/modules/nlp_modules/datasets/wikitext/5de6e79516446f747fcccc09aa2614fa159053b75909594d28d262395f72d89d/wikitext.json Loading Dataset Infos from /home/zeyuy/.cache/huggingface/modules/nlp_modules/datasets/wikitext/5de6e79516446f747fcccc09aa2614fa159053b75909594d28d262395f72d89d Overwrite dataset info from restored data version. Loading Dataset info from /home/zeyuy/.cache/huggingface/datasets/wikitext/wikitext-2-v1/1.0.0/5de6e79516446f747fcccc09aa2614fa159053b75909594d28d262395f72d89d Reusing dataset wikitext (/home/zeyuy/.cache/huggingface/datasets/wikitext/wikitext-2-v1/1.0.0/5de6e79516446f747fcccc09aa2614fa159053b75909594d28d262395f72d89d) Constructing Dataset for split train, from /home/zeyuy/.cache/huggingface/datasets/wikitext/wikitext-2-v1/1.0.0/5de6e79516446f747fcccc09aa2614fa159053b75909594d28d262395f72d89d Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/zeyuy/transformers/examples/language-modeling/nlp/src/nlp/load.py", line 600, in load_dataset ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications) File "/home/zeyuy/transformers/examples/language-modeling/nlp/src/nlp/builder.py", line 611, in as_dataset datasets = utils.map_nested( File "/home/zeyuy/transformers/examples/language-modeling/nlp/src/nlp/utils/py_utils.py", line 216, in map_nested return function(data_struct) File "/home/zeyuy/transformers/examples/language-modeling/nlp/src/nlp/builder.py", line 631, in _build_single_dataset ds = self._as_dataset( File "/home/zeyuy/transformers/examples/language-modeling/nlp/src/nlp/builder.py", line 704, in _as_dataset return Dataset(**dataset_kwargs) File "/home/zeyuy/transformers/examples/language-modeling/nlp/src/nlp/arrow_dataset.py", line 188, in __init__ self._fingerprint = generate_fingerprint(self) File "/home/zeyuy/transformers/examples/language-modeling/nlp/src/nlp/fingerprint.py", line 91, in generate_fingerprint hasher.update(key) File "/home/zeyuy/transformers/examples/language-modeling/nlp/src/nlp/fingerprint.py", line 57, in update self.m.update(self.hash(value).encode("utf-8")) File "/home/zeyuy/transformers/examples/language-modeling/nlp/src/nlp/fingerprint.py", line 53, in hash return cls.hash_default(value) File "/home/zeyuy/transformers/examples/language-modeling/nlp/src/nlp/fingerprint.py", line 46, in hash_default return cls.hash_bytes(dumps(value)) File "/home/zeyuy/transformers/examples/language-modeling/nlp/src/nlp/utils/py_utils.py", line 361, in dumps with _no_cache_fields(obj): File "/home/zeyuy/miniconda3/lib/python3.8/contextlib.py", line 113, in __enter__ return next(self.gen) File "/home/zeyuy/transformers/examples/language-modeling/nlp/src/nlp/utils/py_utils.py", line 348, in _no_cache_fields if isinstance(obj, tr.PreTrainedTokenizerBase) and hasattr(obj, "cache") and isinstance(obj.cache, dict): AttributeError: module 'transformers' has no attribute 'PreTrainedTokenizerBase' ```
zeyuyun1
https://github.com/huggingface/datasets/issues/598
null
false
697,112,029
597
Indices incorrect with multiprocessing
closed
[]
2020-09-09T19:50:56
2020-09-10T11:03:37
2020-09-10T11:03:37
When `num_proc` > 1, the indices argument passed to the map function is incorrect: ```python d = load_dataset('imdb', split='test[:1%]') def fn(x, inds): print(inds) return x d.select(range(10)).map(fn, with_indices=True, batched=True) # [0, 1] # [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] d.select(range(10)).map(fn, with_indices=True, batched=True, num_proc=2) # [0, 1] # [0, 1] # [0, 1, 2, 3, 4] # [0, 1, 2, 3, 4] ``` As you can see, the subset passed to each thread is indexed from 0 to N which doesn't reflect their positions in `d`.
joeddav
https://github.com/huggingface/datasets/issues/597
null
false
696,928,139
596
[style/quality] Moving to isort 5.0.0 + style/quality on datasets and metrics
closed
[]
2020-09-09T15:47:21
2020-09-10T10:05:04
2020-09-10T10:05:03
Move the repo to isort 5.0.0. Also start testing style/quality on datasets and metrics. Specific rule: we allow F401 (unused imports) in metrics to be able to add imports to detect early on missing dependencies. Maybe we could add this in datasets but while cleaning this I've seen many example of really unused imports in dataset so maybe it's better to have it as a line-by-line nova instead of a general rule like in metrics.
thomwolf
https://github.com/huggingface/datasets/pull/596
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/596", "html_url": "https://github.com/huggingface/datasets/pull/596", "diff_url": "https://github.com/huggingface/datasets/pull/596.diff", "patch_url": "https://github.com/huggingface/datasets/pull/596.patch", "merged_at": "2020-09-10T10:05:03" }
true
696,892,304
595
`Dataset`/`DatasetDict` has no attribute 'save_to_disk'
closed
[]
2020-09-09T15:01:52
2020-09-09T16:20:19
2020-09-09T16:20:18
Hi, As the title indicates, both `Dataset` and `DatasetDict` classes don't seem to have the `save_to_disk` method. While the file [`arrow_dataset.py`](https://github.com/huggingface/nlp/blob/34bf0b03bfe03e7f77b8fec1cd48f5452c4fc7c1/src/nlp/arrow_dataset.py) in the repo here has the method, the file `arrow_dataset.py` which is saved after `pip install nlp -U` in my `conda` environment DOES NOT contain the `save_to_disk` method. I even tried `pip install git+https://github.com/huggingface/nlp.git ` and still no luck. Do I need to install the library in another way?
sudarshan85
https://github.com/huggingface/datasets/issues/595
null
false
696,816,893
594
Fix germeval url
closed
[]
2020-09-09T13:29:35
2020-09-09T13:34:35
2020-09-09T13:34:34
Continuation of #593 but without the dummy data hack
lhoestq
https://github.com/huggingface/datasets/pull/594
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/594", "html_url": "https://github.com/huggingface/datasets/pull/594", "diff_url": "https://github.com/huggingface/datasets/pull/594.diff", "patch_url": "https://github.com/huggingface/datasets/pull/594.patch", "merged_at": "2020-09-09T13:34:34" }
true
696,679,182
593
GermEval 2014: new download urls
closed
[]
2020-09-09T10:07:29
2020-09-09T14:16:54
2020-09-09T13:35:15
Hi, unfortunately, the download links for the GermEval 2014 dataset have changed: they're now located on a Google Drive. I changed the URLs and bump version from 1.0.0 to 2.0.0.
stefan-it
https://github.com/huggingface/datasets/pull/593
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/593", "html_url": "https://github.com/huggingface/datasets/pull/593", "diff_url": "https://github.com/huggingface/datasets/pull/593.diff", "patch_url": "https://github.com/huggingface/datasets/pull/593.patch", "merged_at": null }
true
696,619,986
592
Test in memory and on disk
closed
[]
2020-09-09T08:59:30
2020-09-09T13:50:04
2020-09-09T13:50:03
I added test parameters to do every test both in memory and on disk. I also found a bug in concatenate_dataset thanks to the new tests and fixed it.
lhoestq
https://github.com/huggingface/datasets/pull/592
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/592", "html_url": "https://github.com/huggingface/datasets/pull/592", "diff_url": "https://github.com/huggingface/datasets/pull/592.diff", "patch_url": "https://github.com/huggingface/datasets/pull/592.patch", "merged_at": "2020-09-09T13:50:03" }
true
696,530,413
591
fix #589 (backward compat)
closed
[]
2020-09-09T07:33:13
2020-09-09T08:57:56
2020-09-09T08:57:55
Fix #589
thomwolf
https://github.com/huggingface/datasets/pull/591
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/591", "html_url": "https://github.com/huggingface/datasets/pull/591", "diff_url": "https://github.com/huggingface/datasets/pull/591.diff", "patch_url": "https://github.com/huggingface/datasets/pull/591.patch", "merged_at": "2020-09-09T08:57:54" }
true
696,501,827
590
The process cannot access the file because it is being used by another process (windows)
closed
[]
2020-09-09T07:01:36
2020-09-25T14:02:28
2020-09-25T14:02:28
Hi, I consistently get the following error when developing in my PC (windows 10): ``` train_dataset = train_dataset.map(convert_to_features, batched=True) File "C:\Users\saareliad\AppData\Local\Continuum\miniconda3\envs\py38\lib\site-packages\nlp\arrow_dataset.py", line 970, in map shutil.move(tmp_file.name, cache_file_name) File "C:\Users\saareliad\AppData\Local\Continuum\miniconda3\envs\py38\lib\shutil.py", line 803, in move os.unlink(src) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\saareliad\\.cache\\huggingface\\datasets\\squad\\plain_text\\1.0.0\\408a8fa46a1e2805445b793f1022e743428ca739a34809fce872f0c7f17b44ab\\tmpsau1bep1' ```
saareliad
https://github.com/huggingface/datasets/issues/590
null
false
696,488,447
589
Cannot use nlp.load_dataset text, AttributeError: module 'nlp.utils' has no attribute 'logging'
closed
[]
2020-09-09T06:46:53
2020-09-09T08:57:54
2020-09-09T08:57:54
``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/root/anaconda3/envs/pytorch/lib/python3.7/site-packages/nlp/load.py", line 533, in load_dataset builder_cls = import_main_class(module_path, dataset=True) File "/root/anaconda3/envs/pytorch/lib/python3.7/site-packages/nlp/load.py", line 61, in import_main_class module = importlib.import_module(module_path) File "/root/anaconda3/envs/pytorch/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/root/anaconda3/envs/pytorch/lib/python3.7/site-packages/nlp/datasets/text/5dc629379536c4037d9c2063e1caa829a1676cf795f8e030cd90a537eba20c08/text.py", line 9, in <module> logger = nlp.utils.logging.get_logger(__name__) AttributeError: module 'nlp.utils' has no attribute 'logging' ``` Occurs on the following code, or any code including the load_dataset('text'): ``` dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ```
ksjae
https://github.com/huggingface/datasets/issues/589
null
false
695,249,809
588
Support pathlike obj in load dataset
closed
[]
2020-09-07T16:13:21
2020-09-08T07:45:19
2020-09-08T07:45:18
Fix #582 (I recreated the PR, I got an issue with git)
lhoestq
https://github.com/huggingface/datasets/pull/588
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/588", "html_url": "https://github.com/huggingface/datasets/pull/588", "diff_url": "https://github.com/huggingface/datasets/pull/588.diff", "patch_url": "https://github.com/huggingface/datasets/pull/588.patch", "merged_at": "2020-09-08T07:45:17" }
true
695,246,018
587
Support pathlike obj in load dataset
closed
[]
2020-09-07T16:09:16
2020-09-07T16:10:35
2020-09-07T16:10:35
Fix #582
lhoestq
https://github.com/huggingface/datasets/pull/587
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/587", "html_url": "https://github.com/huggingface/datasets/pull/587", "diff_url": "https://github.com/huggingface/datasets/pull/587.diff", "patch_url": "https://github.com/huggingface/datasets/pull/587.patch", "merged_at": null }
true
695,237,999
586
Better message when data files is empty
closed
[]
2020-09-07T15:59:57
2020-09-09T09:00:09
2020-09-09T09:00:08
Fix #581
lhoestq
https://github.com/huggingface/datasets/pull/586
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/586", "html_url": "https://github.com/huggingface/datasets/pull/586", "diff_url": "https://github.com/huggingface/datasets/pull/586.diff", "patch_url": "https://github.com/huggingface/datasets/pull/586.patch", "merged_at": "2020-09-09T09:00:07" }
true
695,191,209
585
Fix select for pyarrow < 1.0.0
closed
[]
2020-09-07T15:02:52
2020-09-08T07:43:17
2020-09-08T07:43:15
Fix #583
lhoestq
https://github.com/huggingface/datasets/pull/585
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/585", "html_url": "https://github.com/huggingface/datasets/pull/585", "diff_url": "https://github.com/huggingface/datasets/pull/585.diff", "patch_url": "https://github.com/huggingface/datasets/pull/585.patch", "merged_at": "2020-09-08T07:43:15" }
true
695,186,652
584
Use github versioning
closed
[]
2020-09-07T14:58:15
2020-09-09T13:37:35
2020-09-09T13:37:34
Right now dataset scripts and metrics are downloaded from S3 which is in sync with master. It means that it's not currently possible to pin the dataset/metric script version. To fix that I changed the download url from S3 to github, and adding a `version` parameter in `load_dataset` and `load_metric` to pin a certain version of the lib, as in #562
lhoestq
https://github.com/huggingface/datasets/pull/584
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/584", "html_url": "https://github.com/huggingface/datasets/pull/584", "diff_url": "https://github.com/huggingface/datasets/pull/584.diff", "patch_url": "https://github.com/huggingface/datasets/pull/584.patch", "merged_at": "2020-09-09T13:37:34" }
true
695,166,265
583
ArrowIndexError on Dataset.select
closed
[]
2020-09-07T14:36:29
2020-09-08T07:43:15
2020-09-08T07:43:15
If the indices table consists in several chunks, then `dataset.select` results in an `ArrowIndexError` error for pyarrow < 1.0.0 Example: ```python from nlp import load_dataset mnli = load_dataset("glue", "mnli", split="train") shuffled = mnli.shuffle(seed=42) mnli.select(list(range(len(mnli)))) ``` raises: ```python --------------------------------------------------------------------------- ArrowIndexError Traceback (most recent call last) <ipython-input-64-006a5d38d418> in <module> ----> 1 mnli.shuffle(seed=42).select(list(range(len(mnli)))) ~/Desktop/hf/nlp/src/nlp/fingerprint.py in wrapper(*args, **kwargs) 161 # Call actual function 162 --> 163 out = func(self, *args, **kwargs) 164 165 # Update fingerprint of in-place transforms + update in-place history of transforms ~/Desktop/hf/nlp/src/nlp/arrow_dataset.py in select(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 1653 if self._indices is not None: 1654 if PYARROW_V0: -> 1655 indices_array = self._indices.column(0).chunk(0).take(indices_array) 1656 else: 1657 indices_array = self._indices.column(0).take(indices_array) ~/.virtualenvs/hf-datasets/lib/python3.7/site-packages/pyarrow/array.pxi in pyarrow.lib.Array.take() ~/.virtualenvs/hf-datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowIndexError: take index out of bounds ``` This is because the `take` method is only done on the first chunk which only contains 1000 elements by default (mnli has ~400 000 elements). Shall we change that to use ```python pa.concat_tables(self._indices._indices.slice(i, 1) for i in indices_array) ``` instead of `take` ? @thomwolf
lhoestq
https://github.com/huggingface/datasets/issues/583
null
false
695,126,456
582
Allow for PathLike objects
closed
[]
2020-09-07T13:54:51
2020-09-08T07:45:17
2020-09-08T07:45:17
Using PathLike objects as input for `load_dataset` does not seem to work. The following will throw an error. ```python files = list(Path(r"D:\corpora\yourcorpus").glob("*.txt")) dataset = load_dataset("text", data_files=files) ``` Traceback: ``` Traceback (most recent call last): File "C:/dev/python/dutch-simplification/main.py", line 7, in <module> dataset = load_dataset("text", data_files=files) File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\load.py", line 548, in load_dataset builder_instance.download_and_prepare( File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\builder.py", line 470, in download_and_prepare self._save_info() File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\builder.py", line 564, in _save_info self.info.write_to_directory(self._cache_dir) File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\info.py", line 149, in write_to_directory self._dump_info(f) File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\info.py", line 156, in _dump_info file.write(json.dumps(asdict(self)).encode("utf-8")) File "c:\users\bramv\appdata\local\programs\python\python38\lib\json\__init__.py", line 231, in dumps return _default_encoder.encode(obj) File "c:\users\bramv\appdata\local\programs\python\python38\lib\json\encoder.py", line 199, in encode chunks = self.iterencode(o, _one_shot=True) File "c:\users\bramv\appdata\local\programs\python\python38\lib\json\encoder.py", line 257, in iterencode return _iterencode(o, 0) TypeError: keys must be str, int, float, bool or None, not WindowsPath ``` We have to cast to a string explicitly to make this work. It would be nicer if we could actually use PathLike objects. ```python files = [str(f) for f in Path(r"D:\corpora\wablieft").glob("*.txt")] ```
BramVanroy
https://github.com/huggingface/datasets/issues/582
null
false
695,120,517
581
Better error message when input file does not exist
closed
[]
2020-09-07T13:47:59
2020-09-09T09:00:07
2020-09-09T09:00:07
In the following scenario, when `data_files` is an empty list, the stack trace and error message could be improved. This can probably be solved by checking for each file whether it actually exists and/or whether the argument is not false-y. ```python dataset = load_dataset("text", data_files=[]) ``` Example error trace. ``` Using custom data configuration default Downloading and preparing dataset text/default-d18f9b6611eb8e16 (download: Unknown size, generated: Unknown size, post-processed: Unknown sizetotal: Unknown size) to C:\Users\bramv\.cache\huggingface\datasets\text\default-d18f9b6611eb8e16\0.0.0\3a79870d85f1982d6a2af884fde86a71c771747b4b161fd302d28ad22adf985b... Traceback (most recent call last): File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\builder.py", line 424, in incomplete_dir yield tmp_dir File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare self._download_and_prepare( File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\builder.py", line 537, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\builder.py", line 813, in _prepare_split num_examples, num_bytes = writer.finalize() File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\arrow_writer.py", line 217, in finalize self.pa_writer.close() AttributeError: 'NoneType' object has no attribute 'close' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:/dev/python/dutch-simplification/main.py", line 7, in <module> dataset = load_dataset("text", data_files=files) File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\load.py", line 548, in load_dataset builder_instance.download_and_prepare( File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\builder.py", line 470, in download_and_prepare self._save_info() File "c:\users\bramv\appdata\local\programs\python\python38\lib\contextlib.py", line 131, in __exit__ self.gen.throw(type, value, traceback) File "C:\Users\bramv\.virtualenvs\dutch-simplification-nbNdqK9u\lib\site-packages\nlp\builder.py", line 430, in incomplete_dir shutil.rmtree(tmp_dir) File "c:\users\bramv\appdata\local\programs\python\python38\lib\shutil.py", line 737, in rmtree return _rmtree_unsafe(path, onerror) File "c:\users\bramv\appdata\local\programs\python\python38\lib\shutil.py", line 615, in _rmtree_unsafe onerror(os.unlink, fullname, sys.exc_info()) File "c:\users\bramv\appdata\local\programs\python\python38\lib\shutil.py", line 613, in _rmtree_unsafe os.unlink(fullname) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\bramv\\.cache\\huggingface\\datasets\\text\\default-d18f9b6611eb8e16\\0.0.0\\3a79870d85f1982d6a2af884fde86a71c771747b4b161fd302d28ad22adf985b.incomplete\\text-train.arrow' ```
BramVanroy
https://github.com/huggingface/datasets/issues/581
null
false
694,954,551
580
nlp re-creates already-there caches when using a script, but not within a shell
closed
[]
2020-09-07T10:23:50
2020-09-07T15:19:09
2020-09-07T14:26:41
`nlp` keeps creating new caches for the same file when launching `filter` from a script, and behaves correctly from within the shell. Example: try running ``` import nlp hans_easy_data = nlp.load_dataset('hans', split="validation").filter(lambda x: x['label'] == 0) hans_hard_data = nlp.load_dataset('hans', split="validation").filter(lambda x: x['label'] == 1) ``` twice. If launched from a `file.py` script, the cache will be re-created the second time. If launched as 3 shell/`ipython` commands, `nlp` will correctly re-use the cache. As observed with @lhoestq.
TevenLeScao
https://github.com/huggingface/datasets/issues/580
null
false
694,947,599
579
Doc metrics
closed
[]
2020-09-07T10:15:24
2020-09-10T13:06:11
2020-09-10T13:06:10
Adding documentation on metrics loading/using/sharing
thomwolf
https://github.com/huggingface/datasets/pull/579
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/579", "html_url": "https://github.com/huggingface/datasets/pull/579", "diff_url": "https://github.com/huggingface/datasets/pull/579.diff", "patch_url": "https://github.com/huggingface/datasets/pull/579.patch", "merged_at": "2020-09-10T13:06:10" }
true
694,849,940
578
Add CommonGen Dataset
closed
[]
2020-09-07T08:17:17
2020-09-07T11:50:29
2020-09-07T11:49:07
CC Authors: @yuchenlin @MichaelZhouwang
JetRunner
https://github.com/huggingface/datasets/pull/578
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/578", "html_url": "https://github.com/huggingface/datasets/pull/578", "diff_url": "https://github.com/huggingface/datasets/pull/578.diff", "patch_url": "https://github.com/huggingface/datasets/pull/578.patch", "merged_at": "2020-09-07T11:49:07" }
true
694,607,148
577
Some languages in wikipedia dataset are not loading
closed
[]
2020-09-07T01:16:29
2023-04-11T22:50:48
2022-10-11T11:16:04
Hi, I am working with the `wikipedia` dataset and I have a script that goes over 92 of the available languages in that dataset. So far I have detected that `ar`, `af`, `an` are not loading. Other languages like `fr` and `en` are working fine. Here's how I am loading them: ``` import nlp langs = ['ar'. 'af', 'an'] for lang in langs: data = nlp.load_dataset('wikipedia', f'20200501.{lang}', beam_runner='DirectRunner', split='train') print(lang, len(data)) ``` Here's what I see for 'ar' (it gets stuck there): ``` Downloading and preparing dataset wikipedia/20200501.ar (download: Unknown size, generated: Unknown size, post-processed: Unknown sizetotal: Unknown size) to /home/gaguilar/.cache/huggingface/datasets/wikipedia/20200501.ar/1.0.0/7be7f4324255faf70687be8692de57cf79197afdc33ff08d6a04ed602df32d50... ``` Note that those languages are indeed in the list of expected languages. Any suggestions on how to work around this? Thanks!
gaguilar
https://github.com/huggingface/datasets/issues/577
null
false
694,348,645
576
Fix the code block in doc
closed
[]
2020-09-06T11:40:55
2020-09-07T07:37:32
2020-09-07T07:37:18
JetRunner
https://github.com/huggingface/datasets/pull/576
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/576", "html_url": "https://github.com/huggingface/datasets/pull/576", "diff_url": "https://github.com/huggingface/datasets/pull/576.diff", "patch_url": "https://github.com/huggingface/datasets/pull/576.patch", "merged_at": "2020-09-07T07:37:18" }
true
693,691,611
575
Couldn't reach certain URLs and for the ones that can be reached, code just blocks after downloading.
closed
[]
2020-09-04T21:46:25
2020-09-22T10:41:36
2020-09-22T10:41:36
Hi, I'm following the [quick tour](https://huggingface.co/nlp/quicktour.html) and tried to load the glue dataset: ``` >>> from nlp import load_dataset >>> dataset = load_dataset('glue', 'mrpc', split='train') ``` However, this ran into a `ConnectionError` saying it could not reach the URL (just pasting the last few lines): ``` /net/vaosl01/opt/NFS/su0/miniconda3/envs/hf/lib/python3.7/site-packages/nlp/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only) 354 " to False." 355 ) --> 356 raise ConnectionError("Couldn't reach {}".format(url)) 357 358 # From now on, connected is True. ConnectionError: Couldn't reach https://firebasestorage.googleapis.com/v0/b/mtl-sentence-representations.appspot.com/o/data%2Fmrpc_dev_ids.tsv?alt=media&token=ec5c0836-31d5-48f4-b431-7480817f1adc ``` I tried glue with cola and sst2. I got the same error, just instead of mrpc in the URL, it was replaced with cola and sst2. Since this was not working, I thought I'll try another dataset. So I tried downloading the imdb dataset: ``` ds = load_dataset('imdb', split='train') ``` This downloads the data, but it just blocks after that: ``` Downloading: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.56k/4.56k [00:00<00:00, 1.38MB/s] Downloading: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.07k/2.07k [00:00<00:00, 1.15MB/s] Downloading and preparing dataset imdb/plain_text (download: 80.23 MiB, generated: 127.06 MiB, post-processed: Unknown sizetotal: 207.28 MiB) to /net/vaosl01/opt/NFS/su0/huggingface/datasets/imdb/plain_text/1.0.0/76cdbd7249ea3548c928bbf304258dab44d09cd3638d9da8d42480d1d1be3743... Downloading: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 84.1M/84.1M [00:07<00:00, 11.1MB/s] ``` I checked the folder `$HF_HOME/datasets/downloads/extracted/<id>/aclImdb`. This folder is constantly growing in size. When I navigated to the train folder within, there was no file. However, the test folder seemed to be populating. The last time I checked it was 327M. I thought the Imdb dataset was smaller than that. My questions are: 1. Why is it still blocking? Is it still downloading? 2. I specified split as train, so why is the test folder being populated? 3. I read somewhere that after downloading, `nlp` converts the text files into some sort of `arrow` files, which will also take a while. Is this also happening here? Thanks.
sudarshan85
https://github.com/huggingface/datasets/issues/575
null
false
693,364,853
574
Add modules cache
closed
[]
2020-09-04T16:30:03
2020-09-22T10:27:08
2020-09-07T09:01:35
As discusses in #554 , we should use a module cache directory outside of the python packages directory since we may not have write permissions. I added a new HF_MODULES_PATH directory that is added to the python path when doing `import nlp`. In this directory, a module `nlp_modules` is created so that datasets can be added to `nlp_modules.datasets` and metrics to `nlp_modules.metrics`. `nlp_modules` doesn't exist on Pypi. If someone using cloudpickle still wants to have the downloaded dataset/metrics scripts to be inside the nlp directory, it is still possible to change the environment variable HF_MODULES_CACHE to be a path inside the nlp lib.
lhoestq
https://github.com/huggingface/datasets/pull/574
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/574", "html_url": "https://github.com/huggingface/datasets/pull/574", "diff_url": "https://github.com/huggingface/datasets/pull/574.diff", "patch_url": "https://github.com/huggingface/datasets/pull/574.patch", "merged_at": "2020-09-07T09:01:35" }
true
693,091,790
573
Faster caching for text dataset
closed
[]
2020-09-04T11:58:34
2020-09-04T12:53:24
2020-09-04T12:53:23
As mentioned in #546 and #548 , hashing `data_files` contents to get the cache directory name for a text dataset can take a long time. To make it faster I changed the hashing so that it takes into account the `path` and the `last modified timestamp` of each data file, instead of iterating through the content of each file to get a hash.
lhoestq
https://github.com/huggingface/datasets/pull/573
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/573", "html_url": "https://github.com/huggingface/datasets/pull/573", "diff_url": "https://github.com/huggingface/datasets/pull/573.diff", "patch_url": "https://github.com/huggingface/datasets/pull/573.patch", "merged_at": "2020-09-04T12:53:23" }
true
692,598,231
572
Add CLUE Benchmark (11 datasets)
closed
[]
2020-09-04T01:57:40
2020-09-07T09:59:11
2020-09-07T09:59:10
Add 11 tasks of [CLUE](https://github.com/CLUEbenchmark/CLUE).
JetRunner
https://github.com/huggingface/datasets/pull/572
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/572", "html_url": "https://github.com/huggingface/datasets/pull/572", "diff_url": "https://github.com/huggingface/datasets/pull/572.diff", "patch_url": "https://github.com/huggingface/datasets/pull/572.patch", "merged_at": "2020-09-07T09:59:10" }
true
692,109,287
571
Serialization
closed
[]
2020-09-03T16:21:38
2020-09-07T07:46:08
2020-09-07T07:46:07
I added `save` and `load` method to serialize/deserialize a dataset object in a folder. It moves the arrow files there (or write them if the tables were in memory), and saves the pickle state in a json file `state.json`, except the info that are in a separate file `dataset_info.json`. Example: ```python import nlp squad = nlp.load_dataset("squad", split="train") squad.save("tmp/squad") squad = nlp.Dataset.load("tmp/squad") ``` `ls tmp/squad` ``` dataset_info.json squad-train.arrow state.json ``` `cat tmp/squad/state.json` ```json { "_data": null, "_data_files": [ { "filename": "squad-train.arrow", "skip": 0, "take": 87599 } ], "_fingerprint": "61f452797a686bc1", "_format_columns": null, "_format_kwargs": {}, "_format_type": null, "_indexes": {}, "_indices": null, "_indices_data_files": [], "_inplace_history": [ { "transforms": [] } ], "_output_all_columns": false, "_split": "train" } ``` `cat tmp/squad/dataset_info.json` ```json { "builder_name": "squad", "citation": "@article{2016arXiv160605250R,\n author = {{Rajpurkar}, Pranav and {Zhang}, Jian and {Lopyrev},\n Konstantin and {Liang}, Percy},\n title = \"{SQuAD: 100,000+ Questions for Machine Comprehension of Text}\",\n journal = {arXiv e-prints},\n year = 2016,\n eid = {arXiv:1606.05250},\n pages = {arXiv:1606.05250},\narchivePrefix = {arXiv},\n eprint = {1606.05250},\n}\n", "config_name": "plain_text", "dataset_size": 89789763, "description": "Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable.\n", "download_checksums": { "https://rajpurkar.github.io/SQuAD-explorer/dataset/dev-v1.1.json": { "checksum": "95aa6a52d5d6a735563366753ca50492a658031da74f301ac5238b03966972c9", "num_bytes": 4854279 }, "https://rajpurkar.github.io/SQuAD-explorer/dataset/train-v1.1.json": { "checksum": "3527663986b8295af4f7fcdff1ba1ff3f72d07d61a20f487cb238a6ef92fd955", "num_bytes": 30288272 } }, "download_size": 35142551, "features": { "answers": { "_type": "Sequence", "feature": { "answer_start": { "_type": "Value", "dtype": "int32", "id": null }, "text": { "_type": "Value", "dtype": "string", "id": null } }, "id": null, "length": -1 }, "context": { "_type": "Value", "dtype": "string", "id": null }, "id": { "_type": "Value", "dtype": "string", "id": null }, "question": { "_type": "Value", "dtype": "string", "id": null }, "title": { "_type": "Value", "dtype": "string", "id": null } }, "homepage": "https://rajpurkar.github.io/SQuAD-explorer/", "license": "", "post_processed": { "features": null, "resources_checksums": { "train": {}, "train[:10%]": {} } }, "post_processing_size": 0, "size_in_bytes": 124932314, "splits": { "train": { "dataset_name": "squad", "name": "train", "num_bytes": 79317110, "num_examples": 87599 }, "validation": { "dataset_name": "squad", "name": "validation", "num_bytes": 10472653, "num_examples": 10570 } }, "supervised_keys": null, "version": { "description": "New split API (https://tensorflow.org/datasets/splits)", "major": 1, "minor": 0, "nlp_version_to_prepare": null, "patch": 0, "version_str": "1.0.0" } } ```
lhoestq
https://github.com/huggingface/datasets/pull/571
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/571", "html_url": "https://github.com/huggingface/datasets/pull/571", "diff_url": "https://github.com/huggingface/datasets/pull/571.diff", "patch_url": "https://github.com/huggingface/datasets/pull/571.patch", "merged_at": "2020-09-07T07:46:07" }
true
691,846,397
570
add reuters21578 dataset
closed
[]
2020-09-03T10:25:47
2020-09-03T10:46:52
2020-09-03T10:46:51
Reopen a PR this the merge.
jplu
https://github.com/huggingface/datasets/pull/570
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/570", "html_url": "https://github.com/huggingface/datasets/pull/570", "diff_url": "https://github.com/huggingface/datasets/pull/570.diff", "patch_url": "https://github.com/huggingface/datasets/pull/570.patch", "merged_at": "2020-09-03T10:46:51" }
true
691,832,720
569
Revert "add reuters21578 dataset"
closed
[]
2020-09-03T10:06:16
2020-09-03T10:07:13
2020-09-03T10:07:12
Reverts huggingface/nlp#471
jplu
https://github.com/huggingface/datasets/pull/569
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/569", "html_url": "https://github.com/huggingface/datasets/pull/569", "diff_url": "https://github.com/huggingface/datasets/pull/569.diff", "patch_url": "https://github.com/huggingface/datasets/pull/569.patch", "merged_at": "2020-09-03T10:07:12" }
true
691,638,656
568
`metric.compute` throws `ArrowInvalid` error
closed
[]
2020-09-03T04:56:57
2020-10-05T16:33:53
2020-10-05T16:33:53
I get the following error with `rouge.compute`. It happens only with distributed training, and it occurs randomly I can't easily reproduce it. This is using `nlp==0.4.0` ``` File "/home/beltagy/trainer.py", line 92, in validation_step rouge_scores = rouge.compute(predictions=generated_str, references=gold_str, rouge_types=['rouge2', 'rouge1', 'rougeL']) File "/home/beltagy/miniconda3/envs/allennlp/lib/python3.7/site-packages/nlp/metric.py", line 224, in compute self.finalize(timeout=timeout) File "/home/beltagy/miniconda3/envs/allennlp/lib/python3.7/site-packages/nlp/metric.py", line 213, in finalize self.data = Dataset(**reader.read_files(node_files)) File "/home/beltagy/miniconda3/envs/allennlp/lib/python3.7/site-packages/nlp/arrow_reader.py", line 217, in read_files dataset_kwargs = self._read_files(files=files, info=self._info, original_instructions=original_instructions) File "/home/beltagy/miniconda3/envs/allennlp/lib/python3.7/site-packages/nlp/arrow_reader.py", line 162, in _read_files pa_table: pa.Table = self._get_dataset_from_filename(f_dict) File "/home/beltagy/miniconda3/envs/allennlp/lib/python3.7/site-packages/nlp/arrow_reader.py", line 276, in _get_dataset_from_filename f = pa.ipc.open_stream(mmap) File "/home/beltagy/miniconda3/envs/allennlp/lib/python3.7/site-packages/pyarrow/ipc.py", line 173, in open_stream return RecordBatchStreamReader(source) File "/home/beltagy/miniconda3/envs/allennlp/lib/python3.7/site-packages/pyarrow/ipc.py", line 64, in __init__ self._open(source) File "pyarrow/ipc.pxi", line 469, in pyarrow.lib._RecordBatchStreamReader._open 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: Tried reading schema message, was null or length 0 ```
ibeltagy
https://github.com/huggingface/datasets/issues/568
null
false
691,430,245
567
Fix BLEURT metrics for backward compatibility
closed
[]
2020-09-02T21:22:35
2020-09-03T07:29:52
2020-09-03T07:29:50
Fix #565
thomwolf
https://github.com/huggingface/datasets/pull/567
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/567", "html_url": "https://github.com/huggingface/datasets/pull/567", "diff_url": "https://github.com/huggingface/datasets/pull/567.diff", "patch_url": "https://github.com/huggingface/datasets/pull/567.patch", "merged_at": "2020-09-03T07:29:50" }
true
691,160,208
566
Remove logger pickling to fix gg colab issues
closed
[]
2020-09-02T16:16:21
2020-09-03T16:31:53
2020-09-03T16:31:52
A `logger` objects are not picklable in google colab, contrary to `logger` objects in jupyter notebooks or in python shells. It creates some issues in google colab right now. Indeed by calling any `Dataset` method, the fingerprint update pickles the transform function, and as the logger comes with it, it results in an error (full stacktrace [here](http://pastebin.fr/64330)): ```python /usr/local/lib/python3.6/dist-packages/zmq/backend/cython/socket.cpython-36m-x86_64-linux-gnu.so in zmq.backend.cython.socket.Socket.__reduce_cython__() TypeError: no default __reduce__ due to non-trivial __cinit__ ``` To fix that I no longer dump the transform (`_map_single`, `select`, etc.), but the full name only (`nlp.arrow_dataset.Dataset._map_single`, `nlp.arrow_dataset.Dataset.select`, etc.)
lhoestq
https://github.com/huggingface/datasets/pull/566
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/566", "html_url": "https://github.com/huggingface/datasets/pull/566", "diff_url": "https://github.com/huggingface/datasets/pull/566.diff", "patch_url": "https://github.com/huggingface/datasets/pull/566.patch", "merged_at": "2020-09-03T16:31:52" }
true
691,039,121
565
No module named 'nlp.logging'
closed
[]
2020-09-02T13:49:50
2020-09-03T07:29:50
2020-09-03T07:29:50
Hi, I am using nlp version 0.4.0. Trying to use bleurt as an eval metric, however, the bleurt script imports nlp.logging which creates the following error. What am I missing? ``` >>> import nlp 2020-09-02 13:47:09.210310: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1 >>> bleurt = nlp.load_metric("bleurt") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/melody/anaconda3/envs/transformers/lib/python3.6/site-packages/nlp/load.py", line 443, in load_metric metric_cls = import_main_class(module_path, dataset=False) File "/home/melody/anaconda3/envs/transformers/lib/python3.6/site-packages/nlp/load.py", line 61, in import_main_class module = importlib.import_module(module_path) File "/home/melody/anaconda3/envs/transformers/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/melody/anaconda3/envs/transformers/lib/python3.6/site-packages/nlp/metrics/bleurt/43448cf2959ea81d3ae0e71c5c8ee31dc15eed9932f197f5f50673cbcecff2b5/bleurt.py", line 20, in <module> from nlp.logging import get_logger ModuleNotFoundError: No module named 'nlp.logging' ``` Just to show once again that I can't import the logging module: ``` >>> import nlp 2020-09-02 13:48:38.190621: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1 >>> nlp.__version__ '0.4.0' >>> from nlp.logging import get_logger Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'nlp.logging' ```
melody-ju
https://github.com/huggingface/datasets/issues/565
null
false
691,000,020
564
Wait for writing in distributed metrics
closed
[]
2020-09-02T12:58:50
2020-09-09T09:13:23
2020-09-09T09:13:22
There were CI bugs where a distributed metric would try to read all the files in process 0 while the other processes haven't started writing. To fix that I added a custom locking mechanism that waits for the file to exist before trying to read it
lhoestq
https://github.com/huggingface/datasets/pull/564
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/564", "html_url": "https://github.com/huggingface/datasets/pull/564", "diff_url": "https://github.com/huggingface/datasets/pull/564.diff", "patch_url": "https://github.com/huggingface/datasets/pull/564.patch", "merged_at": "2020-09-09T09:13:22" }
true
690,908,674
563
[Large datasets] Speed up download and processing
closed
[]
2020-09-02T10:31:54
2020-09-09T09:03:33
2020-09-09T09:03:32
Various improvements to speed-up creation and processing of large scale datasets. Currently: - distributed downloads - remove etag from datafiles hashes to spare a request when restarting a failed download
thomwolf
https://github.com/huggingface/datasets/pull/563
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/563", "html_url": "https://github.com/huggingface/datasets/pull/563", "diff_url": "https://github.com/huggingface/datasets/pull/563.diff", "patch_url": "https://github.com/huggingface/datasets/pull/563.patch", "merged_at": "2020-09-09T09:03:32" }
true
690,907,604
562
[Reproductibility] Allow to pin versions of datasets/metrics
closed
[]
2020-09-02T10:30:13
2023-09-24T09:49:42
2020-09-09T13:04:54
Repurpose the `version` attribute in datasets and metrics to let the user pin a specific version of datasets and metric scripts: ``` dataset = nlp.load_dataset('squad', version='1.0.0') metric = nlp.load_metric('squad', version='1.0.0') ``` Notes: - version number are the release version of the library - currently only possible for canonical datasets/metrics, ie. integrated in the GitHub repo of the library
thomwolf
https://github.com/huggingface/datasets/pull/562
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/562", "html_url": "https://github.com/huggingface/datasets/pull/562", "diff_url": "https://github.com/huggingface/datasets/pull/562.diff", "patch_url": "https://github.com/huggingface/datasets/pull/562.patch", "merged_at": null }
true
690,871,415
561
Made `share_dataset` more readable
closed
[]
2020-09-02T09:34:48
2020-09-03T09:00:30
2020-09-03T09:00:29
TevenLeScao
https://github.com/huggingface/datasets/pull/561
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/561", "html_url": "https://github.com/huggingface/datasets/pull/561", "diff_url": "https://github.com/huggingface/datasets/pull/561.diff", "patch_url": "https://github.com/huggingface/datasets/pull/561.patch", "merged_at": "2020-09-03T09:00:29" }
true
690,488,764
560
Using custom DownloadConfig results in an error
closed
[]
2020-09-01T22:23:02
2022-10-04T17:23:45
2022-10-04T17:23:45
## Version / Environment Ubuntu 18.04 Python 3.6.8 nlp 0.4.0 ## Description Loading `imdb` dataset works fine when when I don't specify any `download_config` argument. When I create a custom `DownloadConfig` object and pass it to the `nlp.load_dataset` function, this results in an error. ## How to reproduce ### Example without DownloadConfig --> works ```python import os os.environ["HF_HOME"] = "/data/hf-test-without-dl-config-01/" import logging import nlp logging.basicConfig(level=logging.INFO) if __name__ == "__main__": imdb = nlp.load_dataset(path="imdb") ``` ### Example with DownloadConfig --> doesn't work ```python import os os.environ["HF_HOME"] = "/data/hf-test-with-dl-config-01/" import logging import nlp from nlp.utils import DownloadConfig logging.basicConfig(level=logging.INFO) if __name__ == "__main__": download_config = DownloadConfig() imdb = nlp.load_dataset(path="imdb", download_config=download_config) ``` Error traceback: ``` Traceback (most recent call last): File "/.../example_with_dl_config.py", line 13, in <module> imdb = nlp.load_dataset(path="imdb", download_config=download_config) File "/.../python3.6/python3.6/site-packages/nlp/load.py", line 549, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/.../python3.6/python3.6/site-packages/nlp/builder.py", line 463, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/.../python3.6/python3.6/site-packages/nlp/builder.py", line 518, in _download_and_prepare split_generators = self._split_generators(dl_manager, **split_generators_kwargs) File "/.../python3.6/python3.6/site-packages/nlp/datasets/imdb/76cdbd7249ea3548c928bbf304258dab44d09cd3638d9da8d42480d1d1be3743/imdb.py", line 86, in _split_generators arch_path = dl_manager.download_and_extract(_DOWNLOAD_URL) File "/.../python3.6/python3.6/site-packages/nlp/utils/download_manager.py", line 220, in download_and_extract return self.extract(self.download(url_or_urls)) File "/.../python3.6/python3.6/site-packages/nlp/utils/download_manager.py", line 158, in download self._record_sizes_checksums(url_or_urls, downloaded_path_or_paths) File "/.../python3.6/python3.6/site-packages/nlp/utils/download_manager.py", line 108, in _record_sizes_checksums self._recorded_sizes_checksums[url] = get_size_checksum_dict(path) File "/.../python3.6/python3.6/site-packages/nlp/utils/info_utils.py", line 79, in get_size_checksum_dict with open(path, "rb") as f: IsADirectoryError: [Errno 21] Is a directory: '/data/hf-test-with-dl-config-01/datasets/extracted/b6802c5b61824b2c1f7dbf7cda6696b5f2e22214e18d171ce1ed3be90c931ce5' ```
ynouri
https://github.com/huggingface/datasets/issues/560
null
false
690,411,263
559
Adding the KILT knowledge source and tasks
closed
[]
2020-09-01T20:05:13
2020-09-04T18:05:47
2020-09-04T18:05:47
This adds Wikipedia pre-processed for KILT, as well as the task data. Only the question IDs are provided for TriviaQA, but they can easily be mapped back with: ``` import nlp kilt_wikipedia = nlp.load_dataset('kilt_wikipedia') kilt_tasks = nlp.load_dataset('kilt_tasks') triviaqa = nlp.load_dataset('trivia_qa', 'unfiltered.nocontext') triviaqa_map = {} for k in ['train', 'validation', 'test']: triviaqa_map = dict([(q_id, i) for i, q_id in enumerate(triviaqa[k]['question_id'])]) kilt_tasks[k + '_triviaqa'] = kilt_tasks[k + '_triviaqa'].filter(lambda x: x['id'] in triviaqa_map) kilt_tasks[k + '_triviaqa'].map(lambda x: {'input': triviaqa[split][triviaqa_map[x['id']]]['question']}) ``` It would be great to have the dataset by Monday, which is when the paper should land on Arxiv and @fabiopetroni is planning on tweeting about the paper and `facebookresearch` repository for the datasett
yjernite
https://github.com/huggingface/datasets/pull/559
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/559", "html_url": "https://github.com/huggingface/datasets/pull/559", "diff_url": "https://github.com/huggingface/datasets/pull/559.diff", "patch_url": "https://github.com/huggingface/datasets/pull/559.patch", "merged_at": "2020-09-04T18:05:47" }
true
690,318,105
558
Rerun pip install -e
closed
[]
2020-09-01T17:24:39
2020-09-01T17:24:51
2020-09-01T17:24:50
Hopefully it fixes the github actions
lhoestq
https://github.com/huggingface/datasets/pull/558
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/558", "html_url": "https://github.com/huggingface/datasets/pull/558", "diff_url": "https://github.com/huggingface/datasets/pull/558.diff", "patch_url": "https://github.com/huggingface/datasets/pull/558.patch", "merged_at": "2020-09-01T17:24:50" }
true
690,220,135
557
Fix a few typos
closed
[]
2020-09-01T15:03:24
2020-09-02T07:39:08
2020-09-02T07:39:07
julien-c
https://github.com/huggingface/datasets/pull/557
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/557", "html_url": "https://github.com/huggingface/datasets/pull/557", "diff_url": "https://github.com/huggingface/datasets/pull/557.diff", "patch_url": "https://github.com/huggingface/datasets/pull/557.patch", "merged_at": "2020-09-02T07:39:06" }
true
690,218,423
556
Add DailyDialog
closed
[]
2020-09-01T15:01:15
2020-09-03T15:42:03
2020-09-03T15:38:39
http://yanran.li/dailydialog.html https://arxiv.org/pdf/1710.03957.pdf
julien-c
https://github.com/huggingface/datasets/pull/556
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/556", "html_url": "https://github.com/huggingface/datasets/pull/556", "diff_url": "https://github.com/huggingface/datasets/pull/556.diff", "patch_url": "https://github.com/huggingface/datasets/pull/556.patch", "merged_at": "2020-09-03T15:38:39" }
true
690,197,725
555
Upgrade pip in benchmark github action
closed
[]
2020-09-01T14:37:26
2020-09-01T15:26:16
2020-09-01T15:26:15
It looks like it fixes the `import nlp` issue we have
lhoestq
https://github.com/huggingface/datasets/pull/555
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/555", "html_url": "https://github.com/huggingface/datasets/pull/555", "diff_url": "https://github.com/huggingface/datasets/pull/555.diff", "patch_url": "https://github.com/huggingface/datasets/pull/555.patch", "merged_at": "2020-09-01T15:26:15" }
true
690,173,214
554
nlp downloads to its module path
closed
[]
2020-09-01T14:06:14
2020-09-11T06:19:24
2020-09-11T06:19:24
I am trying to package `nlp` for Nix, because it is now an optional dependency for `transformers`. The problem that I encounter is that the `nlp` library downloads to the module path, which is typically not writable in most package management systems: ```>>> import nlp >>> squad_dataset = nlp.load_dataset('squad') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/nix/store/2yhik0hhqayksmkkfb0ylqp8cf5wa5wp-python3-3.8.5-env/lib/python3.8/site-packages/nlp/load.py", line 530, in load_dataset module_path, hash = prepare_module(path, download_config=download_config, dataset=True) File "/nix/store/2yhik0hhqayksmkkfb0ylqp8cf5wa5wp-python3-3.8.5-env/lib/python3.8/site-packages/nlp/load.py", line 329, in prepare_module os.makedirs(main_folder_path, exist_ok=True) File "/nix/store/685kq8pyhrvajah1hdsfn4q7gm3j4yd4-python3-3.8.5/lib/python3.8/os.py", line 223, in makedirs mkdir(name, mode) OSError: [Errno 30] Read-only file system: '/nix/store/2yhik0hhqayksmkkfb0ylqp8cf5wa5wp-python3-3.8.5-env/lib/python3.8/site-packages/nlp/datasets/squad' ``` Do you have any suggested workaround for this issue? Perhaps overriding the default value for `force_local_path` of `prepare_module`?
danieldk
https://github.com/huggingface/datasets/issues/554
null
false
690,143,182
553
[Fix GitHub Actions] test adding tmate
closed
[]
2020-09-01T13:28:03
2021-05-05T18:24:38
2020-09-03T09:01:13
thomwolf
https://github.com/huggingface/datasets/pull/553
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/553", "html_url": "https://github.com/huggingface/datasets/pull/553", "diff_url": "https://github.com/huggingface/datasets/pull/553.diff", "patch_url": "https://github.com/huggingface/datasets/pull/553.patch", "merged_at": null }
true
690,079,429
552
Add multiprocessing
closed
[]
2020-09-01T11:56:17
2020-09-22T15:11:56
2020-09-02T10:01:25
Adding multiprocessing to `.map` It works in 3 steps: - shard the dataset in `num_proc` shards - spawn one process per shard and call `map` on them - concatenate the resulting datasets Example of usage: ```python from nlp import load_dataset dataset = load_dataset("squad", split="train") def function(x): return {"lowered": x.lower()} processed = d.map( function, input_columns=["context"], num_proc=4, cache_file_name="playground/tmp.arrow", load_from_cache_file=False ) ``` Here it writes 4 files depending on the process rank: - `playground/tmp_00000_of_00004.arrow` - `playground/tmp_00001_of_00004.arrow` - `playground/tmp_00002_of_00004.arrow` - `playground/tmp_00003_of_00004.arrow` The suffix format can be specified by the user. If the `cache_file_name` is not specified, it writes into separated files depending on the fingerprint, as usual. I still need to: - write tests for this - try to improve the logging (currently it shows 4 progress bars, but if one finishes before the others, then the following messages are written over the progress bars)
lhoestq
https://github.com/huggingface/datasets/pull/552
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/552", "html_url": "https://github.com/huggingface/datasets/pull/552", "diff_url": "https://github.com/huggingface/datasets/pull/552.diff", "patch_url": "https://github.com/huggingface/datasets/pull/552.patch", "merged_at": "2020-09-02T10:01:25" }
true
690,034,762
551
added HANS dataset
closed
[]
2020-09-01T10:42:02
2020-09-01T12:17:10
2020-09-01T12:17:10
Adds the [HANS](https://github.com/tommccoy1/hans) dataset to evaluate NLI systems.
TevenLeScao
https://github.com/huggingface/datasets/pull/551
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/551", "html_url": "https://github.com/huggingface/datasets/pull/551", "diff_url": "https://github.com/huggingface/datasets/pull/551.diff", "patch_url": "https://github.com/huggingface/datasets/pull/551.patch", "merged_at": "2020-09-01T12:17:10" }
true
689,775,914
550
[BUGFIX] Solving mismatched checksum issue for the LinCE dataset (#539)
closed
[]
2020-09-01T03:27:03
2020-09-03T09:06:01
2020-09-03T09:06:01
Hi, I have added the updated `dataset_infos.json` file for the LinCE benchmark. This update is to fix the mismatched checksum bug #539 for one of the datasets in the LinCE benchmark. To update the file, I run this command from the nlp root directory: ``` python nlp-cli test ./datasets/lince --save_infos --all_configs ``` **NOTE**: I needed to change [this line](https://github.com/huggingface/nlp/blob/master/src/nlp/commands/dummy_data.py#L8) from: `from .utils.logging import get_logger` to `from nlp.utils.logging import get_logger`, otherwise the script was not able to import `get_logger`. However, I did not include that in this PR since that could have been just my environment (and another PR could be fixing this already if it is actually an issue).
gaguilar
https://github.com/huggingface/datasets/pull/550
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/550", "html_url": "https://github.com/huggingface/datasets/pull/550", "diff_url": "https://github.com/huggingface/datasets/pull/550.diff", "patch_url": "https://github.com/huggingface/datasets/pull/550.patch", "merged_at": "2020-09-03T09:06:01" }
true
689,766,465
549
Fix bleurt logging import
closed
[]
2020-09-01T03:01:25
2020-09-03T18:04:46
2020-09-03T09:04:20
Bleurt started throwing an error in some code we have. This looks like the fix but... It's also unnerving that even a prebuilt docker image with pinned versions can be working 1 day and then fail the next (especially for production systems). Any way for us to pin your metrics code so that they are guaranteed not to to change and possibly fail on repository changes? Thanks (and also for your continued work on the lib...)
jbragg
https://github.com/huggingface/datasets/pull/549
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/549", "html_url": "https://github.com/huggingface/datasets/pull/549", "diff_url": "https://github.com/huggingface/datasets/pull/549.diff", "patch_url": "https://github.com/huggingface/datasets/pull/549.patch", "merged_at": null }
true
689,285,996
548
[Breaking] Switch text loading to multi-threaded PyArrow loading
closed
[]
2020-08-31T15:15:41
2020-09-08T10:19:58
2020-09-08T10:19:57
Test if we can get better performances for large-scale text datasets by using multi-threaded text file loading based on Apache Arrow multi-threaded CSV loader. If it works ok, it would fix #546. **Breaking change**: The text lines now do not include final line-breaks anymore.
thomwolf
https://github.com/huggingface/datasets/pull/548
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/548", "html_url": "https://github.com/huggingface/datasets/pull/548", "diff_url": "https://github.com/huggingface/datasets/pull/548.diff", "patch_url": "https://github.com/huggingface/datasets/pull/548.patch", "merged_at": "2020-09-08T10:19:57" }
true
689,268,589
547
[Distributed] Making loading distributed datasets a bit safer
closed
[]
2020-08-31T14:51:34
2020-08-31T15:16:30
2020-08-31T15:16:29
Add some file-locks during dataset loading
thomwolf
https://github.com/huggingface/datasets/pull/547
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/547", "html_url": "https://github.com/huggingface/datasets/pull/547", "diff_url": "https://github.com/huggingface/datasets/pull/547.diff", "patch_url": "https://github.com/huggingface/datasets/pull/547.patch", "merged_at": "2020-08-31T15:16:29" }
true
689,186,526
546
Very slow data loading on large dataset
closed
[]
2020-08-31T12:57:23
2024-01-02T20:26:24
2020-09-08T10:19:57
I made a simple python script to check the NLP library speed, which loads 1.1 TB of textual data. It has been 8 hours and still, it is on the loading steps. It does work when the text dataset size is small about 1 GB, but it doesn't scale. It also uses a single thread during the data loading step. ``` train_files = glob.glob("xxx/*.txt",recursive=True) random.shuffle(train_files) print(train_files) dataset = nlp.load_dataset('text', data_files=train_files, name="customDataset", version="1.0.0", cache_dir="xxx/nlp") ``` Is there something that I am missing ?
agemagician
https://github.com/huggingface/datasets/issues/546
null
false
689,138,878
545
New release coming up for this library
closed
[]
2020-08-31T11:37:38
2021-01-13T10:59:04
2021-01-13T10:59:04
Hi all, A few words on the roadmap for this library. The next release will be a big one and is planed at the end of this week. In addition to the support for indexed datasets (useful for non-parametric models like REALM, RAG, DPR, knn-LM and many other fast dataset retrieval technics), it will: - have support for multi-modal datasets - include various significant improvements on speed for standard processing (map, shuffling, ...) - have a better support for metrics (better caching, and a robust API) and a bigger focus on reproductibility - change the name to the final name (voted by the community): `datasets` - be the 1.0.0 release as we think the API will be mostly stabilized from now on
thomwolf
https://github.com/huggingface/datasets/issues/545
null
false
689,062,519
544
[Distributed] Fix load_dataset error when multiprocessing + add test
closed
[]
2020-08-31T09:30:10
2020-08-31T11:15:11
2020-08-31T11:15:10
Fix #543 + add test
thomwolf
https://github.com/huggingface/datasets/pull/544
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/544", "html_url": "https://github.com/huggingface/datasets/pull/544", "diff_url": "https://github.com/huggingface/datasets/pull/544.diff", "patch_url": "https://github.com/huggingface/datasets/pull/544.patch", "merged_at": "2020-08-31T11:15:10" }
true
688,644,407
543
nlp.load_dataset is not safe for multi processes when loading from local files
closed
[]
2020-08-30T03:20:34
2020-08-31T11:15:10
2020-08-31T11:15:10
Loading from local files, e.g., `dataset = nlp.load_dataset('csv', data_files=['file_1.csv', 'file_2.csv'])` concurrently from multiple processes, will raise `FileExistsError` from builder's line 430, https://github.com/huggingface/nlp/blob/6655008c738cb613c522deb3bd18e35a67b2a7e5/src/nlp/builder.py#L423-L438 Likely because multiple processes step into download_and_prepare, https://github.com/huggingface/nlp/blob/6655008c738cb613c522deb3bd18e35a67b2a7e5/src/nlp/load.py#L550-L554 This can happen when launching distributed training with commands like `python -m torch.distributed.launch --nproc_per_node 4` on a new collection of files never loaded before. I can create a PR that puts in some file locks. It would be helpful if I can be informed of the convention for naming and placement of the lock.
luyug
https://github.com/huggingface/datasets/issues/543
null
false
688,555,036
542
Add TensorFlow example
closed
[]
2020-08-29T15:39:27
2020-08-31T09:49:20
2020-08-31T09:49:19
Update the Quick Tour documentation in order to add the TensorFlow equivalent source code for the classification example. Now it is possible to select either the code in PyTorch or in TensorFlow in the Quick tour.
jplu
https://github.com/huggingface/datasets/pull/542
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/542", "html_url": "https://github.com/huggingface/datasets/pull/542", "diff_url": "https://github.com/huggingface/datasets/pull/542.diff", "patch_url": "https://github.com/huggingface/datasets/pull/542.patch", "merged_at": "2020-08-31T09:49:19" }
true
688,521,224
541
Best practices for training tokenizers with nlp
closed
[]
2020-08-29T12:06:49
2022-10-04T17:28:04
2022-10-04T17:28:04
Hi, thank you for developing this library. What do you think are the best practices for training tokenizers using `nlp`? In the document and examples, I could only find pre-trained tokenizers used.
moskomule
https://github.com/huggingface/datasets/issues/541
null
false
688,475,884
540
[BUGFIX] Fix Race Dataset Checksum bug
closed
[]
2020-08-29T07:00:10
2020-09-18T11:42:20
2020-09-18T11:42:20
In #537 I noticed that there was a bug in checksum checking when I have tried to download the race dataset. The reason for this is that the current preprocessing was just considering the `high school` data and it was ignoring the `middle` one. This PR just fixes it :) Moreover, I have added some descriptions.
abarbosa94
https://github.com/huggingface/datasets/pull/540
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/540", "html_url": "https://github.com/huggingface/datasets/pull/540", "diff_url": "https://github.com/huggingface/datasets/pull/540.diff", "patch_url": "https://github.com/huggingface/datasets/pull/540.patch", "merged_at": "2020-09-18T11:42:20" }
true
688,323,602
539
[Dataset] `NonMatchingChecksumError` due to an update in the LinCE benchmark data
closed
[]
2020-08-28T19:55:51
2020-09-03T16:34:02
2020-09-03T16:34:01
Hi, There is a `NonMatchingChecksumError` error for the `lid_msaea` (language identification for Modern Standard Arabic - Egyptian Arabic) dataset from the LinCE benchmark due to a minor update on that dataset. How can I update the checksum of the library to solve this issue? The error is below and it also appears in the [nlp viewer](https://huggingface.co/nlp/viewer/?dataset=lince&config=lid_msaea): ```python import nlp nlp.load_dataset('lince', 'lid_msaea') ``` Output: ``` NonMatchingChecksumError: ['https://ritual.uh.edu/lince/libaccess/eyJ1c2VybmFtZSI6ICJodWdnaW5nZmFjZSBubHAiLCAidXNlcl9pZCI6IDExMSwgImVtYWlsIjogImR1bW15QGVtYWlsLmNvbSJ9/lid_msaea.zip'] Traceback: File "/home/sasha/streamlit/lib/streamlit/ScriptRunner.py", line 322, in _run_script exec(code, module.__dict__) File "/home/sasha/nlp-viewer/run.py", line 196, in <module> dts, fail = get(str(option.id), str(conf_option.name) if conf_option else None) File "/home/sasha/streamlit/lib/streamlit/caching.py", line 591, in wrapped_func return get_or_create_cached_value() File "/home/sasha/streamlit/lib/streamlit/caching.py", line 575, in get_or_create_cached_value return_value = func(*args, **kwargs) File "/home/sasha/nlp-viewer/run.py", line 150, in get builder_instance.download_and_prepare() File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/nlp/builder.py", line 432, in download_and_prepare download_config.force_download = download_mode == FORCE_REDOWNLOAD File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/nlp/builder.py", line 469, in _download_and_prepare File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/nlp/utils/info_utils.py", line 36, in verify_checksums raise NonMatchingChecksumError(str(bad_urls)) ``` Thank you in advance! @lhoestq
gaguilar
https://github.com/huggingface/datasets/issues/539
null
false
688,015,912
538
[logging] Add centralized logging - Bump-up cache loads to warnings
closed
[]
2020-08-28T11:42:29
2020-08-31T11:42:51
2020-08-31T11:42:51
Add a `nlp.logging` module to set the global logging level easily. The verbosity level also controls the tqdm bars (disabled when set higher than INFO). You can use: ``` nlp.logging.set_verbosity(verbosity: int) nlp.logging.set_verbosity_info() nlp.logging.set_verbosity_warning() nlp.logging.set_verbosity_debug() nlp.logging.set_verbosity_error() nlp.logging.get_verbosity() -> int ``` And use the levels: ``` nlp.logging.CRITICAL nlp.logging.DEBUG nlp.logging.ERROR nlp.logging.FATAL nlp.logging.INFO nlp.logging.NOTSET nlp.logging.WARN nlp.logging.WARNING ```
thomwolf
https://github.com/huggingface/datasets/pull/538
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/538", "html_url": "https://github.com/huggingface/datasets/pull/538", "diff_url": "https://github.com/huggingface/datasets/pull/538.diff", "patch_url": "https://github.com/huggingface/datasets/pull/538.patch", "merged_at": "2020-08-31T11:42:50" }
true
687,614,699
537
[Dataset] RACE dataset Checksums error
closed
[]
2020-08-27T23:58:16
2020-09-18T12:07:04
2020-09-18T12:07:04
Hi there, I just would like to use this awesome lib to perform a dataset fine-tuning on RACE dataset. I have performed the following steps: ``` dataset = nlp.load_dataset("race") len(dataset["train"]), len(dataset["validation"]) ``` But then I got the following error: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-15-8bf7603ce0ed> in <module> ----> 1 dataset = nlp.load_dataset("race") 2 len(dataset["train"]), len(dataset["validation"]) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 546 547 # Download and prepare data --> 548 builder_instance.download_and_prepare( 549 download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, 550 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs) 460 logger.info("Dataset not on Hf google storage. Downloading and preparing it from source") 461 if not downloaded_from_gcs: --> 462 self._download_and_prepare( 463 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 464 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 519 # Checksums verification 520 if verify_infos: --> 521 verify_checksums( 522 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 523 ) ~/miniconda3/envs/masters/lib/python3.8/site-packages/nlp/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 36 if len(bad_urls) > 0: 37 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 38 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 39 logger.info("All the checksums matched successfully" + for_verification_name) 40 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['http://www.cs.cmu.edu/~glai1/data/race/RACE.tar.gz'] ```
abarbosa94
https://github.com/huggingface/datasets/issues/537
null
false
687,378,332
536
Fingerprint
closed
[]
2020-08-27T16:27:09
2020-08-31T14:20:40
2020-08-31T14:20:39
This PR is a continuation of #513 , in which many in-place functions were introduced or updated (cast_, flatten_) etc. However the caching didn't handle these changes. Indeed the caching took into account only the previous cache file name of the table, and not the possible in-place transforms of the table. To fix that, I added the concept of dataset fingerprint, that is updated after each transform (in place or not), and stored inside the table metadata. When a dataset is created, an initial fingerprint is computed. If the dataset is memory-mapped, then the fingerprint generator doesn't read the table and only looks at the filename. However if the table is in-memory, then the fingerprint generator reads the content of the table using a batched non-crypto hashing. I added a utility class to compute hashes of arbitrary python objects in `fingerprint.py` : `Hasher`. The API is close to standard hashing tools (`.update`, `.hexdigest`). It also supports custom hashing functions depending on object types using a registry like pickle. I added a custom hashing function to hash a `pa.Table` in a batched way, and also for `nlp.DatasetInfo` to leverage its json serialization feature. Note about this PR: This is a draft PR because #513 needs to be merged first. The diff that is shown is for branches fingerprint -> indices (and not master, for now)
lhoestq
https://github.com/huggingface/datasets/pull/536
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/536", "html_url": "https://github.com/huggingface/datasets/pull/536", "diff_url": "https://github.com/huggingface/datasets/pull/536.diff", "patch_url": "https://github.com/huggingface/datasets/pull/536.patch", "merged_at": "2020-08-31T14:20:39" }
true
686,238,315
535
Benchmarks
closed
[]
2020-08-26T11:21:26
2020-08-27T08:40:00
2020-08-27T08:39:59
Adding some benchmarks with DVC/CML To add a new tracked benchmark: - create a new python benchmarking script in `./benchmarks/`. The script can use the utilities in `./benchmarks/utils.py` and should output a JSON file with results in `./benchmarks/results/`. - add a new pipeline stage in [dvc.yaml](./dvc.yaml) with the name of your new benchmark. That's it
thomwolf
https://github.com/huggingface/datasets/pull/535
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/535", "html_url": "https://github.com/huggingface/datasets/pull/535", "diff_url": "https://github.com/huggingface/datasets/pull/535.diff", "patch_url": "https://github.com/huggingface/datasets/pull/535.patch", "merged_at": "2020-08-27T08:39:59" }
true
686,115,912
534
`list_datasets()` is broken.
closed
[]
2020-08-26T08:19:01
2020-08-27T06:31:11
2020-08-27T06:31:11
version = '0.4.0' `list_datasets()` is broken. It results in the following error : ``` In [3]: nlp.list_datasets() Out[3]: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/core/formatters.py in __call__(self, obj) 700 type_pprinters=self.type_printers, 701 deferred_pprinters=self.deferred_printers) --> 702 printer.pretty(obj) 703 printer.flush() 704 return stream.getvalue() ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in pretty(self, obj) 375 if cls in self.type_pprinters: 376 # printer registered in self.type_pprinters --> 377 return self.type_pprinters[cls](obj, self, cycle) 378 else: 379 # deferred printer ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in inner(obj, p, cycle) 553 p.text(',') 554 p.breakable() --> 555 p.pretty(x) 556 if len(obj) == 1 and type(obj) is tuple: 557 # Special case for 1-item tuples. ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in pretty(self, obj) 392 if cls is not object \ 393 and callable(cls.__dict__.get('__repr__')): --> 394 return _repr_pprint(obj, self, cycle) 395 396 return _default_pprint(obj, self, cycle) ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle) 698 """A pprint that just redirects to the normal repr function.""" 699 # Find newlines and replace them with p.break_() --> 700 output = repr(obj) 701 lines = output.splitlines() 702 with p.group(): ~/.virtualenvs/san-lgUCsFg_/lib/python3.8/site-packages/nlp/hf_api.py in __repr__(self) 110 111 def __repr__(self): --> 112 single_line_description = self.description.replace("\n", "") 113 return f"nlp.ObjectInfo(id='{self.id}', description='{single_line_description}', files={self.siblings})" 114 AttributeError: 'NoneType' object has no attribute 'replace' ```
ashutosh-dwivedi-e3502
https://github.com/huggingface/datasets/issues/534
null
false
685,585,914
533
Fix ArrayXD for pyarrow 0.17.1 by using non fixed length list arrays
closed
[]
2020-08-25T15:32:44
2020-08-26T08:02:24
2020-08-26T08:02:23
It should fix the CI problems in #513
lhoestq
https://github.com/huggingface/datasets/pull/533
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/533", "html_url": "https://github.com/huggingface/datasets/pull/533", "diff_url": "https://github.com/huggingface/datasets/pull/533.diff", "patch_url": "https://github.com/huggingface/datasets/pull/533.patch", "merged_at": "2020-08-26T08:02:23" }
true
685,540,614
532
File exists error when used with TPU
open
[]
2020-08-25T14:36:38
2020-09-01T12:14:56
null
Hi, I'm getting a "File exists" error when I use [text dataset](https://github.com/huggingface/nlp/tree/master/datasets/text) for pre-training a RoBERTa model using `transformers` (3.0.2) and `nlp`(0.4.0) on a VM with TPU (v3-8). I modified [line 131 in the original `run_language_modeling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L131) as follows: ```python # line 131: return LineByLineTextDataset(tokenizer=tokenizer, file_path=file_path, block_size=args.block_size) dataset = load_dataset("text", data_files=file_path, split="train") dataset = dataset.map(lambda ex: tokenizer(ex["text"], add_special_tokens=True, truncation=True, max_length=args.block_size), batched=True) dataset.set_format(type='torch', columns=['input_ids']) return dataset ``` When I run this with [`xla_spawn.py`](https://github.com/huggingface/transformers/blob/master/examples/xla_spawn.py), I get the following error (it produces one message per core in TPU, which I believe is fine). It seems the current version doesn't take into account distributed training processes as in [this example](https://github.com/huggingface/transformers/blob/a573777901e662ec2e565be312ffaeedef6effec/src/transformers/data/datasets/language_modeling.py#L35-L38)? ``` 08/25/2020 13:59:41 - WARNING - nlp.builder - Using custom data configuration default 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) 08/25/2020 13:59:43 - INFO - nlp.builder - Generating dataset text (/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d) Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:6: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:4: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:1: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:7: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:3: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Downloading and preparing dataset text/default-b0932b2bdbb63283 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/ 447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d... Exception in device=TPU:2: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Exception in device=TPU:0: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) Traceback (most recent call last): FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' Traceback (most recent call last): File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 231, in _start_fn fn(gindex, *args) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/home/*****/huggingface_roberta/run_language_modeling.py", line 300, in _mp_fn main() File "/home/*****/huggingface_roberta/run_language_modeling.py", line 240, in main train_dataset = get_dataset(data_args, tokenizer=tokenizer) if training_args.do_train else None File "/home/*****/huggingface_roberta/run_language_modeling.py", line 134, in get_dataset dataset = load_dataset("text", data_files=file_path, split="train") File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/load.py", line 546, in load_dataset download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications, File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 450, in download_and_prepare with incomplete_dir(self._cache_dir) as tmp_data_dir: File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/site-packages/nlp/builder.py", line 422, in incomplete_dir os.makedirs(tmp_dir) File "/anaconda3/envs/torch-xla-1.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/*****/.cache/huggingface/datasets/text/default-b0932b2bdbb63283/0.0.0/447f2bcfa2a721a37bc8fdf23800eade1523cf07f7eada6fe661fe4d070d380d.incomplete' ```
go-inoue
https://github.com/huggingface/datasets/issues/532
null
false
685,291,036
531
add concatenate_datasets to the docs
closed
[]
2020-08-25T08:40:05
2020-08-25T09:02:20
2020-08-25T09:02:19
lhoestq
https://github.com/huggingface/datasets/pull/531
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/531", "html_url": "https://github.com/huggingface/datasets/pull/531", "diff_url": "https://github.com/huggingface/datasets/pull/531.diff", "patch_url": "https://github.com/huggingface/datasets/pull/531.patch", "merged_at": "2020-08-25T09:02:19" }
true
684,825,612
530
use ragged tensor by default
closed
[]
2020-08-24T17:06:15
2021-10-22T19:38:40
2020-08-24T19:22:25
I think it's better if it's clear whether the returned tensor is ragged or not when the type is set to tensorflow. Previously it was a tensor (not ragged) if numpy could stack the output (which can change depending on the batch of example you take), which make things difficult to handle, as it may sometimes return a ragged tensor and sometimes not. Therefore I reverted this behavior to always return a ragged tensor as we used to do.
lhoestq
https://github.com/huggingface/datasets/pull/530
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/530", "html_url": "https://github.com/huggingface/datasets/pull/530", "diff_url": "https://github.com/huggingface/datasets/pull/530.diff", "patch_url": "https://github.com/huggingface/datasets/pull/530.patch", "merged_at": "2020-08-24T19:22:25" }
true
684,797,157
529
Add MLSUM
closed
[]
2020-08-24T16:18:35
2020-08-26T08:04:11
2020-08-26T08:04:11
Hello (again :) !), So, I started a new branch because of a [rebase issue](https://github.com/huggingface/nlp/pull/463), sorry for the mess. However, the command `pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_real_dataset_mlsum` still fails because there is no default language dataset : the script throws an error as a specific config language is necessary. I think that setting a default language would be a bad workaround for this so I kept it as it is. Putting all the train files across languages together would also be a bad idea because of the size. Thanks for your help, Rachel
RachelKer
https://github.com/huggingface/datasets/pull/529
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/529", "html_url": "https://github.com/huggingface/datasets/pull/529", "diff_url": "https://github.com/huggingface/datasets/pull/529.diff", "patch_url": "https://github.com/huggingface/datasets/pull/529.patch", "merged_at": "2020-08-26T08:04:10" }
true
684,673,673
528
fix missing variable names in docs
closed
[]
2020-08-24T13:31:48
2020-08-25T09:04:04
2020-08-25T09:04:03
fix #524
lhoestq
https://github.com/huggingface/datasets/pull/528
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/528", "html_url": "https://github.com/huggingface/datasets/pull/528", "diff_url": "https://github.com/huggingface/datasets/pull/528.diff", "patch_url": "https://github.com/huggingface/datasets/pull/528.patch", "merged_at": "2020-08-25T09:04:03" }
true
684,632,930
527
Fix config used for slow test on real dataset
closed
[]
2020-08-24T12:39:34
2020-08-25T09:20:45
2020-08-25T09:20:44
As noticed in #470, #474, #476, #504 , the slow test `test_load_real_dataset` couldn't run on datasets that require config parameters. To fix that I replaced it with one test with the first config of BUILDER_CONFIGS `test_load_real_dataset`, and another test that runs all of the configs in BUILDER_CONFIGS `test_load_real_dataset_all_configs`
lhoestq
https://github.com/huggingface/datasets/pull/527
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/527", "html_url": "https://github.com/huggingface/datasets/pull/527", "diff_url": "https://github.com/huggingface/datasets/pull/527.diff", "patch_url": "https://github.com/huggingface/datasets/pull/527.patch", "merged_at": "2020-08-25T09:20:44" }
true
684,615,455
526
Returning None instead of "python" if dataset is unformatted
closed
[]
2020-08-24T12:10:35
2020-08-24T12:50:43
2020-08-24T12:50:42
Following the discussion on Slack, this small fix ensures that calling `dataset.set_format(type=dataset.format["type"])` works properly. Slightly breaking as calling `dataset.format` when the dataset is unformatted will return `None` instead of `python`.
TevenLeScao
https://github.com/huggingface/datasets/pull/526
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/526", "html_url": "https://github.com/huggingface/datasets/pull/526", "diff_url": "https://github.com/huggingface/datasets/pull/526.diff", "patch_url": "https://github.com/huggingface/datasets/pull/526.patch", "merged_at": "2020-08-24T12:50:42" }
true
683,875,483
525
wmt download speed example
closed
[]
2020-08-21T23:29:06
2022-10-04T17:45:39
2022-10-04T17:45:39
Continuing from the slack 1.0 roadmap thread w @lhoestq , I realized the slow downloads is only a thing sometimes. Here are a few examples, I suspect there are multiple issues. All commands were run from the same gcp us-central-1f machine. ``` import nlp nlp.load_dataset('wmt16', 'de-en') ``` Downloads at 49.1 KB/S Whereas ``` pip install gdown # download from google drive !gdown https://drive.google.com/uc?id=1iO7um-HWoNoRKDtw27YUSgyeubn9uXqj ``` Downloads at 127 MB/s. (The file is a copy of wmt-en-de raw). ``` nlp.load_dataset('wmt16', 'ro-en') ``` goes at 27 MB/s, much faster. if we wget the same data from s3 is the same download speed, but ¼ the file size: ``` wget https://s3.amazonaws.com/datasets.huggingface.co/translation/wmt_en_ro_packed_200_rand.tgz ``` Finally, ``` nlp.load_dataset('wmt19', 'zh-en') ``` Starts fast, but broken. (duplicate of #493 )
sshleifer
https://github.com/huggingface/datasets/issues/525
null
false
683,686,359
524
Some docs are missing parameter names
closed
[]
2020-08-21T16:47:34
2020-08-25T09:04:03
2020-08-25T09:04:03
See https://huggingface.co/nlp/master/package_reference/main_classes.html#nlp.Dataset.map. I believe this is because the parameter names are enclosed in backticks in the docstrings, maybe it's an old docstring format that doesn't work with the current Sphinx version.
jarednielsen
https://github.com/huggingface/datasets/issues/524
null
false