From 6f66cd4a4dc8dcf61cb529ecdee6b4a8003e5aa6 Mon Sep 17 00:00:00 2001 From: rusty1s Date: Mon, 23 Mar 2020 09:52:09 +0100 Subject: [PATCH 1/3] added collate_dgl to __init__ --- ogb/graphproppred/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ogb/graphproppred/__init__.py b/ogb/graphproppred/__init__.py index 8e66896c..db0b58f7 100644 --- a/ogb/graphproppred/__init__.py +++ b/ogb/graphproppred/__init__.py @@ -8,5 +8,6 @@ try: from .dataset_dgl import DglGraphPropPredDataset + from .dataset_dgl import collate_dgl except ImportError: pass From a1f2c049f28c16d1500956bd45bb4e088e4e5335 Mon Sep 17 00:00:00 2001 From: Matthias Fey Date: Mon, 23 Mar 2020 09:53:22 +0100 Subject: [PATCH 2/3] Update main_pyg.py --- examples/graphproppred/mol/main_pyg.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/graphproppred/mol/main_pyg.py b/examples/graphproppred/mol/main_pyg.py index 30372f83..58e1466c 100644 --- a/examples/graphproppred/mol/main_pyg.py +++ b/examples/graphproppred/mol/main_pyg.py @@ -11,10 +11,7 @@ ### importing OGB -### for loading dataset -from ogb.graphproppred.dataset_pyg import PygGraphPropPredDataset -### for evaluation -from ogb.graphproppred import Evaluator +from ogb.graphproppred import PygGraphPropPredDataset, Evaluator cls_criterion = torch.nn.BCEWithLogitsLoss() reg_criterion = torch.nn.MSELoss() @@ -166,4 +163,4 @@ def main(): if __name__ == "__main__": - main() \ No newline at end of file + main() From 3719ada7d809258b843ee1448a7ca4676b75eae6 Mon Sep 17 00:00:00 2001 From: Matthias Fey Date: Mon, 23 Mar 2020 09:53:55 +0100 Subject: [PATCH 3/3] Update main_pyg.py --- examples/graphproppred/ppi/main_pyg.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/graphproppred/ppi/main_pyg.py b/examples/graphproppred/ppi/main_pyg.py index 70c13a3d..0f1ecfba 100644 --- a/examples/graphproppred/ppi/main_pyg.py +++ b/examples/graphproppred/ppi/main_pyg.py @@ -11,10 +11,7 @@ ### importing OGB -### for loading dataset -from ogb.graphproppred.dataset_pyg import PygGraphPropPredDataset -### for evaluation -from ogb.graphproppred import Evaluator +from ogb.graphproppred import PygGraphPropPredDataset, Evaluator multicls_criterion = torch.nn.CrossEntropyLoss() @@ -149,4 +146,4 @@ def main(): if __name__ == "__main__": - main() \ No newline at end of file + main()