ersilia-os / ersilia

The Ersilia Model Hub, a repository of AI/ML models for infectious and neglected disease research.
https://ersilia.io
GNU General Public License v3.0
203 stars 131 forks source link

🐛 Bug: Incorrect API call in AutomatedTests.ipynb #524

Closed pavithranair closed 1 year ago

pavithranair commented 1 year ago

Describe the bug.

The API call in AutomatedTests.ipynb is passing a python variable to a terminal command. Hence, the variable name is being treated as a string and the following error is encountered:

image

The command causing the error: !ersilia api -i smi

Describe the steps to reproduce the behavior

  1. Open AutomatedTests.ipynb in Colab
  2. Run the cells

Expected behavior.

No response

Screenshots.

image

Operating environment

Ubuntu 18.04.2 lts

Additional context

No response

pavithranair commented 1 year ago

Hi! Is this the required output of the API call?

image

GemmaTuron commented 1 year ago

Hi @pavithranair !

Thanks, this notebook for automated testing of models in Google Colab is still work in progress so many of the inputs still need work, we are working with @miquelduranfrigola and @megamanics. The input needs to be modified because many models do not require a single smiles, but two smiles or other combinations. This needs to automatically be taken from the internal tests that happen at fetch time (see #488 )

GemmaTuron commented 1 year ago

Hi,

Just to comment on this for clarification. Sorry I rushed through the comments and did not check properly. We have now edited the different notebooks we will be using:

The change that @pavithranair was suggesting is actually not ideal, since we want to pass smiles as strings, if you pass any smiles with a () it will fail with the following error: !ersilia api -i $smi /bin/bash: -c: line 0: syntax error near unexpected token(' /bin/bash: -c: line 0: ersilia api -i CC(C)CC1=CC=C(C=C1)C(C)C(=O)O'

The solution is: !ersilia api -i "$smi"

pavithranair commented 1 year ago

Hi!

My bad, I didn't account for smiles with parenthesis. Your solution seems to be doing the trick!