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
627,235,893
219
force mwparserfromhell as third party
closed
[]
2020-05-29T12:33:17
2020-05-29T13:30:13
2020-05-29T13:30:12
This should fix your env because you had `mwparserfromhell ` as a first party for `isort` @patrickvonplaten
lhoestq
https://github.com/huggingface/datasets/pull/219
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/219", "html_url": "https://github.com/huggingface/datasets/pull/219", "diff_url": "https://github.com/huggingface/datasets/pull/219.diff", "patch_url": "https://github.com/huggingface/datasets/pull/219.patch", "merged_at": "2020-05-29T13:30:12" }
true
627,173,407
218
Add Natual Questions and C4 scripts
closed
[]
2020-05-29T10:40:30
2020-05-29T12:31:01
2020-05-29T12:31:00
Scripts are ready ! However they are not processed nor directly available from gcp yet.
lhoestq
https://github.com/huggingface/datasets/pull/218
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/218", "html_url": "https://github.com/huggingface/datasets/pull/218", "diff_url": "https://github.com/huggingface/datasets/pull/218.diff", "patch_url": "https://github.com/huggingface/datasets/pull/218.patch", "merged_at": "2020-05-29T12:31:00" }
true
627,128,403
217
Multi-task dataset mixing
open
[]
2020-05-29T09:22:26
2025-09-24T08:59:38
null
It seems like many of the best performing models on the GLUE benchmark make some use of multitask learning (simultaneous training on multiple tasks). The [T5 paper](https://arxiv.org/pdf/1910.10683.pdf) highlights multiple ways of mixing the tasks together during finetuning: - **Examples-proportional mixing** - sample from tasks proportionally to their dataset size - **Equal mixing** - sample uniformly from each task - **Temperature-scaled mixing** - The generalized approach used by multilingual BERT which uses a temperature T, where the mixing rate of each task is raised to the power 1/T and renormalized. When T=1 this is equivalent to equal mixing, and becomes closer to equal mixing with increasing T. Following this discussion https://github.com/huggingface/transformers/issues/4340 in [transformers](https://github.com/huggingface/transformers), @enzoampil suggested that the `nlp` library might be a better place for this functionality. Some method for combining datasets could be implemented ,e.g. ``` dataset = nlp.load_multitask(['squad','imdb','cnn_dm'], temperature=2.0, ...) ``` We would need a few additions: - Method of identifying the tasks - how can we support adding a string to each task as an identifier: e.g. 'summarisation: '? - Method of combining the metrics - a standard approach is to use the specific metric for each task and add them together for a combined score. It would be great to support common use cases such as pretraining on the GLUE benchmark before fine-tuning on each GLUE task in turn. I'm willing to write bits/most of this I just need some guidance on the interface and other library details so I can integrate it properly.
ghomasHudson
https://github.com/huggingface/datasets/issues/217
null
false
626,896,890
216
โ“ How to get ROUGE-2 with the ROUGE metric ?
closed
[]
2020-05-28T23:47:32
2020-06-01T00:04:35
2020-06-01T00:04:35
I'm trying to use ROUGE metric, but I don't know how to get the ROUGE-2 metric. --- I compute scores with : ```python import nlp rouge = nlp.load_metric('rouge') with open("pred.txt") as p, open("ref.txt") as g: for lp, lg in zip(p, g): rouge.add([lp], [lg]) score = rouge.compute() ``` then : _(print only the F-score for readability)_ ```python for k, s in score.items(): print(k, s.mid.fmeasure) ``` It gives : >rouge1 0.7915168355671788 rougeL 0.7915168355671788 --- **How can I get the ROUGE-2 score ?** Also, it's seems weird that ROUGE-1 and ROUGE-L scores are the same. Did I made a mistake ? @lhoestq
astariul
https://github.com/huggingface/datasets/issues/216
null
false
626,867,879
215
NonMatchingSplitsSizesError when loading blog_authorship_corpus
closed
[]
2020-05-28T22:55:19
2025-01-04T00:03:12
2022-02-10T13:05:45
Getting this error when i run `nlp.load_dataset('blog_authorship_corpus')`. ``` raise NonMatchingSplitsSizesError(str(bad_splits)) nlp.utils.info_utils.NonMatchingSplitsSizesError: [{'expected': SplitInfo(name='train', num_bytes=610252351, num_examples=532812, dataset_name='blog_authorship_corpus'), 'recorded': SplitInfo(name='train', num_bytes=616473500, num_examples=536323, dataset_name='blog_authorship_corpus')}, {'expected': SplitInfo(name='validation', num_bytes=37500394, num_examples=31277, dataset_name='blog_authorship_corpus'), 'recorded': SplitInfo(name='validation', num_bytes=30786661, num_examples=27766, dataset_name='blog_authorship_corpus')}] ``` Upon checking it seems like there is a disparity between the information in `datasets/blog_authorship_corpus/dataset_infos.json` and what was downloaded. Although I can get away with this by passing `ignore_verifications=True` in `load_dataset`, I'm thinking doing so might give problems later on.
cedricconol
https://github.com/huggingface/datasets/issues/215
null
false
626,641,549
214
[arrow_dataset.py] add new filter function
closed
[]
2020-05-28T16:21:40
2020-05-29T11:43:29
2020-05-29T11:32:20
The `.map()` function is super useful, but can IMO a bit tedious when filtering certain examples. I think, filtering out examples is also a very common operation people would like to perform on datasets. This PR is a proposal to add a `.filter()` function in the same spirit than the `.map()` function. Here is a sample code you can play around with: ```python ds = nlp.load_dataset("squad", split="validation[:10%]") def remove_under_idx_5(example, idx): return idx < 5 def only_keep_examples_with_is_in_context(example): return "is" in example["context"] result_keep_only_first_5 = ds.filter(remove_under_idx_5, with_indices=True, load_from_cache_file=False) result_keep_examples_with_is_in_context = ds.filter(only_keep_examples_with_is_in_context, load_from_cache_file=False) print("Original number of examples: {}".format(len(ds))) print("First five examples number of examples: {}".format(len(result_keep_only_first_5))) print("Is in context examples number of examples: {}".format(len(result_keep_examples_with_is_in_context))) ```
patrickvonplaten
https://github.com/huggingface/datasets/pull/214
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/214", "html_url": "https://github.com/huggingface/datasets/pull/214", "diff_url": "https://github.com/huggingface/datasets/pull/214.diff", "patch_url": "https://github.com/huggingface/datasets/pull/214.patch", "merged_at": "2020-05-29T11:32:20" }
true
626,587,995
213
better message if missing beam options
closed
[]
2020-05-28T15:06:57
2020-05-29T09:51:17
2020-05-29T09:51:16
WDYT @yjernite ? For example: ```python dataset = nlp.load_dataset('wikipedia', '20200501.aa') ``` Raises: ``` MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/ If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory). Example of usage: `load_dataset('wikipedia', '20200501.aa', beam_runner='DirectRunner')` ```
lhoestq
https://github.com/huggingface/datasets/pull/213
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/213", "html_url": "https://github.com/huggingface/datasets/pull/213", "diff_url": "https://github.com/huggingface/datasets/pull/213.diff", "patch_url": "https://github.com/huggingface/datasets/pull/213.patch", "merged_at": "2020-05-29T09:51:16" }
true
626,580,198
212
have 'add' and 'add_batch' for metrics
closed
[]
2020-05-28T14:56:47
2020-05-29T10:41:05
2020-05-29T10:41:04
This should fix #116 Previously the `.add` method of metrics expected a batch of examples. Now `.add` expects one prediction/reference and `.add_batch` expects a batch. I think it is more coherent with the way the ArrowWriter works.
lhoestq
https://github.com/huggingface/datasets/pull/212
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/212", "html_url": "https://github.com/huggingface/datasets/pull/212", "diff_url": "https://github.com/huggingface/datasets/pull/212.diff", "patch_url": "https://github.com/huggingface/datasets/pull/212.patch", "merged_at": "2020-05-29T10:41:04" }
true
626,565,994
211
[Arrow writer, Trivia_qa] Could not convert TagMe with type str: converting to null type
closed
[]
2020-05-28T14:38:14
2020-07-23T10:15:16
2020-07-23T10:15:16
Running the following code ``` import nlp ds = nlp.load_dataset("trivia_qa", "rc", split="validation[:1%]") # this might take 2.3 min to download but it's cached afterwards... ds.map(lambda x: x, load_from_cache_file=False) ``` triggers a `ArrowInvalid: Could not convert TagMe with type str: converting to null type` error. On the other hand if we remove a certain column of `trivia_qa` which seems responsible for the bug, it works: ``` import nlp ds = nlp.load_dataset("trivia_qa", "rc", split="validation[:1%]") # this might take 2.3 min to download but it's cached afterwards... ds.map(lambda x: x, remove_columns=["entity_pages"], load_from_cache_file=False) ``` . Seems quite hard to debug what's going on here... @lhoestq @thomwolf - do you have a good first guess what the problem could be? **Note** BTW: I think this could be a good test to check that the datasets work correctly: Take a tiny portion of the dataset and check that it can be written correctly.
patrickvonplaten
https://github.com/huggingface/datasets/issues/211
null
false
626,504,243
210
fix xnli metric kwargs description
closed
[]
2020-05-28T13:21:44
2020-05-28T13:22:11
2020-05-28T13:22:10
The text was wrong as noticed in #202
lhoestq
https://github.com/huggingface/datasets/pull/210
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/210", "html_url": "https://github.com/huggingface/datasets/pull/210", "diff_url": "https://github.com/huggingface/datasets/pull/210.diff", "patch_url": "https://github.com/huggingface/datasets/pull/210.patch", "merged_at": "2020-05-28T13:22:10" }
true
626,405,849
209
Add a Google Drive exception for small files
closed
[]
2020-05-28T10:40:17
2020-05-28T15:15:04
2020-05-28T15:15:04
I tried to use the ``nlp`` library to load personnal datasets. I mainly copy-paste the code for ``multi-news`` dataset because my files are stored on Google Drive. One of my dataset is small (< 25Mo) so it can be verified by Drive without asking the authorization to the user. This makes the download starts directly. Currently the ``nlp`` raises a error: ``ConnectionError: Couldn't reach https://drive.google.com/uc?export=download&id=1DGnbUY9zwiThTdgUvVTSAvSVHoloCgun`` while the url is working. So I just add a new exception as you have already done for ``firebasestorage.googleapis.com`` : ``` elif (response.status_code == 400 and "firebasestorage.googleapis.com" in url) or (response.status_code == 405 and "drive.google.com" in url) ``` I make an example of the error that you can run on [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1ae_JJ9uvUt-9GBh0uGZhjbF5aXkl-BPv?usp=sharing) I avoid the error by adding an exception but there is maybe a proper way to do it. Many thanks :hugs: Best,
airKlizz
https://github.com/huggingface/datasets/pull/209
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/209", "html_url": "https://github.com/huggingface/datasets/pull/209", "diff_url": "https://github.com/huggingface/datasets/pull/209.diff", "patch_url": "https://github.com/huggingface/datasets/pull/209.patch", "merged_at": "2020-05-28T15:15:04" }
true
626,398,519
208
[Dummy data] insert config name instead of config
closed
[]
2020-05-28T10:28:19
2020-05-28T12:48:01
2020-05-28T12:48:00
Thanks @yjernite for letting me know. in the dummy data command the config name shuold be passed to the dataset builder and not the config itself. Also, @lhoestq fixed small import bug introduced by beam command I think.
patrickvonplaten
https://github.com/huggingface/datasets/pull/208
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/208", "html_url": "https://github.com/huggingface/datasets/pull/208", "diff_url": "https://github.com/huggingface/datasets/pull/208.diff", "patch_url": "https://github.com/huggingface/datasets/pull/208.patch", "merged_at": "2020-05-28T12:48:00" }
true
625,932,200
207
Remove test set from NLP viewer
closed
[]
2020-05-27T18:32:07
2022-02-10T13:17:45
2022-02-10T13:17:45
While the new [NLP viewer](https://huggingface.co/nlp/viewer/) is a great tool, I think it would be best to outright remove the option of looking at the test sets. At the very least, a warning should be displayed to users before showing the test set. Newcomers to the field might not be aware of best practices, and small things like this can help increase awareness.
chrisdonahue
https://github.com/huggingface/datasets/issues/207
null
false
625,842,989
206
[Question] Combine 2 datasets which have the same columns
closed
[]
2020-05-27T16:25:52
2020-06-10T09:11:14
2020-06-10T09:11:14
Hi, I am using ``nlp`` to load personal datasets. I created summarization datasets in multi-languages based on wikinews. I have one dataset for english and one for german (french is getting to be ready as well). I want to keep these datasets independent because they need different pre-processing (add different task-specific prefixes for T5 : *summarize:* for english and *zusammenfassen:* for german) My issue is that I want to train T5 on the combined english and german datasets to see if it improves results. So I would like to combine 2 datasets (which have the same columns) to make one and train T5 on it. I was wondering if there is a proper way to do it? I assume that it can be done by combining all examples of each dataset but maybe you have a better solution. Hoping this is clear enough, Thanks a lot ๐Ÿ˜Š Best
airKlizz
https://github.com/huggingface/datasets/issues/206
null
false
625,839,335
205
Better arrow dataset iter
closed
[]
2020-05-27T16:20:21
2020-05-27T16:39:58
2020-05-27T16:39:56
I tried to play around with `tf.data.Dataset.from_generator` and I found out that the `__iter__` that we have for `nlp.arrow_dataset.Dataset` ignores the format that has been set (torch or tensorflow). With these changes I should be able to come up with a `tf.data.Dataset` that uses lazy loading, as asked in #193.
lhoestq
https://github.com/huggingface/datasets/pull/205
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/205", "html_url": "https://github.com/huggingface/datasets/pull/205", "diff_url": "https://github.com/huggingface/datasets/pull/205.diff", "patch_url": "https://github.com/huggingface/datasets/pull/205.patch", "merged_at": "2020-05-27T16:39:56" }
true
625,655,849
204
Add Dataflow support + Wikipedia + Wiki40b
closed
[]
2020-05-27T12:32:49
2020-05-28T08:10:35
2020-05-28T08:10:34
# Add Dataflow support + Wikipedia + Wiki40b ## Support datasets processing with Apache Beam Some datasets are too big to be processed on a single machine, for example: wikipedia, wiki40b, etc. Apache Beam allows to process datasets on many execution engines like Dataflow, Spark, Flink, etc. To process such datasets with Beam, I added a command to run beam pipelines `nlp-cli run_beam path/to/dataset/script`. Then I used it to process the english + french wikipedia, and the english of wiki40b. The processed arrow files are on GCS and are the result of a Dataflow job. I added a markdown documentation file in `docs` that explains how to use it properly. ## Load already processed datasets Now that we have those datasets already processed, I made it possible to load datasets that are already processed. You can do `load_dataset('wikipedia', '20200501.en')` and it will download the processed files from the Hugging Face GCS directly into the user's cache and be ready to use ! The Wikipedia dataset was already asked in #187 and this PR should soon allow to add Natural Questions as asked in #129 ## Other changes in the code To make things work, I had to do a few adjustments: - add a `ship_files_with_pipeline` method to the `DownloadManager`. This is because beam pipelines can be run in the cloud and therefore need to have access to your downloaded data. I used it in the wikipedia script: ```python if not pipeline.is_local(): downloaded_files = dl_manager.ship_files_with_pipeline(downloaded_files, pipeline) ``` - add parquet to arrow conversion. This is because the output of beam pipelines are parquet files so we need to convert them to arrow and have the arrow files on GCS - add a test script with a dummy beam dataset - minor adjustments to allow read/write operations on remote files using `apache_beam.io.filesystems.FileSystems` if we want (it can be connected to gcp, s3, hdfs, etc...)
lhoestq
https://github.com/huggingface/datasets/pull/204
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/204", "html_url": "https://github.com/huggingface/datasets/pull/204", "diff_url": "https://github.com/huggingface/datasets/pull/204.diff", "patch_url": "https://github.com/huggingface/datasets/pull/204.patch", "merged_at": "2020-05-28T08:10:34" }
true
625,515,488
203
Raise an error if no config name for datasets like glue
closed
[]
2020-05-27T09:03:58
2020-05-27T16:40:39
2020-05-27T16:40:38
Some datasets like glue (see #130) and scientific_papers (see #197) have many configs. For example for glue there are cola, sst2, mrpc etc. Currently if a user does `load_dataset('glue')`, then Cola is loaded by default and it can be confusing. Instead, we should raise an error to let the user know that he has to pick one of the available configs (as proposed in #152). For example for glue, the message looks like: ``` ValueError: Config name is missing. Please pick one among the available configs: ['cola', 'sst2', 'mrpc', 'qqp', 'stsb', 'mnli', 'mnli_mismatched', 'mnli_matched', 'qnli', 'rte', 'wnli', 'ax'] Example of usage: `load_dataset('glue', 'cola')` ``` The error is raised if the config name is missing and if there are >=2 possible configs.
lhoestq
https://github.com/huggingface/datasets/pull/203
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/203", "html_url": "https://github.com/huggingface/datasets/pull/203", "diff_url": "https://github.com/huggingface/datasets/pull/203.diff", "patch_url": "https://github.com/huggingface/datasets/pull/203.patch", "merged_at": "2020-05-27T16:40:38" }
true
625,493,983
202
Mistaken `_KWARGS_DESCRIPTION` for XNLI metric
closed
[]
2020-05-27T08:34:42
2020-05-28T13:22:36
2020-05-28T13:22:36
Hi! The [`_KWARGS_DESCRIPTION`](https://github.com/huggingface/nlp/blob/7d0fa58641f3f462fb2861dcdd6ce7f0da3f6a56/metrics/xnli/xnli.py#L45) for the XNLI metric uses `Args` and `Returns` text from [BLEU](https://github.com/huggingface/nlp/blob/7d0fa58641f3f462fb2861dcdd6ce7f0da3f6a56/metrics/bleu/bleu.py#L58) metric: ``` _KWARGS_DESCRIPTION = """ Computes XNLI score which is just simple accuracy. Args: predictions: list of translations to score. Each translation should be tokenized into a list of tokens. references: list of lists of references for each translation. Each reference should be tokenized into a list of tokens. max_order: Maximum n-gram order to use when computing BLEU score. smooth: Whether or not to apply Lin et al. 2004 smoothing. Returns: 'bleu': bleu score, 'precisions': geometric mean of n-gram precisions, 'brevity_penalty': brevity penalty, 'length_ratio': ratio of lengths, 'translation_length': translation_length, 'reference_length': reference_length """ ``` But it should be something like: ``` _KWARGS_DESCRIPTION = """ Computes XNLI score which is just simple accuracy. Args: predictions: Predicted labels. references: Ground truth labels. Returns: 'accuracy': accuracy ```
phiyodr
https://github.com/huggingface/datasets/issues/202
null
false
625,235,430
201
Fix typo in README
closed
[]
2020-05-26T22:18:21
2020-05-26T23:40:31
2020-05-26T23:00:56
LysandreJik
https://github.com/huggingface/datasets/pull/201
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/201", "html_url": "https://github.com/huggingface/datasets/pull/201", "diff_url": "https://github.com/huggingface/datasets/pull/201.diff", "patch_url": "https://github.com/huggingface/datasets/pull/201.patch", "merged_at": "2020-05-26T23:00:56" }
true
625,226,638
200
[ArrowWriter] Set schema at first write example
closed
[]
2020-05-26T21:59:48
2020-05-27T09:07:54
2020-05-27T09:07:53
Right now if the schema was not specified when instantiating `ArrowWriter`, then it could be set with the first `write_table` for example (it calls `self._build_writer()` to do so). I noticed that it was not done if the first example is added via `.write`, so I added it for coherence.
lhoestq
https://github.com/huggingface/datasets/pull/200
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/200", "html_url": "https://github.com/huggingface/datasets/pull/200", "diff_url": "https://github.com/huggingface/datasets/pull/200.diff", "patch_url": "https://github.com/huggingface/datasets/pull/200.patch", "merged_at": "2020-05-27T09:07:53" }
true
625,217,440
199
Fix GermEval 2014 dataset infos
closed
[]
2020-05-26T21:41:44
2020-05-26T21:50:24
2020-05-26T21:50:24
Hi, this PR just removes the `dataset_info.json` file and adds a newly generated `dataset_infos.json` file.
stefan-it
https://github.com/huggingface/datasets/pull/199
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/199", "html_url": "https://github.com/huggingface/datasets/pull/199", "diff_url": "https://github.com/huggingface/datasets/pull/199.diff", "patch_url": "https://github.com/huggingface/datasets/pull/199.patch", "merged_at": "2020-05-26T21:50:24" }
true
625,200,627
198
Index outside of table length
closed
[]
2020-05-26T21:09:40
2020-05-26T22:43:49
2020-05-26T22:43:49
The offset input box warns of numbers larger than a limit (like 2000) but then the errors start at a smaller value than that limit (like 1955). > ValueError: Index (2000) outside of table length (2000). > Traceback: > File "/home/sasha/.local/lib/python3.7/site-packages/streamlit/ScriptRunner.py", line 322, in _run_script > exec(code, module.__dict__) > File "/home/sasha/nlp_viewer/run.py", line 116, in <module> > v = d[item][k] > File "/home/sasha/.local/lib/python3.7/site-packages/nlp/arrow_dataset.py", line 338, in __getitem__ > output_all_columns=self._output_all_columns, > File "/home/sasha/.local/lib/python3.7/site-packages/nlp/arrow_dataset.py", line 290, in _getitem > raise ValueError(f"Index ({key}) outside of table length ({self._data.num_rows}).")
casajarm
https://github.com/huggingface/datasets/issues/198
null
false
624,966,904
197
Scientific Papers only downloading Pubmed
closed
[]
2020-05-26T15:18:47
2020-05-28T08:19:28
2020-05-28T08:19:28
Hi! I have been playing around with this module, and I am a bit confused about the `scientific_papers` dataset. I thought that it would download two separate datasets, arxiv and pubmed. But when I run the following: ``` dataset = nlp.load_dataset('scientific_papers', data_dir='.', cache_dir='.') Downloading: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 5.05k/5.05k [00:00<00:00, 2.66MB/s] Downloading: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 4.90k/4.90k [00:00<00:00, 2.42MB/s] Downloading and preparing dataset scientific_papers/pubmed (download: 4.20 GiB, generated: 2.33 GiB, total: 6.53 GiB) to ./scientific_papers/pubmed/1.1.1... Downloading: 3.62GB [00:40, 90.5MB/s] Downloading: 880MB [00:08, 101MB/s] Dataset scientific_papers downloaded and prepared to ./scientific_papers/pubmed/1.1.1. Subsequent calls will reuse this data. ``` only a pubmed folder is created. There doesn't seem to be something for arxiv. Are these two datasets merged? Or have I misunderstood something? Thanks!
antmarakis
https://github.com/huggingface/datasets/issues/197
null
false
624,901,266
196
Check invalid config name
closed
[]
2020-05-26T13:52:51
2020-05-26T21:04:56
2020-05-26T21:04:55
As said in #194, we should raise an error if the config name has bad characters. Bad characters are those that are not allowed for directory names on windows.
lhoestq
https://github.com/huggingface/datasets/pull/196
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/196", "html_url": "https://github.com/huggingface/datasets/pull/196", "diff_url": "https://github.com/huggingface/datasets/pull/196.diff", "patch_url": "https://github.com/huggingface/datasets/pull/196.patch", "merged_at": "2020-05-26T21:04:55" }
true
624,858,686
195
[Dummy data command] add new case to command
closed
[]
2020-05-26T12:50:47
2020-05-26T14:38:28
2020-05-26T14:38:27
Qanta: #194 introduces a case that was not noticed before. This change in code helps community users to have an easier time creating the dummy data.
patrickvonplaten
https://github.com/huggingface/datasets/pull/195
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/195", "html_url": "https://github.com/huggingface/datasets/pull/195", "diff_url": "https://github.com/huggingface/datasets/pull/195.diff", "patch_url": "https://github.com/huggingface/datasets/pull/195.patch", "merged_at": "2020-05-26T14:38:27" }
true
624,854,897
194
Add Dataset: Qanta
closed
[]
2020-05-26T12:44:35
2020-05-26T16:58:17
2020-05-26T13:16:20
Fixes dummy data for #169 @EntilZha
patrickvonplaten
https://github.com/huggingface/datasets/pull/194
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/194", "html_url": "https://github.com/huggingface/datasets/pull/194", "diff_url": "https://github.com/huggingface/datasets/pull/194.diff", "patch_url": "https://github.com/huggingface/datasets/pull/194.patch", "merged_at": "2020-05-26T13:16:20" }
true
624,655,558
193
[Tensorflow] Use something else than `from_tensor_slices()`
closed
[]
2020-05-26T07:19:14
2020-10-27T15:28:11
2020-10-27T15:28:11
In the example notebook, the TF Dataset is built using `from_tensor_slices()` : ```python columns = ['input_ids', 'token_type_ids', 'attention_mask', 'start_positions', 'end_positions'] train_tf_dataset.set_format(type='tensorflow', columns=columns) features = {x: train_tf_dataset[x] for x in columns[:3]} labels = {"output_1": train_tf_dataset["start_positions"]} labels["output_2"] = train_tf_dataset["end_positions"] tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8) ``` But according to [official tensorflow documentation](https://www.tensorflow.org/guide/data#consuming_numpy_arrays), this will load the entire dataset to memory. **This defeats one purpose of this library, which is lazy loading.** Is there any other way to load the `nlp` dataset into TF dataset lazily ? --- For example, is it possible to use [Arrow dataset](https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowDataset) ? If yes, is there any code example ?
astariul
https://github.com/huggingface/datasets/issues/193
null
false
624,397,592
192
[Question] Create Apache Arrow dataset from raw text file
closed
[]
2020-05-25T16:42:47
2021-12-18T01:45:34
2020-10-27T15:20:22
Hi guys, I have gathered and preprocessed about 2GB of COVID papers from CORD dataset @ Kggle. I have seen you have a text dataset as "Crime and punishment" in Apache arrow format. Do you have any script to do it from a raw txt file (preprocessed as for BERT like) or any guide? Is the worth of send it to you and add it to the NLP library? Thanks, Manu
mrm8488
https://github.com/huggingface/datasets/issues/192
null
false
624,394,936
191
[Squad es] add dataset_infos
closed
[]
2020-05-25T16:35:52
2020-05-25T16:39:59
2020-05-25T16:39:58
@mariamabarham - was still about to upload this. Should have waited with my comment a bit more :D
patrickvonplaten
https://github.com/huggingface/datasets/pull/191
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/191", "html_url": "https://github.com/huggingface/datasets/pull/191", "diff_url": "https://github.com/huggingface/datasets/pull/191.diff", "patch_url": "https://github.com/huggingface/datasets/pull/191.patch", "merged_at": "2020-05-25T16:39:58" }
true
624,124,600
190
add squad Spanish v1 and v2
closed
[]
2020-05-25T08:08:40
2020-05-25T16:28:46
2020-05-25T16:28:45
This PR add the Spanish Squad versions 1 and 2 datasets. Fixes #164
mariamabarham
https://github.com/huggingface/datasets/pull/190
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/190", "html_url": "https://github.com/huggingface/datasets/pull/190", "diff_url": "https://github.com/huggingface/datasets/pull/190.diff", "patch_url": "https://github.com/huggingface/datasets/pull/190.patch", "merged_at": "2020-05-25T16:28:45" }
true
624,048,881
189
[Question] BERT-style multiple choice formatting
closed
[]
2020-05-25T05:11:05
2020-05-25T18:38:28
2020-05-25T18:38:28
Hello, I am wondering what the equivalent formatting of a dataset should be to allow for multiple-choice answering prediction, BERT-style. Previously, this was done by passing a list of `InputFeatures` to the dataloader instead of a list of `InputFeature`, where `InputFeatures` contained lists of length equal to the number of answer choices in the MCQ instead of single items. I'm a bit confused on what the output of my feature conversion function should be when using `dataset.map()` to ensure similar behavior. Thanks!
sarahwie
https://github.com/huggingface/datasets/issues/189
null
false
623,890,430
188
When will the remaining math_dataset modules be added as dataset objects
closed
[]
2020-05-24T15:46:52
2020-05-24T18:53:48
2020-05-24T18:53:48
Currently only the algebra_linear_1d is supported. Is there a timeline for making the other modules supported. If no timeline is established, how can I help?
tylerroost
https://github.com/huggingface/datasets/issues/188
null
false
623,627,800
187
[Question] How to load wikipedia ? Beam runner ?
closed
[]
2020-05-23T10:18:52
2020-05-25T00:12:02
2020-05-25T00:12:02
When `nlp.load_dataset('wikipedia')`, I got * `WARNING:nlp.builder:Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided. Please pass a nlp.DownloadConfig(beam_runner=...) object to the builder.download_and_prepare(download_config=...) method. Default values will be used.` * `AttributeError: 'NoneType' object has no attribute 'size'` Could somebody tell me what should I do ? # Env On Colab, ``` git clone https://github.com/huggingface/nlp cd nlp pip install -q . ``` ``` %pip install -q apache_beam mwparserfromhell -> ERROR: pydrive 1.3.1 has requirement oauth2client>=4.0.0, but you'll have oauth2client 3.0.0 which is incompatible. ERROR: google-api-python-client 1.7.12 has requirement httplib2<1dev,>=0.17.0, but you'll have httplib2 0.12.0 which is incompatible. ERROR: chainer 6.5.0 has requirement typing-extensions<=3.6.6, but you'll have typing-extensions 3.7.4.2 which is incompatible. ``` ``` pip install -q apache-beam[interactive] ERROR: google-colab 1.0.0 has requirement ipython~=5.5.0, but you'll have ipython 5.10.0 which is incompatible. ``` # The whole message ``` WARNING:nlp.builder:Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided. Please pass a nlp.DownloadConfig(beam_runner=...) object to the builder.download_and_prepare(download_config=...) method. Default values will be used. Downloading and preparing dataset wikipedia/20200501.aa (download: Unknown size, generated: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/wikipedia/20200501.aa/1.0.0... --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) /usr/local/lib/python3.6/dist-packages/apache_beam/runners/common.cpython-36m-x86_64-linux-gnu.so in apache_beam.runners.common.DoFnRunner.process() 44 frames /usr/local/lib/python3.6/dist-packages/apache_beam/runners/common.cpython-36m-x86_64-linux-gnu.so in apache_beam.runners.common.PerWindowInvoker.invoke_process() /usr/local/lib/python3.6/dist-packages/apache_beam/runners/common.cpython-36m-x86_64-linux-gnu.so in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window() /usr/local/lib/python3.6/dist-packages/apache_beam/io/iobase.py in process(self, element, init_result) 1081 writer.write(e) -> 1082 return [window.TimestampedValue(writer.close(), timestamp.MAX_TIMESTAMP)] 1083 /usr/local/lib/python3.6/dist-packages/apache_beam/io/filebasedsink.py in close(self) 422 def close(self): --> 423 self.sink.close(self.temp_handle) 424 return self.temp_shard_path /usr/local/lib/python3.6/dist-packages/apache_beam/io/parquetio.py in close(self, writer) 537 if len(self._buffer[0]) > 0: --> 538 self._flush_buffer() 539 if self._record_batches_byte_size > 0: /usr/local/lib/python3.6/dist-packages/apache_beam/io/parquetio.py in _flush_buffer(self) 569 for b in x.buffers(): --> 570 size = size + b.size 571 self._record_batches_byte_size = self._record_batches_byte_size + size AttributeError: 'NoneType' object has no attribute 'size' During handling of the above exception, another exception occurred: AttributeError Traceback (most recent call last) <ipython-input-9-340aabccefff> in <module>() ----> 1 dset = nlp.load_dataset('wikipedia') /usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 518 download_mode=download_mode, 519 ignore_verifications=ignore_verifications, --> 520 save_infos=save_infos, 521 ) 522 /usr/local/lib/python3.6/dist-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, save_infos, dl_manager, **download_and_prepare_kwargs) 370 verify_infos = not save_infos and not ignore_verifications 371 self._download_and_prepare( --> 372 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 373 ) 374 # Sync info /usr/local/lib/python3.6/dist-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos) 770 with beam.Pipeline(runner=beam_runner, options=beam_options,) as pipeline: 771 super(BeamBasedBuilder, self)._download_and_prepare( --> 772 dl_manager, pipeline=pipeline, verify_infos=False 773 ) # TODO{beam} verify infos 774 /usr/local/lib/python3.6/dist-packages/apache_beam/pipeline.py in __exit__(self, exc_type, exc_val, exc_tb) 501 def __exit__(self, exc_type, exc_val, exc_tb): 502 if not exc_type: --> 503 self.run().wait_until_finish() 504 505 def visit(self, visitor): /usr/local/lib/python3.6/dist-packages/apache_beam/pipeline.py in run(self, test_runner_api) 481 return Pipeline.from_runner_api( 482 self.to_runner_api(use_fake_coders=True), self.runner, --> 483 self._options).run(False) 484 485 if self._options.view_as(TypeOptions).runtime_type_check: /usr/local/lib/python3.6/dist-packages/apache_beam/pipeline.py in run(self, test_runner_api) 494 finally: 495 shutil.rmtree(tmpdir) --> 496 return self.runner.run_pipeline(self, self._options) 497 498 def __enter__(self): /usr/local/lib/python3.6/dist-packages/apache_beam/runners/direct/direct_runner.py in run_pipeline(self, pipeline, options) 128 runner = BundleBasedDirectRunner() 129 --> 130 return runner.run_pipeline(pipeline, options) 131 132 /usr/local/lib/python3.6/dist-packages/apache_beam/runners/portability/fn_api_runner.py in run_pipeline(self, pipeline, options) 553 554 self._latest_run_result = self.run_via_runner_api( --> 555 pipeline.to_runner_api(default_environment=self._default_environment)) 556 return self._latest_run_result 557 /usr/local/lib/python3.6/dist-packages/apache_beam/runners/portability/fn_api_runner.py in run_via_runner_api(self, pipeline_proto) 563 # TODO(pabloem, BEAM-7514): Create a watermark manager (that has access to 564 # the teststream (if any), and all the stages). --> 565 return self.run_stages(stage_context, stages) 566 567 @contextlib.contextmanager /usr/local/lib/python3.6/dist-packages/apache_beam/runners/portability/fn_api_runner.py in run_stages(self, stage_context, stages) 704 stage, 705 pcoll_buffers, --> 706 stage_context.safe_coders) 707 metrics_by_stage[stage.name] = stage_results.process_bundle.metrics 708 monitoring_infos_by_stage[stage.name] = ( /usr/local/lib/python3.6/dist-packages/apache_beam/runners/portability/fn_api_runner.py in _run_stage(self, worker_handler_factory, pipeline_components, stage, pcoll_buffers, safe_coders) 1071 cache_token_generator=cache_token_generator) 1072 -> 1073 result, splits = bundle_manager.process_bundle(data_input, data_output) 1074 1075 def input_for(transform_id, input_id): /usr/local/lib/python3.6/dist-packages/apache_beam/runners/portability/fn_api_runner.py in process_bundle(self, inputs, expected_outputs) 2332 2333 with UnboundedThreadPoolExecutor() as executor: -> 2334 for result, split_result in executor.map(execute, part_inputs): 2335 2336 split_result_list += split_result /usr/lib/python3.6/concurrent/futures/_base.py in result_iterator() 584 # Careful not to keep a reference to the popped future 585 if timeout is None: --> 586 yield fs.pop().result() 587 else: 588 yield fs.pop().result(end_time - time.monotonic()) /usr/lib/python3.6/concurrent/futures/_base.py in result(self, timeout) 430 raise CancelledError() 431 elif self._state == FINISHED: --> 432 return self.__get_result() 433 else: 434 raise TimeoutError() /usr/lib/python3.6/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 /usr/local/lib/python3.6/dist-packages/apache_beam/utils/thread_pool_executor.py in run(self) 42 # If the future wasn't cancelled, then attempt to execute it. 43 try: ---> 44 self._future.set_result(self._fn(*self._fn_args, **self._fn_kwargs)) 45 except BaseException as exc: 46 # Even though Python 2 futures library has #set_exection(), /usr/local/lib/python3.6/dist-packages/apache_beam/runners/portability/fn_api_runner.py in execute(part_map) 2329 self._registered, 2330 cache_token_generator=self._cache_token_generator) -> 2331 return bundle_manager.process_bundle(part_map, expected_outputs) 2332 2333 with UnboundedThreadPoolExecutor() as executor: /usr/local/lib/python3.6/dist-packages/apache_beam/runners/portability/fn_api_runner.py in process_bundle(self, inputs, expected_outputs) 2243 process_bundle_descriptor_id=self._bundle_descriptor.id, 2244 cache_tokens=[next(self._cache_token_generator)])) -> 2245 result_future = self._worker_handler.control_conn.push(process_bundle_req) 2246 2247 split_results = [] # type: List[beam_fn_api_pb2.ProcessBundleSplitResponse] /usr/local/lib/python3.6/dist-packages/apache_beam/runners/portability/fn_api_runner.py in push(self, request) 1557 self._uid_counter += 1 1558 request.instruction_id = 'control_%s' % self._uid_counter -> 1559 response = self.worker.do_instruction(request) 1560 return ControlFuture(request.instruction_id, response) 1561 /usr/local/lib/python3.6/dist-packages/apache_beam/runners/worker/sdk_worker.py in do_instruction(self, request) 413 # E.g. if register is set, this will call self.register(request.register)) 414 return getattr(self, request_type)( --> 415 getattr(request, request_type), request.instruction_id) 416 else: 417 raise NotImplementedError /usr/local/lib/python3.6/dist-packages/apache_beam/runners/worker/sdk_worker.py in process_bundle(self, request, instruction_id) 448 with self.maybe_profile(instruction_id): 449 delayed_applications, requests_finalization = ( --> 450 bundle_processor.process_bundle(instruction_id)) 451 monitoring_infos = bundle_processor.monitoring_infos() 452 monitoring_infos.extend(self.state_cache_metrics_fn()) /usr/local/lib/python3.6/dist-packages/apache_beam/runners/worker/bundle_processor.py in process_bundle(self, instruction_id) 837 for data in data_channel.input_elements(instruction_id, 838 expected_transforms): --> 839 input_op_by_transform_id[data.transform_id].process_encoded(data.data) 840 841 # Finish all operations. /usr/local/lib/python3.6/dist-packages/apache_beam/runners/worker/bundle_processor.py in process_encoded(self, encoded_windowed_values) 214 decoded_value = self.windowed_coder_impl.decode_from_stream( 215 input_stream, True) --> 216 self.output(decoded_value) 217 218 def try_split(self, fraction_of_remainder, total_buffer_size): /usr/local/lib/python3.6/dist-packages/apache_beam/runners/worker/operations.cpython-36m-x86_64-linux-gnu.so in apache_beam.runners.worker.operations.Operation.output() /usr/local/lib/python3.6/dist-packages/apache_beam/runners/worker/operations.cpython-36m-x86_64-linux-gnu.so in apache_beam.runners.worker.operations.Operation.output() /usr/local/lib/python3.6/dist-packages/apache_beam/runners/worker/operations.cpython-36m-x86_64-linux-gnu.so in apache_beam.runners.worker.operations.SingletonConsumerSet.receive() /usr/local/lib/python3.6/dist-packages/apache_beam/runners/worker/operations.cpython-36m-x86_64-linux-gnu.so in apache_beam.runners.worker.operations.DoOperation.process() /usr/local/lib/python3.6/dist-packages/apache_beam/runners/worker/operations.cpython-36m-x86_64-linux-gnu.so in apache_beam.runners.worker.operations.DoOperation.process() /usr/local/lib/python3.6/dist-packages/apache_beam/runners/common.cpython-36m-x86_64-linux-gnu.so in apache_beam.runners.common.DoFnRunner.process() /usr/local/lib/python3.6/dist-packages/apache_beam/runners/common.cpython-36m-x86_64-linux-gnu.so in apache_beam.runners.common.DoFnRunner._reraise_augmented() /usr/local/lib/python3.6/dist-packages/future/utils/__init__.py in raise_with_traceback(exc, traceback) 417 if traceback == Ellipsis: 418 _, _, traceback = sys.exc_info() --> 419 raise exc.with_traceback(traceback) 420 421 else: /usr/local/lib/python3.6/dist-packages/apache_beam/runners/common.cpython-36m-x86_64-linux-gnu.so in apache_beam.runners.common.DoFnRunner.process() /usr/local/lib/python3.6/dist-packages/apache_beam/runners/common.cpython-36m-x86_64-linux-gnu.so in apache_beam.runners.common.PerWindowInvoker.invoke_process() /usr/local/lib/python3.6/dist-packages/apache_beam/runners/common.cpython-36m-x86_64-linux-gnu.so in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window() /usr/local/lib/python3.6/dist-packages/apache_beam/io/iobase.py in process(self, element, init_result) 1080 for e in bundle[1]: # values 1081 writer.write(e) -> 1082 return [window.TimestampedValue(writer.close(), timestamp.MAX_TIMESTAMP)] 1083 1084 /usr/local/lib/python3.6/dist-packages/apache_beam/io/filebasedsink.py in close(self) 421 422 def close(self): --> 423 self.sink.close(self.temp_handle) 424 return self.temp_shard_path /usr/local/lib/python3.6/dist-packages/apache_beam/io/parquetio.py in close(self, writer) 536 def close(self, writer): 537 if len(self._buffer[0]) > 0: --> 538 self._flush_buffer() 539 if self._record_batches_byte_size > 0: 540 self._write_batches(writer) /usr/local/lib/python3.6/dist-packages/apache_beam/io/parquetio.py in _flush_buffer(self) 568 for x in arrays: 569 for b in x.buffers(): --> 570 size = size + b.size 571 self._record_batches_byte_size = self._record_batches_byte_size + size AttributeError: 'NoneType' object has no attribute 'size' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles'] ```
richarddwang
https://github.com/huggingface/datasets/issues/187
null
false
623,595,180
186
Weird-ish: Not creating unique caches for different phases
closed
[]
2020-05-23T06:40:58
2020-05-23T20:22:18
2020-05-23T20:22:17
Sample code: ```python import nlp dataset = nlp.load_dataset('boolq') def func1(x): return x def func2(x): return None train_output = dataset["train"].map(func1) valid_output = dataset["validation"].map(func1) print() print(len(train_output), len(valid_output)) # Output: 9427 9427 ``` The map method in both cases seem to be pointing to the same cache, so the latter call based on the validation data will return the processed train data cache. What's weird is that the following doesn't seem to be an issue: ```python train_output = dataset["train"].map(func2) valid_output = dataset["validation"].map(func2) print() print(len(train_output), len(valid_output)) # 9427 3270 ```
zphang
https://github.com/huggingface/datasets/issues/186
null
false
623,172,484
185
[Commands] In-detail instructions to create dummy data folder
closed
[]
2020-05-22T12:26:25
2020-05-22T14:06:35
2020-05-22T14:06:34
### Dummy data command This PR adds a new command `python nlp-cli dummy_data <path_to_dataset_folder>` that gives in-detail instructions on how to add the dummy data files. It would be great if you can try it out by moving the current dummy_data folder of any dataset in `./datasets` with `mv datasets/<dataset_script>/dummy_data datasets/<dataset_name>/dummy_data_copy` and running the command `python nlp-cli dummy_data ./datasets/<dataset_name>` to see if you like the instructions. ### CONTRIBUTING.md Also the CONTRIBUTING.md is made cleaner including a new section on "How to add a dataset". ### Current PRs It would be nice if we can try out if this command helps current PRs, *e.g.* #169 to add a dataset. I comment on those PRs.
patrickvonplaten
https://github.com/huggingface/datasets/pull/185
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/185", "html_url": "https://github.com/huggingface/datasets/pull/185", "diff_url": "https://github.com/huggingface/datasets/pull/185.diff", "patch_url": "https://github.com/huggingface/datasets/pull/185.patch", "merged_at": "2020-05-22T14:06:34" }
true
623,120,929
184
Use IndexError instead of ValueError when index out of range
closed
[]
2020-05-22T10:43:42
2020-05-28T08:31:18
2020-05-28T08:31:18
**`default __iter__ needs IndexError`**. When I want to create a wrapper of arrow dataset to adapt to fastai, I don't know how to initialize it, so I didn't use inheritance but use object composition. I wrote sth like this. ``` clas HF_dataset(): def __init__(self, arrow_dataset): self.dset = arrow_dataset def __getitem__(self, i): return self.my_get_item(self.dset) ``` But `for sample in my_dataset:` gave me `ValueError(f"Index ({key}) outside of table length ({self._data.num_rows}).")` . This is because default `__iter__` will stop when it catched `IndexError`. You can also see my [work](https://github.com/richardyy1188/Pretrain-MLM-and-finetune-on-GLUE-with-fastai/blob/master/GLUE_with_fastai.ipynb) that uses fastai2 to show/load batches from huggingface/nlp GLUE datasets So I hope we can use `IndexError` instead to let other people who want to wrap it for any purpose won't be caught by this caveat. BTW, I super appreciate your work, both transformers and nlp save my life. ๐Ÿ’–๐Ÿ’–๐Ÿ’–๐Ÿ’–๐Ÿ’–๐Ÿ’–๐Ÿ’–
richarddwang
https://github.com/huggingface/datasets/pull/184
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/184", "html_url": "https://github.com/huggingface/datasets/pull/184", "diff_url": "https://github.com/huggingface/datasets/pull/184.diff", "patch_url": "https://github.com/huggingface/datasets/pull/184.patch", "merged_at": "2020-05-28T08:31:18" }
true
623,054,270
183
[Bug] labels of glue/ax are all -1
closed
[]
2020-05-22T08:43:36
2020-05-22T22:14:05
2020-05-22T22:14:05
``` ax = nlp.load_dataset('glue', 'ax') for i in range(30): print(ax['test'][i]['label'], end=', ') ``` ``` -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ```
richarddwang
https://github.com/huggingface/datasets/issues/183
null
false
622,646,770
182
Update newsroom.py
closed
[]
2020-05-21T17:07:43
2020-05-22T16:38:23
2020-05-22T16:38:23
Updated the URL for Newsroom download so it's more robust to future changes.
yoavartzi
https://github.com/huggingface/datasets/pull/182
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/182", "html_url": "https://github.com/huggingface/datasets/pull/182", "diff_url": "https://github.com/huggingface/datasets/pull/182.diff", "patch_url": "https://github.com/huggingface/datasets/pull/182.patch", "merged_at": "2020-05-22T16:38:23" }
true
622,634,420
181
Cannot upload my own dataset
closed
[]
2020-05-21T16:45:52
2020-06-18T22:14:42
2020-06-18T22:14:42
I look into `nlp-cli` and `user.py` to learn how to upload my own data. It is supposed to work like this - Register to get username, password at huggingface.co - `nlp-cli login` and type username, passworld - I have a single file to upload at `./ttc/ttc_freq_extra.csv` - `nlp-cli upload ttc/ttc_freq_extra.csv` But I got this error. ``` 2020-05-21 16:33:52.722464: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1 About to upload file /content/ttc/ttc_freq_extra.csv to S3 under filename ttc/ttc_freq_extra.csv and namespace korakot Proceed? [Y/n] y Uploading... This might take a while if files are large Traceback (most recent call last): File "/usr/local/bin/nlp-cli", line 33, in <module> service.run() File "/usr/local/lib/python3.6/dist-packages/nlp/commands/user.py", line 234, in run token=token, filename=filename, filepath=filepath, organization=self.args.organization File "/usr/local/lib/python3.6/dist-packages/nlp/hf_api.py", line 141, in presign_and_upload urls = self.presign(token, filename=filename, organization=organization) File "/usr/local/lib/python3.6/dist-packages/nlp/hf_api.py", line 132, in presign return PresignedUrl(**d) TypeError: __init__() got an unexpected keyword argument 'cdn' ```
korakot
https://github.com/huggingface/datasets/issues/181
null
false
622,556,861
180
Add hall of fame
closed
[]
2020-05-21T14:53:48
2020-05-22T16:35:16
2020-05-22T16:35:14
powered by https://github.com/sourcerer-io/hall-of-fame
clmnt
https://github.com/huggingface/datasets/pull/180
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/180", "html_url": "https://github.com/huggingface/datasets/pull/180", "diff_url": "https://github.com/huggingface/datasets/pull/180.diff", "patch_url": "https://github.com/huggingface/datasets/pull/180.patch", "merged_at": "2020-05-22T16:35:14" }
true
622,525,410
179
[Feature request] separate split name and split instructions
closed
[]
2020-05-21T14:10:51
2020-05-22T13:31:08
2020-05-22T13:31:07
Currently, the name of an nlp.NamedSplit is parsed in arrow_reader.py and used as the instruction. This makes it impossible to have several training sets, which can occur when: - A dataset corresponds to a collection of sub-datasets - A dataset was built in stages, adding new examples at each stage Would it be possible to have two separate fields in the Split class, a name /instruction and a unique ID that is used as the key in the builder's split_dict ?
yjernite
https://github.com/huggingface/datasets/issues/179
null
false
621,979,849
178
[Manual data] improve error message for manual data in general
closed
[]
2020-05-20T18:10:45
2020-05-20T18:18:52
2020-05-20T18:18:50
`nlp.load("xsum")` now leads to the following error message: ![Screenshot from 2020-05-20 20-05-28](https://user-images.githubusercontent.com/23423619/82481825-3587ea00-9ad6-11ea-9ca2-5794252c6ac7.png) I guess the manual download instructions for `xsum` can also be improved.
patrickvonplaten
https://github.com/huggingface/datasets/pull/178
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/178", "html_url": "https://github.com/huggingface/datasets/pull/178", "diff_url": "https://github.com/huggingface/datasets/pull/178.diff", "patch_url": "https://github.com/huggingface/datasets/pull/178.patch", "merged_at": "2020-05-20T18:18:50" }
true
621,975,368
177
Xsum manual download instruction
closed
[]
2020-05-20T18:02:41
2020-05-20T18:16:50
2020-05-20T18:16:49
mariamabarham
https://github.com/huggingface/datasets/pull/177
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/177", "html_url": "https://github.com/huggingface/datasets/pull/177", "diff_url": "https://github.com/huggingface/datasets/pull/177.diff", "patch_url": "https://github.com/huggingface/datasets/pull/177.patch", "merged_at": "2020-05-20T18:16:49" }
true
621,934,638
176
[Tests] Refactor MockDownloadManager
closed
[]
2020-05-20T17:07:36
2020-05-20T18:17:19
2020-05-20T18:17:18
Clean mock download manager class. The print function was not of much help I think. We should think about adding a command that creates the dummy folder structure for the user.
patrickvonplaten
https://github.com/huggingface/datasets/pull/176
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/176", "html_url": "https://github.com/huggingface/datasets/pull/176", "diff_url": "https://github.com/huggingface/datasets/pull/176.diff", "patch_url": "https://github.com/huggingface/datasets/pull/176.patch", "merged_at": "2020-05-20T18:17:18" }
true
621,929,428
175
[Manual data dir] Error message: nlp.load_dataset('xsum') -> TypeError
closed
[]
2020-05-20T17:00:32
2020-05-20T18:18:50
2020-05-20T18:18:50
v 0.1.0 from pip ```python import nlp xsum = nlp.load_dataset('xsum') ``` Issue is `dl_manager.manual_dir`is `None` ```python --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-42-8a32f066f3bd> in <module> ----> 1 xsum = nlp.load_dataset('xsum') ~/miniconda3/envs/nb/lib/python3.7/site-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 515 download_mode=download_mode, 516 ignore_verifications=ignore_verifications, --> 517 save_infos=save_infos, 518 ) 519 ~/miniconda3/envs/nb/lib/python3.7/site-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, save_infos, dl_manager, **download_and_prepare_kwargs) 361 verify_infos = not save_infos and not ignore_verifications 362 self._download_and_prepare( --> 363 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 364 ) 365 # Sync info ~/miniconda3/envs/nb/lib/python3.7/site-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 397 split_dict = SplitDict(dataset_name=self.name) 398 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) --> 399 split_generators = self._split_generators(dl_manager, **split_generators_kwargs) 400 # Checksums verification 401 if verify_infos: ~/miniconda3/envs/nb/lib/python3.7/site-packages/nlp/datasets/xsum/5c5fca23aaaa469b7a1c6f095cf12f90d7ab99bcc0d86f689a74fd62634a1472/xsum.py in _split_generators(self, dl_manager) 102 with open(dl_path, "r") as json_file: 103 split_ids = json.load(json_file) --> 104 downloaded_path = os.path.join(dl_manager.manual_dir, "xsum-extracts-from-downloads") 105 return [ 106 nlp.SplitGenerator( ~/miniconda3/envs/nb/lib/python3.7/posixpath.py in join(a, *p) 78 will be discarded. An empty last part will result in a path that 79 ends with a separator.""" ---> 80 a = os.fspath(a) 81 sep = _get_sep(a) 82 path = a TypeError: expected str, bytes or os.PathLike object, not NoneType ```
sshleifer
https://github.com/huggingface/datasets/issues/175
null
false
621,928,403
174
nlp.load_dataset('xsum') -> TypeError
closed
[]
2020-05-20T16:59:09
2020-05-20T17:43:46
2020-05-20T17:43:46
sshleifer
https://github.com/huggingface/datasets/issues/174
null
false
621,764,932
173
Rm extracted test dirs
closed
[]
2020-05-20T13:30:48
2020-05-22T16:34:36
2020-05-22T16:34:35
All the dummy data used for tests were duplicated. For each dataset, we had one zip file but also its extracted directory. I removed all these directories Furthermore instead of extracting next to the dummy_data.zip file, we extract in the temp `cached_dir` used for tests, so that all the extracted directories get removed after testing. Finally there was a bug in the `mock_download_manager` that would let it create directories with invalid names, as in #172. I fixed that by encoding url arguments. I had to rename the dummy data for `scientific_papers` and `cnn_dailymail` (the aws tests don't pass for those 2 in this PR, but they will once aws will be synced, as the local ones do) Let me know if it sounds good to you @patrickvonplaten . I'm still not entirely familiar with the mock downloader
lhoestq
https://github.com/huggingface/datasets/pull/173
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/173", "html_url": "https://github.com/huggingface/datasets/pull/173", "diff_url": "https://github.com/huggingface/datasets/pull/173.diff", "patch_url": "https://github.com/huggingface/datasets/pull/173.patch", "merged_at": "2020-05-22T16:34:35" }
true
621,377,386
172
Clone not working on Windows environment
closed
[]
2020-05-20T00:45:14
2020-05-23T12:49:13
2020-05-23T11:27:52
Cloning in a windows environment is not working because of use of special character '?' in folder name .. Please consider changing the folder name .... Reference to folder - nlp/datasets/cnn_dailymail/dummy/3.0.0/3.0.0/dummy_data-zip-extracted/dummy_data/uc?export=download&id=0BwmD_VLjROrfM1BxdkxVaTY2bWs/dailymail/stories/ error log: fatal: cannot create directory at 'datasets/cnn_dailymail/dummy/3.0.0/3.0.0/dummy_data-zip-extracted/dummy_data/uc?export=download&id=0BwmD_VLjROrfM1BxdkxVaTY2bWs': Invalid argument
codehunk628
https://github.com/huggingface/datasets/issues/172
null
false
621,199,128
171
fix squad metric format
closed
[]
2020-05-19T18:37:36
2020-05-22T13:36:50
2020-05-22T13:36:48
The format of the squad metric was wrong. This should fix #143 I tested with ```python3 predictions = [ {'id': '56be4db0acb8001400a502ec', 'prediction_text': 'Denver Broncos'} ] references = [ {'answers': [{'text': 'Denver Broncos'}], 'id': '56be4db0acb8001400a502ec'} ] ```
lhoestq
https://github.com/huggingface/datasets/pull/171
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/171", "html_url": "https://github.com/huggingface/datasets/pull/171", "diff_url": "https://github.com/huggingface/datasets/pull/171.diff", "patch_url": "https://github.com/huggingface/datasets/pull/171.patch", "merged_at": "2020-05-22T13:36:48" }
true
621,119,747
170
Rename anli dataset
closed
[]
2020-05-19T16:26:57
2020-05-20T12:23:09
2020-05-20T12:23:08
What we have now as the `anli` dataset is actually the ฮฑNLI dataset from the ART challenge dataset. This name is confusing because `anli` is also the name of adversarial NLI (see [https://github.com/facebookresearch/anli](https://github.com/facebookresearch/anli)). I renamed the current `anli` dataset by `art`.
lhoestq
https://github.com/huggingface/datasets/pull/170
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/170", "html_url": "https://github.com/huggingface/datasets/pull/170", "diff_url": "https://github.com/huggingface/datasets/pull/170.diff", "patch_url": "https://github.com/huggingface/datasets/pull/170.patch", "merged_at": "2020-05-20T12:23:07" }
true
621,099,682
169
Adding Qanta (Quizbowl) Dataset
closed
[]
2020-05-19T16:03:01
2020-05-26T12:52:31
2020-05-26T12:52:31
This PR adds the qanta question answering datasets from [Quizbowl: The Case for Incremental Question Answering](https://arxiv.org/abs/1904.04792) and [Trick Me If You Can: Human-in-the-loop Generation of Adversarial Question Answering Examples](https://www.aclweb.org/anthology/Q19-1029/) (adversarial fold) This partially continues a discussion around fixing dummy data from https://github.com/huggingface/nlp/issues/161 I ran the following code to double check that it works and did some sanity checks on the output. The majority of the code itself is from our `allennlp` version of the dataset reader. ```python import nlp # Default is full question data = nlp.load_dataset('./datasets/qanta') # Four configs # Primarily useful for training data = nlp.load_dataset('./datasets/qanta', 'mode=sentences,char_skip=25') # Primarily used in evaluation data = nlp.load_dataset('./datasets/qanta', 'mode=first,char_skip=25') data = nlp.load_dataset('./datasets/qanta', 'mode=full,char_skip=25') # Primarily useful in evaluation and "live" play data = nlp.load_dataset('./datasets/qanta', 'mode=runs,char_skip=25') ```
EntilZha
https://github.com/huggingface/datasets/pull/169
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/169", "html_url": "https://github.com/huggingface/datasets/pull/169", "diff_url": "https://github.com/huggingface/datasets/pull/169.diff", "patch_url": "https://github.com/huggingface/datasets/pull/169.patch", "merged_at": null }
true
620,959,819
168
Loading 'wikitext' dataset fails
closed
[]
2020-05-19T13:04:29
2020-05-26T21:46:52
2020-05-26T21:46:52
Loading the 'wikitext' dataset fails with Attribute error: Code to reproduce (From example notebook): import nlp wikitext_dataset = nlp.load_dataset('wikitext') Error: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-17-d5d9df94b13c> in <module>() 11 12 # Load a dataset and print the first examples in the training set ---> 13 wikitext_dataset = nlp.load_dataset('wikitext') 14 print(wikitext_dataset['train'][0]) 6 frames /usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 518 download_mode=download_mode, 519 ignore_verifications=ignore_verifications, --> 520 save_infos=save_infos, 521 ) 522 /usr/local/lib/python3.6/dist-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, save_infos, dl_manager, **download_and_prepare_kwargs) 363 verify_infos = not save_infos and not ignore_verifications 364 self._download_and_prepare( --> 365 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 366 ) 367 # Sync info /usr/local/lib/python3.6/dist-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 416 try: 417 # Prepare split will record examples associated to the split --> 418 self._prepare_split(split_generator, **prepare_split_kwargs) 419 except OSError: 420 raise OSError("Cannot find data file. " + (self.MANUAL_DOWNLOAD_INSTRUCTIONS or "")) /usr/local/lib/python3.6/dist-packages/nlp/builder.py in _prepare_split(self, split_generator) 594 example = self.info.features.encode_example(record) 595 writer.write(example) --> 596 num_examples, num_bytes = writer.finalize() 597 598 assert num_examples == num_examples, f"Expected to write {split_info.num_examples} but wrote {num_examples}" /usr/local/lib/python3.6/dist-packages/nlp/arrow_writer.py in finalize(self, close_stream) 173 def finalize(self, close_stream=True): 174 if self.pa_writer is not None: --> 175 self.write_on_file() 176 self.pa_writer.close() 177 if close_stream: /usr/local/lib/python3.6/dist-packages/nlp/arrow_writer.py in write_on_file(self) 124 else: 125 # All good --> 126 self._write_array_on_file(pa_array) 127 self.current_rows = [] 128 /usr/local/lib/python3.6/dist-packages/nlp/arrow_writer.py in _write_array_on_file(self, pa_array) 93 def _write_array_on_file(self, pa_array): 94 """Write a PyArrow Array""" ---> 95 pa_batch = pa.RecordBatch.from_struct_array(pa_array) 96 self._num_bytes += pa_array.nbytes 97 self.pa_writer.write_batch(pa_batch) AttributeError: type object 'pyarrow.lib.RecordBatch' has no attribute 'from_struct_array'
itay1itzhak
https://github.com/huggingface/datasets/issues/168
null
false
620,908,786
167
[Tests] refactor tests
closed
[]
2020-05-19T11:43:32
2020-05-19T16:17:12
2020-05-19T16:17:10
This PR separates AWS and Local tests to remove these ugly statements in the script: ```python if "/" not in dataset_name: logging.info("Skip {} because it is a canonical dataset") return ``` To run a `aws` test, one should now run the following command: ```python pytest -s tests/test_dataset_common.py::AWSDatasetTest::test_builder_class_wmt14 ``` The same `local` test, can be run with: ```python pytest -s tests/test_dataset_common.py::LocalDatasetTest::test_builder_class_wmt14 ```
patrickvonplaten
https://github.com/huggingface/datasets/pull/167
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/167", "html_url": "https://github.com/huggingface/datasets/pull/167", "diff_url": "https://github.com/huggingface/datasets/pull/167.diff", "patch_url": "https://github.com/huggingface/datasets/pull/167.patch", "merged_at": "2020-05-19T16:17:10" }
true
620,850,218
166
Add a method to shuffle a dataset
closed
[]
2020-05-19T10:08:46
2020-06-23T15:07:33
2020-06-23T15:07:32
Could maybe be a `dataset.shuffle(generator=None, seed=None)` signature method. Also, we could maybe have a clear indication of which method modify in-place and which methods return/cache a modified dataset. I kinda like torch conversion of having an underscore suffix for all the methods which modify a dataset in-place. What do you think?
thomwolf
https://github.com/huggingface/datasets/issues/166
null
false
620,758,221
165
ANLI
closed
[]
2020-05-19T07:50:57
2020-05-20T12:23:07
2020-05-20T12:23:07
Can I recommend the following: For ANLI, use https://github.com/facebookresearch/anli. As that paper says, "Our dataset is not to be confused with abductive NLI (Bhagavatula et al., 2019), which calls itself ฮฑNLI, or ART.". Indeed, the paper cited under what is currently called anli says in the abstract "We introduce a challenge dataset, ART". The current naming will confuse people :)
douwekiela
https://github.com/huggingface/datasets/issues/165
null
false
620,540,250
164
Add Spanish POR and NER Datasets
closed
[]
2020-05-18T22:18:21
2020-05-25T16:28:45
2020-05-25T16:28:45
Hi guys, In order to cover multilingual support a little step could be adding standard Datasets used for Spanish NER and POS tasks. I can provide it in raw and preprocessed formats.
mrm8488
https://github.com/huggingface/datasets/issues/164
null
false
620,534,307
163
[Feature request] Add cos-e v1.0
closed
[]
2020-05-18T22:05:26
2020-06-16T23:15:25
2020-06-16T18:52:06
I noticed the second release of cos-e (v1.11) is included in this repo. I wanted to request inclusion of v1.0, since this is the version on which results are reported on in [the paper](https://www.aclweb.org/anthology/P19-1487/), and v1.11 has noted [annotation](https://github.com/salesforce/cos-e/issues/2) [issues](https://arxiv.org/pdf/2004.14546.pdf).
sarahwie
https://github.com/huggingface/datasets/issues/163
null
false
620,513,554
162
fix prev files hash in map
closed
[]
2020-05-18T21:20:51
2020-05-18T21:36:21
2020-05-18T21:36:20
Fix the `.map` issue in #160. This makes sure it takes the previous files when computing the hash.
lhoestq
https://github.com/huggingface/datasets/pull/162
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/162", "html_url": "https://github.com/huggingface/datasets/pull/162", "diff_url": "https://github.com/huggingface/datasets/pull/162.diff", "patch_url": "https://github.com/huggingface/datasets/pull/162.patch", "merged_at": "2020-05-18T21:36:20" }
true
620,487,535
161
Discussion on version identifier & MockDataLoaderManager for test data
open
[]
2020-05-18T20:31:30
2020-05-24T18:10:03
null
Hi, I'm working on adding a dataset and ran into an error due to `download` not being defined on `MockDataLoaderManager`, but being defined in `nlp/utils/download_manager.py`. The readme step running this: `RUN_SLOW=1 pytest tests/test_dataset_common.py::DatasetTest::test_load_real_dataset_localmydatasetname` triggers the error. If I can get something to work, I can include it in my data PR once I'm done.
EntilZha
https://github.com/huggingface/datasets/issues/161
null
false
620,448,236
160
caching in map causes same result to be returned for train, validation and test
closed
[]
2020-05-18T19:22:03
2020-05-18T21:36:20
2020-05-18T21:36:20
hello, I am working on a program that uses the `nlp` library with the `SST2` dataset. The rough outline of the program is: ``` import nlp as nlp_datasets ... parser.add_argument('--dataset', help='HuggingFace Datasets id', default=['glue', 'sst2'], nargs='+') ... dataset = nlp_datasets.load_dataset(*args.dataset) ... # Create feature vocabs vocabs = create_vocabs(dataset.values(), vectorizers) ... # Create a function to vectorize based on vectorizers and vocabs: print('TS', train_set.num_rows) print('VS', valid_set.num_rows) print('ES', test_set.num_rows) # factory method to create a `convert_to_features` function based on vocabs convert_to_features = create_featurizer(vectorizers, vocabs) train_set = train_set.map(convert_to_features, batched=True) train_set.set_format(type='torch', columns=list(vectorizers.keys()) + ['y', 'lengths']) train_loader = torch.utils.data.DataLoader(train_set, batch_size=args.batchsz) valid_set = valid_set.map(convert_to_features, batched=True) valid_set.set_format(type='torch', columns=list(vectorizers.keys()) + ['y', 'lengths']) valid_loader = torch.utils.data.DataLoader(valid_set, batch_size=args.batchsz) test_set = test_set.map(convert_to_features, batched=True) test_set.set_format(type='torch', columns=list(vectorizers.keys()) + ['y', 'lengths']) test_loader = torch.utils.data.DataLoader(test_set, batch_size=args.batchsz) print('TS', train_set.num_rows) print('VS', valid_set.num_rows) print('ES', test_set.num_rows) ``` Im not sure if Im using it incorrectly, but the results are not what I expect. Namely, the `.map()` seems to grab the datset from the cache and then loses track of what the specific dataset is, instead using my training data for all datasets: ``` TS 67349 VS 872 ES 1821 TS 67349 VS 67349 ES 67349 ``` The behavior changes if I turn off the caching but then the results fail: ``` train_set = train_set.map(convert_to_features, batched=True, load_from_cache_file=False) ... valid_set = valid_set.map(convert_to_features, batched=True, load_from_cache_file=False) ... test_set = test_set.map(convert_to_features, batched=True, load_from_cache_file=False) ``` Now I get the right set of features back... ``` TS 67349 VS 872 ES 1821 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 68/68 [00:00<00:00, 92.78it/s] 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 1/1 [00:00<00:00, 75.47it/s] 0%| | 0/2 [00:00<?, ?it/s]TS 67349 VS 872 ES 1821 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 2/2 [00:00<00:00, 77.19it/s] ``` but I think its losing track of the original training set: ``` Traceback (most recent call last): File "/home/dpressel/dev/work/baseline/api-examples/layers-classify-hf-datasets.py", line 148, in <module> for x in train_loader: File "/home/dpressel/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 345, in __next__ data = self._next_data() File "/home/dpressel/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "/home/dpressel/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/dpressel/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/dpressel/anaconda3/lib/python3.7/site-packages/nlp/arrow_dataset.py", line 338, in __getitem__ output_all_columns=self._output_all_columns, File "/home/dpressel/anaconda3/lib/python3.7/site-packages/nlp/arrow_dataset.py", line 294, in _getitem outputs = self._unnest(self._data.slice(key, 1).to_pydict()) File "pyarrow/table.pxi", line 1211, in pyarrow.lib.Table.slice File "pyarrow/public-api.pxi", line 390, in pyarrow.lib.pyarrow_wrap_table File "pyarrow/error.pxi", line 85, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Column 3: In chunk 0: Invalid: Length spanned by list offsets (15859698) larger than values array (length 100000) Process finished with exit code 1 ``` The full-example program (minus the print stmts) is here: https://github.com/dpressel/mead-baseline/pull/620/files
dpressel
https://github.com/huggingface/datasets/issues/160
null
false
620,420,700
159
How can we add more datasets to nlp library?
closed
[]
2020-05-18T18:35:31
2020-05-18T18:37:08
2020-05-18T18:37:07
Tahsin-Mayeesha
https://github.com/huggingface/datasets/issues/159
null
false
620,396,658
158
add Toronto Books Corpus
closed
[]
2020-05-18T17:54:45
2020-06-11T07:49:15
2020-05-19T07:34:56
This PR adds the Toronto Books Corpus. . It on consider TMX and plain text files (Moses) defined in the table **Statistics and TMX/Moses Downloads** [here](http://opus.nlpl.eu/Books.php )
mariamabarham
https://github.com/huggingface/datasets/pull/158
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/158", "html_url": "https://github.com/huggingface/datasets/pull/158", "diff_url": "https://github.com/huggingface/datasets/pull/158.diff", "patch_url": "https://github.com/huggingface/datasets/pull/158.patch", "merged_at": null }
true
620,356,542
157
nlp.load_dataset() gives "TypeError: list_() takes exactly one argument (2 given)"
closed
[]
2020-05-18T16:46:38
2020-06-05T08:08:58
2020-06-05T08:08:58
I'm trying to load datasets from nlp but there seems to have error saying "TypeError: list_() takes exactly one argument (2 given)" gist can be found here https://gist.github.com/saahiluppal/c4b878f330b10b9ab9762bc0776c0a6a
saahiluppal
https://github.com/huggingface/datasets/issues/157
null
false
620,263,687
156
SyntaxError with WMT datasets
closed
[]
2020-05-18T14:38:18
2020-07-23T16:41:55
2020-07-23T16:41:55
The following snippet produces a syntax error: ``` import nlp dataset = nlp.load_dataset('wmt14') print(dataset['train'][0]) ``` ``` Traceback (most recent call last): File "/home/tom/.local/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3326, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-8-3206959998b9>", line 3, in <module> dataset = nlp.load_dataset('wmt14') File "/home/tom/.local/lib/python3.6/site-packages/nlp/load.py", line 505, in load_dataset builder_cls = import_main_class(module_path, dataset=True) File "/home/tom/.local/lib/python3.6/site-packages/nlp/load.py", line 56, in import_main_class module = importlib.import_module(module_path) File "/usr/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/tom/.local/lib/python3.6/site-packages/nlp/datasets/wmt14/c258d646f4f5870b0245f783b7aa0af85c7117e06aacf1e0340bd81935094de2/wmt14.py", line 21, in <module> from .wmt_utils import Wmt, WmtConfig File "/home/tom/.local/lib/python3.6/site-packages/nlp/datasets/wmt14/c258d646f4f5870b0245f783b7aa0af85c7117e06aacf1e0340bd81935094de2/wmt_utils.py", line 659 <<<<<<< HEAD ^ SyntaxError: invalid syntax ``` Python version: `3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0]` Running on Ubuntu 18.04, via a Jupyter notebook
tomhosking
https://github.com/huggingface/datasets/issues/156
null
false
620,067,946
155
Include more links in README, fix typos
closed
[]
2020-05-18T09:47:08
2020-05-28T08:31:57
2020-05-28T08:31:57
Include more links and fix typos in README
bharatr21
https://github.com/huggingface/datasets/pull/155
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/155", "html_url": "https://github.com/huggingface/datasets/pull/155", "diff_url": "https://github.com/huggingface/datasets/pull/155.diff", "patch_url": "https://github.com/huggingface/datasets/pull/155.patch", "merged_at": "2020-05-28T08:31:57" }
true
620,059,066
154
add Ubuntu Dialogs Corpus datasets
closed
[]
2020-05-18T09:34:48
2020-05-18T10:12:28
2020-05-18T10:12:27
This PR adds the Ubuntu Dialog Corpus datasets version 2.0.
mariamabarham
https://github.com/huggingface/datasets/pull/154
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/154", "html_url": "https://github.com/huggingface/datasets/pull/154", "diff_url": "https://github.com/huggingface/datasets/pull/154.diff", "patch_url": "https://github.com/huggingface/datasets/pull/154.patch", "merged_at": "2020-05-18T10:12:27" }
true
619,972,246
153
Meta-datasets (GLUE/XTREME/...) โ€“ Special care to attributions and citations
open
[]
2020-05-18T07:24:22
2020-05-18T21:18:16
null
Meta-datasets are interesting in terms of standardized benchmarks but they also have specific behaviors, in particular in terms of attribution and authorship. It's very important that each specific dataset inside a meta dataset is properly referenced and the citation/specific homepage/etc are very visible and accessible and not only the generic citation of the meta-dataset itself. Let's take GLUE as an example: The configuration has the citation for each dataset included (e.g. [here](https://github.com/huggingface/nlp/blob/master/datasets/glue/glue.py#L154-L161)) but it should be copied inside the dataset info so that, when people access `dataset.info.citation` they get both the citation for GLUE and the citation for the specific datasets inside GLUE that they have loaded.
thomwolf
https://github.com/huggingface/datasets/issues/153
null
false
619,971,900
152
Add GLUE config name check
closed
[]
2020-05-18T07:23:43
2020-05-27T22:09:12
2020-05-27T22:09:12
Fixes #130 by adding a name check to the Glue class
bharatr21
https://github.com/huggingface/datasets/pull/152
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/152", "html_url": "https://github.com/huggingface/datasets/pull/152", "diff_url": "https://github.com/huggingface/datasets/pull/152.diff", "patch_url": "https://github.com/huggingface/datasets/pull/152.patch", "merged_at": null }
true
619,968,480
151
Fix JSON tests.
closed
[]
2020-05-18T07:17:38
2020-05-18T07:21:52
2020-05-18T07:21:51
jplu
https://github.com/huggingface/datasets/pull/151
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/151", "html_url": "https://github.com/huggingface/datasets/pull/151", "diff_url": "https://github.com/huggingface/datasets/pull/151.diff", "patch_url": "https://github.com/huggingface/datasets/pull/151.patch", "merged_at": "2020-05-18T07:21:51" }
true
619,809,645
150
Add WNUT 17 NER dataset
closed
[]
2020-05-17T22:19:04
2020-05-26T20:37:59
2020-05-26T20:37:59
Hi, this PR adds the WNUT 17 dataset to `nlp`. > Emerging and Rare entity recognition > This shared task focuses on identifying unusual, previously-unseen entities in the context of emerging discussions. Named entities form the basis of many modern approaches to other tasks (like event clustering and summarisation), but recall on them is a real problem in noisy text - even among annotators. This drop tends to be due to novel entities and surface forms. Take for example the tweet โ€œso.. kktny in 30 mins?โ€ - even human experts find entity kktny hard to detect and resolve. This task will evaluate the ability to detect and classify novel, emerging, singleton named entities in noisy text. > > The goal of this task is to provide a definition of emerging and of rare entities, and based on that, also datasets for detecting these entities. More information about the dataset can be found on the [shared task page](https://noisy-text.github.io/2017/emerging-rare-entities.html). Dataset is taken is taken from their [GitHub repository](https://github.com/leondz/emerging_entities_17), because the data provided in this repository contains minor fixes in the dataset format. ## Usage Then the WNUT 17 dataset can be used in `nlp` like this: ```python import nlp wnut_17 = nlp.load_dataset("./datasets/wnut_17/wnut_17.py") print(wnut_17) ``` This outputs: ```txt 'train': Dataset(schema: {'id': 'string', 'tokens': 'list<item: string>', 'labels': 'list<item: string>'}, num_rows: 3394) 'validation': Dataset(schema: {'id': 'string', 'tokens': 'list<item: string>', 'labels': 'list<item: string>'}, num_rows: 1009) 'test': Dataset(schema: {'id': 'string', 'tokens': 'list<item: string>', 'labels': 'list<item: string>'}, num_rows: 1287) ``` Number are identical with the ones in [this paper](https://www.ijcai.org/Proceedings/2019/0702.pdf) and are the same as using the `dataset` reader in Flair. ## Features The following feature format is used to represent a sentence in the WNUT 17 dataset: | Feature | Example | Description | ---- | ---- | ----------------- | `id` | `0` | Number (id) of current sentence | `tokens` | `["AHFA", "extends", "deadline"]` | List of tokens (strings) for a sentence | `labels` | `["B-group", "O", "O"]` | List of labels (outer span) The following labels are used in WNUT 17: ```txt O B-corporation I-corporation B-location I-location B-product I-product B-person I-person B-group I-group B-creative-work I-creative-work ```
stefan-it
https://github.com/huggingface/datasets/pull/150
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/150", "html_url": "https://github.com/huggingface/datasets/pull/150", "diff_url": "https://github.com/huggingface/datasets/pull/150.diff", "patch_url": "https://github.com/huggingface/datasets/pull/150.patch", "merged_at": "2020-05-26T20:37:59" }
true
619,735,739
149
[Feature request] Add Ubuntu Dialogue Corpus dataset
closed
[]
2020-05-17T15:42:39
2020-05-18T17:01:46
2020-05-18T17:01:46
https://github.com/rkadlec/ubuntu-ranking-dataset-creator or http://dataset.cs.mcgill.ca/ubuntu-corpus-1.0/
danth
https://github.com/huggingface/datasets/issues/149
null
false
619,590,555
148
_download_and_prepare() got an unexpected keyword argument 'verify_infos'
closed
[]
2020-05-17T01:48:53
2020-05-18T07:38:33
2020-05-18T07:38:33
# Reproduce In Colab, ``` %pip install -q nlp %pip install -q apache_beam mwparserfromhell dataset = nlp.load_dataset('wikipedia') ``` get ``` Downloading and preparing dataset wikipedia/20200501.aa (download: Unknown size, generated: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/wikipedia/20200501.aa/1.0.0... --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-6-52471d2a0088> in <module>() ----> 1 dataset = nlp.load_dataset('wikipedia') 1 frames /usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 515 download_mode=download_mode, 516 ignore_verifications=ignore_verifications, --> 517 save_infos=save_infos, 518 ) 519 /usr/local/lib/python3.6/dist-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, save_infos, dl_manager, **download_and_prepare_kwargs) 361 verify_infos = not save_infos and not ignore_verifications 362 self._download_and_prepare( --> 363 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 364 ) 365 # Sync info TypeError: _download_and_prepare() got an unexpected keyword argument 'verify_infos' ```
richarddwang
https://github.com/huggingface/datasets/issues/148
null
false
619,581,907
147
Error with sklearn train_test_split
closed
[]
2020-05-17T00:28:24
2020-06-18T16:23:23
2020-06-18T16:23:23
It would be nice if we could use sklearn `train_test_split` to quickly generate subsets from the dataset objects returned by `nlp.load_dataset`. At the moment the code: ```python data = nlp.load_dataset('imdb', cache_dir=data_cache) f_half, s_half = train_test_split(data['train'], test_size=0.5, random_state=seed) ``` throws: ``` ValueError: Can only get row(s) (int or slice) or columns (string). ``` It's not a big deal, since there are other ways to split the data, but it would be a cool thing to have.
ClonedOne
https://github.com/huggingface/datasets/issues/147
null
false
619,564,653
146
Add BERTScore to metrics
closed
[]
2020-05-16T22:09:39
2020-05-17T22:22:10
2020-05-17T22:22:09
This PR adds [BERTScore](https://arxiv.org/abs/1904.09675) to metrics. Here is an example of how to use it. ```sh import nlp bertscore = nlp.load_metric('metrics/bertscore') # or simply nlp.load_metric('bertscore') after this is added to huggingface's s3 bucket predictions = ['example', 'fruit'] references = [['this is an example.', 'this is one example.'], ['apple']] results = bertscore.compute(predictions, references, lang='en') print(results) ```
felixgwu
https://github.com/huggingface/datasets/pull/146
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/146", "html_url": "https://github.com/huggingface/datasets/pull/146", "diff_url": "https://github.com/huggingface/datasets/pull/146.diff", "patch_url": "https://github.com/huggingface/datasets/pull/146.patch", "merged_at": "2020-05-17T22:22:09" }
true
619,480,549
145
[AWS Tests] Follow-up PR from #144
closed
[]
2020-05-16T13:53:46
2020-05-16T13:54:23
2020-05-16T13:54:22
I forgot to add this line in PR #145 .
patrickvonplaten
https://github.com/huggingface/datasets/pull/145
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/145", "html_url": "https://github.com/huggingface/datasets/pull/145", "diff_url": "https://github.com/huggingface/datasets/pull/145.diff", "patch_url": "https://github.com/huggingface/datasets/pull/145.patch", "merged_at": "2020-05-16T13:54:22" }
true
619,477,367
144
[AWS tests] AWS test should not run for canonical datasets
closed
[]
2020-05-16T13:39:30
2020-05-16T13:44:34
2020-05-16T13:44:33
AWS tests should in general not run for canonical datasets. Only local tests will run in this case. This way a PR is able to pass when adding a new dataset. This PR changes to logic to the following: 1) All datasets that are present in `nlp/datasets` are tested only locally. This way when one adds a canonical dataset, the PR includes his dataset in the tests. 2) All datasets that are only present on AWS, such as `webis/tl_dr` atm are tested only on AWS. I think the testing structure might need a bigger refactoring and better documentation very soon. Merging for now to unblock new PRs @thomwolf @mariamabarham .
patrickvonplaten
https://github.com/huggingface/datasets/pull/144
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/144", "html_url": "https://github.com/huggingface/datasets/pull/144", "diff_url": "https://github.com/huggingface/datasets/pull/144.diff", "patch_url": "https://github.com/huggingface/datasets/pull/144.patch", "merged_at": "2020-05-16T13:44:33" }
true
619,457,641
143
ArrowTypeError in squad metrics
closed
[]
2020-05-16T12:06:37
2020-05-22T13:38:52
2020-05-22T13:36:48
`squad_metric.compute` is giving following error ``` ArrowTypeError: Could not convert [{'text': 'Denver Broncos'}, {'text': 'Denver Broncos'}, {'text': 'Denver Broncos'}] with type list: was not a dict, tuple, or recognized null value for conversion to struct type ``` This is how my predictions and references look like ``` predictions[0] # {'id': '56be4db0acb8001400a502ec', 'prediction_text': 'Denver Broncos'} ``` ``` references[0] # {'answers': [{'text': 'Denver Broncos'}, {'text': 'Denver Broncos'}, {'text': 'Denver Broncos'}], 'id': '56be4db0acb8001400a502ec'} ``` These are structured as per the `squad_metric.compute` help string.
patil-suraj
https://github.com/huggingface/datasets/issues/143
null
false
619,450,068
142
[WMT] Add all wmt
closed
[]
2020-05-16T11:28:46
2020-05-17T12:18:21
2020-05-17T12:18:20
This PR adds all wmt datasets scripts. At the moment the script is **not** functional for the language pairs "cs-en", "ru-en", "hi-en" because apparently it takes up to a week to get the manual data for these datasets: see http://ufal.mff.cuni.cz/czeng. The datasets are fully functional though for the "big" language pairs "de-en" and "fr-en". Overall I think the scripts are very messy and might need a big refactoring at some point. For now I think there are good to merge (most dataset configs can be used). I will add "cs", "ru" and "hi" when the manual data is available.
patrickvonplaten
https://github.com/huggingface/datasets/pull/142
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/142", "html_url": "https://github.com/huggingface/datasets/pull/142", "diff_url": "https://github.com/huggingface/datasets/pull/142.diff", "patch_url": "https://github.com/huggingface/datasets/pull/142.patch", "merged_at": "2020-05-17T12:18:20" }
true
619,447,090
141
[Clean up] remove bogus folder
closed
[]
2020-05-16T11:13:42
2020-05-16T13:24:27
2020-05-16T13:24:26
@mariamabarham - I think you accidentally placed it there.
patrickvonplaten
https://github.com/huggingface/datasets/pull/141
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/141", "html_url": "https://github.com/huggingface/datasets/pull/141", "diff_url": "https://github.com/huggingface/datasets/pull/141.diff", "patch_url": "https://github.com/huggingface/datasets/pull/141.patch", "merged_at": "2020-05-16T13:24:25" }
true
619,443,613
140
[Tests] run local tests as default
closed
[]
2020-05-16T10:56:06
2020-05-16T13:21:44
2020-05-16T13:21:43
This PR also enables local tests by default I think it's safer for now to enable both local and aws tests for every commit. The problem currently is that when we do a PR to add a dataset, the dataset is not yet on AWS on therefore not tested on the PR itself. Thus the PR will always be green even if the datasets are not correct. This PR aims at fixing this. ## Suggestion on how to commit to the repo from now on: Now since the repo is "online", I think we should adopt a couple of best practices: 1) - No direct committing to the repo anymore. Every change should be opened in a PR and be well documented so that we can find it later 2) - Every PR has to be reviewed by at least x people (I guess @thomwolf you should decide here) because we now have to be much more careful when doing changes to the API for backward compatibility, etc...
patrickvonplaten
https://github.com/huggingface/datasets/pull/140
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/140", "html_url": "https://github.com/huggingface/datasets/pull/140", "diff_url": "https://github.com/huggingface/datasets/pull/140.diff", "patch_url": "https://github.com/huggingface/datasets/pull/140.patch", "merged_at": "2020-05-16T13:21:43" }
true
619,327,409
139
Add GermEval 2014 NER dataset
closed
[]
2020-05-15T23:42:09
2020-05-16T13:56:37
2020-05-16T13:56:22
Hi, this PR adds the GermEval 2014 NER dataset ๐Ÿ˜ƒ > The GermEval 2014 NER Shared Task builds on a new dataset with German Named Entity annotation [1] with the following properties: > - The data was sampled from German Wikipedia and News Corpora as a collection of citations. > - The dataset covers over 31,000 sentences corresponding to over 590,000 tokens. > - The NER annotation uses the NoSta-D guidelines, which extend the Tรผbingen Treebank guidelines, using four main NER categories with sub-structure, and annotating embeddings among NEs such as [ORG FC Kickers [LOC Darmstadt]]. Dataset will be downloaded from the [official GermEval 2014 website](https://sites.google.com/site/germeval2014ner/data). ## Dataset format Here's an example of the dataset format from the original dataset: ```tsv # http://de.wikipedia.org/wiki/Manfred_Korfmann [2009-10-17] 1 Aufgrund O O 2 seiner O O 3 Initiative O O 4 fand O O 5 2001/2002 O O 6 in O O 7 Stuttgart B-LOC O 8 , O O 9 Braunschweig B-LOC O 10 und O O 11 Bonn B-LOC O 12 eine O O 13 groรŸe O O 14 und O O 15 publizistisch O O 16 vielbeachtete O O 17 Troia-Ausstellung B-LOCpart O 18 statt O O 19 , O O 20 โ€ž O O 21 Troia B-OTH B-LOC 22 - I-OTH O 23 Traum I-OTH O 24 und I-OTH O 25 Wirklichkeit I-OTH O 26 โ€œ O O 27 . O O ``` The sentence is encoded as one token per line (tab separated columns. The first column contains either a `#`, which signals the source the sentence is cited from and the date it was retrieved, or the token number within the sentence. The second column contains the token. Column three and four contain the named entity (in IOB2 scheme). Outer spans are encoded in the third column, embedded/nested spans in the fourth column. ## Features I decided to keep most information from the dataset. That means the so called "source" information (where the sentences come from + date information) is also returned for each sentence in the feature vector. For each sentence in the dataset, one feature vector (`nlp.Features` definition) will be returned: | Feature | Example | Description | ---- | ---- | ----------------- | `id` | `0` | Number (id) of current sentence | `source` | `http://de.wikipedia.org/wiki/Manfred_Korfmann [2009-10-17]` | URL and retrieval date as string | `tokens` | `["Schwartau", "sagte", ":"]` | List of tokens (strings) for a sentence | `labels` | `["B-PER", "O", "O"]` | List of labels (outer span) | `nested-labels` | `["O", "O", "O"]` | List of labels for nested span ## Example The following command downloads the dataset from the official GermEval 2014 page and pre-processed it: ```bash python nlp-cli test datasets/germeval_14 --all_configs ``` It then outputs the number for training, development and testset. The training set consists of 24,000 sentences, the development set of 2,200 and the test of 5,100 sentences. Now it can be imported and used with `nlp`: ```python import nlp germeval = nlp.load_dataset("./datasets/germeval_14/germeval_14.py") assert len(germeval["train"]) == 24000 # Show first sentence of training set: germeval["train"][0] ```
stefan-it
https://github.com/huggingface/datasets/pull/139
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/139", "html_url": "https://github.com/huggingface/datasets/pull/139", "diff_url": "https://github.com/huggingface/datasets/pull/139.diff", "patch_url": "https://github.com/huggingface/datasets/pull/139.patch", "merged_at": "2020-05-16T13:56:22" }
true
619,225,191
138
Consider renaming to nld
closed
[]
2020-05-15T20:23:27
2022-09-16T05:18:22
2020-09-28T00:08:10
Hey :) Just making a thread here recording what I said on Twitter, as it's impossible to follow discussion there. It's also just really not a good way to talk about this sort of thing. The issue is that modules go into the global namespace, so you shouldn't use variable names that conflict with module names. This means the package makes `nlp` a bad variable name everywhere in the codebase. I've always used `nlp` as the canonical variable name of spaCy's `Language` objects, and this is a convention that a lot of other code has followed (Stanza, flair, etc). And actually, your `transformers` library uses `nlp` as the name for its `Pipeline` instance in your readme. If you stick with the `nlp` name for this package, if anyone uses it then they should rewrite all of that code. If `nlp` is a bad choice of variable anywhere, it's a bad choice of variable everywhere --- because you shouldn't have to notice whether some other function uses a module when you're naming variables within a function. You want to have one convention that you can stick to everywhere. If people use your `nlp` package and continue to use the `nlp` variable name, they'll find themselves with confusing bugs. There will be many many bits of code cut-and-paste from tutorials that give confusing results when combined with the data loading from the `nlp` library. The problem will be especially bad for shadowed modules (people might reasonably have a module named `nlp.py` within their codebase) and notebooks, as people might run notebook cells for data loading out-of-order. I don't think it's an exaggeration to say that if your library becomes popular, we'll all be answering issues around this about once a week for the next few years. That seems pretty unideal, so I do hope you'll reconsider. I suggest `nld` as a better name. It more accurately represents what the package actually does. It's pretty unideal to have a package named `nlp` that doesn't do any processing, and contains data about natural language generation or other non-NLP tasks. The name is equally short, and is sort of a visual pun on `nlp`, since a d is a rotated p.
honnibal
https://github.com/huggingface/datasets/issues/138
null
false
619,211,018
136
Update README.md
closed
[]
2020-05-15T20:01:07
2020-05-17T12:17:28
2020-05-17T12:17:28
small typo
renaud
https://github.com/huggingface/datasets/pull/136
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/136", "html_url": "https://github.com/huggingface/datasets/pull/136", "diff_url": "https://github.com/huggingface/datasets/pull/136.diff", "patch_url": "https://github.com/huggingface/datasets/pull/136.patch", "merged_at": null }
true
619,206,708
135
Fix print statement in READ.md
closed
[]
2020-05-15T19:52:23
2020-05-17T12:14:06
2020-05-17T12:14:05
print statement was throwing generator object instead of printing names of available datasets/metrics
codehunk628
https://github.com/huggingface/datasets/pull/135
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/135", "html_url": "https://github.com/huggingface/datasets/pull/135", "diff_url": "https://github.com/huggingface/datasets/pull/135.diff", "patch_url": "https://github.com/huggingface/datasets/pull/135.patch", "merged_at": "2020-05-17T12:14:05" }
true
619,112,641
134
Update README.md
closed
[]
2020-05-15T16:56:14
2020-05-28T08:21:49
2020-05-28T08:21:49
pranv
https://github.com/huggingface/datasets/pull/134
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/134", "html_url": "https://github.com/huggingface/datasets/pull/134", "diff_url": "https://github.com/huggingface/datasets/pull/134.diff", "patch_url": "https://github.com/huggingface/datasets/pull/134.patch", "merged_at": null }
true
619,094,954
133
[Question] Using/adding a local dataset
closed
[]
2020-05-15T16:26:06
2020-07-23T16:44:09
2020-07-23T16:44:09
Users may want to either create/modify a local copy of a dataset, or use a custom-built dataset with the same `Dataset` API as externally downloaded datasets. It appears to be possible to point to a local dataset path rather than downloading the external ones, but I'm not exactly sure how to go about doing this. A notebook/example script demonstrating this would be very helpful.
zphang
https://github.com/huggingface/datasets/issues/133
null
false
619,077,851
132
[Feature Request] Add the OpenWebText dataset
closed
[]
2020-05-15T15:57:29
2020-10-07T14:22:48
2020-10-07T14:22:48
The OpenWebText dataset is an open clone of OpenAI's WebText dataset. It can be used to train ELECTRA as is specified in the [README](https://www.github.com/google-research/electra). More information and the download link are available [here](https://skylion007.github.io/OpenWebTextCorpus/).
LysandreJik
https://github.com/huggingface/datasets/issues/132
null
false
619,073,731
131
[Feature request] Add Toronto BookCorpus dataset
closed
[]
2020-05-15T15:50:44
2020-06-28T21:27:31
2020-06-28T21:27:31
I know the copyright/distribution of this one is complex, but it would be great to have! That, combined with the existing `wikitext`, would provide a complete dataset for pretraining models like BERT.
jarednielsen
https://github.com/huggingface/datasets/issues/131
null
false
619,035,440
130
Loading GLUE dataset loads CoLA by default
closed
[]
2020-05-15T14:55:50
2020-05-27T22:08:15
2020-05-27T22:08:15
If I run: ```python dataset = nlp.load_dataset('glue') ``` The resultant dataset seems to be CoLA be default, without throwing any error. This is in contrast to calling: ```python metric = nlp.load_metric("glue") ``` which throws an error telling the user that they need to specify a task in GLUE. Should the same apply for loading datasets?
zphang
https://github.com/huggingface/datasets/issues/130
null
false
618,997,725
129
[Feature request] Add Google Natural Question dataset
closed
[]
2020-05-15T14:14:20
2020-07-23T13:21:29
2020-07-23T13:21:29
Would be great to have https://github.com/google-research-datasets/natural-questions as an alternative to SQuAD.
elyase
https://github.com/huggingface/datasets/issues/129
null
false
618,951,117
128
Some error inside nlp.load_dataset()
closed
[]
2020-05-15T13:01:29
2020-05-15T13:10:40
2020-05-15T13:10:40
First of all, nice work! I am going through [this overview notebook](https://colab.research.google.com/github/huggingface/nlp/blob/master/notebooks/Overview.ipynb) In simple step `dataset = nlp.load_dataset('squad', split='validation[:10%]')` I get an error, which is connected with some inner code, I think: ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-8-d848d3a99b8c> in <module>() 1 # Downloading and loading a dataset 2 ----> 3 dataset = nlp.load_dataset('squad', split='validation[:10%]') 8 frames /usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs) 515 download_mode=download_mode, 516 ignore_verifications=ignore_verifications, --> 517 save_infos=save_infos, 518 ) 519 /usr/local/lib/python3.6/dist-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, save_infos, dl_manager, **download_and_prepare_kwargs) 361 verify_infos = not save_infos and not ignore_verifications 362 self._download_and_prepare( --> 363 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 364 ) 365 # Sync info /usr/local/lib/python3.6/dist-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 414 try: 415 # Prepare split will record examples associated to the split --> 416 self._prepare_split(split_generator, **prepare_split_kwargs) 417 except OSError: 418 raise OSError("Cannot find data file. " + (self.MANUAL_DOWNLOAD_INSTRUCTIONS or "")) /usr/local/lib/python3.6/dist-packages/nlp/builder.py in _prepare_split(self, split_generator) 585 fname = "{}-{}.arrow".format(self.name, split_generator.name) 586 fpath = os.path.join(self._cache_dir, fname) --> 587 examples_type = self.info.features.type 588 writer = ArrowWriter(data_type=examples_type, path=fpath, writer_batch_size=self._writer_batch_size) 589 /usr/local/lib/python3.6/dist-packages/nlp/features.py in type(self) 460 @property 461 def type(self): --> 462 return get_nested_type(self) 463 464 @classmethod /usr/local/lib/python3.6/dist-packages/nlp/features.py in get_nested_type(schema) 370 # Nested structures: we allow dict, list/tuples, sequences 371 if isinstance(schema, dict): --> 372 return pa.struct({key: get_nested_type(value) for key, value in schema.items()}) 373 elif isinstance(schema, (list, tuple)): 374 assert len(schema) == 1, "We defining list feature, you should just provide one example of the inner type" /usr/local/lib/python3.6/dist-packages/nlp/features.py in <dictcomp>(.0) 370 # Nested structures: we allow dict, list/tuples, sequences 371 if isinstance(schema, dict): --> 372 return pa.struct({key: get_nested_type(value) for key, value in schema.items()}) 373 elif isinstance(schema, (list, tuple)): 374 assert len(schema) == 1, "We defining list feature, you should just provide one example of the inner type" /usr/local/lib/python3.6/dist-packages/nlp/features.py in get_nested_type(schema) 379 # We allow to reverse list of dict => dict of list for compatiblity with tfds 380 if isinstance(inner_type, pa.StructType): --> 381 return pa.struct(dict((f.name, pa.list_(f.type, schema.length)) for f in inner_type)) 382 return pa.list_(inner_type, schema.length) 383 /usr/local/lib/python3.6/dist-packages/nlp/features.py in <genexpr>(.0) 379 # We allow to reverse list of dict => dict of list for compatiblity with tfds 380 if isinstance(inner_type, pa.StructType): --> 381 return pa.struct(dict((f.name, pa.list_(f.type, schema.length)) for f in inner_type)) 382 return pa.list_(inner_type, schema.length) 383 TypeError: list_() takes exactly one argument (2 given) ```
polkaYK
https://github.com/huggingface/datasets/issues/128
null
false
618,909,042
127
Update Overview.ipynb
closed
[]
2020-05-15T11:46:48
2020-05-15T11:47:27
2020-05-15T11:47:25
update notebook
patrickvonplaten
https://github.com/huggingface/datasets/pull/127
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/127", "html_url": "https://github.com/huggingface/datasets/pull/127", "diff_url": "https://github.com/huggingface/datasets/pull/127.diff", "patch_url": "https://github.com/huggingface/datasets/pull/127.patch", "merged_at": "2020-05-15T11:47:25" }
true
618,897,499
126
remove webis
closed
[]
2020-05-15T11:25:20
2020-05-15T11:31:24
2020-05-15T11:30:26
Remove webis from dataset folder. Our first dataset script that only lives on AWS :-) https://s3.console.aws.amazon.com/s3/buckets/datasets.huggingface.co/nlp/datasets/webis/tl_dr/?region=us-east-1 @julien-c @jplu
patrickvonplaten
https://github.com/huggingface/datasets/pull/126
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/126", "html_url": "https://github.com/huggingface/datasets/pull/126", "diff_url": "https://github.com/huggingface/datasets/pull/126.diff", "patch_url": "https://github.com/huggingface/datasets/pull/126.patch", "merged_at": "2020-05-15T11:30:26" }
true
618,869,048
125
[Newsroom] add newsroom
closed
[]
2020-05-15T10:34:34
2020-05-15T10:37:07
2020-05-15T10:37:02
I checked it with the data link of the mail you forwarded @thomwolf => works well!
patrickvonplaten
https://github.com/huggingface/datasets/pull/125
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/125", "html_url": "https://github.com/huggingface/datasets/pull/125", "diff_url": "https://github.com/huggingface/datasets/pull/125.diff", "patch_url": "https://github.com/huggingface/datasets/pull/125.patch", "merged_at": "2020-05-15T10:37:02" }
true
618,864,284
124
Xsum, require manual download of some files
closed
[]
2020-05-15T10:26:13
2020-05-15T11:04:48
2020-05-15T11:04:46
mariamabarham
https://github.com/huggingface/datasets/pull/124
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/124", "html_url": "https://github.com/huggingface/datasets/pull/124", "diff_url": "https://github.com/huggingface/datasets/pull/124.diff", "patch_url": "https://github.com/huggingface/datasets/pull/124.patch", "merged_at": "2020-05-15T11:04:46" }
true
618,820,140
123
[Tests] Local => aws
closed
[]
2020-05-15T09:12:25
2020-05-15T10:06:12
2020-05-15T10:03:26
## Change default Test from local => aws As a default we set` aws=True`, `Local=False`, `slow=False` ### 1. RUN_AWS=1 (default) This runs 4 tests per dataset script. a) Does the dataset script have a valid etag / Can it be reached on AWS? b) Can we load its `builder_class`? c) Can we load **all** dataset configs? d) _Most importantly_: Can we load the dataset? Important - we currently only test the first config of each dataset to reduce test time. Total test time is around 1min20s. ### 2. RUN_LOCAL=1 RUN_AWS=0 ***This should be done when debugging dataset scripts of the ./datasets folder*** This only runs 1 test per dataset test, which is equivalent to aws d) - Can we load the dataset from the local `datasets` directory? ### 3. RUN_SLOW=1 We should set up to run these tests maybe 1 time per week ? @thomwolf The `slow` tests include two more important tests. e) Can we load the dataset with all possible configs? This test will probably fail at the moment because a lot of dummy data is missing. We should add the dummy data step by step to be sure that all configs work. f) Test that the actual dataset can be loaded. This will take quite some time to run, but is important to make sure that the "real" data can be loaded. It will also test whether the dataset script has the correct checksums file which is currently not tested with `aws=True`. @lhoestq - is there an easy way to check cheaply whether the `dataset_info.json` is correct for each dataset script?
patrickvonplaten
https://github.com/huggingface/datasets/pull/123
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/123", "html_url": "https://github.com/huggingface/datasets/pull/123", "diff_url": "https://github.com/huggingface/datasets/pull/123.diff", "patch_url": "https://github.com/huggingface/datasets/pull/123.patch", "merged_at": "2020-05-15T10:03:26" }
true
618,813,182
122
Final cleanup of readme and metrics
closed
[]
2020-05-15T09:00:52
2021-09-03T19:40:09
2020-05-15T09:02:22
thomwolf
https://github.com/huggingface/datasets/pull/122
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/122", "html_url": "https://github.com/huggingface/datasets/pull/122", "diff_url": "https://github.com/huggingface/datasets/pull/122.diff", "patch_url": "https://github.com/huggingface/datasets/pull/122.patch", "merged_at": "2020-05-15T09:02:22" }
true
618,790,040
121
make style
closed
[]
2020-05-15T08:23:36
2020-05-15T08:25:39
2020-05-15T08:25:38
patrickvonplaten
https://github.com/huggingface/datasets/pull/121
{ "url": "https://api.github.com/repos/huggingface/datasets/pulls/121", "html_url": "https://github.com/huggingface/datasets/pull/121", "diff_url": "https://github.com/huggingface/datasets/pull/121.diff", "patch_url": "https://github.com/huggingface/datasets/pull/121.patch", "merged_at": "2020-05-15T08:25:38" }
true
618,737,783
120
๐Ÿ› `map` not working
closed
[]
2020-05-15T06:43:08
2020-05-15T07:02:38
2020-05-15T07:02:38
I'm trying to run a basic example (mapping function to add a prefix). [Here is the colab notebook I'm using.](https://colab.research.google.com/drive/1YH4JCAy0R1MMSc-k_Vlik_s1LEzP_t1h?usp=sharing) ```python import nlp dataset = nlp.load_dataset('squad', split='validation[:10%]') def test(sample): sample['title'] = "test prefix @@@ " + sample["title"] return sample print(dataset[0]['title']) dataset.map(test) print(dataset[0]['title']) ``` Output : > Super_Bowl_50 Super_Bowl_50 Expected output : > Super_Bowl_50 test prefix @@@ Super_Bowl_50
astariul
https://github.com/huggingface/datasets/issues/120
null
false
618,652,145
119
๐Ÿ› Colab : type object 'pyarrow.lib.RecordBatch' has no attribute 'from_struct_array'
closed
[]
2020-05-15T02:27:26
2020-05-15T05:11:22
2020-05-15T02:45:28
I'm trying to load CNN/DM dataset on Colab. [Colab notebook](https://colab.research.google.com/drive/11Mf7iNhIyt6GpgA1dBEtg3cyMHmMhtZS?usp=sharing) But I meet this error : > AttributeError: type object 'pyarrow.lib.RecordBatch' has no attribute 'from_struct_array'
astariul
https://github.com/huggingface/datasets/issues/119
null
false