albertvillanova HF staff commited on
Commit
c0c52bb
1 Parent(s): 69a8c7b

Update source data to 1.3 version in loading script

Browse files
Files changed (1) hide show
  1. air_dialogue.py +7 -11
air_dialogue.py CHANGED
@@ -56,17 +56,14 @@ _LICENSE = "cc-by-nc-4.0"
56
  # TODO: Add link to the official dataset URLs here
57
  # The HuggingFace dataset library don't host the datasets but only point to the original files
58
  # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
59
- _URLs = {
60
- "air_dialogue_data": "https://storage.googleapis.com/airdialogue/airdialogue_data.tar.gz",
61
- "air_dialogue_kb": "https://storage.googleapis.com/airdialogue/airdialogue_data.tar.gz",
62
- }
63
 
64
 
65
  # TODO: Name of the dataset usually match the script name with CamelCase instead of snake_case
66
  class AirDialogue(datasets.GeneratorBasedBuilder):
67
  """TODO: Short description of my dataset."""
68
 
69
- VERSION = datasets.Version("1.1.0")
70
 
71
  # This is an example of a dataset with multiple configurations.
72
  # If you don't want/need to define several sub-sets in your dataset,
@@ -183,14 +180,13 @@ class AirDialogue(datasets.GeneratorBasedBuilder):
183
  # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLs
184
  # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
185
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
186
- my_urls = _URLs[self.config.name]
187
- archive = dl_manager.download(my_urls)
188
  if self.config.name == "air_dialogue_data":
189
- train = "airdialogue_data/airdialogue/train_data.json"
190
- dev = "airdialogue_data/airdialogue/dev_data.json"
191
  else:
192
- train = "airdialogue_data/airdialogue/train_kb.json"
193
- dev = "airdialogue_data/airdialogue/dev_kb.json"
194
 
195
  return [
196
  datasets.SplitGenerator(
 
56
  # TODO: Add link to the official dataset URLs here
57
  # The HuggingFace dataset library don't host the datasets but only point to the original files
58
  # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
59
+ _URL = "https://storage.googleapis.com/airdialogue/airdialogue_data.tar.gz"
 
 
 
60
 
61
 
62
  # TODO: Name of the dataset usually match the script name with CamelCase instead of snake_case
63
  class AirDialogue(datasets.GeneratorBasedBuilder):
64
  """TODO: Short description of my dataset."""
65
 
66
+ VERSION = datasets.Version("1.3.0")
67
 
68
  # This is an example of a dataset with multiple configurations.
69
  # If you don't want/need to define several sub-sets in your dataset,
 
180
  # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLs
181
  # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
182
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
183
+ archive = dl_manager.download(_URL)
 
184
  if self.config.name == "air_dialogue_data":
185
+ train = "airdialogue_data_1.3/airdialogue/train_data.json"
186
+ dev = "airdialogue_data_1.3/airdialogue/dev_data.json"
187
  else:
188
+ train = "airdialogue_data_1.3/airdialogue/train_kb.json"
189
+ dev = "airdialogue_data_1.3/airdialogue/dev_kb.json"
190
 
191
  return [
192
  datasets.SplitGenerator(