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

[Feature] get_attention parameter in GlobalAttentionPooling #3837

Merged
merged 6 commits into from
Mar 24, 2022

Conversation

decoherencer
Copy link
Contributor

@decoherencer decoherencer commented Mar 13, 2022

Description

@mufeili Added get_attention optional parameter to return node attention weights from GlobalAttentionPooling
from the https://discuss.dgl.ai/t/about-globalattentionpooling/2766

Checklist

  • The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented
  • To the best of my knowledge, examples are either not affected by this change,
    or have been fixed to be compatible with this change

Changes

  • optional parameter addition in forward

@dgl-bot
Copy link
Collaborator

dgl-bot commented Mar 13, 2022

To trigger regression tests:

  • @dgl-bot run [instance-type] [which tests] [compare-with-branch];
    For example: @dgl-bot run g4dn.4xlarge all dmlc/master or @dgl-bot run c5.9xlarge kernel,api dmlc/master

@mufeili mufeili self-requested a review March 14, 2022 15:30
Copy link
Member

@mufeili mufeili left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@mufeili
Copy link
Member

mufeili commented Mar 15, 2022

@decoherencer Could you fix these issues caught by CI?

python/dgl/nn/pytorch/glob.py:458:0: C0303: Trailing whitespace (trailing-whitespace)
python/dgl/nn/pytorch/glob.py:1268:0: C0304: Final newline missing (missing-final-newline)

You need to remove the extra empty spaces at the end of L458 and add a new empty line after L1268.

@decoherencer
Copy link
Contributor Author

decoherencer commented Mar 16, 2022

Sorry. I got into this weird state with my pip, which I only noticed now.
I tried with lint packages locally now. Thanks.
And instead of noticing the line number in CI issues for trailing whitespace, I removed the final newline in the last last last commit 😅

@mufeili
Copy link
Member

mufeili commented Mar 16, 2022

Sorry. I got into this weird state with my pip, which I only noticed now. I tried with lint packages locally now. Thanks. And instead of noticing the line number in CI issues for trailing whitespace, I removed the final newline in the last commit 😅

@decoherencer No worries. There is something wrong with the CI. If you don't mind, I can directly modify your code when CI is back. Thanks.

@decoherencer
Copy link
Contributor Author

decoherencer commented Mar 16, 2022

If you don't mind, I can directly modify your code when CI is back. Thanks.

Sure. I pushed lint fix, it seems to have passed in last CI lint checks before it crashed on cpu build, you can modify if any other errors

@mufeili mufeili merged commit 12e97c5 into dmlc:master Mar 24, 2022
@mufeili
Copy link
Member

mufeili commented Mar 24, 2022

@decoherencer Thanks for your patience. The PR has been merged.

@decoherencer
Copy link
Contributor Author

nice. Looking forward to help more

@mufeili
Copy link
Member

mufeili commented Mar 25, 2022

Thanks. That will be great!

@decoherencer decoherencer deleted the globalattpool branch March 27, 2022 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants