jozhang97 / MutateEverything

66 stars 6 forks source link

incomplete openfold source code #1

Closed linghuichen closed 1 year ago

linghuichen commented 1 year ago

Missing openfold/data and openfold/resources?

jozhang97 commented 1 year ago

Thanks for your interest in this project.

openfold/data: we do not train AlphaFold for structure prediction, instead fine-tune a pre-trained checkpoint.

openfold/resources: https://github.com/aqlaboratory/openfold/blob/main/scripts/install_third_party_dependencies.sh might have what you are looking for.

Let me know if you have any more specific questions/issues/problems you are encountering.

linghuichen commented 1 year ago

Thanks for your quick reply.

I tried to run the training of AF backbone, but the loss at epoch 19 seems to be much larger than your.

image

The training of ESM backbone looks fine. Is there anything I missed? (BTW, I dissabled the flash_attn in openfold since I'm not running on A100, this is the only modification I made on the source code).

jozhang97 commented 1 year ago

Hmm, I am able to reproduce on Quadro RTX 6000.

It looks like the loss is too high. Could you share the entire log? Did you check that you are loading the model correctly?

linghuichen commented 1 year ago

I'm runing on Tesla V100. The initial AF checkpoint seems to be loaded correctly.

Here is my config

image

and the losses from epoch 0:

image
jozhang97 commented 1 year ago

Thanks for your patience.

Can you try downloading the model we trained and evaluating it? Add the args --resume /path/to/model --eval

linghuichen commented 1 year ago

Thanks for your patience.

Can you try downloading the model we trained and evaluating it? Add the args --resume /path/to/model --eval

I ran eval on protherm_multiple using downloaded checkpoing mutate_everything_af.pth, the result looks bad:

image
jozhang97 commented 1 year ago

Ah, then its probably something different in your openfold installation, can you take a look?

linghuichen commented 1 year ago

Ah, then its probably something different in your openfold installation, can you take a look?

Thanks a lot for your help. This problem may caused by my modification on openfold (I disabled flash attention). But I cannot confirm it because I don't have GPU for flash attention. However, I replaced openfold with Uni-Fold and the loss looks fine now.

jozhang97 commented 1 year ago

That's great! Out of curiosity, was it a lot of work to swap openfold with unifold?

linghuichen commented 1 year ago

That's great! Out of curiosity, was it a lot of work to swap openfold with unifold?

It takes about 1~2 hours to do the swaping. The implementation of openfold and unifold are similar, it's easy to do this.

jozhang97 commented 1 year ago

Thanks for letting me know! Closing for now, feel free to open another issue.