Fixed bug: entity ranking used test data instead of validation data
@@ -24,9 +24,11 @@ class EntityRankingJob(EvaluationJob):
self.train_po = self.dataset.index_1toN("train", "po")
self.valid_sp = self.dataset.index_1toN("valid", "sp")
self.valid_po = self.dataset.index_1toN("valid", "po")
+ if self.eval_data == "test":
+ self.triples = self.dataset.test
+ else:
self.triples = self.dataset.valid
if self.eval_data == "test" or self.filter_valid_with_test:
- self.triples = self.dataset.test
self.test_sp = self.dataset.index_1toN("test", "sp")
self.test_po = self.dataset.index_1toN("test", "po")
