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
e0c7f959
Unverified
Commit
e0c7f959
authored
Oct 31, 2023
by
LastWhisper
Committed by
GitHub
Oct 31, 2023
Browse files
[GraphBolt] Update the param to make the code consistent (#6491)
parent
9e26c8e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
examples/sampling/graphbolt/lightning/node_classification.py
examples/sampling/graphbolt/lightning/node_classification.py
+1
-1
examples/sampling/graphbolt/node_classification.py
examples/sampling/graphbolt/node_classification.py
+5
-5
No files found.
examples/sampling/graphbolt/lightning/node_classification.py
View file @
e0c7f959
...
@@ -211,7 +211,7 @@ if __name__ == "__main__":
...
@@ -211,7 +211,7 @@ if __name__ == "__main__":
dataset
=
gb
.
BuiltinDataset
(
"ogbn-products"
).
load
()
dataset
=
gb
.
BuiltinDataset
(
"ogbn-products"
).
load
()
datamodule
=
DataModule
(
datamodule
=
DataModule
(
dataset
,
dataset
,
[
1
5
,
10
,
5
],
[
1
0
,
10
,
10
],
args
.
batch_size
,
args
.
batch_size
,
args
.
num_workers
,
args
.
num_workers
,
)
)
...
...
examples/sampling/graphbolt/node_classification.py
View file @
e0c7f959
...
@@ -330,20 +330,20 @@ def parse_args():
...
@@ -330,20 +330,20 @@ def parse_args():
help
=
"Learning rate for optimization."
,
help
=
"Learning rate for optimization."
,
)
)
parser
.
add_argument
(
parser
.
add_argument
(
"--batch-size"
,
type
=
int
,
default
=
256
,
help
=
"Batch size for training."
"--batch-size"
,
type
=
int
,
default
=
1024
,
help
=
"Batch size for training."
)
)
parser
.
add_argument
(
parser
.
add_argument
(
"--num-workers"
,
"--num-workers"
,
type
=
int
,
type
=
int
,
default
=
4
,
default
=
0
,
help
=
"Number of workers for data loading."
,
help
=
"Number of workers for data loading."
,
)
)
parser
.
add_argument
(
parser
.
add_argument
(
"--fanout"
,
"--fanout"
,
type
=
str
,
type
=
str
,
default
=
"1
5
,10,
5
"
,
default
=
"1
0
,10,
10
"
,
help
=
"Fan-out of neighbor sampling. It is IMPORTANT to keep len(fanout)"
help
=
"Fan-out of neighbor sampling. It is IMPORTANT to keep len(fanout)"
" identical with the number of layers in your model. Default: 1
5
,10,
5
"
,
" identical with the number of layers in your model. Default: 1
0
,10,
10
"
,
)
)
parser
.
add_argument
(
parser
.
add_argument
(
"--device"
,
"--device"
,
...
@@ -377,7 +377,7 @@ def main(args):
...
@@ -377,7 +377,7 @@ def main(args):
num_classes
=
dataset
.
tasks
[
0
].
metadata
[
"num_classes"
]
num_classes
=
dataset
.
tasks
[
0
].
metadata
[
"num_classes"
]
in_size
=
features
.
size
(
"node"
,
None
,
"feat"
)[
0
]
in_size
=
features
.
size
(
"node"
,
None
,
"feat"
)[
0
]
hidden_size
=
128
hidden_size
=
256
out_size
=
num_classes
out_size
=
num_classes
model
=
SAGE
(
in_size
,
hidden_size
,
out_size
)
model
=
SAGE
(
in_size
,
hidden_size
,
out_size
)
...
...
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