Skip to content

Commit

Permalink
update wikikgv2 evaluator
Browse files Browse the repository at this point in the history
  • Loading branch information
hyren committed Oct 28, 2022
1 parent dd9e3d0 commit ec19e8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ogb/lsc/wikikg90mv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def save_test_submission(self, input_dict: Dict, dir_path: str, mode: str):
t_pred_top10 = input_dict['h,r->t']['t_pred_top10']

for i in range(len(t_pred_top10)):
assert len(pd.unique(t_pred_top10[i])) == len(t_pred_top10[i]), 'Found duplicated tail prediction for some triplets!'
assert len(pd.unique(t_pred_top10[i][t_pred_top10[i] >= 0])) == len(t_pred_top10[i][t_pred_top10[i] >= 0]), 'Found duplicated tail prediction for some triplets!'

if mode == 'test-dev':
assert t_pred_top10.shape == (15000, 10)
Expand Down

0 comments on commit ec19e8b

Please sign in to comment.