openfold
openfold copied to clipboard
Docker container AttributeError: Did you mean: 'linear_a_p'? when trying to run multimer inference
Hello i build a docker container using the pl_upgrade tagged version of the git, to run openfold on our HPC system, which uses CUDA12. The building of the docker container worked without any problems, but when trying to run the container using singularity (docker is not available on the HPC) i get the following error:
[2024-06-07 10:28:00,003] [INFO] [real_accelerator.py:161:get_accelerator] Setting ds_accelerator to cuda (auto detect)
/fasta_dir/NP_test.fasta contains more than one sequence but multimer mode is not enabled. Skipping...
Traceback (most recent call last):
File "/opt/openfold/run_pretrained_openfold.py", line 493, in <module>
main(args)
File "/opt/openfold/run_pretrained_openfold.py", line 283, in main
for model, output_directory in model_generator:
File "/opt/openfold/openfold/utils/script_utils.py", line 66, in load_models_from_command_line
import_jax_weights_(
File "/opt/openfold/openfold/utils/import_weights.py", line 651, in import_jax_weights_
translations = generate_translation_dict(model, version, is_multimer=("multimer" in version))
File "/opt/openfold/openfold/utils/import_weights.py", line 430, in generate_translation_dict
ems_blocks_params = stacked([ExtraMSABlockParams(b) for b in ems_blocks])
File "/opt/openfold/openfold/utils/import_weights.py", line 430, in <listcomp>
ems_blocks_params = stacked([ExtraMSABlockParams(b) for b in ems_blocks])
File "/opt/openfold/openfold/utils/import_weights.py", line 376, in EvoformerBlockParams
TriMulOutParams(b.pair_stack.tri_mul_out),
File "/opt/openfold/openfold/utils/import_weights.py", line 220, in TriMulOutParams
"projection": lin_param_type(tri_mul.linear_ab_p),
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1695, in __getattr__
raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
AttributeError: 'TriangleMultiplicationOutgoing' object has no attribute 'linear_ab_p'. Did you mean: 'linear_a_p'?
The command i used for starting the run was the following one:
singularity run --nv --bind $INPUT:/fasta_dir --bind /software/databases/alphafold/:/database/alphafold/ --bind /software/all/:/software/all/ --bind /software/databases/alphafold/params/:/openfold/resources/params/ openfold_v2.1.sif \
python3 /opt/openfold/run_pretrained_openfold.py \
/fasta_dir \
/database/alphafold/pdb_mmcif/mmcif_files/ \
--max_template_date 2021-10-10 \
--output_dir $OUTPUT \
--uniref90_database_path /database/alphafold/uniref90/uniref90.fasta \
--mgnify_database_path /database/alphafold/mgnify/mgy_clusters_2022_05.fa \
--pdb_seqres_database_path /database/alphafold/pdb_seqres_pdv_seqres.txt \
--uniref30_database_path /database/alphafold/uniref/UniRef30_2021_03 \
--uniprot_database_path /database/alphafold/uniprot/uniprot.fasta \
--bfd_database_path /database/alphafold/bfd/bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt \
--jackhmmer_binary_path /software/all/HMMER/3.3.2-gompi-2022a/bin/jackhmmer \
--hhblits_binary_path /software/all/HH-suite/3.3.0-gompi-2022a/bin/hhblits \
--hmmbuild_binary_path /software/all/HMMER/3.3.2-gompi-2022a/bin/hmmbuild \
--hmmsearch_binary_path /software/all/HMMER/3.3.2-gompi-2022a/bin/hmmsearch \
--kalign_binary_path /software/all/Kalign/3.3.5-GCCcore-11.3.0/bin/kalign \
--jax_param_path /openfold/resources/params/params_model_1_multimer_v3.npz \
--model_device "cuda:0" \
Does anyone know how this problem can be solved? It appears to be an actual problem within the code, rather than an input file problem.