Skip to content

Commit

Permalink
pyg 2.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s committed Mar 20, 2024
1 parent 58c1c62 commit fbb2a50
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend="flit_core.buildapi"

[project]
name="torch_geometric"
version="2.5.1"
version="2.5.2"
authors=[
{name="Matthias Fey", email="matthias@pyg.org"},
]
Expand Down
2 changes: 1 addition & 1 deletion torch_geometric/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
contrib = LazyLoader('contrib', globals(), 'torch_geometric.contrib')
graphgym = LazyLoader('graphgym', globals(), 'torch_geometric.graphgym')

__version__ = '2.5.1'
__version__ = '2.5.2'

__all__ = [
'EdgeIndex',
Expand Down
10 changes: 6 additions & 4 deletions torch_geometric/inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,15 @@ def collect_param_data(

def get_source(self, cls: Optional[Type] = None) -> str:
r"""Returns the source code of :obj:`cls`."""
from torch_geometric.nn import MessagePassing

cls = cls or self._cls
if cls.__name__ in self._source_dict:
return self._source_dict[cls.__name__]
try:
source = inspect.getsource(cls)
except Exception:
source = ''
if cls in {object, torch.nn.Module, MessagePassing}:
return ''
source = inspect.getsource(cls)

self._source_dict[cls.__name__] = source
return source

Expand Down

0 comments on commit fbb2a50

Please sign in to comment.