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

Perforated AI OGBN Example #9926

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1157d80
checking in graphSage example original file from the branch I was usi…
RorryB Dec 17, 2024
7446d41
removed PAI and _original from first PR. moved _scheduler to replace…
RorryB Dec 18, 2024
6f66d89
rebase with master
RorryB Dec 19, 2024
df7fa07
updated changelog
RorryB Jan 8, 2025
b5cebd9
Merge branch 'master' into master
RorryB Jan 8, 2025
b856e0c
added perforated ai ogbn example
RorryB Jan 8, 2025
0496528
updated changelog and intro comment
RorryB Jan 8, 2025
2b63eb7
Merge branch 'pyg-team:master' into master
RorryB Jan 16, 2025
437170e
updated formatting
RorryB Jan 16, 2025
e877f58
added perforated ai ogbn example
RorryB Jan 8, 2025
e4a7825
updated changelog and intro comment
RorryB Jan 8, 2025
e6da90f
Merge branch 'paiExample' of https://github.com/PerforatedAI/pytorch_…
RorryB Jan 16, 2025
d8ce9c8
Merge branch 'pyg-team:master' into master
RorryB Jan 17, 2025
60e3444
formatting updates
RorryB Jan 19, 2025
d77f5b3
updated comment
RorryB Jan 19, 2025
637628a
Merge branch 'pyg-team:master' into master
RorryB Jan 19, 2025
a291449
added perforated ai ogbn example
RorryB Jan 8, 2025
4f7bc6d
updated changelog and intro comment
RorryB Jan 8, 2025
38dd700
added perforated ai ogbn example
RorryB Jan 8, 2025
5d0253c
Merge branch 'paiExample' of https://github.com/PerforatedAI/pytorch_…
RorryB Jan 19, 2025
3b25b56
formatting 1
RorryB Jan 19, 2025
0415e96
formatting 2
RorryB Jan 19, 2025
59c7d41
formatting 3
RorryB Jan 19, 2025
ac56feb
formatting 4
RorryB Jan 19, 2025
e13c37a
formatting 5
RorryB Jan 19, 2025
97e711e
formatting 6
RorryB Jan 19, 2025
adee77d
formatting 6
RorryB Jan 19, 2025
e94442c
formatting 7
RorryB Jan 19, 2025
85a8aae
formatting 8
RorryB Jan 19, 2025
d3931e9
reverting README
RorryB Jan 19, 2025
b20e47d
formatting 9
RorryB Jan 19, 2025
20a5481
formatting 10
RorryB Jan 19, 2025
c4935a8
Merge branch 'pyg-team:master' into paiExample
RorryB Feb 3, 2025
cd66d5d
updated examples README
RorryB Feb 6, 2025
f4ee7ea
Merge branch 'pyg-team:master' into paiExample
RorryB Feb 6, 2025
890f00d
Merge branch 'master' into paiExample
RorryB Feb 12, 2025
12d372d
Merge branch 'master' into paiExample
RorryB Feb 14, 2025
9e9a52d
Merge branch 'master' into paiExample
RorryB Feb 21, 2025
8989bd0
Merge branch 'master' into paiExample
RorryB Feb 24, 2025
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
formatting 7
  • Loading branch information
RorryB committed Jan 19, 2025
commit e94442cade7666b13d4a814104bd4e6aac92e373
17 changes: 4 additions & 13 deletions examples/ogbn_train_perforatedai.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from torch_geometric.loader import NeighborLoader
from torch_geometric.nn.models import GAT, GraphSAGE
from torch_geometric.utils import to_undirected

'''
PAI README:

Expand Down Expand Up @@ -111,15 +110,11 @@
)
parser.add_argument('-e', '--epochs', type=int, default=50000)
parser.add_argument('--num_layers', type=int, default=3)
parser.add_argument('--num_heads',
type=int,
default=2,
parser.add_argument('--num_heads', type=int, default=2,
help='number of heads for GAT model.')
parser.add_argument('-b', '--batch_size', type=int, default=1024)
parser.add_argument('--num_workers', type=int, default=12)
parser.add_argument('--fan_out',
type=int,
default=10,
parser.add_argument('--fan_out', type=int, default=10,
help='number of neighbors in each layer')
parser.add_argument('--hidden_channels', type=int, default=256)
# Set to 0 to run this code without Perforated Backpropagation happening.
Expand Down Expand Up @@ -268,7 +263,6 @@ def test(loader: NeighborLoader) -> float:
# This is the main PAI function that converts everything under the hood
# to allow for the addition of dendrites
model = PBU.convertNetwork(model)

'''
This initializes the Perforated Backpropagation Tracker object which
organizes communication between each individual Dendrite convereted
Expand All @@ -280,10 +274,8 @@ def test(loader: NeighborLoader) -> float:
doingPB, # Can set to False if you want to do just normal training
saveName=args.
saveName, # Change the save name for different parameter runs
maximizingScore=
True, # True for maximizing score, False for minimizing loss
maximizingScore=True, # True for max score, False for min loss
makingGraphs=True) # True if you want graphs to be saved

'''
# This can be added to pick up where it left off if something crashes.
print('pre loading')
Expand Down Expand Up @@ -355,8 +347,7 @@ def test(loader: NeighborLoader) -> float:
trainingComplete - if the tracker has determined that this is the final
model to use
'''
outputs = PBG.pbTracker.addValidationScore(
val_acc, model, args.saveName)
outputs = PBG.pbTracker.addValidationScore(val_acc, model, args.saveName)
model, improved, restructured, trainingComplete = outputs
# Need to setup GPU settings of the new model
model = model.to(device)
Expand Down
Loading