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: Predict has typeerror in CLI for models eos2hbd and eos97yu #436

Closed angelnagaba closed 1 year ago

angelnagaba commented 1 year ago

Describe the bug.

the fetch and serve command run well however the predict shows a type error. [Uploading my.log…]()

Describe the steps to reproduce the behavior

  1. Fetch models eos2hbd or eos97yu.
  2. serve the models
  3. Predict the models

Expected behavior.

Model should predict successfully

Screenshots.

No response

Operating environment

Ubuntu 22.04 VM

Additional context

i was able to run these successfully in google colab

0xhaisenberg commented 1 year ago

@angelnagaba posting your log will help provide more insight into the error

angelnagaba commented 1 year ago

my.log Here is the log

GemmaTuron commented 1 year ago

Please @angelnagaba Can you paste here the exact command that you used for predicting? I also always advise to test the prediction with only ONE molecule (-i "CCCC") and print the output in the screen. Show us the commands you are using and do the test with one molecule. Serve the models again, but do not refetch them!

angelnagaba commented 1 year ago

ersilia -v api predict -i "eml_canonical.csv" -o "eos2hbd.csv" > my.log 2>&1 This is the command I used

angelnagaba commented 1 year ago

Command for serve: ersilia -v serve eos2hbd Predict: ersilia -v api predict -i "eml_canonical.csv" -o "eos2hbd.csv" > my.log 2>&1 Below is my output when i predict one molecule it seems to work image

GemmaTuron commented 1 year ago

Hi @angelnagaba

Are you sure you are specifying the right path to the file? Where is the eml_canonical.csv stored? because you are running the command from ersilia's folder.

angelnagaba commented 1 year ago

Hi @GemmaTuron The eml_canonical.csv file is in the ersilia folder

GemmaTuron commented 1 year ago

Hello @angelnagaba As you can see in error TypeError: No registered converter was able to produce a C++ rvalue of type std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > from this Python object of type NoneType it does not find any smiles (nonetype) so the problem lies in the file itself. I'd suggest creating a file with only the first three molecules and passing that making sure that the path is correct.

angelnagaba commented 1 year ago

I tested this for a single molecule and it works perfect. let me try this too

GemmaTuron commented 1 year ago

Hi @angelnagaba

Like in issue #439 it seems to me you are not passing the correct path to the file. Please, can you paste here from where you are running the command and where is the file you are trying to predict located?

GemmaTuron commented 1 year ago

I will close this issue due to inactivity