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

🐛 Bug: Header picked up wrong from example file #1549

Open
GemmaTuron opened this issue Feb 12, 2025 · 4 comments
Open

🐛 Bug: Header picked up wrong from example file #1549

GemmaTuron opened this issue Feb 12, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@GemmaTuron
Copy link
Member

Describe the bug.

I have come across this issue in several models and I cannot bypass it as I dont understand its source. The model runs but it takes the wrong headers for the outputs, always putting "outcome" instead of the list of expected headers. In this case, for model eos78ao:

(ersilia) gturon@pujarnol:~/github$ ersilia -v run -i test.csv -o drugbank_test.csv
21:24:25 | DEBUG    | Getting session from /home/gturon/eos/sessions/session_275452/session.json
21:24:25 | DEBUG    | Getting session from /home/gturon/eos/sessions/session_275452/session.json
21:24:25 | DEBUG    | Getting session from /home/gturon/eos/sessions/session_275452/session.json
21:24:25 | DEBUG    | Getting session from /home/gturon/eos/sessions/session_275452/session.json
21:24:25 | DEBUG    | Is fetched: True
21:24:25 | DEBUG    | Schema available in /home/gturon/eos/dest/eos78ao/api_schema.json
21:24:25 | DEBUG    | Setting BentoML AutoService for eos78ao
21:24:25 | INFO     | Service class provided
21:24:25 | DEBUG    | Using port 41879
21:24:25 | DEBUG    | Starting Docker Daemon service
21:24:25 | DEBUG    | Creating container tmp logs folder /home/gturon/eos/sessions/session_275452/_logs/tmp and mounting as volume in container
21:24:25 | DEBUG    | Image ersiliaos/eos78ao:latest is available locally
21:24:25 | DEBUG    | Using port 33189
21:24:25 | DEBUG    | Starting Docker Daemon service
21:24:25 | DEBUG    | Creating container tmp logs folder /home/gturon/eos/sessions/session_275452/_logs/tmp and mounting as volume in container
21:24:25 | INFO     | Done with initialization!
21:24:25 | INFO     | Starting runner
21:24:25 | DEBUG    | Trying standard API
21:24:25 | INFO     | You are running the app with a standard runner. Beware that this runner does not do as many checks on the input as the conventional runner: use it at your own risk.
21:24:25 | DEBUG    | Standard API processor started at http://0.0.0.0:55991
21:24:25 | DEBUG    | This is the input type: ['Compound']
21:24:26 | DEBUG    | Determining header from standard output file: /home/gturon/eos/dest/eos78ao/example_standard_output.csv
21:24:26 | DEBUG    | This is the expected header (max 10): ['key', 'input', 'outcome']
21:24:26 | DEBUG    | It seems amenable for standard run
21:24:26 | DEBUG    | Starting standard runner
21:24:26 | DEBUG    | Two columns found in input
drugbank_test.csv

the output in csv is:

key,input,outcome
DB00006,CC[C@H](C)[C@H](NC(=O)[C@H](CCC(O)=O)NC(=O)[C@H](CCC(O)=O)NC(=O)[C@H](CC1=CC=CC=C1)NC(=O)[C@H](CC(O)=O)NC(=O)CNC(=O)[C@H](CC(N)=O)NC(=O)CNC(=O)CNC(=O)CNC(=O)CNC(=O)[C@@H]1CCCN1C(=O)[C@H](CCCNC(N)=N)NC(=O)[C@@H]1CCCN1C(=O)[C@H](N)CC1=CC=CC=C1)C(=O)N1CCC[C@H]1C(=O)N[C@@H](CCC(O)=O)C(=O)N[C@@H](CCC(O)=O)C(=O)N[C@@H](CC1=CC=C(O)C=C1)C(=O)N[C@@H](CC(C)C)C(O)=O,116.62299446005748,86.47263888365579,6.0,4.0,190.059247471018,2.427362205191924,4.802288542980252,190.059247471018,1.2261886933614066,5.92244693911214,5.129361815012785,0.03309265687105022,4.375821272837621,42672119.82657053,275303.9988811002,20.30989635740943,18.0,18.0,293.0,155.0,0.0,0.0,57.0,138.0,0.0,98.0,24.0,33.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2408.0,2042.0,2714.0,2896.0,3425.0,4359.0,4112.0,4276.0,4938.0,890.0,1113.0,

Describe the steps to reproduce the behavior

No response

Operating environment

Ubuntu 24.04

@GemmaTuron GemmaTuron added the bug Something isn't working label Feb 12, 2025
@GemmaTuron
Copy link
Member Author

