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

[GNN] Reference implementation for GNN node classification #700

Merged
merged 10 commits into from
Mar 21, 2024

Conversation

LiSu
Copy link
Contributor

@LiSu LiSu commented Feb 5, 2024

In this PR we (Alibaba, Intel & Nvidia) propose a GNN training benchmark, which is a multi-class node classification task in a heterogenous graph using the IGB Heterogeneous Dataset named IGBH-Full. The task is carried out using a GAT model based on the Relational Graph Attention Networks paper.

@LiSu LiSu requested a review from a team as a code owner February 5, 2024 08:23
Copy link

github-actions bot commented Feb 5, 2024

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@LiSu
Copy link
Contributor Author

LiSu commented Feb 5, 2024

recheck

@LiSu LiSu marked this pull request as draft February 5, 2024 08:30
pip install torch==1.13.0+cu117 torchvision==0.14.0+cu117 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu117
pip install torch_geometric
pip install --no-index torch_scatter torch_sparse -f https://data.pyg.org/whl/torch-1.13.0+cu117.html
pip install graphlearn-torch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we have a library version pinned here so that we can reproduce the exact results even after a few months / years? This would also apply for all other libraries, such as torch_geometric in line 14.

Additionally, it would be very helpful for users if we can integrate these into a Dockerfile, so that all they need to do is to run docker build -f Dockerfile . instead of manually following all the steps.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added guidelines for building Docker image using the Dockerfile

@LiSu LiSu changed the title [WIP] Reference implementation for GNN node classification Reference implementation for GNN node classification Feb 20, 2024
@LiSu LiSu marked this pull request as ready for review February 20, 2024 06:37
parser.add_argument("--random_seed", type=int, default='42')
parser.add_argument('--num_classes', type=int, default=2983,
choices=[19, 2983], help='number of classes')
parser.add_argument("--validation_frac", type=float, default=0.025,
Copy link
Contributor

@Elnifio Elnifio Feb 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor correction: the validation fraction should be set as 0.005 - $1 \over 40$ of the original validation dataset size. Since the original validation dataset size is ${1 \over 5} = 0.2$ of the full trainable nodes, we should use ${1 \over 5} \times {1 \over 40} = {1 \over 200} = 0.005$ of the full trainable nodes, instead of ${1 \over 40} = 0.025$ of the full trainable nodes, so that the eval cost would be at most 10% for the most basic single-node configuration, similar to other benchmarks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the correction!

@LiSu LiSu changed the title Reference implementation for GNN node classification [GNN] Reference implementation for GNN node classification Feb 21, 2024
@Elnifio
Copy link
Contributor

Elnifio commented Feb 21, 2024

Is it possible to also update the file name from gnn_node_classification to graph_neural_network so that the folder name refers to the domain name (GNN) but not the overly detailed task name (node classification), which is similar to all other benchmarks?

@LiSu
Copy link
Contributor Author

LiSu commented Feb 22, 2024

Is it possible to also update the file name from gnn_node_classification to graph_neural_network so that the folder name refers to the domain name (GNN) but not the overly detailed task name (node classification), which is similar to all other benchmarks?

The folder is renamed as graph_neural_network

@Elnifio
Copy link
Contributor

Elnifio commented Mar 14, 2024

As discussed in the MLLogging PR, could we also add gradient accumulation step (1 in our current case) and optimizer name (Adam in our case) to MLLog outputs?

… log outputs

Committed-by: LiSu from Dev container
@LiSu
Copy link
Contributor Author

LiSu commented Mar 14, 2024

As discussed in the MLLogging PR, could we also add gradient accumulation step (1 in our current case) and optimizer name (Adam in our case) to MLLog outputs?

Added gradient accumulation step and optimizer name to MLLog outputs ;-)

@Elnifio
Copy link
Contributor

Elnifio commented Mar 20, 2024

As discussed in the MLLogging PR, could we also add gradient accumulation step (1 in our current case) and optimizer name (Adam in our case) to MLLog outputs?

Added gradient accumulation step and optimizer name to MLLog outputs ;-)

Just noticed that the checker is asking for "adam" instead of "Adam". Could we have this small fix checked in so that the reference is consistent with the compliance checker?

Committed-by: LiSu from Dev container
@LiSu
Copy link
Contributor Author

LiSu commented Mar 21, 2024

As discussed in the MLLogging PR, could we also add gradient accumulation step (1 in our current case) and optimizer name (Adam in our case) to MLLog outputs?

Added gradient accumulation step and optimizer name to MLLog outputs ;-)

Just noticed that the checker is asking for "adam" instead of "Adam". Could we have this small fix checked in so that the reference is consistent with the compliance checker?

Fixed in the last commit.

@nv-rborkar nv-rborkar merged commit 2d0e7ae into mlcommons:master Mar 21, 2024
1 check passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants