Luke-ebbis / neuralplexer-workflow

A workflow for predicting ligands and protein interactions with NeuralPlexer
Apache License 2.0
0 stars 0 forks source link

Memory overflow #4

Open Luke-ebbis opened 5 months ago

Luke-ebbis commented 5 months ago

/NeuralPLexer/neuralplexer/inference.py:629: UserWarning: Assuming the provided receptor input is a protein sequence warnings.warn("Assuming the provided receptor input is a protein sequence") Block contact sampling: 100%|██████████| 32/32 [00:02<00:00, 10.93it/s] Structure generation using langevin_simulated_annealing: 100%|██████████| 40/40 [00:15<00:00, 2.55it/s] /opt/conda/envs/NeuralPLexer/lib/python3.9/site-packages/pytorch3d/ops/points_alignment.py:338: UserWarning: Excessively low rank of cross-correlation between aligned point clouds. corresponding_points_alignment cannot return a unique rotation. warnings.warn( Block contact sampling: 100%|██████████| 32/32 [00:02<00:00, 11.08it/s] Structure generation using langevin_simulated_annealing: 100%|██████████| 40/40 [00:13<00:00, 2.97it/s] /opt/conda/envs/NeuralPLexer/lib/python3.9/site-packages/pytorch3d/ops/points_alignment.py:338: UserWarning: Excessively low rank of cross-correlation between aligned point clouds. corresponding_points_alignment cannot return a unique rotation. warnings.warn( Block contact sampling: 100%|██████████| 32/32 [00:02<00:00, 11.04it/s] Structure generation using langevin_simulated_annealing: 100%|██████████| 40/40 [00:13<00:00, 2.97it/s] /opt/conda/envs/NeuralPLexer/lib/python3.9/site-packages/pytorch3d/ops/points_alignment.py:338: UserWarning: Excessively low rank of cross-correlation between aligned point clouds. corresponding_points_alignment cannot return a unique rotation. warnings.warn( Block contact sampling: 100%|██████████| 32/32 [00:02<00:00, 11.03it/s] Structure generation using langevin_simulated_annealing: 100%|██████████| 40/40 [00:13<00:00, 2.97it/s] /opt/conda/envs/NeuralPLexer/lib/python3.9/site-packages/pytorch3d/ops/points_alignment.py:338: UserWarning: Excessively low rank of cross-correlation between aligned point clouds. corresponding_points_alignment cannot return a unique rotation. warnings.warn( Block contact sampling: 100%|██████████| 32/32 [00:02<00:00, 11.06it/s] Structure generation using langevin_simulated_annealing: 100%|██████████| 40/40 [00:13<00:00, 2.91it/s] /opt/conda/envs/NeuralPLexer/lib/python3.9/site-packages/pytorch3d/ops/points_alignment.py:338: UserWarning: Excessively low rank of cross-correlation between aligned point clouds. corresponding_points_alignment cannot return a unique rotation. warnings.warn( Block contact sampling: 100%|██████████| 32/32 [00:02<00:00, 11.05it/s] Structure generation using langevin_simulated_annealing: 100%|██████████| 40/40 [00:13<00:00, 2.97it/s] /opt/conda/envs/NeuralPLexer/lib/python3.9/site-packages/pytorch3d/ops/points_alignment.py:338: UserWarning: Excessively low rank of cross-correlation between aligned point clouds. corresponding_points_alignment cannot return a unique rotation. warnings.warn( Block contact sampling: 100%|██████████| 32/32 [00:02<00:00, 11.04it/s] Structure generation using langevin_simulated_annealing: 100%|██████████| 40/40 [00:13<00:00, 2.97it/s] /opt/conda/envs/NeuralPLexer/lib/python3.9/site-packages/pytorch3d/ops/points_alignment.py:338: UserWarning: Excessively low rank of cross-correlation between aligned point clouds. corresponding_points_alignment cannot return a unique rotation. warnings.warn( Block contact sampling: 100%|██████████| 32/32 [00:02<00:00, 11.02it/s] Structure generation using langevin_simulated_annealing: 100%|██████████| 40/40 [00:13<00:00, 2.97it/s] /opt/conda/envs/NeuralPLexer/lib/python3.9/site-packages/pytorch3d/ops/points_alignment.py:338: UserWarning: Excessively low rank of cross-correlation between aligned point clouds. corresponding_points_alignment cannot return a unique rotation. warnings.warn( Block contact sampling: 100%|██████████| 32/32 [00:02<00:00, 11.00it/s] Structure generation using langevin_simulated_annealing: 100%|██████████| 40/40 [00:13<00:00, 2.97it/s] /opt/conda/envs/NeuralPLexer/lib/python3.9/site-packages/pytorch3d/ops/points_alignment.py:338: UserWarning: Excessively low rank of cross-correlation between aligned point clouds. corresponding_points_alignment cannot return a unique rotation. warnings.warn( Block contact sampling: 100%|██████████| 32/32 [00:02<00:00, 11.03it/s] Structure generation using langevin_simulated_annealing: 100%|██████████| 40/40 [00:13<00:00, 2.97it/s] /opt/conda/envs/NeuralPLexer/lib/python3.9/site-packages/pytorch3d/ops/points_alignment.py:338: UserWarning: Excessively low rank of cross-correlation between aligned point clouds. corresponding_points_alignment cannot return a unique rotation. warnings.warn( Block contact sampling: 100%|██████████| 32/32 [00:02<00:00, 11.03it/s] Structure generation using langevin_simulated_annealing: 100%|██████████| 40/40 [00:13<00:00, 2.97it/s] /opt/conda/envs/NeuralPLexer/lib/python3.9/site-packages/pytorch3d/ops/points_alignment.py:338: UserWarning: Excessively low rank of cross-correlation between aligned point clouds. corresponding_points_alignment cannot return a unique rotation. warnings.warn( Block contact sampling: 100%|██████████| 32/32 [00:02<00:00, 11.03it/s] Structure generation using langevin_simulated_annealing: 100%|██████████| 40/40 [00:13<00:00, 2.96it/s] /opt/conda/envs/NeuralPLexer/lib/python3.9/site-packages/pytorch3d/ops/points_alignment.py:338: UserWarning: Excessively low rank of cross-correlation between aligned point clouds. corresponding_points_alignment cannot return a unique rotation. warnings.warn( Block contact sampling: 100%|██████████| 32/32 [00:02<00:00, 10.98it/s] Structure generation using langevin_simulated_annealing: 100%|██████████| 40/40 [00:13<00:00, 2.96it/s] /opt/conda/envs/NeuralPLexer/lib/python3.9/site-packages/pytorch3d/ops/points_alignment.py:338: UserWarning: Excessively low rank of cross-correlation between aligned point clouds. corresponding_points_alignment cannot return a unique rotation. warnings.warn( Block contact sampling: 100%|██████████| 32/32 [00:02<00:00, 11.01it/s] Structure generation using langevin_simulated_annealing: 55%|█████▌ | 22/40 [00:07<00:06, 2.82it/s] Traceback (most recent call last): File "/opt/conda/envs/NeuralPLexer/bin/neuralplexer-inference", line 33, in sys.exit(load_entry_point('neuralplexer', 'console_scripts', 'neuralplexer-inference')()) File "/NeuralPLexer/neuralplexer/inference.py", line 634, in main multi_pose_sampling( File "/NeuralPLexer/neuralplexer/inference.py", line 182, in multi_pose_sampling output_struct = model.sample_pl_complex_structures( File "/NeuralPLexer/neuralplexer/model/wrappers.py", line 3163, in sample_pl_complex_structures batch = self._reverse_diffuse_plcomplex_latinp( File "/NeuralPLexer/neuralplexer/model/wrappers.py", line 2937, in _reverse_diffuse_plcomplex_latinp batch = self.forward( File "/NeuralPLexer/neuralplexer/model/wrappers.py", line 207, in forward batch["outputs"]["denoised_prediction"] = self._run_score_head( File "/NeuralPLexer/neuralplexer/model/wrappers.py", line 755, in _run_score_head batch = self._init_esdm_inputs(batch, embedding_iter_id) File "/NeuralPLexer/neuralplexer/model/wrappers.py", line 725, in _init_esdm_inputs self._init_randexp_kNN_edges_and_covmask( File "/NeuralPLexer/neuralplexer/model/wrappers.py", line 334, in _init_randexp_kNN_edges_and_covmask knn_edge_mask = topk_edge_mask_from_logits( File "/NeuralPLexer/neuralplexer/model/common.py", line 175, in topk_edge_mask_from_logits scores = scores - torch.log(-torch.log(noise)) torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 816.00 MiB (GPU 0; 11.72 GiB total capacity; 8.32 GiB already allocated; 83.44 MiB free; 10.61 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

ERROR conda.cli.main_run:execute(124): conda run neuralplexer-inference --task=batched_structure_sampling --input-receptor MSTLEDGFPADKLFAQGYSYTYDDVIFLPHFIDFSTDAVSLSTRLSRRVPLSIPCVSSPMDTVSESHMAAAMASLGGIGIVHYNCGIAAQASIIRQAKSLKHPIASDAGVKFPEYEITSLDAFGPSSFVFVEQTGTMTTPKLLGYVTKSQWKRMNYEQREMKIYDYMKSCDSSDYCVPWEIDFEKLEFVLEDKQKGFVVLERDGETVNVVTKDDIQRVKGYPKSGPGTVGPDGEWMVGAAIGTRESDKERLEHLVNVGVNAVVLDSSQGNSIYQLEMIKYVKKTYPELDVIGGNVVTMYQAQNLIQAGVDGLRVGMGSGSICTTQEVCAVGRGQATAVYKVCSIAAQSGIPVIADGGISNSGHIVKALVLGASTVMMGSFLAGSTEAPGGYEYTNGKRIKKYRGMGSLEAMTKGSDQRYLGDQTKLKIAQGVV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YEKKSF|MSTLEDGFPADKLFAQGYSYTYDDVIFLPHFIDFSTDAVSLSTRLSRRVPLSIPCVSSPMDTVSESHMAAAMASLGGIGIVHYNCGIAAQASIIRQAKSLKHPIASDAGVKFPEYEITSLDAFGPSSFVFVEQTGTMTTPKLLGYVTKSQWKRMNYEQREMKIYDYMKSCDSSDYCVPWEIDFEKLEFVLEDKQKGFVVLERDGETVNVVTKDDIQRVKGYPKSGPGTVGPDGEWMVGAAIGTRESDKERLEHLVNVGVNAVVLDSSQGNSIYQLEMIKYVKKTYPELDVIGGNVVTMYQAQNLIQAGVDGLRVGMGSGSICTTQEVCAVGRGQATAVYKVCSIAAQSGIPVIADGGISNSGHIVKALVLGASTVMMGSFLAGSTEAPGGYEYTNGKRIKKYRGMGSLEAMTKGSDQRYLGDQTKLKIAQGVVGAVADKGSVLKLIPYTMHAVKQGFQDLGASSLQSAHGLLRSNILRLEARTGAAQVEGGVHGLVSYEKKSF --input-ligand data/IMPDH1/GMP_ideal.sdf --sampler=langevin_simulated_annealing --model-checkpoint results/dependencies/neuralplexer/data/neuralplexermodels_downstream_datasets_predictions/models/complex_structure_prediction.ckpt --n-samples 16 --chunk-size 1 --num-steps=40 --cuda --out-path results/data/IMPDH1/output failed. (See above for error)

Luke-ebbis commented 5 months ago

Use the following bash script to regenerate the error

mkdir results/data/IMPDH1.ouput -p

FASTA=$(tail -n +2 data/IMPDH1/P47996.fasta | tr -d '\n') echo $FASTA

CUDA_VISIBLE_DEVICES=0 apptainer run --nv results/dependencies/neuralplexer/neuralplexer.sif neuralplexer-inference \ --task=batched_structure_sampling \ --input-receptor "$FASTA|$FASTA|$FASTA|$FASTA" \ --input-ligand data/IMPDH1/GMP_ideal.sdf \ --sampler=langevin_simulated_annealing \ --model-checkpoint results/dependencies/neuralplexer/data/neuralplexermodels_downstream_datasets_predictions/models/complex_structure_prediction.ckpt \ --n-samples 16 \ --chunk-size 1 \ --num-steps=40 --cuda \ --out-path results/data/IMPDH1/output #