Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
0528e90d
Unverified
Commit
0528e90d
authored
Mar 03, 2022
by
Rhett Ying
Committed by
GitHub
Mar 03, 2022
Browse files
[Examples] fix path for load_graph (#3797)
parent
1d80d91a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
5 deletions
+6
-5
examples/pytorch/graphsage/advanced/train_lightning.py
examples/pytorch/graphsage/advanced/train_lightning.py
+1
-1
examples/pytorch/graphsage/advanced/train_lightning_unsupervised.py
...ytorch/graphsage/advanced/train_lightning_unsupervised.py
+1
-1
examples/pytorch/graphsage/advanced/train_sampling_unsupervised.py
...pytorch/graphsage/advanced/train_sampling_unsupervised.py
+1
-1
examples/pytorch/graphsage/dist/partition_graph.py
examples/pytorch/graphsage/dist/partition_graph.py
+2
-1
examples/pytorch/graphsage/distgnn/partition_graph.py
examples/pytorch/graphsage/distgnn/partition_graph.py
+1
-1
No files found.
examples/pytorch/graphsage/advanced/train_lightning.py
View file @
0528e90d
...
@@ -11,7 +11,7 @@ import tqdm
...
@@ -11,7 +11,7 @@ import tqdm
import
glob
import
glob
import
os
import
os
import
sys
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
load_graph
import
load_reddit
,
inductive_split
,
load_ogb
from
torchmetrics
import
Accuracy
from
torchmetrics
import
Accuracy
...
...
examples/pytorch/graphsage/advanced/train_lightning_unsupervised.py
View file @
0528e90d
...
@@ -18,7 +18,7 @@ from pytorch_lightning.callbacks import ModelCheckpoint, Callback
...
@@ -18,7 +18,7 @@ from pytorch_lightning.callbacks import ModelCheckpoint, Callback
from
pytorch_lightning
import
LightningDataModule
,
LightningModule
,
Trainer
from
pytorch_lightning
import
LightningDataModule
,
LightningModule
,
Trainer
from
model
import
SAGE
,
compute_acc_unsupervised
as
compute_acc
from
model
import
SAGE
,
compute_acc_unsupervised
as
compute_acc
import
sys
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
load_graph
import
load_reddit
,
inductive_split
,
load_ogb
class
CrossEntropyLoss
(
nn
.
Module
):
class
CrossEntropyLoss
(
nn
.
Module
):
...
...
examples/pytorch/graphsage/advanced/train_sampling_unsupervised.py
View file @
0528e90d
...
@@ -15,7 +15,7 @@ from torch.nn.parallel import DistributedDataParallel
...
@@ -15,7 +15,7 @@ from torch.nn.parallel import DistributedDataParallel
from
model
import
SAGE
,
compute_acc_unsupervised
as
compute_acc
from
model
import
SAGE
,
compute_acc_unsupervised
as
compute_acc
from
negative_sampler
import
NegativeSampler
from
negative_sampler
import
NegativeSampler
import
sys
import
sys
sys
.
path
.
append
(
'..
/
'
)
sys
.
path
.
append
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
)
)
from
load_graph
import
load_reddit
,
load_ogb
from
load_graph
import
load_reddit
,
load_ogb
class
CrossEntropyLoss
(
nn
.
Module
):
class
CrossEntropyLoss
(
nn
.
Module
):
...
...
examples/pytorch/graphsage/dist/partition_graph.py
View file @
0528e90d
...
@@ -4,7 +4,8 @@ import torch as th
...
@@ -4,7 +4,8 @@ import torch as th
import
argparse
import
argparse
import
time
import
time
import
sys
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
from
load_graph
import
load_reddit
,
load_ogb
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
examples/pytorch/graphsage/distgnn/partition_graph.py
View file @
0528e90d
...
@@ -19,7 +19,7 @@ from statistics import mean
...
@@ -19,7 +19,7 @@ from statistics import mean
import
random
import
random
import
time
import
time
import
argparse
import
argparse
sys
.
path
.
append
(
'..
/
'
)
sys
.
path
.
append
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
)
)
from
load_graph
import
load_ogb
from
load_graph
import
load_ogb
import
dgl
import
dgl
from
dgl.data
import
load_data
from
dgl.data
import
load_data
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment