Skip to content

Commit

Permalink
[Examples] fix path for load_graph (dmlc#3797)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhett-Ying authored Mar 3, 2022
1 parent 1d80d91 commit 0528e90
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/pytorch/graphsage/advanced/train_lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import glob
import os
import sys
sys.path.append('../')
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from load_graph import load_reddit, inductive_split, load_ogb

from torchmetrics import Accuracy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from pytorch_lightning import LightningDataModule, LightningModule, Trainer
from model import SAGE, compute_acc_unsupervised as compute_acc
import sys
sys.path.append('../')
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from load_graph import load_reddit, inductive_split, load_ogb

class CrossEntropyLoss(nn.Module):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from model import SAGE, compute_acc_unsupervised as compute_acc
from negative_sampler import NegativeSampler
import sys
sys.path.append('../')
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from load_graph import load_reddit, load_ogb

class CrossEntropyLoss(nn.Module):
Expand Down
3 changes: 2 additions & 1 deletion examples/pytorch/graphsage/dist/partition_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import argparse
import time
import sys
sys.path.append('../')
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from load_graph import load_reddit, load_ogb

if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/graphsage/distgnn/partition_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import random
import time
import argparse
sys.path.append('../')
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from load_graph import load_ogb
import dgl
from dgl.data import load_data
Expand Down

0 comments on commit 0528e90

Please sign in to comment.