diff --git a/PyTorch/built-in/others/OpenFold_for_PyTorch/README.md b/PyTorch/built-in/others/OpenFold_for_PyTorch/README.md index 579f762260238866ca3982255e4a67cce08e1e1e..8664ccd3dd91fecffe74cb17fb9ae68dc1025c7f 100644 --- a/PyTorch/built-in/others/OpenFold_for_PyTorch/README.md +++ b/PyTorch/built-in/others/OpenFold_for_PyTorch/README.md @@ -68,7 +68,7 @@ pip install torch==2.1.0 conda install -c bioconda -c conda-forge hhsuite - conda install -c bioconda -c kalign2 + conda install -c bioconda kalign2 conda install -c bioconda -c conda-forge mmseqs2 ``` @@ -153,7 +153,7 @@ 启动8卡训练。 ``` - bash test/train_openfold_8p.sh --data_path xxxx # openfold 8p training + bash test/train_openfold_8p.sh --data_path=xxxx # openfold 8p training ``` - 8卡验证精度 @@ -161,7 +161,7 @@ 启动8卡验证(需跑完训练后进行验证)。 ``` - bash test/val_openfold_8p.sh --data_path xxxx --val_alignment_dir xxxx --val_data_dir xxxx # openfold 8p validation + bash test/val_openfold_8p.sh --data_path=xxxx --val_alignment_dir=xxxx --val_data_dir=xxxx # openfold 8p validation ``` diff --git a/PyTorch/built-in/others/OpenFold_for_PyTorch/test/train_openfold_8p.sh b/PyTorch/built-in/others/OpenFold_for_PyTorch/test/train_openfold_8p.sh index d79e0500a5243bc7aceeddc687e7217674849109..4e456e5aad947a32219903aa50d10da5fe4626c7 100644 --- a/PyTorch/built-in/others/OpenFold_for_PyTorch/test/train_openfold_8p.sh +++ b/PyTorch/built-in/others/OpenFold_for_PyTorch/test/train_openfold_8p.sh @@ -22,8 +22,9 @@ python3 train_openfold.py $data_path/pdb_data/mmcif_files \ $data_path/pdb_data/mmcif_files \ ./output \ "2021-10-10" \ - --train_chaintrain_mmcif_data_cache_path $data_path/pdb_data/chain_data_cache.json \ + --train_chain_data_cache_path $data_path/pdb_data/chain_data_cache.json \ --template_release_dates_cache_path $data_path/pdb_data/mmcif_cache.json \ + --alignment_index_path $data_path/alignment_data/alignment_dbs/alignment_db.index \ --config_preset initial_training \ --seed 42 \ --obsolete_pdbs_file_path $data_path/pdb_data/obsolete.dat \ diff --git a/PyTorch/built-in/others/OpenFold_for_PyTorch/test/val_openfold_8p.sh b/PyTorch/built-in/others/OpenFold_for_PyTorch/test/val_openfold_8p.sh index efab7028c0bcc4601b785c9f392979b69491a90c..2cb89f58baabfc9921f3ba2bfced54d39f5e722b 100644 --- a/PyTorch/built-in/others/OpenFold_for_PyTorch/test/val_openfold_8p.sh +++ b/PyTorch/built-in/others/OpenFold_for_PyTorch/test/val_openfold_8p.sh @@ -26,8 +26,9 @@ python3 train_openfold.py $data_path/pdb_data/mmcif_files \ $data_path/pdb_data/mmcif_files \ ./output \ "2021-10-10" \ - --train_chaintrain_mmcif_data_cache_path $data_path/pdb_data/data_caches/chain_data_cache.json \ + --train_chain_data_cache_path $data_path/pdb_data/data_caches/chain_data_cache.json \ --template_release_dates_cache_path $data_path/pdb_data/data_caches/mmcif_cache.json \ + --alignment_index_path $data_path/alignment_data/alignment_dbs/alignment_db.index \ --config_preset initial_training \ --seed 42 \ --obsolete_pdbs_file_path $data_path/pdb_data/obsolete.dat \ diff --git a/PyTorch/built-in/others/OpenFold_for_PyTorch/train_openfold.py b/PyTorch/built-in/others/OpenFold_for_PyTorch/train_openfold.py index 3509386953d358859ab36cf35828fa5e53d91905..4156c0d24e546fa57621c8715279edd0d63199de 100644 --- a/PyTorch/built-in/others/OpenFold_for_PyTorch/train_openfold.py +++ b/PyTorch/built-in/others/OpenFold_for_PyTorch/train_openfold.py @@ -4,6 +4,15 @@ import os import sys import json +import lightning_fabric.accelerators.cuda as cuda_module + + +def _check_cuda_matmul_precision_npu(device): + # Patch the function which is not supported by NPU + pass + +cuda_module._check_cuda_matmul_precision = _check_cuda_matmul_precision_npu + import pytorch_lightning as pl from pytorch_lightning.callbacks.lr_monitor import LearningRateMonitor from pytorch_lightning.callbacks import DeviceStatsMonitor