Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test model eos4q1a in CLI and Colab #7

Closed
GemmaTuron opened this issue Jan 10, 2023 · 23 comments
Closed

Test model eos4q1a in CLI and Colab #7

GemmaTuron opened this issue Jan 10, 2023 · 23 comments
Assignees

Comments

@GemmaTuron
Copy link
Member

GemmaTuron commented Jan 10, 2023

Test the model using a single smiles and a .csv file with a few of them to check that it works.

@Femme-js
Copy link
Collaborator

While fetching the model in CLI, I got the following error. It might be a conda installation
eos4q1a2.log
error.

@GemmaTuron
Copy link
Member Author

Hi @Femme-js ,

I think its a problem of space on your disk, see the following error in your log:
shutil.Error: [('/home/femme_js/eos/dest/eos4q1a/model/databases/replacements02_sc2.db', '/tmp/bentoml-temp-ot1v5vll/eos4q1a/artifacts/databases/replacements02_sc2.db', '[Errno 28] No space left on device')]

Can you try on google colab see if it works there?
@DhanshreeA how much does this model occupy?

@DhanshreeA
Copy link
Member

@GemmaTuron the database occupies 688MB of space.

@DhanshreeA
Copy link
Member

@Femme-js maybe you just have a lot of tmp files that need to be flushed? You could either delete them yourself or reboot your system?

@paulinebanye
Copy link
Collaborator

paulinebanye commented Jan 14, 2023

Hi @GemmaTuron

Testing the model on the CLI and Colab.

On reviewing the error, I noticed there was a typo in the run_generate.sh of the colab notebook

Model API eos4q1a:generate did not produce an output/root/eos/repository/eos4q1a/20230114014544_6A73E9/eos4q1a/artifacts/framework/run_generate.sh: line 1: /usreos4q1a/bin/python: No such file or directory

@GemmaTuron
Copy link
Member Author

Hi @pauline-banye

Please instead of screenshots can you provide the log files? You can collect them or at least print the output of running the cells and paste it in a .txt file for example.
I don't understand the typo you mention: typo would be a misspelling, is there a misspelling? Please share the link to the notebook with access so I can check!

Thanks!

@paulinebanye
Copy link
Collaborator

paulinebanye commented Jan 14, 2023

Hi @GemmaTuron, I provided the log files and the link to colab as well.

I just included the screenshots but I've taken them out now. I'm sorry for the confusion.

Regarding the error, I can see /usreos4q1a/bin/python in the generated report on colab. I believe that usreos4q1a is the source of the error.

@carcablop
Copy link

Hi @pauline-banye. This path /usreos4q1a/bin/python should be the path of the conda environment variable python path, in this case this path should be /usr/eos4q1/bin/python. If you run "which python" (in an active conda environment in google colab) and compare it you will notice the difference. It throws the error in the first line of run_predict.sh because the first line runs "python main.py".
Which Google colab template are you using? Can you share the link?

@paulinebanye
Copy link
Collaborator

paulinebanye commented Jan 16, 2023

Hi @pauline-banye. This path /usreos4q1a/bin/python should be the path of the conda environment variable python path, in this case this path should be /usr/eos4q1/bin/python. If you run "which python" (in an active conda environment in google colab) and compare it you will notice the difference. It throws the error in the first line of run_predict.sh because the first line runs "python main.py".
Which Google colab template are you using? Can you share the link?

Hi @carcablop I guessed there needed to be a / in-between. Oh the link to the colab is referenced in my comment about testing the issue on colab but let me paste it again 👇.
https://colab.research.google.com/drive/1WiWTa_zqHTtsgNqhLqC6b9RSbh21SbQF#scrollTo=mWRZdAMkmgxZ

@GemmaTuron
Copy link
Member Author

Thanks @pauline-banye I see the link to colab now, apoloies I went throught he issue veyr fats the other day.

  • Have you tried the exact same colab with another model, to rule out an issue with the ersilia installation?
    I agree there seems to be a missing / between usr and the model name. The python path was correctly set to
    %env PYTHONPATH= "$PYTHONPATH:/usr/local/lib/python3.7/site-packages" though? Can you try !which python to confirm?

@DhanshreeA
Copy link
Member

Hi @GemmaTuron @pauline-banye and @carcablop I have updated the repo with a colab template in this branch, it was long due https://github.com/ersilia-os/eos4q1a/tree/6-bonus-add-colab-notebook-template-to-the-repo (PR: #9 pending review from @GemmaTuron)

I haven't specifically gone through @pauline-banye's notebook yet to figure out where the issue is coming from but I can confirm that the model worked on colab for me and if you run the notebook provided in this branch hopefully it should run for you too.

@GemmaTuron
Copy link
Member Author

Hi @DhanshreeA ,

Thanks for the work! Is there any reason you created a specific notebook for this repo? Maybe I should have explained it better before, sorry, I missed your bonus issue: all models should work with the template provided in ersilia/notebooks/ersilia-on-colab.ipynb to avoid too many notebook versions, instead of each repo having its own colab version. Otherwise it will become too much to maintain. What do you think?
I've merged PR #9 because it is very difficult to revise the notebooks from the github interface, but I suggest checking if there are any differences with the template and otherwise removing it to stick to one single notebook for all models!

@GemmaTuron
Copy link
Member Author

Is something different between @DhanshreeA's notebook and the one @pauline-banye was using?

@GemmaTuron
Copy link
Member Author

We have done some changes and this is solved now, can you confirm? Thanks!
ersilia-os/ersilia@70bcf54

@paulinebanye
Copy link
Collaborator

Sure @GemmaTuron , I'm repeating the tests now

@paulinebanye
Copy link
Collaborator

paulinebanye commented Jan 16, 2023

@GemmaTuron The model fetched, served and generated successfully with the updated colab notebook. https://colab.research.google.com/drive/19-8OPvv2LZNkilCKja9JIQK5GIui9tKt#scrollTo=1cg9EqzVnJSs

@Femme-js
Copy link
Collaborator

Hi @GemmaTuron !

I tested the model on my CLI. It fails to fetch. I am attaching the log here.
eos4q1a.log

@GemmaTuron
Copy link
Member Author

Hi @Femme-js

Please have a look at the log file and identify the error to understand how to solve it. Have you considered everything we discussed in this same issue before?

@DhanshreeA
Copy link
Member

DhanshreeA commented Jan 19, 2023

@GemmaTuron I understand and the maintainability issue makes complete sense! When I was testing this model in colab, it came as a suggestion from Miquel to store this as an artifact within the repo, probably for easy usage but moving on this does not seem like a good idea. Thanks for merging the PR anyway but I realize this has just opened up more technical debt. 😅

@DhanshreeA
Copy link
Member

Can you try on google colab see if it works there?
@DhanshreeA how much does this model occupy?

@GemmaTuron the fragment database that the model needs takes up about 680 MB.

@DhanshreeA
Copy link
Member

@Femme-js Could you run ls -lah /tmp and let us know the size of the /tmp directory on your machine? Probably your /tmp partition is just small and cannot handle the ~680 MB space required by the model (in addition to all the other tmp artifacts that ersilia generates)

@Femme-js
Copy link
Collaborator

@Femme-js maybe you just have a lot of tmp files that need to be flushed? You could either delete them yourself or reboot your system?

Yes, I see this was a memory issue.

I ran the test again and was able to fetch the model successfully.
eos4q1a.log

@GemmaTuron
Copy link
Member Author

Perfect, let's mark this as completed then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

5 participants