Skip to content

Commit

Permalink
Fix typing inconsistency in return of _check_input (#9564)
Browse files Browse the repository at this point in the history
Fix #9560

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
MFairley and pre-commit-ci[bot] authored Aug 7, 2024
1 parent c809173 commit 6eac972
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed metaclass conflict in `Dataset` ([#8999](https://github.com/pyg-team/pytorch_geometric/pull/8999))
- Fixed import errors on `MessagePassing` modules with nested inheritance ([#8973](https://github.com/pyg-team/pytorch_geometric/pull/8973))
- Fixed bug in multi XPU training ([#9456](https://github.com/pyg-team/pytorch_geometric/pull/9456))
- Fixed TorchScript compilation error for `MessagePassing._check_input` on older torch versions ([#9564](https://github.com/pyg-team/pytorch_geometric/pull/9564))

### Removed

Expand Down
2 changes: 1 addition & 1 deletion torch_geometric/nn/conv/message_passing.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def __repr__(self) -> str:
def _check_input(
self,
edge_index: Union[Tensor, SparseTensor],
size: Optional[Tuple[int, int]],
size: Optional[Tuple[Optional[int], Optional[int]]],
) -> List[Optional[int]]:

if not torch.jit.is_scripting() and isinstance(edge_index, EdgeIndex):
Expand Down

0 comments on commit 6eac972

Please sign in to comment.