Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GraphBolt][PyG] Link prediction example. #7752

Merged
merged 7 commits into from
Aug 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make more similar to DGL example.
  • Loading branch information
mfbalin committed Aug 27, 2024
commit 222942d46f0069a9f0db2c7970e8fcf00911e913
8 changes: 4 additions & 4 deletions examples/graphbolt/pyg/link_prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def evaluate(model, graph, features, all_nodes_set, valid_set, test_set):
graph,
features,
all_nodes_set,
args.batch_size,
args.eval_batch_size,
[-1],
args.device,
job="infer",
Expand Down Expand Up @@ -370,6 +370,8 @@ def parse_args():
help="Learning rate for optimization.",
)
parser.add_argument("--neg-ratio", type=int, default=1)
parser.add_argument("--train-batch-size", type=int, default=512)
parser.add_argument("--eval-batch-size", type=int, default=1024)
parser.add_argument(
"--batch-size", type=int, default=1024, help="Batch size for training."
)
Expand Down Expand Up @@ -467,8 +469,6 @@ def main():
all_nodes_set = dataset.all_nodes_set
args.fanout = list(map(int, args.fanout.split(",")))

num_classes = dataset.tasks[0].metadata["num_classes"]

if args.gpu_cache_size > 0 and args.feature_device != "cuda":
features._features[("node", None, "feat")] = gb.gpu_cached_feature(
features._features[("node", None, "feat")],
Expand All @@ -479,7 +479,7 @@ def main():
graph=graph,
features=features,
itemset=train_set,
batch_size=args.batch_size,
batch_size=args.train_batch_size,
fanout=args.fanout,
device=args.device,
job="train",
Expand Down
Loading