Datasets:

Languages:
English
ArXiv:
License:
system HF staff commited on
Commit
9203151
1 Parent(s): 6323813

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.0

Files changed (1) hide show
  1. cosmos_qa.py +7 -9
cosmos_qa.py CHANGED
@@ -4,7 +4,6 @@ from __future__ import absolute_import, division, print_function
4
 
5
  import csv
6
  import json
7
- import os
8
 
9
  import datasets
10
 
@@ -24,10 +23,13 @@ _CITATION = """\
24
  _DESCRIPTION = """\
25
  Cosmos QA is a large-scale dataset of 35.6K problems that require commonsense-based reading comprehension, formulated as multiple-choice questions. It focuses on reading between the lines over a diverse collection of people's everyday narratives, asking questions concerning on the likely causes or effects of events that require reasoning beyond the exact text spans in the context
26
  """
 
27
  _URL = "https://github.com/wilburOne/cosmosqa/raw/master/data/"
28
- _TEST_FILE = "test.jsonl"
29
- _TRAIN_FILE = "train.csv"
30
- _DEV_FILE = "valid.csv"
 
 
31
 
32
 
33
  class CosmosQa(datasets.GeneratorBasedBuilder):
@@ -69,11 +71,7 @@ class CosmosQa(datasets.GeneratorBasedBuilder):
69
  # TODO(cosmos_qa): Downloads the data and defines the splits
70
  # dl_manager is a datasets.download.DownloadManager that can be used to
71
  # download and extract URLs
72
- urls_to_download = {
73
- "train": os.path.join(_URL, _TRAIN_FILE),
74
- "test": os.path.join(_URL, _TEST_FILE),
75
- "dev": os.path.join(_URL, _DEV_FILE),
76
- }
77
  dl_dir = dl_manager.download_and_extract(urls_to_download)
78
  return [
79
  datasets.SplitGenerator(
 
4
 
5
  import csv
6
  import json
 
7
 
8
  import datasets
9
 
 
23
  _DESCRIPTION = """\
24
  Cosmos QA is a large-scale dataset of 35.6K problems that require commonsense-based reading comprehension, formulated as multiple-choice questions. It focuses on reading between the lines over a diverse collection of people's everyday narratives, asking questions concerning on the likely causes or effects of events that require reasoning beyond the exact text spans in the context
25
  """
26
+
27
  _URL = "https://github.com/wilburOne/cosmosqa/raw/master/data/"
28
+ _URLS = {
29
+ "train": _URL + "train.csv",
30
+ "test": _URL + "test.jsonl",
31
+ "dev": _URL + "valid.csv",
32
+ }
33
 
34
 
35
  class CosmosQa(datasets.GeneratorBasedBuilder):
 
71
  # TODO(cosmos_qa): Downloads the data and defines the splits
72
  # dl_manager is a datasets.download.DownloadManager that can be used to
73
  # download and extract URLs
74
+ urls_to_download = _URLS
 
 
 
 
75
  dl_dir = dl_manager.download_and_extract(urls_to_download)
76
  return [
77
  datasets.SplitGenerator(