Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
zechengz committed Sep 30, 2024
1 parent 08bf337 commit 9bc4dea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/gnn_link.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import argparse
import copy
import json
Expand Down Expand Up @@ -245,7 +247,7 @@ def test(src_loader: NeighborLoader, dst_loader: NeighborLoader) -> np.ndarray:
best_val_metric = val_metrics[tune_metric]
state_dict = copy.deepcopy(model.state_dict())

model.load_state_dict(state_dict)
model.load_state_dict(state_dict) # type: ignore
val_pred = test(*eval_loaders_dict["val"])
val_metrics = task.evaluate(val_pred, task.get_table("val"))
print(f"Best Val metrics: {val_metrics}")
Expand Down

0 comments on commit 9bc4dea

Please sign in to comment.