Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collaborate #2

Open
Amelie-Schreiber opened this issue Sep 1, 2023 · 7 comments
Open

Collaborate #2

Amelie-Schreiber opened this issue Sep 1, 2023 · 7 comments

Comments

@Amelie-Schreiber
Copy link

Amelie-Schreiber commented Sep 1, 2023

I'm very interested in replicating your work and would like to train a diffusion model to generate protein binding partners similar to what RFDiffusion accomplishes, but I would like to use ESM-2 models as you have done. If you are open to collaborating, feel free to reach out if you have the time. Also, would you be able to create a tutorial similar to this?

@pengzhangzhi
Copy link
Owner

hi there! I am open to collaboration on interesting works. You may want to discuss your ideas and implementation details with me?

best,
zhangzhi

@Amelie-Schreiber
Copy link
Author

Amelie-Schreiber commented Sep 1, 2023 via email

@pengzhangzhi
Copy link
Owner

hi, the training is pretty cheap. I can fit the model in a 10g GPU. Regarding the documentation, please follow the readme to install pkgs and train the model. Please let me know which parts confuse you.

best,
Zhangzhi

@Amelie-Schreiber
Copy link
Author

Amelie-Schreiber commented Sep 1, 2023

Could you find me on discord?
Also, could I use Hugging Face's accelerator to do data parallelization to split training across two 8GB GPUs? If so, that might work...

EDIT: I've tried training on a P100 GPU (using a colab instance) and it doesn't seems to work. My training script must not be setup correctly or something.

@pengzhangzhi
Copy link
Owner

pengzhangzhi commented Sep 3, 2023

Hi,

  • I don't have discord, sorry.
  • I have not tested the code on 8g gpus. By reducing the batch size, the memory consumption would be reduced to fit in the 8g memory you have.
  • I use accelerator a lot; it is very simple and easy to use. Data parallelization may work in that case.
  • You can call Python scripts and functions from a script in notebook.

@Amelie-Schreiber
Copy link
Author

Hi! I tried following the install instruction and I am having some issues. First, there seems to be a mistake in the install instructions. I believe you need

cd protein-sequence-diffusion-model

instead of

cd denoising_diffusion_protein_sequence

Also. Once everything is installed, I am getting the following error:

(esm2d) C:\Users\OWO\Desktop\amelie_vscode\esmd\protein-sequence-diffusion-model\denoising_diffusion_pytorch>python pl_train.py --max_epochs 1 --fas_dpath seq_data/fas
C:\Users\OWO\anaconda3\envs\esm2d\lib\site-packages\Bio\pairwise2.py:278: BiopythonDeprecationWarning: Bio.pairwise2 has been deprecated, and we intend to remove it in a future release of Biopython. As an alternative, please consider using Bio.Align.PairwiseAligner as a replacement, and contact the Biopython developers if you still need the Bio.pairwise2 module.
  warnings.warn(
C:\Users\OWO\anaconda3\envs\esm2d\lib\site-packages\torchaudio\backend\utils.py:74: UserWarning: No audio backend is available.
  warnings.warn("No audio backend is available.")
seq_data/fas\seqs.a3m already exists.
Traceback (most recent call last):
  File "C:\Users\OWO\Desktop\amelie_vscode\esmd\protein-sequence-diffusion-model\denoising_diffusion_pytorch\pl_train.py", line 205, in <module>
    train(args)
  File "C:\Users\OWO\Desktop\amelie_vscode\esmd\protein-sequence-diffusion-model\denoising_diffusion_pytorch\pl_train.py", line 187, in train
    trainer = pl.Trainer(
  File "C:\Users\OWO\anaconda3\envs\esm2d\lib\site-packages\pytorch_lightning\utilities\argparse.py", line 70, in insert_env_defaults
    return fn(self, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'gpus'

@pengzhangzhi
Copy link
Owner

I guess the error is because the pytorch lightning version is updated and they stop using gpus as an argument.
please set accelerator="auto"
https://lightning.ai/docs/pytorch/stable/common/trainer.html

use trainer = pl.Trainer(max_epochs=20,accelerator="auto")
Ref:
https://stackoverflow.com/a/76193000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants