moses icon indicating copy to clipboard operation
moses copied to clipboard

Make compatible with newer versions of torch

Open Dom303 opened this issue 4 years ago • 6 comments

When installing moses via pip, it overwrites the local pytorch version. Please, change the code to pip install tensorflow-gpu>=1.14 , and make sure it is compatible with newer versions.

https://github.com/molecularsets/moses/blob/b75dd89ccf924c8fbade4273b27a05f457c5a1e1/install_latentgan_dependencies.sh#L12

Dom303 avatar Apr 27 '20 15:04 Dom303

@SeemonJ, can you please comment on this?

danpol avatar Apr 27 '20 15:04 danpol

Hi @Dom303,

The reason why we are using specifically tensorflow-gpu 1.14 is because it is the last version that supports the loading of the pretrained models and weights for the heteroencoder in the LatentGAN. I do not recall if the newer branch of the heteroencoder, intended for tensorflow 2.0 use, is compatible with the LatentGAN and allowing us to train new models, but the immediate problem is that it would render reproducibility impossible.

SeemonJ avatar Apr 28 '20 01:04 SeemonJ

Sorry, I referenced Tensorflow by accident, I wanted to reference Pytorch v1.1.0. Can you add support for PyTorch 1.4 or 1.5?

https://github.com/molecularsets/moses/blob/b75dd89ccf924c8fbade4273b27a05f457c5a1e1/Dockerfile#L34

Dom303 avatar Apr 28 '20 13:04 Dom303

Hi, @Dom303! If you install MOSES using pip (pip install molsets), the requirement is torch>=1.1.0 — it should not affect your local version of PyTorch. We specify a fixed (older) version in Docker for reproducibility.

danpol avatar May 06 '20 10:05 danpol

Hi, @SeemonJ ! I was temp to retrain the Latent-GAN with my own data on the Moses platform, but it seems not quite an easy job to settle the dependencies right. I set the environment and installed dependencies just as the steps listed in the 'Manually' section, but the procedure still reported lots of warnings and errors(May still caused by version compatible problem). Need your help baddddly!! 图片 图片

Updated after 2h: It's fine now. I reproduced it with the source code of Latent-GAN, and set up with the Deep-Drug-Code (Moses branch). Peace!

Hunter-Leo avatar Dec 04 '20 06:12 Hunter-Leo

@Hunter-Leo Good to hear that you have solved the issue. I would, however, advise you to try to start with a fresh heteroencoder model rather than the moses-pretrained model, if you have a training set that has different structures than the moses molecules. You do this easiest by adding the option --heteroencoder_version new

the default of latentgan is to use the pretained model in the directory to save time, which might not always be the most suitable for your task.

SeemonJ avatar Dec 06 '20 14:12 SeemonJ