GemmaTuron commented Feb 13, 2025

Hi @DhanshreeA & @Abellegese

I have found this issue again when rebuilding the model eos78ao locally and fetching from_dir. In this case, the model is trying to pick up the example file for the header, but using the INPUT file, which obviously does not have headers for the output (takes smiles). Hope this helps in debugging this issue.
Here the error:

(ersilia) gturon@pujarnol:~/github$ ersilia -v run -i test.csv -o test_ersilia.csv
12:29:02 | DEBUG    | Getting session from /home/gturon/eos/sessions/session_275452/session.json
12:29:02 | DEBUG    | Getting session from /home/gturon/eos/sessions/session_275452/session.json
12:29:02 | DEBUG    | Getting session from /home/gturon/eos/sessions/session_275452/session.json
12:29:02 | DEBUG    | Getting session from /home/gturon/eos/sessions/session_275452/session.json
12:29:02 | DEBUG    | Is fetched: True
12:29:02 | DEBUG    | Schema available in /home/gturon/eos/dest/eos78ao/api_schema.json
12:29:02 | DEBUG    | Setting BentoML AutoService for eos78ao
12:29:02 | INFO     | Service class provided
12:29:02 | DEBUG    | Pack method is: bentoml
12:29:02 | DEBUG    | Pack method is: bentoml
12:29:02 | INFO     | Done with initialization!
12:29:02 | INFO     | Starting runner
12:29:02 | DEBUG    | Trying standard API
12:29:02 | INFO     | You are running the app with a standard runner. Beware that this runner does not do as many checks on the input as the conventional runner: use it at your own risk.
12:29:02 | DEBUG    | Standard API processor started at http://127.0.0.1:44861
12:29:02 | DEBUG    | This is the input type: ['Compound']
12:29:02 | DEBUG    | Determining header from predefined example file: model/framework/examples/input.csv
12:29:02 | DEBUG    | This is the expected header (max 10): ['key', 'input', 'smiles']
12:29:02 | DEBUG    | It seems amenable for standard run
12:29:02 | DEBUG    | Starting standard runner
12:29:02 | DEBUG    | One column found in input
test_ersilia.csv

@Abellegese
Copy link
Contributor

@GemmaTuron @DhanshreeA the standard runner csv serializer does not have key expansion thats why this happened.

@GemmaTuron
Copy link
Member Author

If it helps when I remove the examples folder and re-fetch from dir again the input file is not picked up as example and the correct output file is generated:

(ersilia) gturon@pujarnol:~/github$ ersilia -v run -i test.csv -o test_ersilia.csv
12:36:10 | DEBUG    | Getting session from /home/gturon/eos/sessions/session_275452/session.json
12:36:10 | DEBUG    | Getting session from /home/gturon/eos/sessions/session_275452/session.json
12:36:10 | DEBUG    | Getting session from /home/gturon/eos/sessions/session_275452/session.json
12:36:10 | DEBUG    | Getting session from /home/gturon/eos/sessions/session_275452/session.json
12:36:10 | DEBUG    | Is fetched: True
12:36:10 | DEBUG    | Schema available in /home/gturon/eos/dest/eos78ao/api_schema.json
12:36:10 | DEBUG    | Setting BentoML AutoService for eos78ao
12:36:10 | INFO     | Service class provided
12:36:10 | DEBUG    | Pack method is: bentoml
12:36:10 | DEBUG    | Pack method is: bentoml
12:36:10 | INFO     | Done with initialization!
12:36:10 | INFO     | Starting runner
12:36:10 | DEBUG    | Trying standard API
12:36:10 | INFO     | You are running the app with a standard runner. Beware that this runner does not do as many checks on the input as the conventional runner: use it at your own risk.
12:36:10 | DEBUG    | Standard API processor started at http://127.0.0.1:44181
12:36:10 | DEBUG    | This is the input type: ['Compound']
12:36:10 | DEBUG    | Determining header from standard output file: /home/gturon/eos/dest/eos78ao/example_standard_output.csv
12:36:10 | DEBUG    | This is the expected header (max 10): ['key', 'input', 'ABC', 'ABCGG', 'nAcid', 'nBase', 'SpAbs_A', 'SpMax_A', 'SpDiam_A', 'SpAD_A']
12:36:10 | DEBUG    | It seems amenable for standard run
12:36:10 | DEBUG    | Starting standard runner
12:36:10 | DEBUG    | One column found in input
test_ersilia.csv

@GemmaTuron
Copy link
Member Author

If you need more examples, eos6ru3 (dockerhub version) shows this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: On Hold
Development

No branches or pull requests

2 participants