HannesStark / EquiBind

EquiBind: geometric deep learning for fast predictions of the 3D structure in which a small molecule binds to a protein
MIT License
469 stars 110 forks source link

FileNotFoundError: train_arguments.yaml #23

Closed Tonylac77 closed 2 years ago

Tonylac77 commented 2 years ago

Hi I am attempting to the run this software on an Ubuntu Virtual Machine. Setting up the environment went smoothly. However when I try to run the inference.py script I get the following error:

Traceback (most recent call last):
  File "/home/tony/Documents/EquiBind-main/inference.py", line 460, in <module>
    with open(os.path.join(os.path.dirname(args.checkpoint), 'train_arguments.yaml'), 'r') as arg_file:
FileNotFoundError: [Errno 2] No such file or directory: 'runs/flexible_self_docking/train_arguments.yaml'

It seems like the concatenation of the path for the train_arguments.yaml is not working correctly, hopefully this is quite an easy fix though?

Thanks in advance for your help.

HannesStark commented 2 years ago

Hi, You should be running the inference.py file in the project directory. So run python inference.py while being in the EquiBind-main directory. Are you already doing that?

Tonylac77 commented 2 years ago

Sorry, that wasn't the case. It is running now, or at least attempting the docking however I get this other error now:


[2022-05-02 14:56:08.603350] [ Using Seed :  1  ]

Processing paDXS: complex 1 of 1
Trying to load /home/tony/Documents/Equibind/paDXS/paDXS_ligand.sdf
Docking the receptor /home/tony/Documents/Equibind/paDXS/paDXS_protein.pdb
To the ligand /home/tony/Documents/Equibind/paDXS/paDXS_ligand.sdf
Traceback (most recent call last):
  File "inference.py", line 473, in <module>
    inference_from_files(args)
  File "inference.py", line 376, in inference_from_files
    lig_graph.to(device), rec_graph.to(device), geometry_graph, complex_names=[name], epoch=0)
  File "/usr/anaconda3/envs/equibind/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/tony/Documents/EquiBind-main/models/equibind.py", line 1020, in forward
    outputs = self.iegmn(lig_graph, rec_graph, geometry_graph, complex_names, epoch)
  File "/usr/anaconda3/envs/equibind/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/tony/Documents/EquiBind-main/models/equibind.py", line 824, in forward
    geometry_graph=geometry_graph
  File "/usr/anaconda3/envs/equibind/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/tony/Documents/EquiBind-main/models/equibind.py", line 471, in forward
    lig_graph.update_all(self.update_x_moment_lig, fn.mean('m', 'x_update'))
  File "/usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/heterograph.py", line 4895, in update_all
    ndata = core.message_passing(g, message_func, reduce_func, apply_node_func)
  File "/usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/core.py", line 369, in message_passing
    ndata = invoke_gspmm(g, fn.copy_e(msg, msg), rfunc, edata=msgdata)
  File "/usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/core.py", line 332, in invoke_gspmm
    z = op(graph, x)
  File "/usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/ops/spmm.py", line 191, in func
    return gspmm(g, 'copy_rhs', reduce_op, None, x)
  File "/usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/ops/spmm.py", line 77, in gspmm
    lhs_data, rhs_data)
  File "/usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/backend/pytorch/sparse.py", line 757, in gspmm
    return GSpMM.apply(gidx, op, reduce_op, lhs_data, rhs_data)
  File "/usr/anaconda3/envs/equibind/lib/python3.7/site-packages/torch/cuda/amp/autocast_mode.py", line 94, in decorate_fwd
    return fwd(*args, **kwargs)
  File "/usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/backend/pytorch/sparse.py", line 126, in forward
    out, (argX, argY) = _gspmm(gidx, op, reduce_op, X, Y)
  File "/usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/sparse.py", line 233, in _gspmm
    arg_e_nd)
  File "dgl/_ffi/_cython/./function.pxi", line 287, in dgl._ffi._cy3.core.FunctionBase.__call__
  File "dgl/_ffi/_cython/./function.pxi", line 232, in dgl._ffi._cy3.core.FuncCall
  File "dgl/_ffi/_cython/./base.pxi", line 155, in dgl._ffi._cy3.core.CALL
