Skip to content

Commit fbb2a50

Browse files
committed
pyg 2.5.2
1 parent 58c1c62 commit fbb2a50

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend="flit_core.buildapi"
44

55
[project]
66
name="torch_geometric"
7-
version="2.5.1"
7+
version="2.5.2"
88
authors=[
99
{name="Matthias Fey", email="[email protected]"},
1010
]

torch_geometric/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
contrib = LazyLoader('contrib', globals(), 'torch_geometric.contrib')
2323
graphgym = LazyLoader('graphgym', globals(), 'torch_geometric.graphgym')
2424

25-
__version__ = '2.5.1'
25+
__version__ = '2.5.2'
2626

2727
__all__ = [
2828
'EdgeIndex',

torch_geometric/inspector.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,13 +322,15 @@ def collect_param_data(
322322

323323
def get_source(self, cls: Optional[Type] = None) -> str:
324324
r"""Returns the source code of :obj:`cls`."""
325+
from torch_geometric.nn import MessagePassing
326+
325327
cls = cls or self._cls
326328
if cls.__name__ in self._source_dict:
327329
return self._source_dict[cls.__name__]
328-
try:
329-
source = inspect.getsource(cls)
330-
except Exception:
331-
source = ''
330+
if cls in {object, torch.nn.Module, MessagePassing}:
331+
return ''
332+
source = inspect.getsource(cls)
333+
332334
self._source_dict[cls.__name__] = source
333335
return source
334336

0 commit comments

Comments
 (0)