-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Graph Sage OGBN Example with Scheduler #9877
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ng, that file with an added scheduler, and the scheduler file with Perforated Backpropagation
puririshi98
approved these changes
Jan 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for addressing my offline comments, this looks good now
puririshi98
pushed a commit
that referenced
this pull request
Apr 22, 2025
This PR is to include an example of how Perforated Backpropagation can be used to improve pytorch_geometric models. It adds on the [previous PR](#9877) which added a scheduler, both of which improve upon the test accuracy of the original ogbn_train.py example. Perforated Backpropagation empowers each neuron in a PyTorch network with Dendrite nodes. These nodes are outside the network, but able to inform the neurons inside the network to make better decisions by leveraging a covariance based learning rule to reduce residual error. The PyTorch add-on combines modern neuroscience with modern software to create neural networks that are smarter, smaller, and more accurate. Run docker from torch_geometric directory docker run --gpus all -i --shm-size=8g -v .:/pai -w /pai -t nvcr.io/nvidia/pyg:24.11-py3 /bin/bash Within Docker pip install -e . pip install safetensors pip install perforatedai Ran original with: CUDA_VISIBLE_DEVICES=0 python examples/ogbn_train.py --dataset ogbn-products --batch_size 128 --model sage Results: Test Accuracy: 77.06% Run PAI with: PAIEMAIL=YourEmail PAITOKEN=YourToken CUDA_VISIBLE_DEVICES=0 python ogbn_train_perforatedai.py --dataset ogbn-products --batch_size 128 --saveName ogbnPAI --model sage Results: Test Accuracy: 78.05% Update: Example updated to include base usage with default SGFormer. Original: CUDA_VISIBLE_DEVICES=0 python ogbn_train.py --dataset ogbn-products --batch_size 128 Results: Test Accuracy: 80.86% PAI: PAIEMAIL=YourEmail PAITOKEN=YourToken CUDA_VISIBLE_DEVICES=0 python ogbn_train_perforatedai.py --dataset ogbn-products --batch_size 128 --saveName ogbnPAI Results: Test Accuracy: 81.27% --------- Co-authored-by: Akihiro Nitta <nitta@akihironitta.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is to update the ogbn example to have a scheduler, improving performance from a test accuracy of 75.52% to 77.19%