DingLuoXMU / ConBAP

code for ConBAP
MIT License
6 stars 0 forks source link

error #1

Closed cengyangjie closed 2 months ago

cengyangjie commented 3 months ago

作者您好,我在运行predict_single.py 是遇到了一些索引上的错误,不知道如何去解决它。希望作者能给我提供一些帮助

Original Traceback (most recent call last): File "/nas2_public/soft/Miniforge-pypy3-23.11.0-0/envs/ConBAP_01/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop data = fetcher.fetch(index) File "/nas2_public/soft/Miniforge-pypy3-23.11.0-0/envs/ConBAP_01/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 52, in fetch return self.collate_fn(data) File "/nas2_public/yangjie_data/New/2.ConBAP/ConBAP-main/supervised/dataset_ConBAP.py", line 272, in collate_fn graphA = batchA[i] File "/nas2_public/soft/Miniforge-pypy3-23.11.0-0/envs/ConBAP_01/lib/python3.9/site-packages/torch_geometric/data/batch.py", line 148, in getitem return self.get_example(idx) File "/nas2_public/soft/Miniforge-pypy3-23.11.0-0/envs/ConBAP_01/lib/python3.9/site-packages/torch_geometric/data/batch.py", line 96, in get_example data = separate( File "/nas2_public/soft/Miniforge-pypy3-23.11.0-0/envs/ConBAP_01/lib/python3.9/site-packages/torch_geometric/data/separate.py", line 38, in separate data_store[attr] = _separate(attr, batch_store[attr], idx, slices, File "/nas2_public/soft/Miniforge-pypy3-23.11.0-0/envs/ConBAP_01/lib/python3.9/site-packages/torch_geometric/data/separate.py", line 64, in _separate start, end = int(slices[idx]), int(slices[idx + 1]) IndexError: index 2 is out of bounds for dimension 0 with size 2

patjiang commented 3 months ago

Hello! Can you provide your input as well? It can help with debug

DingLuoXMU commented 3 months ago

Hello, is the second column of your .CSV file set correctly? If you are using it to predict your own data set, please use predict.py. The affinities in the second column need to be all set to 0. As mentioned above, can you provide your input files?

cengyangjie commented 3 months ago

Thank you for your reply. I use the raw data you provided on github. The same error still occurs after I set the affinity of the toy_set.csv file to 0. In addition, I use the proteins and ligands provided by CASF2016 (more than 20 complexes such as 1a30 and 1h22) and get the same error.

DingLuoXMU commented 3 months ago

Can you provide all the package version in your conda environment?

cengyangjie commented 3 months ago

anyio==4.3.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 asttokens @ file:///opt/conda/conda-bld/asttokens_1646925590279/work async-lru==2.0.4 attrs==23.2.0 Babel==2.14.0 backcall @ file:///home/ktietz/src/ci/backcall_1611930011877/work beautifulsoup4==4.12.3 biopython==1.83 bleach==6.1.0 Bottleneck @ file:///croot/bottleneck_1707864210935/work Brotli @ file:///home/conda/feedstock_root/build_artifacts/brotli-split_1695989787169/work certifi @ file:///home/conda/feedstock_root/build_artifacts/certifi_1707022139797/work/certifi cffi==1.16.0 charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1698833585322/work colorama @ file:///croot/colorama_1672386526460/work comm @ file:///croot/comm_1709322850197/work contourpy @ file:///croot/contourpy_1700583582875/work cycler @ file:///tmp/build/80754af9/cycler_1637851556182/work debugpy @ file:///croot/debugpy_1690905042057/work decorator @ file:///opt/conda/conda-bld/decorator_1643638310831/work defusedxml==0.7.1 exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work executing @ file:///opt/conda/conda-bld/executing_1646925071911/work fastjsonschema==2.19.1 fonttools==4.25.0 fqdn==1.5.1 googledrivedownloader==0.4 h11==0.14.0 httpcore==1.0.5 httpx==0.27.0 idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1701026962277/work importlib-metadata @ file:///croot/importlib_metadata-suite_1704813515092/work importlib-resources @ file:///croot/importlib_resources-suite_1704281845041/work ipykernel @ file:///croot/ipykernel_1705933831282/work ipython @ file:///croot/ipython_1694181358621/work ipywidgets==8.1.2 isodate==0.6.1 isoduration==20.11.0 jedi @ file:///tmp/build/80754af9/jedi_1644297102865/work Jinja2==3.1.3 joblib @ file:///croot/joblib_1685113087166/work json5==0.9.24 jsonpointer==2.4 jsonschema==4.21.1 jsonschema-specifications==2023.12.1 jupyter==1.0.0 jupyter-console==6.6.3 jupyter-events==0.10.0 jupyter-lsp==2.2.4 jupyter_client @ file:///croot/jupyter_client_1699455897726/work jupyter_core @ file:///croot/jupyter_core_1698937308754/work jupyter_server==2.13.0 jupyter_server_terminals==0.5.3 jupyterlab==4.1.5 jupyterlab_pygments==0.3.0 jupyterlab_server==2.25.4 jupyterlab_widgets==3.0.10 kiwisolver @ file:///croot/kiwisolver_1672387140495/work MarkupSafe==2.1.5 matplotlib @ file:///croot/matplotlib-suite_1693812469450/work matplotlib-inline @ file:///opt/conda/conda-bld/matplotlib-inline_1662014470464/work mistune==3.0.2 mkl-fft @ file:///croot/mkl_fft_1695058164594/work mkl-random @ file:///croot/mkl_random_1695059800811/work mkl-service==2.4.0 munkres==1.1.4 nbclient==0.10.0 nbconvert==7.16.3 nbformat==5.10.3 nest-asyncio @ file:///croot/nest-asyncio_1708532673751/work networkx @ file:///croot/networkx_1690561992265/work notebook==7.1.2 notebook_shim==0.2.4 numexpr @ file:///croot/numexpr_1696515281613/work numpy @ file:///work/mkl/numpy_and_numpy_base_1682953417311/work overrides==7.7.0 packaging @ file:///croot/packaging_1710807400464/work pandas==1.4.4 pandocfilters==1.5.1 parso @ file:///opt/conda/conda-bld/parso_1641458642106/work pexpect @ file:///tmp/build/80754af9/pexpect_1605563209008/work pickleshare @ file:///tmp/build/80754af9/pickleshare_1606932040724/work pillow @ file:///croot/pillow_1707233021655/work platformdirs @ file:///croot/platformdirs_1692205439124/work ply==3.11 Pmw @ file:///home/conda/feedstock_root/build_artifacts/pmw_1695847164449/work prometheus_client==0.20.0 prompt-toolkit @ file:///croot/prompt-toolkit_1704404351921/work psutil @ file:///opt/conda/conda-bld/psutil_1656431268089/work ptyprocess @ file:///tmp/build/80754af9/ptyprocess_1609355006118/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl pure-eval @ file:///opt/conda/conda-bld/pure_eval_1646925070566/work pycparser==2.22 Pygments @ file:///croot/pygments_1684279966437/work pymol==2.5.0 pyparsing @ file:///opt/conda/conda-bld/pyparsing_1661452539315/work PyQt5==5.15.10 PyQt5-sip @ file:///croot/pyqt-split_1698769088074/work/pyqt_sip PySocks @ file:///home/conda/feedstock_root/build_artifacts/pysocks_1661604839144/work python-dateutil @ file:///tmp/build/80754af9/python-dateutil_1626374649649/work python-json-logger==2.0.7 pytz @ file:///croot/pytz_1695131579487/work PyYAML==6.0.1 pyzmq @ file:///croot/pyzmq_1705605076900/work qtconsole==5.5.1 QtPy==2.4.1 rdflib==7.0.0 rdkit==2022.9.5 referencing==0.34.0 requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1684774241324/work rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rpds-py==0.18.0 scikit-learn @ file:///croot/scikit-learn_1694788527225/work scipy @ file:///home/conda/feedstock_root/build_artifacts/scipy_1604204601456/work seaborn @ file:///croot/seaborn_1673479180098/work Send2Trash==1.8.2 sip @ file:///croot/sip_1698675935381/work six @ file:///tmp/build/80754af9/six_1644875935023/work sniffio==1.3.1 soupsieve==2.5 stack-data @ file:///opt/conda/conda-bld/stack_data_1646927590127/work terminado==0.18.1 threadpoolctl @ file:///Users/ktietz/demo/mc3/conda-bld/threadpoolctl_1629802263681/work tinycss2==1.2.1 tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work torch==1.12.1 torch-cluster @ file:///home/rxdcpu/torch-1.12.1%2Bcu116/torch_cluster-1.6.0%2Bpt112cu116-cp39-cp39-linux_x86_64.whl#sha256=6a01cd6b7452d8029d41812fb1683ee483e6a68e82490ab8681c73d90db8b2a5 torch-scatter @ file:///home/rxdcpu/torch-1.12.1%2Bcu116/torch_scatter-2.1.0%2Bpt112cu116-cp39-cp39-linux_x86_64.whl#sha256=b8d8f271e848655061de2d21a4d4903f8a0a7824e57acf3e2b4e52694758fcff torch-sparse @ file:///home/rxdcpu/torch-1.12.1%2Bcu116/torch_sparse-0.6.16%2Bpt112cu116-cp39-cp39-linux_x86_64.whl#sha256=8661a72231ee0d008a79f9b528786500ed76f7020d63347a0ea6ab3079937b79 torch-spline-conv @ file:///home/rxdcpu/torch-1.12.1%2Bcu116/torch_spline_conv-1.2.1%2Bpt112cu116-cp39-cp39-linux_x86_64.whl#sha256=9d7e2d4734e8d3115c2db6f4e2e31ad23d20c228c87421ab3d05353e8ebd5cda torch_geometric==2.0.3 torchaudio==0.12.1 torchvision==0.13.1 tornado @ file:///croot/tornado_1696936946304/work tqdm @ file:///opt/conda/conda-bld/tqdm_1647339053476/work traitlets @ file:///croot/traitlets_1671143879854/work types-python-dateutil==2.9.0.20240316 typing_extensions @ file:///home/conda/feedstock_root/build_artifacts/typing_extensions_1708904622550/work tzdata @ file:///croot/python-tzdata_1690578112552/work uri-template==1.3.0 urllib3 @ file:///home/conda/feedstock_root/build_artifacts/urllib3_1708239446578/work wcwidth @ file:///Users/ktietz/demo/mc3/conda-bld/wcwidth_1629357192024/work webcolors==1.13 webencodings==0.5.1 websocket-client==1.7.0 widgetsnbextension==4.0.10 yacs==0.1.8

DingLuoXMU commented 3 months ago

I found a bug,please install pyg==2.3.0 and try it again

cengyangjie commented 3 months ago

Thank you very much for your help! I have solved this problem, and I'm sorry for taking your time to help me. If given the opportunity, I look forward to further academic exchanges with you.