ncats / ncats-adme

The source code for ADME@NCATS application that hosts prediction models for ADME properties. Link to application: https://opendata.ncats.nih.gov/adme/home
32 stars 15 forks source link

can ncats-adme be run locally in commandline without calling API? #113

Closed ravinpoudel closed 6 months ago

ravinpoudel commented 7 months ago

Hi, I am wondering if there is an option to run the ncats-adme model locally without calling for API. I have dockerized the tool, and exposed API to the port locally, then once api becomes available, I am running the model. IF there is way to run the model without going via the API, i think it will be much effiecient, computationally.

Regards, Ravin

iwwwish commented 6 months ago

Hi Ravin,

Sorry for the delayed response. At the moment, I think the only way the models can be called is via the API. This choice was probably made for good reasons (e.g., to be able to call the models from scripts). I recall you raised a similar issue (#95) in the past and I provided you a sample script to make predictions from command line. Please feel free to modify the open source code to suit your needs.

One way I think you can boost the speed is to download the model files to your local disk and load them directly into your code or call them via command line. This way you bypass the API and can make predictions on a large batch of compounds. For the GCNN models, you could use the Chemprop's command line option by pointing to the corresponding model checkpoints. Hope this helps.

Best, Vishal

iwwwish commented 6 months ago

Please feel free to reopen if you have further questions. Thank you!