-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Example][Refactor] Refactor GCN example #4160
Conversation
To trigger regression tests:
|
680f120
to
15c922c
Compare
CI-test keeps failing since I removed gcn.py file, which includes the gcn module definition. Please let me know if it is desired to keep gcn module file separately. @jermainewang @mufeili |
Apart from the inline comments, I feel we could further simplify the example:
@mufeili what do you think? |
I agree. |
43157d6
to
8d4a1f8
Compare
help="Dataset name ('cora', 'citeseer', 'pubmed').") | ||
args = parser.parse_args() | ||
print(f'Training with DGL intrinsic graph convolution module.') | ||
|
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.
You might want to first create a transform object and then pass it to the dataset classes below. Also you need to compose RemoveSelfLoop
and AddSelfLoop
as some datasets have self-loops at the beginning for some of the nodes.
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.
Yes, I can do that (creating a transform object transform=AddSelfLoop()
and pass trans. obj to dataset class)
I think, by default (allow_duplicate=False
), AddSelfLoop
includes RemoveSelfLoop
to remove duplicated self-loops, if I understand the doc correctly (https://docs.dgl.ai/generated/dgl.transforms.AddSelfLoop.html).
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.
I see. Thanks.
Overall a great job, I've left some minor comments. |
@chang-l Can you add your name in |
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.
I'm good.
@yaox12 Thanks for reminding. I just added. |
* Refactor GCN example * Refactor GCN based on graphsage * Readme update * Minor update * update * Remove user-defined GCN implementation * README update * Update * Update CONTRIBUTORS.md * update task_example_test Co-authored-by: Xin Yao <xiny@nvidia.com>
Description
Referring to: #4186, this PR is for refactoring GCN example. Only single GPU is implemented.
Please note that we have two gcn implementations, one for DGL module (train.py) and one of customized module (gcn_mp.py). To properly show file diff for reviewing, I have not renamed gcn_mp.py. It needs to be addressed before merge.
Checklist
Please feel free to remove inapplicable items for your PR.
or have been fixed to be compatible with this change
Changes
Tests
Included in the updated README file.