Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s committed Jul 8, 2024
1 parent 4a03485 commit c42271d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### Changed

- Allow optional but untyped tensors in `MessagePassing` ([#9494](https://github.com/pyg-team/pytorch_geometric/pull/9494))
- Added support for modifying `filename` of the stored partitioned file in `ClusterLoader` ([#9448](https://github.com/pyg-team/pytorch_geometric/pull/9448))
- Support other than two-dimensional inputs in `AttentionalAggregation` ([#9433](https://github.com/pyg-team/pytorch_geometric/pull/9433))
- Improved model performance of the `examples/ogbn_papers_100m.py` script ([#9386](https://github.com/pyg-team/pytorch_geometric/pull/9386), [#9445](https://github.com/pyg-team/pytorch_geometric/pull/9445))
Expand Down
14 changes: 14 additions & 0 deletions torch_geometric/nn/conv/collect.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,20 @@ def {{collect_name}}(
else:
raise NotImplementedError

{%- if 'edge_weight' in collect_param_dict and
collect_param_dict['edge_weight'].type_repr.endswith('Tensor') %}
if torch.jit.is_scripting():
assert edge_weight is not None
{%- elif 'edge_attr' in collect_param_dict and
collect_param_dict['edge_attr'].type_repr.endswith('Tensor') %}
if torch.jit.is_scripting():
assert edge_attr is not None
{%- elif 'edge_type' in collect_param_dict and
collect_param_dict['edge_type'].type_repr.endswith('Tensor') %}
if torch.jit.is_scripting():
assert edge_type is not None
{%- endif %}

# Collect user-defined arguments:
{%- for name in collect_param_dict %}
{%- if (name.endswith('_i') or name.endswith('_j')) and
Expand Down

0 comments on commit c42271d

Please sign in to comment.