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

Add Aggregation.set_validate_args method to toggle validation of dim_size #5290

Merged
merged 2 commits into from
Aug 29, 2022

Conversation

hatemhelal
Copy link
Contributor

@hatemhelal hatemhelal commented Aug 27, 2022

Proposal for #5289

This change should default to running the eager validation but allows a user to override this behaviour when using different PyTorch execution backend.

@codecov
Copy link

codecov bot commented Aug 27, 2022

Codecov Report

Merging #5290 (02daea7) into master (615d0b6) will decrease coverage by 1.94%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5290      +/-   ##
==========================================
- Coverage   85.27%   83.33%   -1.95%     
==========================================
  Files         337      337              
  Lines       18639    18641       +2     
==========================================
- Hits        15895    15535     -360     
- Misses       2744     3106     +362     
Impacted Files Coverage Δ
torch_geometric/nn/aggr/base.py 96.22% <100.00%> (+0.48%) ⬆️
torch_geometric/nn/models/dimenet_utils.py 0.00% <0.00%> (-75.52%) ⬇️
torch_geometric/nn/models/dimenet.py 14.51% <0.00%> (-53.00%) ⬇️
torch_geometric/profile/profile.py 37.89% <0.00%> (-26.32%) ⬇️
torch_geometric/nn/conv/utils/typing.py 81.25% <0.00%> (-17.50%) ⬇️
torch_geometric/nn/inits.py 67.85% <0.00%> (-7.15%) ⬇️
torch_geometric/transforms/add_self_loops.py 94.44% <0.00%> (-5.56%) ⬇️
torch_geometric/nn/resolver.py 88.88% <0.00%> (-5.56%) ⬇️
torch_geometric/loader/hgt_loader.py 90.56% <0.00%> (-3.78%) ⬇️
torch_geometric/io/tu.py 93.90% <0.00%> (-2.44%) ⬇️
... and 10 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@rusty1s rusty1s left a comment

Choose a reason for hiding this comment

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

Wow, this is super cool! Thanks for making PyG better :)

@rusty1s rusty1s merged commit 6dc4cf4 into pyg-team:master Aug 29, 2022
@rusty1s rusty1s linked an issue Aug 29, 2022 that may be closed by this pull request
@hatemhelal hatemhelal deleted the skip-validate-option branch August 29, 2022 19:27
rusty1s added a commit that referenced this pull request Dec 7, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
This patch removes `Aggregation.set_validate_args` that was added in
#5290 and instead defers the checking of the index values when an
exception is thrown by the aggregation. This works in both the standard
eager-PyTorch mode as well in a compiled context.

Co-authored-by: Matthias Fey <matthias.fey@tu-dortmund.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make validation of dim_size argument in Aggregation interface optional
2 participants