pytorch_geometric
pytorch_geometric copied to clipboard
Add `reverse` support in `aggregation_resolver`
This PR added the reverse
support in aggregation_resolver
to resolve Aggregation
to strings. This will keep message_and_aggregate
functionality intact if an aggr is FUSE_AGGRS
but passed with Aggregation
instance.
Addresses https://github.com/pyg-team/pytorch_geometric/issues/4712.
Codecov Report
Merging #5084 (1b132c1) into master (412ae53) will decrease coverage by
1.88%
. The diff coverage is83.87%
.
@@ Coverage Diff @@
## master #5084 +/- ##
==========================================
- Coverage 84.86% 82.97% -1.89%
==========================================
Files 332 332
Lines 18304 18324 +20
==========================================
- Hits 15534 15205 -329
- Misses 2770 3119 +349
Impacted Files | Coverage Δ | |
---|---|---|
torch_geometric/nn/conv/message_passing.py | 98.84% <75.00%> (+<0.01%) |
:arrow_up: |
torch_geometric/nn/resolver.py | 87.67% <85.18%> (-6.33%) |
:arrow_down: |
torch_geometric/nn/models/dimenet_utils.py | 0.00% <0.00%> (-75.52%) |
:arrow_down: |
torch_geometric/nn/models/dimenet.py | 14.51% <0.00%> (-53.00%) |
:arrow_down: |
torch_geometric/nn/conv/utils/typing.py | 81.25% <0.00%> (-17.50%) |
:arrow_down: |
torch_geometric/profile/profile.py | 32.94% <0.00%> (-15.30%) |
:arrow_down: |
torch_geometric/nn/inits.py | 67.85% <0.00%> (-7.15%) |
:arrow_down: |
torch_geometric/transforms/add_self_loops.py | 94.44% <0.00%> (-5.56%) |
:arrow_down: |
torch_geometric/io/tu.py | 93.90% <0.00%> (-2.44%) |
:arrow_down: |
... and 10 more |
Help us with your feedback. Take ten seconds to tell us how you rate us.
This seems important, but I wonder if we could just define the equivalent aggregation on the aggregation class itself.
class SomeAggregation:
@property
def resolve_str():
return "some_aggregation"
Not sure if its better. Just a thoguht.
This seems important, but I wonder if we could just define the equivalent aggregation on the aggregation class itself.
class SomeAggregation: @property def resolve_str(): return "some_aggregation"
Not sure if its better. Just a thoguht.
Thanks for the suggestion. I am open to this solution as well.
Sorry for the delay in review.