TencentAI4S / HuDiff

Code for humanization of antibody and nanobody
Other
25 stars 1 forks source link

Nanobody error #2

Closed yx0516 closed 1 month ago

yx0516 commented 1 month ago

Appreciate your outstanding work!

when I run the nanobody humanization, the error happened:

python nanobody_scripts/sample_for_nano_cdr.py --ckpt release_data_dir/checkpoints/nanobody/hudiffnb.pt --nano_complex_fasta data/fasta_file/7x2l.fasta --model finetune_vh --inpaint_sample True

[2024-10-29 12:06:06,506::test::INFO] release_data_dir/checkpoints/nanobody/hudiffnb.pt [2024-10-29 12:06:06,506::test::INFO] 42 Nanobody Humanization Process: 0%| | 0/85 [00:10<?, ?it/s] Traceback (most recent call last): File "/data/user/yanx/workdir/repo/HuDiff/nanobody_scripts/sample_for_nano_cdr.py", line 172, in nano_prediction = model( File "/data/user/yanx/Dev/workdir/miniconda3/envs/HuDiff/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl return forward_call(*input, kwargs) File "/data/user/yanx/workdir/repo/HuDiff/model/nanoencoder/model.py", line 335, in forward h_feature = self._encoder( File "/data/user/yanx/workdir/repo/HuDiff/model/nanoencoder/model.py", line 314, in _encoder emb = self.aa_encoder(aa_seq) File "/data/user/yanx/Dev/workdir/miniconda3/envs/HuDiff/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl return forward_call(*input, *kwargs) File "/data/user/yanx/workdir/repo/HuDiff/model/nanoencoder/model.py", line 158, in forward return self._convolve(e, input_mask=input_mask) File "/data/user/yanx/workdir/repo/HuDiff/model/nanoencoder/model.py", line 167, in _convolve e = layer(e, input_mask=input_mask) File "/data/user/yanx/Dev/workdir/miniconda3/envs/HuDiff/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl return forward_call(input, kwargs) File "/data/user/yanx/Dev/workdir/miniconda3/envs/HuDiff/lib/python3.9/site-packages/sequence_models/convolutional.py", line 249, in forward self.conv(self.sequence1(x), input_mask=input_mask) File "/data/user/yanx/Dev/workdir/miniconda3/envs/HuDiff/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl return forward_call(*input, kwargs) File "/data/user/yanx/Dev/workdir/miniconda3/envs/HuDiff/lib/python3.9/site-packages/torch/nn/modules/container.py", line 204, in forward input = module(input) File "/data/user/yanx/Dev/workdir/miniconda3/envs/HuDiff/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl return forward_call(*input, *kwargs) File "/data/user/yanx/Dev/workdir/miniconda3/envs/HuDiff/lib/python3.9/site-packages/sequence_models/layers.py", line 87, in forward return self.conv(x.transpose(1, 2)).transpose(1, 2) File "/data/user/yanx/Dev/workdir/miniconda3/envs/HuDiff/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl return forward_call(input, kwargs) File "/data/user/yanx/Dev/workdir/miniconda3/envs/HuDiff/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 313, in forward return self._conv_forward(input, self.weight, self.bias) File "/data/user/yanx/Dev/workdir/miniconda3/envs/HuDiff/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 309, in _conv_forward return F.conv1d(input, weight, bias, self.stride, RuntimeError: Unable to find a valid cuDNN algorithm to run convolution

Could you help with this? Thanks a lot.

waitma commented 1 month ago

This issue may be due to memory limitations. Reducing the batch size can help resolve it, or alternatively, using a GPU with more memory can also be effective.