instadeepai / lightmhc Goto Github PK
View Code? Open in Web Editor NEWLightMHC: A Light Model for pMHC Structure Prediction with Graph Neural Networks
Home Page: https://www.biorxiv.org/content/10.1101/2023.11.21.568015v1
License: Other
LightMHC: A Light Model for pMHC Structure Prediction with Graph Neural Networks
Home Page: https://www.biorxiv.org/content/10.1101/2023.11.21.568015v1
License: Other
I'm tried to run LightMHC with Cuda 11.8.0
Command:
python LightMHC/lightmhc/inference.py data.input_csv_path=xray.lightmhc.csv data.output_dir=lighmhc-xray model.n_cpus=32 model.use_gpu=true model.batch_size=64
I got an error message:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/baakmanc/miniconda3/envs/lightmhc/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/baakmanc/miniconda3/envs/lightmhc/lib/python3.8/multiprocessing/pool.py", line 51, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "/home/baakmanc/LightMHC/lightmhc/inference.py", line 77, in workflow
model = model.to(device)
File "/home/baakmanc/miniconda3/envs/lightmhc/lib/python3.8/site-packages/torch/nn/modules/module.py", line 673, in to
return self._apply(convert)
File "/home/baakmanc/miniconda3/envs/lightmhc/lib/python3.8/site-packages/torch/nn/modules/module.py", line 387, in _apply
module._apply(fn)
File "/home/baakmanc/miniconda3/envs/lightmhc/lib/python3.8/site-packages/torch/nn/modules/module.py", line 387, in _apply
module._apply(fn)
File "/home/baakmanc/miniconda3/envs/lightmhc/lib/python3.8/site-packages/torch/nn/modules/module.py", line 387, in _apply
module._apply(fn)
File "/home/baakmanc/miniconda3/envs/lightmhc/lib/python3.8/site-packages/torch/nn/modules/module.py", line 409, in _apply
param_applied = fn(param)
File "/home/baakmanc/miniconda3/envs/lightmhc/lib/python3.8/site-packages/torch/nn/modules/module.py", line 671, in convert
return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
File "/home/baakmanc/miniconda3/envs/lightmhc/lib/python3.8/site-packages/torch/cuda/__init__.py", line 160, in _lazy_init
raise RuntimeError(
RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method
"""
I found that the start method can be set to 'spawn' by following the instructions here:
https://pytorch.org/docs/stable/notes/multiprocessing.html
That fixed the issue for me. Just letting you know.
My CUDA version is 12.2, and i got an error when i use LightMHC:
OSError: libcusparse.so.11: cannot open shared object file: No such file or directory
The error I previously had:
RuntimeError: Error(s) in loading state_dict for TrEGNN:
size mismatch for backbone_block.transformer.encoders.0.mha_norm.weight: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for backbone_block.transformer.encoders.0.mha_norm.bias: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for backbone_block.transformer.encoders.0.ffn_norm.weight: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for backbone_block.transformer.encoders.0.ffn_norm.bias: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for backbone_block.transformer.encoders.1.mha_norm.weight: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for backbone_block.transformer.encoders.1.mha_norm.bias: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for backbone_block.transformer.encoders.1.ffn_norm.weight: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for backbone_block.transformer.encoders.1.ffn_norm.bias: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for torsion_block.transformer.encoders.0.mha_norm.weight: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for torsion_block.transformer.encoders.0.mha_norm.bias: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for torsion_block.transformer.encoders.0.ffn_norm.weight: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for torsion_block.transformer.encoders.0.ffn_norm.bias: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for torsion_block.transformer.encoders.1.mha_norm.weight: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for torsion_block.transformer.encoders.1.mha_norm.bias: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for torsion_block.transformer.encoders.1.ffn_norm.weight: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for torsion_block.transformer.encoders.1.ffn_norm.bias: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([128]).
Was resolved by downgrading pytorch geometric.
Hello, I'm a reasearcher and I'm working on a paper for methods that predict MHC peptide structures.
I would like to retrain lightMHC on a custom training set, but I cannot find the code to do so.
Does it exist and could I get it?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.