dgl._ffi.base.DGLError: [14:56:11] /opt/dgl/src/array/cpu/./spmm_blocking_libxsmm.h:267: Failed to generate libxsmm kernel for the SpMM operation!
Stack trace:
  [bt] (0) /usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/libdgl.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x4f) [0x7f143f1b0bdf]
  [bt] (1) /usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/libdgl.so(void dgl::aten::cpu::SpMMRedopCsrOpt<int, float, dgl::aten::cpu::op::CopyRhs<float>, dgl::aten::cpu::op::Add<float> >(dgl::BcastOff const&, dgl::aten::CSRMatrix const&, dgl::runtime::NDArray, dgl::runtime::NDArray, dgl::runtime::NDArray, dgl::runtime::NDArray, dgl::runtime::NDArray)+0x3bc) [0x7f143f3e410c]
  [bt] (2) /usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/libdgl.so(void dgl::aten::cpu::SpMMSumCsrLibxsmm<int, float, dgl::aten::cpu::op::CopyRhs<float> >(dgl::BcastOff const&, dgl::aten::CSRMatrix const&, dgl::runtime::NDArray, dgl::runtime::NDArray, dgl::runtime::NDArray)+0x73) [0x7f143f3e41b3]
  [bt] (3) /usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/libdgl.so(void dgl::aten::cpu::SpMMSumCsr<int, float, dgl::aten::cpu::op::CopyRhs<float> >(dgl::BcastOff const&, dgl::aten::CSRMatrix const&, dgl::runtime::NDArray, dgl::runtime::NDArray, dgl::runtime::NDArray)+0x146) [0x7f143f40f526]
  [bt] (4) /usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/libdgl.so(void dgl::aten::SpMMCsr<1, int, 32>(std::string const&, std::string const&, dgl::BcastOff const&, dgl::aten::CSRMatrix const&, dgl::runtime::NDArray, dgl::runtime::NDArray, dgl::runtime::NDArray, std::vector<dgl::runtime::NDArray, std::allocator<dgl::runtime::NDArray> >)+0xfeb) [0x7f143f41c2db]
  [bt] (5) /usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/libdgl.so(dgl::aten::SpMM(std::string const&, std::string const&, std::shared_ptr<dgl::BaseHeteroGraph>, dgl::runtime::NDArray, dgl::runtime::NDArray, dgl::runtime::NDArray, std::vector<dgl::runtime::NDArray, std::allocator<dgl::runtime::NDArray> >)+0x1004) [0x7f143f454c54]
  [bt] (6) /usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/libdgl.so(+0x4694a8) [0x7f143f4694a8]
  [bt] (7) /usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/libdgl.so(+0x469a41) [0x7f143f469a41]
  [bt] (8) /usr/anaconda3/envs/equibind/lib/python3.7/site-packages/dgl/libdgl.so(DGLFuncCall+0x48) [0x7f143f4bcc28]

Can't seem to make sense of it, hopefully you have some insight?

HannesStark commented 2 years ago

did you maybe install the CPU/GPU dependencies while not having/having a GPU?

Tonylac77 commented 2 years ago

I will reconfigure the environment just in case but I believe I selected the right yml file

Tonylac77 commented 2 years ago

I set up the environment again and get the same error. I also tried updating all packages in the environment and get further errors. If you have any other ideas let me know?

HannesStark commented 2 years ago

We also discussed this error in issue #3 and mentioned:

I am not sure what exactly causes your error dgl._ffi.base.DGLError: /opt/dgl/src/array/cpu/./spmm_blocking_libxsmm.h:267: Failed to generate libxsmm kernel for the SpMM operation!

But DGL has this issue on it: #https://github.com/dmlc/dgl/issues/3459#issue-1039314106 If that is related to your situation it would be great if you can continue issue #3