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

Model 2 error #67

Open
vvishwesh opened this issue Jun 25, 2023 · 1 comment
Open

Model 2 error #67

vvishwesh opened this issue Jun 25, 2023 · 1 comment

Comments

@vvishwesh
Copy link

Am trying to use --model 2. But I get the following error

(omegafoldenv) (omegafoldenv) C:\Workspace\PEPTIDES>omegafold --num_cycle 1 --subbatch_size 8 --device cuda --weights_file release1.pt --model 2 1a4t_B.fasta TEST
INFO:root:Loading weights from release1.pt
INFO:root:Constructing OmegaFold
Traceback (most recent call last):
  File "C:\Software\anaconda3\envs\omegafoldenv\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Software\anaconda3\envs\omegafoldenv\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Software\anaconda3\envs\omegafoldenv\Scripts\omegafold.exe\__main__.py", line 7, in <module>
  File "C:\Software\anaconda3\envs\omegafoldenv\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "C:\Software\anaconda3\envs\omegafoldenv\lib\site-packages\omegafold\__main__.py", line 53, in main
    model.load_state_dict(state_dict)
  File "C:\Software\anaconda3\envs\omegafoldenv\lib\site-packages\torch\nn\modules\module.py", line 1604, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for OmegaFold:
        Missing key(s) in state_dict: "recycle_embedder.embed_struct.linear_z_weights", "recycle_embedder.embed_struct.linear_z_bias", "recycle_embedder.embed_struct.aa_embedding.weight", "recycle_embedder.embed_struct.dist_bin_embedding.weight", "recycle_embedder.embed_struct.dist_bin_embedding.bias", "recycle_embedder.embed_struct.rough_dist_bin_embedding.weight", "recycle_embedder.embed_struct.rough_dist_bin_embedding.bias", "recycle_embedder.embed_struct.dist_bin_linear.weight", "recycle_embedder.embed_struct.dist_bin_linear.bias", "recycle_embedder.embed_struct.rough_dist_bin_linear.weight", "recycle_embedder.embed_struct.rough_dist_bin_linear.bias", "recycle_embedder.embed_struct.pos_bin_embedding.weight", "recycle_embedder.embed_struct.pos_bin_embedding.bias", "recycle_embedder.embed_struct.pos_linear.weight", "recycle_embedder.embed_struct.pos_linear.bias".
@YoelShoshan
Copy link

@vvishwesh you are mixing up version 1 of the checkpoint (--weights_file release1.pt) while asking for model architecture version 2 (--model 2)

Your solutions are:

  1. Only use "--model 2" and drop the "--weights_file release1.pt"
  2. Download release2.pt and change your command to
    omegafold --num_cycle 1 --subbatch_size 8 --device cuda --weights_file release1.pt --model 2 1a4t_B.fasta TEST

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

2 participants