Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: No edges and no nodes #237

Open
srilekha1993 opened this issue Jun 22, 2024 · 3 comments
Open

ValueError: No edges and no nodes #237

srilekha1993 opened this issue Jun 22, 2024 · 3 comments

Comments

@srilekha1993
Copy link

Hi @jsilter,
while running inference.py for pdbbind dataset on 363 complexes mentioned in testset_csv.csv sometimes throwing the below error

48it [49:44, 25.37s/it]--- Logging error ---
Traceback (most recent call last):
File "/home/hgx/omics/srilekhx/DiffDock-1.1.2/inference.py", line 261, in main
data_list, confidence = sampling(data_list=data_list, model=model,
File "/home/hgx/omics/srilekhx/DiffDock-1.1.2/utils/sampling.py", line 115, in sampling
tr_score, rot_score, tor_score = model(mod_complex_graph_batch)[:3]
File "/data/sudarsh2/miniconda3/envs/diff_L_new_rec/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/data/sudarsh2/miniconda3/envs/diff_L_new_rec/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1541, in call_impl
return forward_call(*args, **kwargs)
File "/home/hgx/omics/srilekhx/DiffDock-1.1.2/models/cg_model.py", line 318, in forward
rec_edge_index, rec_edge_attr, rec_edge_sh, rec_edge_weight = self.embedding(data)
File "/home/hgx/omics/srilekhx/DiffDock-1.1.2/models/cg_model.py", line 290, in embedding
rec_node_attr = self.rec_emb_layers[l](rec_node_attr, data['receptor', 'receptor'].edge_index, edge_attr, rec_edge_sh, edge_weight=rec_edge_weight)
File "/data/sudarsh2/miniconda3/envs/diff_L_new_rec/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/data/sudarsh2/miniconda3/envs/diff_L_new_rec/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
return forward_call(*args, **kwargs)
File "/home/hgx/omics/srilekhx/DiffDock-1.1.2/models/tensor_layers.py", line 311, in forward
raise ValueError("No edges and no nodes")
ValueError: No edges and no nodes

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/data/sudarsh2/miniconda3/envs/diff_L_new_rec/lib/python3.9/logging/init.py", line 1083, in emit
msg = self.format(record)
File "/data/sudarsh2/miniconda3/envs/diff_L_new_rec/lib/python3.9/logging/init.py", line 927, in format
return fmt.format(record)
File "/data/sudarsh2/miniconda3/envs/diff_L_new_rec/lib/python3.9/logging/init.py", line 663, in format
record.message = record.getMessage()
File "/data/sudarsh2/miniconda3/envs/diff_L_new_rec/lib/python3.9/logging/init.py", line 367, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "/data/sudarsh2/miniconda3/envs/diff_L_new_rec/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/data/sudarsh2/miniconda3/envs/diff_L_new_rec/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/hgx/omics/srilekhx/DiffDock-1.1.2/inference.py", line 319, in
main(_args)
File "/home/hgx/omics/srilekhx/DiffDock-1.1.2/inference.py", line 303, in main
logger.warning("Failed on", orig_complex_graph["name"], e)
Message: 'Failed on'
Arguments: (['6ott'], ValueError('No edges and no nodes'))

Please let me know what might be the issue for getting that error on inference.py on pdbbind dataset

@zshivji
Copy link

zshivji commented Jul 11, 2024

I am getting the same error...any suggestions?

@tkella47
Copy link

tkella47 commented Jul 13, 2024

I think the error comes from a cropping function

crop_beyond(batch, tr_sigma * 3 + model_args.crop_beyond, model_args.all_atoms)

@navvye
Copy link

navvye commented Sep 8, 2024

Got the same error on the HF space (https://huggingface.co/spaces/reginabarzilaygroup/DiffDock-Web)


ValueError: No edges and no nodes

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/appuser/micromamba/envs/diffdock/lib/python3.9/logging/__init__.py", line 1083, in emit
    msg = self.format(record)
  File "/home/appuser/micromamba/envs/diffdock/lib/python3.9/logging/__init__.py", line 927, in format
    return fmt.format(record)
  File "/home/appuser/micromamba/envs/diffdock/lib/python3.9/logging/__init__.py", line 663, in format
    record.message = record.getMessage()
  File "/home/appuser/micromamba/envs/diffdock/lib/python3.9/logging/__init__.py", line 367, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "/home/appuser/DiffDock/inference.py", line 318, in <module>
    main(_args)
  File "/home/appuser/DiffDock/inference.py", line 302, in main
    logger.warning("Failed on", orig_complex_graph["name"], e)
Message: 'Failed on'
Arguments: (['complex_0'], ValueError('No edges and no nodes'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants