-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
🐛 Bug: Test command failing? #1487
Comments
I will add more detail soon. But for now I found out it was bentoml issue on |
@DhanshreeA has more knowlede on this. But we will tackle it together. I remeber we were debugging same issue a month or 3 weeks ago. For now to solve this, reinstall latest ersilia on conda activate ersilia
conda install python=3.8
pip install -e . |
Hi @Abellegese, thanks. The Py3.8 did the trick for eos3b5e but not for eos5guo, and even then both models eventually fail to run which worries me. A few questions:
|
Hi @GemmaTuron that was quite useful look up into the test command. I did some study on the errors and here is the answer (some with fix) below: Q1) There was a bug there and its fixed now. It was
As you can see the original design decision behind inspect command was to checks model repos after they published and we somehow made it also to work locally. And I don't know how you managed to see the Inspect Summary table without adding the Q3) The test summary is about the status of weather the checks are ran and not. This was intended to spot checks that are not executed (for instance in the case of command without
Q4) This was a bug in the example command (its maybe a feature but upgraded recently I guess) def run_exampe(
self,
n_samples: int,
file_name: str = None,
simple: bool = True,
try_predefined: bool = False
):
"""
Generate example input samples for the model.
Returns
-------
list
List of generated input samples eg ["CCO", ...].
"""
return self.example.example(
n_samples=n_samples,
file_name=file_name,
simple=simple,
try_predefined=try_predefined This will return a list of smiles like this: ["CC[n+]1c(-c2ccccc2)c2cc(N)ccc2c2ccc(N)cc12", "CN1C(=O)N[C@H](Cc2c[nH]c3c(Cl)cccc23)C1=O", ...] So single input example and other checks that needs example sample assumes this above data structure. Now I found out that is has this structure below: [{'input': 'CCO[C@H]1O[C@@H]2O[C@@]3(C)CC[C@H]4[C@H](C)CC[C@@H]([C@H]1C)[C@@]24OO3'}, {'input': 'Cc1cnc(c[n+]1[O-])C(O)=O'}, ...] This caused the error and it FIXED now. Q5) The problem was not from ersilia it was from this errors. It seems it came from the model itself: Traceback (most recent call last):
File "/home/abellegese/eos/repository/eos5guo/20250104180906_0463B7/eos5guo/artifacts/framework/code/main.py", line 26, in <module>
with open(input_file, "r") as f:
^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/abellegese/eos/repository/eos5guo/20250104180906_0463B7/eos5guo/artifacts/framework/example_input.csv' The other error was: Traceback (most recent call last): File "/home/abellegese/eos/repository/eos5guo/20250104180906_0463B7/eos5guo/artifacts/framework/code/main.py", line 6, in <module>
from rdkit import Chem
File "/home/abellegese/miniconda3/envs/eos5guo/lib/python3.11/site-packages/rdkit/Chem/__init__.py", line 16, in <module>
from rdkit.Chem import rdchem
AttributeError: _ARRAY_API not found
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.2.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2. This happened because due to an incompatibility between the version of NumPy installed in Q6) To get the output as ersilia test .... > log.txt |
The fixes will be pushed along with the new updates. |
Hi @Abellegese Thanks for the clarifications. Some comments to see if I understood:
I understand @Abellegese that all this is using PY3.8 only? this should also be fixed as soon as possible. |
Hi @GemmaTuron I will try to push this changes. On ersilia working 3.8 currently, am looking into the ruff refactoring I made (about 233 file formatted ) to see if I made any code change. I checked 189 files but could not find any code change except formating and linting, removing unused variables and imports, fixing variable name etc. I will check the rest of the files if I made a mistake. We will fix this as soon as possible. Also you understood it correctly the inspect command I explained. |
Another question for discussion: should we add a flag to save the output of the test to a more parsable file, for example a .json file, rather than just outputing the log in txt? This could come in handy for workflows maybe. Let me know your thoughts! |
Yes thats sounds good. It currently reports as a table if you don't add any |
but the table is saved in TXT format? Wouldn't it be better to convert the tables to a JSON format for automatic parsing? Then you can get a notification with the specific test that failed. I guess you could do that from a txt as well but if properly formatted the Json or yml would be more versatile? |
The {
"Is Github Url Available": {
"Status": true,
"Details": "Is Github Url Available Repository exists.Details"
},
"Complete Metadata": {
"Status": true,
"Details": "Complete Metadata Details Metadata is complete."
},
...
} We can use such methods to get detailed json parsed report as well. But we may want keep displaying reports as table format in the terminal, right @GemmaTuron. |
More questions:
|
Re Q4 - Example command updates - this was done quite some time back as part of CLI clean up. Referencing the relevant PR: #1430 In all places, the example command is being used through the CLI, and not the Python API, explaining one way this slipped through. |
Re Q5 and Q6:
|
Re 3.8 and 3.10: That one is throwing me off as well, I am trying to reproduce this and nail it down. |
yeap, that makes sense. We need to introduce stronger testing for the Python API as we use it quite a lot in some applications. |
@Abellegese and @DhanshreeA |
Okay @GemmaTuron we will. |
I'll close this issue as this is already being tackled in the refactoring |
Describe the bug.
@Abellegese please check when you can, I do not know if I have something set up wrong in my system or there is a version problem.
I am trying the ersilia test command but I get an error when trying to test eos3b5e (molweight) I haven't had time to have a detailed look but here is the log. Same happened with another model I used as example, eos5guo. I have the latest ersilia code pulled locally and installed the [test] extension. Working on Ubuntu.
eos3b5e_test.txt
Describe the steps to reproduce the behavior
No response
Operating environment
Ubuntu 22.04 LTS
The text was updated successfully, but these errors were encountered: