MolecularAI / Chemformer

Apache License 2.0
211 stars 36 forks source link

models.py file is not in the repository? #22

Closed Ontos46 closed 1 year ago

Ontos46 commented 1 year ago

Apologies if that's a dumb question, I wanted to look into the models.py file from readme but wasn't able to find it in this repository. Could you, please, help me with this? The readme says the following: "Models: The models.py file contains a Pytorch Lightning implementation of the BART language model, as well as Pytorch Lightning implementations of models for downstream tasks.", but I couldn't locate the models.py file.

EBjerrum commented 1 year ago

Ah, I think it has been moved around/refactored. The base model for pretraining is in https://github.com/MolecularAI/Chemformer/blob/main/molbart/models/pre_train.py

finetuning is demonstrated with the scripts in https://github.com/MolecularAI/Chemformer/blob/main/example_scripts/fine_tune.sh

and theres an example of using the pretrained encoder for a regression model in https://github.com/MolecularAI/Chemformer/blob/main/example_scripts/finetune_regression/finetuneRegr.py