hpcaitech / FastFold

Optimizing AlphaFold Training and Inference on GPU Clusters
Apache License 2.0
557 stars 86 forks source link

TypeError in fastfold/data/templates.py #136

Closed kashyapchhatbar closed 1 year ago

kashyapchhatbar commented 1 year ago
Traceback (most recent call last):
  File "~FastFold/inference.py", line 527, in <module>
    main(args)
  File "~FastFold/inference.py", line 153, in main
    inference_multimer_model(args)
  File "~FastFold/inference.py", line 268, in inference_multimer_model
    feature_dict = data_processor.process_fasta(
  File "~FastFold/fastfold/data/data_pipeline.py", line 1165, in process_fasta
    chain_features = self._process_single_chain(
  File "~FastFold/fastfold/data/data_pipeline.py", line 1114, in _process_single_chain
    chain_features = self._monomer_data_pipeline.process_fasta(
  File "~FastFold/fastfold/data/data_pipeline.py", line 942, in process_fasta
    template_features = make_template_features(
  File "~FastFold/fastfold/data/data_pipeline.py", line 76, in make_template_features
    templates_result = template_featurizer.get_templates(
  File "~FastFold/fastfold/data/templates.py", line 1163, in get_templates
    result = _process_single_hit(
  File "~FastFold/fastfold/data/templates.py", line 885, in _process_single_hit
    "%s_%s (sum_probs: %.2f, rank: %d): feature extracting errors: "
TypeError: must be real number, not NoneType

Since the update of alphafold v2.3, the upstream alphafold/data/templates.py has changed. The lines linked below are now required to avoid this error

https://github.com/deepmind/alphafold/blob/a3941673e90b8d1d75c60b16a4b3707ebf7ba527/alphafold/data/templates.py#L763-L764

kashyapchhatbar commented 1 year ago

For a temporary workaround, I am using 0561c05782fa73da66ac9e050828ee05e52139af

Is there a plan to merge all the alphafold v2.3 updates to FastFold and provide a new release?

Shenggan commented 1 year ago

Thank you for your contribution. This issue will be fixed in #137 . We will merge update_dataset in after merging the habana branch, and we will release the new version at the end of this month or early next month.