Skip to content

Commit

Permalink
Merge branch 'master' into tagdataset/add-llm-exp-pred
Browse files Browse the repository at this point in the history
  • Loading branch information
xnuohz authored Jan 22, 2025
2 parents 1f47744 + 47ac818 commit 1ae39ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch_geometric/metrics/link_pred.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ def _compute(self, data: LinkPredMetricData) -> Tensor:
self.discount,
self.discount.new_full((1, ), fill_value=float('inf')),
])
discount = discount[pos.clamp(max=self.k + 1)]
discount = discount[pos.clamp(max=self.k)]

idcg = scatter( # Apply discount and aggregate:
data.edge_label_weight / discount,
Expand Down

0 comments on commit 1ae39ce

Please sign in to comment.