LECI icon indicating copy to clipboard operation
LECI copied to clipboard

raise IndexError(f"Could not access signature for function " IndexError: Could not access signature for function 'explain_message'. Did you forget to inspect it?

Open FD-Star opened this issue 11 months ago • 7 comments

Hello, I encountered the following problem during the code replication process, including when using CIGA. Could you please take a look at how to solve it? Thank you very much.

FD-Star avatar Feb 18 '25 01:02 FD-Star

File "/root/miniconda3/bin/goodtg", line 33, in sys.exit(load_entry_point('graph-ood', 'console_scripts', 'goodtg')()) File "/root/autodl-tmp/LECI/GOOD/kernel/main.py", line 69, in goodtg main() File "/root/autodl-tmp/LECI/GOOD/kernel/main.py", line 60, in main pipeline.load_task() File "/root/autodl-tmp/LECI/GOOD/kernel/pipelines/basic_pipeline.py", line 230, in load_task self.train() File "/root/autodl-tmp/LECI/GOOD/kernel/pipelines/basic_pipeline.py", line 112, in train train_stat = self.train_batch(data, pbar) File "/root/autodl-tmp/LECI/GOOD/kernel/pipelines/basic_pipeline.py", line 70, in train_batch model_output = self.model(data=data, edge_weight=edge_weight, ood_algorithm=self.ood_algorithm) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/root/autodl-tmp/LECI/GOOD/networks/models/LECIGNN.py", line 118, in forward lc_logits = self.lc_classifier(self.lc_gnn(*args, **kwargs)) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/root/autodl-tmp/LECI/GOOD/networks/models/GINs.py", line 90, in forward out_readout = self.encoder(x, edge_index, edge_attr, batch, batch_size, **kwargs) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/root/autodl-tmp/LECI/GOOD/networks/models/GINvirtualnode.py", line 185, in forward node_repr = self.get_node_repr(x, edge_index, edge_attr, batch, batch_size, **kwargs) File "/root/autodl-tmp/LECI/GOOD/networks/models/GINvirtualnode.py", line 217, in get_node_repr post_conv = batch_norm(conv(post_conv, edge_index, edge_attr)) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/root/autodl-tmp/LECI/GOOD/networks/models/GINs.py", line 344, in forward out = self.propagate(edge_index, x=x, edge_attr=edge_attr, size=size) File "/root/miniconda3/lib/python3.8/site-packages/torch_geometric/nn/conv/message_passing.py", line 554, in propagate explain_msg_kwargs = self.inspector.collect_param_data( File "/root/miniconda3/lib/python3.8/site-packages/torch_geometric/inspector.py", line 312, in collect_param_data for param in self.get_params(func): File "/root/miniconda3/lib/python3.8/site-packages/torch_geometric/inspector.py", line 205, in get_params return list(self.get_param_dict(func, exclude).values()) File "/root/miniconda3/lib/python3.8/site-packages/torch_geometric/inspector.py", line 191, in get_param_dict return self.get_signature(func, exclude).param_dict File "/root/miniconda3/lib/python3.8/site-packages/torch_geometric/inspector.py", line 150, in get_signature raise IndexError(f"Could not access signature for function " IndexError: Could not access signature for function 'explain_message'. Did you forget to inspect it?

FD-Star avatar Feb 18 '25 01:02 FD-Star

Can you provide all environment related information?

CM-BF avatar Feb 18 '25 02:02 CM-BF

Thank you, my environment related information is here:

FD-Star avatar Feb 18 '25 07:02 FD-Star

Package Version Location


absl-py 1.0.0 aiohappyeyeballs 2.4.0 aiohttp 3.10.5 aiosignal 1.2.0 alabaster 0.7.13 antlr4-python3-runtime 4.9.3 anyio 3.4.0 argon2-cffi 21.1.0 async-timeout 4.0.3 attrs 24.2.0 Babel 2.9.1 backcall 0.2.0 beautifulsoup4 4.12.3 bleach 4.1.0 brotlipy 0.7.0 cachetools 4.2.4 captum 0.2.0 certifi 2024.8.30 cffi 1.14.6 chardet 4.0.0 cilog 1.2.3 cloudpickle 3.1.0 conda 4.10.3 conda-package-handling 1.7.3 coverage 7.6.1 cryptography 3.4.7 cvxopt 1.3.2 cycler 0.11.0 debugpy 1.5.1 decorator 5.1.0 defusedxml 0.7.1 dive-into-graphs 1.1.0 docutils 0.17.1 entrypoints 0.3 et-xmlfile 2.0.0 execnet 2.1.1 filelock 3.16.1 fonttools 4.28.2 frozenlist 1.4.0 fsspec 2024.6.1 future 0.18.3 gdown 5.2.0 google-auth 2.3.3 google-auth-oauthlib 0.4.6 graph-ood 1.0.1 /root/autodl-tmp/LECI grpcio 1.42.0 h5py 3.11.0 hydra-core 1.3.2 idna 2.10 imagesize 1.4.1 importlib-metadata 4.8.2 importlib-resources 5.4.0 iniconfig 2.0.0 ipykernel 6.5.1 ipython 7.29.0 ipython-genutils 0.2.0 ipywidgets 7.6.5 jedi 0.18.1 jinja2 3.1.4 joblib 1.4.2 json5 0.9.6 jsonschema 4.2.1 jupyter-client 7.1.0 jupyter-core 4.9.1 jupyter-server 1.12.0 jupyterlab 3.2.4 jupyterlab-language-pack-zh-CN 3.2.post2 jupyterlab-pygments 0.1.2 jupyterlab-server 2.8.2 jupyterlab-widgets 1.0.2 kiwisolver 1.3.2 littleutils 0.2.4 llvmlite 0.41.1 Markdown 3.3.6 MarkupSafe 2.1.3 matplotlib 3.5.2 matplotlib-inline 0.1.3 mistune 0.8.4 mkl-fft 1.3.1 mkl-random 1.2.2 mkl-service 2.4.0 mpmath 1.3.0 multidict 6.0.4 munch 2.5.0 mypy-extensions 1.0.0 nbclassic 0.3.4 nbclient 0.5.9 nbconvert 6.3.0 nbformat 5.1.3 nest-asyncio 1.5.1 networkx 2.8 notebook 6.4.6 numba 0.58.0 numpy 1.21.6 oauthlib 3.1.1 ogb 1.3.6 omegaconf 2.3.0 openpyxl 3.1.5 outdated 0.2.2 packaging 21.3 pandas 2.0.3 pandocfilters 1.5.0 parso 0.8.2 pexpect 4.8.0 pickleshare 0.7.5 Pillow 8.4.0 pip 21.1.3 pluggy 1.5.0 prometheus-client 0.12.0 prompt-toolkit 3.0.22 protobuf 3.20.1 psutil 6.1.0 ptyprocess 0.7.0 py 1.11.0 pyasn1 0.4.8 pyasn1-modules 0.2.8 pycosat 0.6.3 pycparser 2.20 pygments 2.18.0 pynvml 11.5.3 pyOpenSSL 20.0.1 pyparsing 3.1.2 pyrsistent 0.18.0 pyscf 2.7.0 PySocks 1.7.1 pytest 7.1.2 pytest-cov 3.0.0 pytest-forked 1.6.0 pytest-xdist 2.5.0 python-dateutil 2.8.2 pytz 2021.3 PyYAML 6.0.2 pyzmq 22.3.0 rdkit-pypi 2022.9.4 requests 2.25.1 requests-oauthlib 1.3.0 rsa 4.8 ruamel-yaml-conda 0.15.100 ruamel.yaml 0.17.21 ruamel.yaml.clib 0.2.8 scikit-learn 1.3.0 scipy 1.9.3 Send2Trash 1.8.0 setuptools 59.5.0 setuptools-scm 6.3.2 shap 0.44.1 six 1.16.0 slicer 0.0.7 sniffio 1.2.0 snowballstemmer 2.2.0 soupsieve 2.6 sphinx 5.3.0 sphinx-rtd-theme 1.0.0 sphinxcontrib-applehelp 1.0.4 sphinxcontrib-devhelp 1.0.2 sphinxcontrib-htmlhelp 2.0.1 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.5 supervisor 4.2.2 sympy 1.13.3 tabulate 0.9.0 tensorboard 2.8.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.0 terminado 0.12.1 testpath 0.5.0 threadpoolctl 3.5.0 tomli 1.2.2 torch 1.12.1 torch-geometric 2.5.2 torch-scatter 2.0.9 torch-sparse 0.6.13 torchvision 0.11.1+cu113 tornado 6.1 tqdm 4.64.0 traitlets 5.1.1 typed-argument-parser 1.7.2 typing-extensions 4.11.0 typing-inspect 0.9.0 tzdata 2024.2 urllib3 1.26.6 wcwidth 0.2.5 webencodings 0.5.1 websocket-client 1.2.1 Werkzeug 2.0.2 wheel 0.36.2 widgetsnbextension 3.5.2 yarl 1.11.0 zipp 3.6.0

FD-Star avatar Feb 18 '25 07:02 FD-Star

Seems like a compatibility issue. How about trying these versions: PyTorch (==1.10.1), PyG (==2.0.3)?

CM-BF avatar Feb 18 '25 17:02 CM-BF

Thank you for your suggestion, I will give it a try.

FD-Star avatar Feb 19 '25 01:02 FD-Star

Thank you for your suggestion. I have resolved this issue after downgrading the version.

FD-Star avatar Feb 22 '25 08:02 FD-Star