system HF staff commited on
Commit
df94587
1 Parent(s): 57be68f

Update files from the datasets library (from 1.16.0)

Browse files

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

Files changed (1) hide show
  1. id_liputan6.py +5 -7
id_liputan6.py CHANGED
@@ -109,23 +109,21 @@ class IdLiputan6(datasets.GeneratorBasedBuilder):
109
  data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
110
  if not os.path.exists(data_dir):
111
  raise FileNotFoundError(
112
- "{} does not exist. Make sure you insert a manual dir via `datasets.load_dataset('id_liputan6', "
113
- "'canonical', data_dir=...)`. Manual download instructions:\n{}".format(
114
- data_dir, self.manual_download_instructions
115
- )
116
  )
117
  split_generators = [
118
  datasets.SplitGenerator(
119
  name=datasets.Split.VALIDATION,
120
  gen_kwargs={
121
- "article_dir": os.path.join(data_dir, "{}/dev".format(self.config.name)),
122
  "split": "dev",
123
  },
124
  ),
125
  datasets.SplitGenerator(
126
  name=datasets.Split.TEST,
127
  gen_kwargs={
128
- "article_dir": os.path.join(data_dir, "{}/test".format(self.config.name)),
129
  "split": "test",
130
  },
131
  ),
@@ -135,7 +133,7 @@ class IdLiputan6(datasets.GeneratorBasedBuilder):
135
  datasets.SplitGenerator(
136
  name=datasets.Split.TRAIN,
137
  gen_kwargs={
138
- "article_dir": os.path.join(data_dir, "{}/train".format(self.config.name)),
139
  "split": "train",
140
  },
141
  )
 
109
  data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
110
  if not os.path.exists(data_dir):
111
  raise FileNotFoundError(
112
+ f"{data_dir} does not exist. Make sure you insert a manual dir via `datasets.load_dataset('id_liputan6', "
113
+ "'canonical', data_dir=...)`. Manual download instructions:\n{self.manual_download_instructions}"
 
 
114
  )
115
  split_generators = [
116
  datasets.SplitGenerator(
117
  name=datasets.Split.VALIDATION,
118
  gen_kwargs={
119
+ "article_dir": os.path.join(data_dir, f"{self.config.name}/dev"),
120
  "split": "dev",
121
  },
122
  ),
123
  datasets.SplitGenerator(
124
  name=datasets.Split.TEST,
125
  gen_kwargs={
126
+ "article_dir": os.path.join(data_dir, f"{self.config.name}/test"),
127
  "split": "test",
128
  },
129
  ),
 
133
  datasets.SplitGenerator(
134
  name=datasets.Split.TRAIN,
135
  gen_kwargs={
136
+ "article_dir": os.path.join(data_dir, f"{self.config.name}/train"),
137
  "split": "train",
138
  },
139
  )