rvashurin commited on
Commit
027d08a
1 Parent(s): c89ca98

Use train dictionary for val data

Browse files
Files changed (1) hide show
  1. wikidata_rubq.py +4 -1
wikidata_rubq.py CHANGED
@@ -130,7 +130,10 @@ class WikidataRuBQ(datasets.GeneratorBasedBuilder):
130
  return name
131
 
132
  def _generate_examples(self, filepath, lang, vocab_path, split, data_dir):
133
- direct_path = os.path.join(data_dir, f"{split}_direct_vocab_wikidata_en.pkl")
 
 
 
134
 
135
  with open(direct_path, 'rb') as handle:
136
  direct_vocab = pickle.load(handle)
 
130
  return name
131
 
132
  def _generate_examples(self, filepath, lang, vocab_path, split, data_dir):
133
+ if split == 'test':
134
+ direct_path = os.path.join(data_dir, f"test_direct_vocab_wikidata_en.pkl")
135
+ else:
136
+ direct_path = os.path.join(data_dir, f"train_direct_vocab_wikidata_en.pkl")
137
 
138
  with open(direct_path, 'rb') as handle:
139
  direct_vocab = pickle.load(handle)