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
221 stars 148 forks source link

πŸ› Bug: Failed Test with the `ersilia test <model_id> command` #929

Closed Inyrkz closed 9 months ago

Inyrkz commented 10 months ago

Describe the bug.

When testing models with the ersilia test command. It fails.

Calculating model size...
🚨🚨🚨 Something went wrong with Ersilia 🚨🚨🚨

Error message:

name 'run_command_check_output' is not defined
If this error message is not helpful, open an issue at:
 - https://github.com/ersilia-os/ersilia
Or feel free to reach out to us at:
 - hello[at]ersilia.io

In the ersilia/publish/test.py file in the ersilia repo, the function is not imported. It is used in line 481.

@staticmethod
    def conda_prefix(is_base):
        o = run_command_check_output("which conda").rstrip()
        if o:
            o = os.path.abspath(os.path.join(o, "..", ".."))
            return o
        if is_base:
            o = run_command_check_output("echo $CONDA_PREFIX").rstrip()
            return o
        else:
            o = run_command_check_output("echo $CONDA_PREFIX_1").rstrip()
            return o

From the ersilia/utils.py file I see it is imported like this from .terminal import run_command, run_command_check_output

Describe the steps to reproduce the behavior

No response

Expected behavior.

No response

Screenshots.

No response

Operating environment

Codespace

Additional context

No response

GemmaTuron commented 10 months ago

I think the same @Inyrkz !

Have you tried it? If you use the pip install -e .option, every change you do in your local will be reflected immediatly, so could you add the import and if that fixes the issue open a PR to Ersilia?

Inyrkz commented 10 months ago

Ok, I'll check it out.

On Fri, Dec 22, 2023, 3:18 PM gemmaturon @.***> wrote:

I think the same @Inyrkz https://github.com/Inyrkz !

Have you tried it? If you use the pip install -e . option, every change you do in your local will be reflected immediatly, so could you add the import and if that fixes the issue open a PR to Ersilia?

β€” Reply to this email directly, view it on GitHub https://github.com/ersilia-os/ersilia/issues/929#issuecomment-1867740224, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANGRFV4IMJZSDUW2NPV44F3YKWJE3AVCNFSM6AAAAABA7YLVLCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRXG42DAMRSGQ . You are receiving this because you were mentioned.Message ID: @.***>

Inyrkz commented 10 months ago

I added this line of code to fix the initial issue

from ..utils.terminal import run_command_check_output

It gave another error that required isuara to be installed. Then another error required the model to be served first. After resolving all that, this is the new error.

(ersilia) affiah@affiah-Latitude-E7450:~/Downloads/ersilia$ ersilia -v test eos2r5a
14:47:25 | DEBUG    | Reading model information from /home/affiah/eos/dest/eos2r5a/information.json
14:47:25 | DEBUG    | Reading model information from /home/affiah/eos/dest/eos2r5a/information.json
14:47:25 | DEBUG    | Checking that model information is correct
Beginning checks for eos2r5a model information:
Checking model ID...
Checking model slug...
Checking model description...
Checking model task...
Checking model input...
Checking model input shape...
Checking model output...
Checking model output type...
Checking model output shape...
SUCCESS! Model information verified.

14:47:25 | DEBUG    | Getting session from /home/affiah/eos/session.json
Testing model on single smiles input...

14:47:28 | DEBUG    | Is fetched: True
14:47:28 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
14:47:28 | DEBUG    | Setting AutoService for eos2r5a
14:47:28 | INFO     | Service class provided
14:47:32 | DEBUG    | No file splitting necessary!
14:47:35 | DEBUG    | Reading card from eos2r5a
14:47:35 | DEBUG    | Reading shape from eos2r5a
14:47:35 | DEBUG    | Input Shape: Single
14:47:35 | DEBUG    | Input type is: compound
14:47:35 | DEBUG    | Input shape is: Single
14:47:35 | DEBUG    | Importing module: .types.compound
14:47:35 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
14:47:36 | DEBUG    | InputShapeSingle shape: Single
14:47:36 | DEBUG    | API eos2r5a:run initialized at URL http://127.0.0.1:48831
14:47:36 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
Printing output...
14:47:36 | DEBUG    | Posting to run
14:47:36 | DEBUG    | Batch size 100
14:47:37 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
14:47:37 | DEBUG    | Checking for already available calculations in the data lake
14:47:37 | DEBUG    | Inspecting 0...
14:47:37 | DEBUG    | Calculating using model eos2r5a
14:47:37 | DEBUG    | Saving in /tmp/ersilia-svid0p09/todo_output.json
14:47:37 | DEBUG    | Expected number: 1
14:47:37 | DEBUG    | Entity is list: False
14:47:37 | DEBUG    | Resolving columns
14:47:37 | DEBUG    | Done with sniffing the file
14:47:37 | DEBUG    | Input: {2: 1, 3: 1}
14:47:37 | DEBUG    | Key: {1: 1}
14:47:37 | DEBUG    | Key: [1]
14:47:37 | DEBUG    | Input: [2]
14:47:37 | DEBUG    | Candidate header is ['0', 'VQPBIJGXSXEOCU-UHFFFAOYSA-N', 'COc1ccc2c(NC(=O)Nc3cccc(C(F)(F)F)n3)ccnc2c1', 'COc1ccc2c(NC(=O)Nc3cccc(C(F)(F)F)n3)ccnc2c1']
14:47:37 | DEBUG    | Matching for input is [2]
14:47:37 | DEBUG    | Has header False
14:47:37 | DEBUG    | Schema {'input': [2], 'key': [1]}
🚨🚨🚨 Something went wrong with Ersilia 🚨🚨🚨

Error message:

object of type 'NoneType' has no len()
If this error message is not helpful, open an issue at:
 - https://github.com/ersilia-os/ersilia
Or feel free to reach out to us at:
 - hello[at]ersilia.io

If you haven't, try to run your command in verbose mode (-v in the CLI)
 - You will find the console log file in: /home/affiah/eos/current.log
GemmaTuron commented 10 months ago

Thanks @Inyrkz for the testing. First, can we test if the model eos2r5a is working (a simple direct fetch and passing one molecule for testing)? Second, we should have served the model before testing, so that the test command does not even need the model id:

ersilia serve eos5ra2
ersilia test

Third, where is the isaura requirement? It should never be a hard requirement so we might want to find where this is happening and remove it

Inyrkz commented 10 months ago
  1. The model eos2r5a: retrosynthetic-accessibility works.

    (base) affiah@affiah-Latitude-E7450:~/Desktop/ersilia$ ersilia api run -i "C1=C(SC(=N1)SC2=NN=C(S2)N)[N+](=O)[O-]"
    {
    "input": {
        "key": "NQQBNZBOOHHVQP-UHFFFAOYSA-N",
        "input": "C1=C(SC(=N1)SC2=NN=C(S2)N)[N+](=O)[O-]",
        "text": "C1=C(SC(=N1)SC2=NN=C(S2)N)[N+](=O)[O-]"
    },
    "output": {
        "outcome": [
            0.9924924
        ]
    }
    }
  2. This pattern ersilia serve eos2r5a then ersilia test doesn't work. It requires the model argument to be passed.

    
    (base) affiah@affiah-Latitude-E7450:~/Desktop/ersilia$ ersilia test
    Usage: ersilia test [OPTIONS] MODEL
    Try 'ersilia test --help' for help.

Error: Missing argument 'MODEL'.

Inyrkz commented 10 months ago

I installed the latest version of ersilia, and ran the ersilia test command again. The output doesn't get stuck at the isaura required warning. It runs without isaura.

Here is the new error.

(base) affiah@affiah-Latitude-E7450:~/Desktop/ersilia$ ersilia -v test eos2r5a
12:24:26 | DEBUG    | Reading model information from /home/affiah/eos/dest/eos2r5a/information.json
12:24:26 | DEBUG    | Reading model information from /home/affiah/eos/dest/eos2r5a/information.json
12:24:26 | DEBUG    | Checking that model information is correct
Beginning checks for eos2r5a model information:
Checking model ID...
Checking model slug...
Checking model description...
Checking model task...
Checking model input...
Checking model input shape...
Checking model output...
Checking model output type...
Checking model output shape...
SUCCESS! Model information verified.

12:24:26 | DEBUG    | Getting session from /home/affiah/eos/session.json
Testing model on single smiles input...

12:24:26 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
12:24:26 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
12:24:27 | DEBUG    | Is fetched: True
12:24:27 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:24:27 | DEBUG    | Setting AutoService for eos2r5a
12:24:27 | INFO     | Service class provided
12:24:28 | DEBUG    | No file splitting necessary!
12:24:30 | DEBUG    | Reading card from eos2r5a
12:24:30 | DEBUG    | Reading shape from eos2r5a
12:24:30 | DEBUG    | Input Shape: Single
12:24:30 | DEBUG    | Input type is: compound
12:24:30 | DEBUG    | Input shape is: Single
12:24:30 | DEBUG    | Importing module: .types.compound
12:24:30 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:24:30 | DEBUG    | InputShapeSingle shape: Single
12:24:30 | DEBUG    | API eos2r5a:run initialized at URL http://127.0.0.1:49201
12:24:30 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
Printing output...
12:24:30 | DEBUG    | Posting to run
12:24:30 | DEBUG    | Batch size 100
12:24:30 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:24:34 | DEBUG    | Status code: 200
12:24:34 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:24:34 | DEBUG    | Done with unique posting
{
    "input": {
        "key": "VQPBIJGXSXEOCU-UHFFFAOYSA-N",
        "input": "COc1ccc2c(NC(=O)Nc3cccc(C(F)(F)F)n3)ccnc2c1",
        "text": "COc1ccc2c(NC(=O)Nc3cccc(C(F)(F)F)n3)ccnc2c1"
    },
    "output": {
        "outcome": [
            0.9974063
        ]
    }
}
12:24:34 | DEBUG    | Getting session from /home/affiah/eos/session.json
12:24:35 | DEBUG    | Reading card from eos2r5a
12:24:35 | DEBUG    | Reading shape from eos2r5a
12:24:35 | DEBUG    | Input Shape: Single
12:24:35 | DEBUG    | Input type is: compound
12:24:35 | DEBUG    | Input shape is: Single
12:24:35 | DEBUG    | Importing module: .types.compound
12:24:35 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:24:35 | DEBUG    | InputShapeSingle shape: Single

Testing model on input of 5 smiles given by 'example' command...

12:24:35 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
12:24:35 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
12:24:37 | DEBUG    | Is fetched: True
12:24:37 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:24:37 | DEBUG    | Setting AutoService for eos2r5a
12:24:37 | INFO     | Service class provided
12:24:37 | DEBUG    | No file splitting necessary!
12:24:39 | DEBUG    | Reading card from eos2r5a
12:24:39 | DEBUG    | Reading shape from eos2r5a
12:24:39 | DEBUG    | Input Shape: Single
12:24:39 | DEBUG    | Input type is: compound
12:24:39 | DEBUG    | Input shape is: Single
12:24:39 | DEBUG    | Importing module: .types.compound
12:24:39 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:24:39 | DEBUG    | InputShapeSingle shape: Single
12:24:39 | DEBUG    | API eos2r5a:run initialized at URL http://127.0.0.1:49201
12:24:39 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
Printing output...
12:24:39 | DEBUG    | Posting to run
12:24:39 | DEBUG    | Batch size 100
12:24:39 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:24:43 | DEBUG    | Status code: 200
12:24:43 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:24:43 | DEBUG    | Done with unique posting
{
    "input": {
        "key": "RHFUXPCCELGMFC-UXHICEINSA-N",
        "input": "CC(=O)N(OCc1ccccc1)[C@H]1[C@H](O)C(C)(C)Oc2ccc(cc12)C#N",
        "text": "CC(=O)N(OCc1ccccc1)[C@H]1[C@H](O)C(C)(C)Oc2ccc(cc12)C#N"
    },
    "output": {
        "outcome": [
            0.67009294
        ]
    }
}
{
    "input": {
        "key": "RQTOOFIXOKYGAN-UHFFFAOYSA-N",
        "input": "CCCc1c2oc(cc(=O)c2cc2c1n(CC)c(cc2=O)C(O)=O)C(O)=O",
        "text": "CCCc1c2oc(cc(=O)c2cc2c1n(CC)c(cc2=O)C(O)=O)C(O)=O"
    },
    "output": {
        "outcome": [
            0.824488
        ]
    }
}
{
    "input": {
        "key": "KUBCEEMXQZUPDQ-UHFFFAOYSA-N",
        "input": "CN(C)CCc1ccc(O)cc1",
        "text": "CN(C)CCc1ccc(O)cc1"
    },
    "output": {
        "outcome": [
            0.986865
        ]
    }
}
{
    "input": {
        "key": "HDHDTKMUACZDAA-PHNIDTBTSA-N",
        "input": "[H][C@]1(Cc2ccccc2)NC(=O)[C@H](Cc2cnc[nH]2)NC(=O)[C@@H](C)NC(=O)[C@]([H])(CSSC[C@H](NC(=O)[C@H](Cc2c[nH]c3ccccc23)NC(=O)[C@H](CCCNC(N)=N)NC1=O)C(N)=O)NC(=O)[C@H](CCCNC(N)=N)NC(C)=O",
        "text": "[H][C@]1(Cc2ccccc2)NC(=O)[C@H](Cc2cnc[nH]2)NC(=O)[C@@H](C)NC(=O)[C@]([H])(CSSC[C@H](NC(=O)[C@H](Cc2c[nH]c3ccccc23)NC(=O)[C@H](CCCNC(N)=N)NC1=O)C(N)=O)NC(=O)[C@H](CCCNC(N)=N)NC(C)=O"
    },
    "output": {
        "outcome": [
            0.03987421
        ]
    }
}
{
    "input": {
        "key": "SMOBCLHAZXOKDQ-ZJUUUORDSA-N",
        "input": "OS(=O)(=O)ON1[C@H]2CN([C@@H](CC2)C(=O)NC2CCNCC2)C1=O",
        "text": "OS(=O)(=O)ON1[C@H]2CN([C@@H](CC2)C(=O)NC2CCNCC2)C1=O"
    },
    "output": {
        "outcome": [
            0.46643698
        ]
    }
}

Confirming model produces consistent output...
12:24:43 | DEBUG    | Getting session from /home/affiah/eos/session.json
12:24:45 | DEBUG    | Reading card from eos2r5a
12:24:45 | DEBUG    | Reading shape from eos2r5a
12:24:45 | DEBUG    | Input Shape: Single
12:24:45 | DEBUG    | Input type is: compound
12:24:45 | DEBUG    | Input shape is: Single
12:24:45 | DEBUG    | Importing module: .types.compound
12:24:45 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:24:45 | DEBUG    | InputShapeSingle shape: Single
12:24:45 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
12:24:45 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
12:24:46 | DEBUG    | Is fetched: True
12:24:46 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:24:46 | DEBUG    | Setting AutoService for eos2r5a
12:24:46 | INFO     | Service class provided
12:24:47 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
12:24:47 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
12:24:49 | DEBUG    | Is fetched: True
12:24:49 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:24:49 | DEBUG    | Setting AutoService for eos2r5a
12:24:49 | INFO     | Service class provided
12:24:49 | DEBUG    | No file splitting necessary!
12:24:51 | DEBUG    | Reading card from eos2r5a
12:24:51 | DEBUG    | Reading shape from eos2r5a
12:24:51 | DEBUG    | Input Shape: Single
12:24:51 | DEBUG    | Input type is: compound
12:24:51 | DEBUG    | Input shape is: Single
12:24:51 | DEBUG    | Importing module: .types.compound
12:24:51 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:24:51 | DEBUG    | InputShapeSingle shape: Single
12:24:51 | DEBUG    | API eos2r5a:run initialized at URL http://127.0.0.1:49201
12:24:51 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:24:51 | DEBUG    | No file splitting necessary!
12:24:53 | DEBUG    | Reading card from eos2r5a
12:24:53 | DEBUG    | Reading shape from eos2r5a
12:24:53 | DEBUG    | Input Shape: Single
12:24:53 | DEBUG    | Input type is: compound
12:24:53 | DEBUG    | Input shape is: Single
12:24:53 | DEBUG    | Importing module: .types.compound
12:24:53 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:24:53 | DEBUG    | InputShapeSingle shape: Single
12:24:53 | DEBUG    | API eos2r5a:run initialized at URL http://127.0.0.1:49201
12:24:53 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:24:53 | DEBUG    | Posting to run
12:24:53 | DEBUG    | Batch size 100
12:24:53 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:24:57 | DEBUG    | Status code: 200
12:24:57 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:24:57 | DEBUG    | Done with unique posting
12:24:57 | DEBUG    | Posting to run
12:24:57 | DEBUG    | Batch size 100
12:24:57 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:25:01 | DEBUG    | Status code: 200
12:25:01 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:25:01 | DEBUG    | Done with unique posting
Model output is consistent!

Confirming there are same number of outputs as inputs...
Number of inputs: 5
Number of outputs: 5
Number of outputs and inputs are equal!

Calculating model size...

Model Size:
KB: 55.291015625
MB: 0.05399513244628906
GB: 5.272962152957916e-05

Running the model bash script...
12:25:03 | DEBUG    | Reading card from eos2r5a
12:25:03 | DEBUG    | Reading shape from eos2r5a
12:25:03 | DEBUG    | Input Shape: Single
12:25:03 | DEBUG    | Input type is: compound
12:25:03 | DEBUG    | Input shape is: Single
12:25:03 | DEBUG    | Importing module: .types.compound
12:25:03 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:25:03 | DEBUG    | InputShapeSingle shape: Single
Executing 'bash run.sh'...
Bash execution completed!

Captured Output:
/home/affiah/eos/repository/eos2r5a/20240103121654_B677E2/eos2r5a/artifacts/checkpoints/XGB_chembl_ecfp_counts/model.pkl

Captured Error:

Executing ersilia run...
12:25:04 | DEBUG    | Getting session from /home/affiah/eos/session.json
12:25:04 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
12:25:04 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
12:25:05 | DEBUG    | Is fetched: True
12:25:05 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:25:05 | DEBUG    | Setting AutoService for eos2r5a
12:25:05 | INFO     | Service class provided
12:25:07 | DEBUG    | Reading card from eos2r5a
12:25:07 | DEBUG    | Reading shape from eos2r5a
12:25:07 | DEBUG    | Input Shape: Single
12:25:07 | DEBUG    | Input type is: compound
12:25:07 | DEBUG    | Input shape is: Single
12:25:07 | DEBUG    | Importing module: .types.compound
12:25:07 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:25:07 | DEBUG    | InputShapeSingle shape: Single
12:25:07 | DEBUG    | Expected number: 1
12:25:07 | DEBUG    | Entity is list: False
12:25:07 | DEBUG    | Resolving columns
12:25:07 | DEBUG    | Number of columns seems to be 1: assuming input is the only column: {'input': [0], 'key': None}
12:25:07 | DEBUG    | Candidate header is ['smilesONC(=O)CCCCCN1C(=O)c2cccc3cccc(C1=O)c23']
12:25:07 | DEBUG    | Matching for input is [0]
12:25:07 | DEBUG    | Has header True
12:25:07 | DEBUG    | Schema {'input': [0], 'key': None}
12:25:07 | DEBUG    | Standardizing input single
12:25:07 | DEBUG    | Writing standardized input to /tmp/ersilia-t5o8hqml/standard_input_file.csv
12:25:07 | DEBUG    | Reading standard file from /tmp/ersilia-t5o8hqml/standard_input_file.csv
12:25:07 | DEBUG    | File has 5 lines
12:25:07 | DEBUG    | No file splitting necessary!
12:25:09 | DEBUG    | Reading card from eos2r5a
12:25:09 | DEBUG    | Reading shape from eos2r5a
12:25:09 | DEBUG    | Input Shape: Single
12:25:09 | DEBUG    | Input type is: compound
12:25:09 | DEBUG    | Input shape is: Single
12:25:09 | DEBUG    | Importing module: .types.compound
12:25:09 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:25:09 | DEBUG    | InputShapeSingle shape: Single
12:25:09 | DEBUG    | API eos2r5a:run initialized at URL http://127.0.0.1:49201
12:25:09 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:25:09 | DEBUG    | Posting to run
12:25:09 | DEBUG    | Batch size 100
12:25:09 | DEBUG    | Expected number: 1
12:25:09 | DEBUG    | Entity is list: False
12:25:09 | DEBUG    | Resolving columns
12:25:09 | DEBUG    | Number of columns seems to be 1: assuming input is the only column: {'input': [0], 'key': None}
12:25:09 | DEBUG    | Candidate header is ['smilesONC(=O)CCCCCN1C(=O)c2cccc3cccc(C1=O)c23']
12:25:09 | DEBUG    | Matching for input is [0]
12:25:09 | DEBUG    | Has header True
12:25:09 | DEBUG    | Schema {'input': [0], 'key': None}
12:25:09 | DEBUG    | Standardizing input single
12:25:09 | DEBUG    | Writing standardized input to /tmp/ersilia-zittiqig/standard_input_file.csv
12:25:09 | DEBUG    | Reading standard file from /tmp/ersilia-zittiqig/standard_input_file.csv
12:25:10 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:25:13 | DEBUG    | Status code: 200
12:25:13 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
12:25:13 | DEBUG    | Done with unique posting
12:25:24 | DEBUG    | Data: outcome
12:25:24 | DEBUG    | Values: [0.06373696]
12:25:24 | DEBUG    | Datatype: numeric_array
Ersilia run completed!

Bash output:
 [{'RA_score': '0.06373696'}, {'RA_score': '0.7816698'}, {'RA_score': '0.9877765'}, {'RA_score': '0.98907834'}]

Ersilia output:
 [{'RA_score': '0.06373696'}, {'RA_score': '0.7816698'}, {'RA_score': '0.9877765'}, {'RA_score': '0.98907834'}]
🚨🚨🚨 Something went wrong with Ersilia 🚨🚨🚨

Error message:

'NoneType' object has no attribute 'ratio'
If this error message is not helpful, open an issue at:
 - https://github.com/ersilia-os/ersilia
Or feel free to reach out to us at:
 - hello[at]ersilia.io

If you haven't, try to run your command in verbose mode (-v in the CLI)
 - You will find the console log file in: /home/affiah/eos/current.log
Inyrkz commented 10 months ago

I'll try testing on another model eos3b5e to see if the error persists.

Inyrkz commented 10 months ago

While testing on model eos3b5e, it gave an error, warning that the model should be served first.

(base) affiah@affiah-Latitude-E7450:~/Desktop/ersilia$ ersilia -v test eos3b5e
12:29:55 | DEBUG    | Reading model information from /home/affiah/eos/dest/eos3b5e/information.json
12:29:55 | DEBUG    | Reading model information from /home/affiah/eos/dest/eos3b5e/information.json
12:29:55 | DEBUG    | Checking that model information is correct
Beginning checks for eos3b5e model information:
Checking model ID...
Checking model slug...
Checking model description...
Checking model task...
Checking model input...
Checking model input shape...
Checking model output...
Checking model output type...
Checking model output shape...
SUCCESS! Model information verified.

12:29:55 | DEBUG    | No session exists
Testing model on single smiles input...

12:29:55 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
12:29:55 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
12:29:59 | DEBUG    | Is fetched: True
12:29:59 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:29:59 | DEBUG    | Setting AutoService for eos3b5e
12:29:59 | DEBUG    | No service class provided, deciding automatically
12:29:59 | DEBUG    | Service class file exists in folder /home/affiah/eos/repository/eos3b5e/20231005152640_06BF06/service_class.txt
12:29:59 | DEBUG    | Service class: conda
12:29:59 | DEBUG    | No file splitting necessary!
🚨🚨🚨 Something went wrong with Ersilia 🚨🚨🚨

Error message:

Process ID file does not exist. Please serve the model first!
If this error message is not helpful, open an issue at:
 - https://github.com/ersilia-os/ersilia
Or feel free to reach out to us at:
 - hello[at]ersilia.io

If you haven't, try to run your command in verbose mode (-v in the CLI)
 - You will find the console log file in: /home/affiah/eos/current.log
Inyrkz commented 10 months ago

After serving the model, eos3b5e: molecular-weight, and testing, it gives another error

(base) affiah@affiah-Latitude-E7450:~/Desktop/ersilia$ ersilia -v test eos3b5e
12:36:07 | DEBUG    | Reading model information from /home/affiah/eos/dest/eos3b5e/information.json
12:36:07 | DEBUG    | Reading model information from /home/affiah/eos/dest/eos3b5e/information.json
12:36:07 | DEBUG    | Checking that model information is correct
Beginning checks for eos3b5e model information:
Checking model ID...
Checking model slug...
Checking model description...
Checking model task...
Checking model input...
Checking model input shape...
Checking model output...
Checking model output type...
Checking model output shape...
SUCCESS! Model information verified.

12:36:07 | DEBUG    | Getting session from /home/affiah/eos/session.json
Testing model on single smiles input...

12:36:07 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
12:36:07 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
12:36:09 | DEBUG    | Is fetched: True
12:36:09 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:36:09 | DEBUG    | Setting AutoService for eos3b5e
12:36:09 | INFO     | Service class provided
12:36:10 | DEBUG    | No file splitting necessary!
12:36:11 | DEBUG    | Reading card from eos3b5e
12:36:11 | DEBUG    | Reading shape from eos3b5e
12:36:11 | DEBUG    | Input Shape: Single
12:36:11 | DEBUG    | Input type is: compound
12:36:11 | DEBUG    | Input shape is: Single
12:36:11 | DEBUG    | Importing module: .types.compound
12:36:11 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:36:11 | DEBUG    | InputShapeSingle shape: Single
12:36:11 | DEBUG    | API eos3b5e:run initialized at URL http://127.0.0.1:34827
12:36:11 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
Printing output...
12:36:11 | DEBUG    | Posting to run
12:36:11 | DEBUG    | Batch size 100
12:36:11 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:36:14 | DEBUG    | Status code: 200
12:36:14 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:36:14 | DEBUG    | Done with unique posting
{
    "input": {
        "key": "VQPBIJGXSXEOCU-UHFFFAOYSA-N",
        "input": "COc1ccc2c(NC(=O)Nc3cccc(C(F)(F)F)n3)ccnc2c1",
        "text": "COc1ccc2c(NC(=O)Nc3cccc(C(F)(F)F)n3)ccnc2c1"
    },
    "output": {
        "mw": 362.31100000000004
    }
}
12:36:14 | DEBUG    | Getting session from /home/affiah/eos/session.json
12:36:16 | DEBUG    | Reading card from eos3b5e
12:36:16 | DEBUG    | Reading shape from eos3b5e
12:36:16 | DEBUG    | Input Shape: Single
12:36:16 | DEBUG    | Input type is: compound
12:36:16 | DEBUG    | Input shape is: Single
12:36:16 | DEBUG    | Importing module: .types.compound
12:36:16 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:36:16 | DEBUG    | InputShapeSingle shape: Single

Testing model on input of 5 smiles given by 'example' command...

12:36:16 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
12:36:16 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
12:36:17 | DEBUG    | Is fetched: True
12:36:17 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:36:17 | DEBUG    | Setting AutoService for eos3b5e
12:36:17 | INFO     | Service class provided
12:36:18 | DEBUG    | No file splitting necessary!
12:36:19 | DEBUG    | Reading card from eos3b5e
12:36:19 | DEBUG    | Reading shape from eos3b5e
12:36:19 | DEBUG    | Input Shape: Single
12:36:19 | DEBUG    | Input type is: compound
12:36:19 | DEBUG    | Input shape is: Single
12:36:19 | DEBUG    | Importing module: .types.compound
12:36:19 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:36:19 | DEBUG    | InputShapeSingle shape: Single
12:36:19 | DEBUG    | API eos3b5e:run initialized at URL http://127.0.0.1:34827
12:36:19 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
Printing output...
12:36:19 | DEBUG    | Posting to run
12:36:19 | DEBUG    | Batch size 100
12:36:19 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:36:22 | DEBUG    | Status code: 200
12:36:22 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:36:22 | DEBUG    | Done with unique posting
{
    "input": {
        "key": "WHUIENZXNGAHQI-GKZDNZBASA-N",
        "input": "OC(=O)CC\\C=C/C[C@@H]1CO[C@@H](O[C@@H]1c1ccccc1O)c1ccccc1Cl",
        "text": "OC(=O)CC\\C=C/C[C@@H]1CO[C@@H](O[C@@H]1c1ccccc1O)c1ccccc1Cl"
    },
    "output": {
        "mw": 402.87400000000014
    }
}
{
    "input": {
        "key": "FOYOGIUAMYSVIT-UHFFFAOYSA-N",
        "input": "Clc1ccc(cc1)C(=O)Nc1ccc(Cl)nc1",
        "text": "Clc1ccc(cc1)C(=O)Nc1ccc(Cl)nc1"
    },
    "output": {
        "mw": 267.115
    }
}
{
    "input": {
        "key": "JNUGFGAVPBYSHF-UHFFFAOYSA-N",
        "input": "Clc1cccc(c1)N1CCN(Cc2cncn2Cc2ccc(cc2)C#N)CC1=O",
        "text": "Clc1cccc(c1)N1CCN(Cc2cncn2Cc2ccc(cc2)C#N)CC1=O"
    },
    "output": {
        "mw": 405.8890000000002
    }
}
{
    "input": {
        "key": "DRSJLVGDSNWQBI-SFHVURJKSA-N",
        "input": "COc1cccc(OC)c1-c1ccc(C[C@H](NC(=O)c2c(Cl)cccc2Cl)C(O)=O)cc1",
        "text": "COc1cccc(OC)c1-c1ccc(C[C@H](NC(=O)c2c(Cl)cccc2Cl)C(O)=O)cc1"
    },
    "output": {
        "mw": 474.34000000000015
    }
}
{
    "input": {
        "key": "YKJYKKNCCRKFSL-RDBSUJKOSA-N",
        "input": "COc1ccc(C[C@H]2NC[C@H](O)[C@H]2OC(C)=O)cc1",
        "text": "COc1ccc(C[C@H]2NC[C@H](O)[C@H]2OC(C)=O)cc1"
    },
    "output": {
        "mw": 265.30899999999997
    }
}

Confirming model produces consistent output...
12:36:22 | DEBUG    | Getting session from /home/affiah/eos/session.json
12:36:24 | DEBUG    | Reading card from eos3b5e
12:36:24 | DEBUG    | Reading shape from eos3b5e
12:36:24 | DEBUG    | Input Shape: Single
12:36:24 | DEBUG    | Input type is: compound
12:36:24 | DEBUG    | Input shape is: Single
12:36:24 | DEBUG    | Importing module: .types.compound
12:36:24 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:36:24 | DEBUG    | InputShapeSingle shape: Single
12:36:24 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
12:36:24 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
12:36:25 | DEBUG    | Is fetched: True
12:36:25 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:36:25 | DEBUG    | Setting AutoService for eos3b5e
12:36:25 | INFO     | Service class provided
12:36:26 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
12:36:26 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
12:36:28 | DEBUG    | Is fetched: True
12:36:28 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:36:28 | DEBUG    | Setting AutoService for eos3b5e
12:36:28 | INFO     | Service class provided
12:36:29 | DEBUG    | No file splitting necessary!
12:36:30 | DEBUG    | Reading card from eos3b5e
12:36:30 | DEBUG    | Reading shape from eos3b5e
12:36:30 | DEBUG    | Input Shape: Single
12:36:30 | DEBUG    | Input type is: compound
12:36:30 | DEBUG    | Input shape is: Single
12:36:30 | DEBUG    | Importing module: .types.compound
12:36:30 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:36:30 | DEBUG    | InputShapeSingle shape: Single
12:36:30 | DEBUG    | API eos3b5e:run initialized at URL http://127.0.0.1:34827
12:36:30 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:36:30 | DEBUG    | No file splitting necessary!
12:36:32 | DEBUG    | Reading card from eos3b5e
12:36:32 | DEBUG    | Reading shape from eos3b5e
12:36:32 | DEBUG    | Input Shape: Single
12:36:32 | DEBUG    | Input type is: compound
12:36:32 | DEBUG    | Input shape is: Single
12:36:32 | DEBUG    | Importing module: .types.compound
12:36:32 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:36:32 | DEBUG    | InputShapeSingle shape: Single
12:36:32 | DEBUG    | API eos3b5e:run initialized at URL http://127.0.0.1:34827
12:36:32 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:36:32 | DEBUG    | Posting to run
12:36:32 | DEBUG    | Batch size 100
12:36:32 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:36:35 | DEBUG    | Status code: 200
12:36:35 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:36:35 | DEBUG    | Done with unique posting
12:36:35 | DEBUG    | Posting to run
12:36:35 | DEBUG    | Batch size 100
12:36:35 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:36:38 | DEBUG    | Status code: 200
12:36:38 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:36:38 | DEBUG    | Done with unique posting
Model output is consistent!

Confirming there are same number of outputs as inputs...
Number of inputs: 5
Number of outputs: 5
Number of outputs and inputs are equal!

Calculating model size...

Model Size:
KB: 46.4375
MB: 0.04534912109375
GB: 4.4286251068115234e-05

Running the model bash script...
12:36:39 | DEBUG    | Reading card from eos3b5e
12:36:39 | DEBUG    | Reading shape from eos3b5e
12:36:39 | DEBUG    | Input Shape: Single
12:36:39 | DEBUG    | Input type is: compound
12:36:39 | DEBUG    | Input shape is: Single
12:36:39 | DEBUG    | Importing module: .types.compound
12:36:39 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:36:39 | DEBUG    | InputShapeSingle shape: Single
Check halted. Either run.sh file does not exist, or model was not fetched via --from_github or --from_s3.
Inyrkz commented 10 months ago

Maybe the test requires that I fetch the model again and serve.

Inyrkz commented 10 months ago

After fetching the model, serving and testing. It still gives the same error.

(base) affiah@affiah-Latitude-E7450:~/Desktop/ersilia$ ersilia -v test eos3b5e
12:56:38 | DEBUG    | Reading model information from /home/affiah/eos/dest/eos3b5e/information.json
12:56:38 | DEBUG    | Reading model information from /home/affiah/eos/dest/eos3b5e/information.json
12:56:38 | DEBUG    | Checking that model information is correct
Beginning checks for eos3b5e model information:
Checking model ID...
Checking model slug...
Checking model description...
Checking model task...
Checking model input...
Checking model input shape...
Checking model output...
Checking model output type...
Checking model output shape...
SUCCESS! Model information verified.

12:56:38 | DEBUG    | Getting session from /home/affiah/eos/session.json
Testing model on single smiles input...

12:56:38 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
12:56:38 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
12:56:39 | DEBUG    | Is fetched: True
12:56:39 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:56:39 | DEBUG    | Setting AutoService for eos3b5e
12:56:39 | INFO     | Service class provided
12:56:42 | DEBUG    | No file splitting necessary!
12:56:43 | DEBUG    | Reading card from eos3b5e
12:56:43 | DEBUG    | Reading shape from eos3b5e
12:56:43 | DEBUG    | Input Shape: Single
12:56:43 | DEBUG    | Input type is: compound
12:56:43 | DEBUG    | Input shape is: Single
12:56:43 | DEBUG    | Importing module: .types.compound
12:56:43 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:56:43 | DEBUG    | InputShapeSingle shape: Single
12:56:43 | DEBUG    | API eos3b5e:run initialized at URL http://127.0.0.1:40923
12:56:43 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
Printing output...
12:56:43 | DEBUG    | Posting to run
12:56:43 | DEBUG    | Batch size 100
12:56:44 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:56:47 | DEBUG    | Status code: 200
12:56:47 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:56:47 | DEBUG    | Done with unique posting
{
    "input": {
        "key": "VQPBIJGXSXEOCU-UHFFFAOYSA-N",
        "input": "COc1ccc2c(NC(=O)Nc3cccc(C(F)(F)F)n3)ccnc2c1",
        "text": "COc1ccc2c(NC(=O)Nc3cccc(C(F)(F)F)n3)ccnc2c1"
    },
    "output": {
        "mw": 362.31100000000004
    }
}
12:56:47 | DEBUG    | Getting session from /home/affiah/eos/session.json
12:56:48 | DEBUG    | Reading card from eos3b5e
12:56:48 | DEBUG    | Reading shape from eos3b5e
12:56:48 | DEBUG    | Input Shape: Single
12:56:48 | DEBUG    | Input type is: compound
12:56:48 | DEBUG    | Input shape is: Single
12:56:48 | DEBUG    | Importing module: .types.compound
12:56:48 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:56:48 | DEBUG    | InputShapeSingle shape: Single

Testing model on input of 5 smiles given by 'example' command...

12:56:48 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
12:56:48 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
12:56:49 | DEBUG    | Is fetched: True
12:56:49 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:56:49 | DEBUG    | Setting AutoService for eos3b5e
12:56:49 | INFO     | Service class provided
12:56:51 | DEBUG    | No file splitting necessary!
12:56:53 | DEBUG    | Reading card from eos3b5e
12:56:53 | DEBUG    | Reading shape from eos3b5e
12:56:53 | DEBUG    | Input Shape: Single
12:56:53 | DEBUG    | Input type is: compound
12:56:53 | DEBUG    | Input shape is: Single
12:56:53 | DEBUG    | Importing module: .types.compound
12:56:53 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:56:53 | DEBUG    | InputShapeSingle shape: Single
12:56:53 | DEBUG    | API eos3b5e:run initialized at URL http://127.0.0.1:40923
12:56:53 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
Printing output...
12:56:53 | DEBUG    | Posting to run
12:56:53 | DEBUG    | Batch size 100
12:56:53 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:56:56 | DEBUG    | Status code: 200
12:56:56 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:56:56 | DEBUG    | Done with unique posting
{
    "input": {
        "key": "MCJGNVYPOGVAJF-UHFFFAOYSA-N",
        "input": "Oc1cccc2cccnc12",
        "text": "Oc1cccc2cccnc12"
    },
    "output": {
        "mw": 145.16099999999997
    }
}
{
    "input": {
        "key": "HQWTUOLCGKIECB-XZWHSSHBSA-N",
        "input": "Oc1ccc(C[C@@H]2N3[C@H](CN(Cc4cccc5ccccc45)C2=O)N(CCC3=O)C(=O)NCc2ccccc2)cc1",
        "text": "Oc1ccc(C[C@@H]2N3[C@H](CN(Cc4cccc5ccccc45)C2=O)N(CCC3=O)C(=O)NCc2ccccc2)cc1"
    },
    "output": {
        "mw": 548.6430000000004
    }
}
{
    "input": {
        "key": "QAIMUUJJAJBPCL-UHFFFAOYSA-N",
        "input": "C(Nc1nc(NCc2ccccc2)c2ccccc2n1)c1ccccc1",
        "text": "C(Nc1nc(NCc2ccccc2)c2ccccc2n1)c1ccccc1"
    },
    "output": {
        "mw": 340.43000000000006
    }
}
{
    "input": {
        "key": "WEQLWGNDNRARGE-DJIMGWMZSA-N",
        "input": "COc1cc2CCN3C[C@@H](CC(C)C)[C@H](O)C[C@@H]3c2cc1OC",
        "text": "COc1cc2CCN3C[C@@H](CC(C)C)[C@H](O)C[C@@H]3c2cc1OC"
    },
    "output": {
        "mw": 319.4450000000001
    }
}
{
    "input": {
        "key": "OFAIGZWCDGNZGT-UHFFFAOYSA-N",
        "input": "CCN(CC)CCOC(=O)C1(CCCC1)c1ccccc1",
        "text": "CCN(CC)CCOC(=O)C1(CCCC1)c1ccccc1"
    },
    "output": {
        "mw": 289.4189999999999
    }
}

Confirming model produces consistent output...
12:56:56 | DEBUG    | Getting session from /home/affiah/eos/session.json
12:56:58 | DEBUG    | Reading card from eos3b5e
12:56:58 | DEBUG    | Reading shape from eos3b5e
12:56:58 | DEBUG    | Input Shape: Single
12:56:58 | DEBUG    | Input type is: compound
12:56:58 | DEBUG    | Input shape is: Single
12:56:58 | DEBUG    | Importing module: .types.compound
12:56:58 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:56:58 | DEBUG    | InputShapeSingle shape: Single
12:56:58 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
12:56:58 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
12:57:00 | DEBUG    | Is fetched: True
12:57:00 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:57:00 | DEBUG    | Setting AutoService for eos3b5e
12:57:00 | INFO     | Service class provided
12:57:02 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
12:57:02 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
12:57:04 | DEBUG    | Is fetched: True
12:57:04 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:57:04 | DEBUG    | Setting AutoService for eos3b5e
12:57:04 | INFO     | Service class provided
12:57:06 | DEBUG    | No file splitting necessary!
12:57:08 | DEBUG    | Reading card from eos3b5e
12:57:08 | DEBUG    | Reading shape from eos3b5e
12:57:08 | DEBUG    | Input Shape: Single
12:57:08 | DEBUG    | Input type is: compound
12:57:08 | DEBUG    | Input shape is: Single
12:57:08 | DEBUG    | Importing module: .types.compound
12:57:08 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:57:08 | DEBUG    | InputShapeSingle shape: Single
12:57:08 | DEBUG    | API eos3b5e:run initialized at URL http://127.0.0.1:40923
12:57:08 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:57:08 | DEBUG    | No file splitting necessary!
12:57:10 | DEBUG    | Reading card from eos3b5e
12:57:10 | DEBUG    | Reading shape from eos3b5e
12:57:10 | DEBUG    | Input Shape: Single
12:57:10 | DEBUG    | Input type is: compound
12:57:10 | DEBUG    | Input shape is: Single
12:57:10 | DEBUG    | Importing module: .types.compound
12:57:10 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:57:10 | DEBUG    | InputShapeSingle shape: Single
12:57:10 | DEBUG    | API eos3b5e:run initialized at URL http://127.0.0.1:40923
12:57:10 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:57:10 | DEBUG    | Posting to run
12:57:10 | DEBUG    | Batch size 100
12:57:10 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:57:13 | DEBUG    | Status code: 200
12:57:13 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:57:13 | DEBUG    | Done with unique posting
12:57:13 | DEBUG    | Posting to run
12:57:13 | DEBUG    | Batch size 100
12:57:13 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:57:16 | DEBUG    | Status code: 200
12:57:16 | DEBUG    | Schema available in /home/affiah/eos/dest/eos3b5e/api_schema.json
12:57:16 | DEBUG    | Done with unique posting
Model output is consistent!

Confirming there are same number of outputs as inputs...
Number of inputs: 5
Number of outputs: 5
Number of outputs and inputs are equal!

Calculating model size...

Model Size:
KB: 46.4375
MB: 0.04534912109375
GB: 4.4286251068115234e-05

Running the model bash script...
12:57:18 | DEBUG    | Reading card from eos3b5e
12:57:18 | DEBUG    | Reading shape from eos3b5e
12:57:18 | DEBUG    | Input Shape: Single
12:57:18 | DEBUG    | Input type is: compound
12:57:18 | DEBUG    | Input shape is: Single
12:57:18 | DEBUG    | Importing module: .types.compound
12:57:18 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
12:57:18 | DEBUG    | InputShapeSingle shape: Single
Check halted. Either run.sh file does not exist, or model was not fetched via --from_github or --from_s3.
GemmaTuron commented 10 months ago

Thanks for the tests @Inyrkz

On the eos3b5e model, the issue seems to be that this model, since it is a super simple one (and the first we added to Ersilia) it does not follow the eos template - hence the error message: Check halted. Either run.sh file does not exist, or model was not fetched via --from_github or --from_s3.

Indeed, run.sh does not exist. @miquelduranfrigola do we want to standardise this model since we use it for baseline tests of ersilia? it might be wise to do so.

for the test on eos2ta5, the error message 'NoneType' object has no attribute 'ratio' seems to be referring to this function in ersilia/publish/test.py

def _compare_output_strings(self, output1, output2):
    if output1 is None and output2 is None:
        return 100
    else:
        return fuzz.ratio(output1, output2)

I am guessing here. Could you try to understand which outputs is it using by adding some print statements? use model eos2ta5 since the eos3b5e will not work as it is now, sorry

miquelduranfrigola commented 10 months ago

Hi @GemmaTuron - it is actually a good idea to standardise this model. Feel free to do it. I don't foresee any disadvantage in doing so.

miquelduranfrigola commented 10 months ago

As for the fuzzywuzzy error, this may result from the fact that we removed fuzzywuzzy as a dependency. Could we maybe just install it in test mode?

GemmaTuron commented 10 months ago

@miquelduranfrigola and @Inyrkz I think that would be it, I forgot we had made fuzzywuzzy optional in the installs - @Inyrkz if you install ersilia with pip install -e .[test] it should install fuzzywuzzy and therefore do not give problems?

miquelduranfrigola commented 10 months ago

I think so, @GemmaTuron - let's give it a try.

Inyrkz commented 10 months ago

Okay, I'll give it a try

Inyrkz commented 10 months ago

After re-installing ersilia using the command pip install -e .[test]

I served the eos2r5a model. I got this error

(ersilia) affiah@affiah-Latitude-E7450:~/Desktop$ ersilia -v serve eos2r5a
Traceback (most recent call last):
  File "/home/affiah/anaconda3/envs/ersilia/bin/ersilia", line 5, in <module>
    from ersilia.cli import cli
  File "/home/affiah/Desktop/ersilia/ersilia/__init__.py", line 22, in <module>
    Checker().config()
  File "/home/affiah/Desktop/ersilia/ersilia/utils/config.py", line 24, in __init__
    self._config()
  File "/home/affiah/Desktop/ersilia/ersilia/utils/config.py", line 45, in _config
    os.symlink(src, dst)
FileExistsError: [Errno 17] File exists: '/home/affiah/Desktop/ersilia/config.json' -> '/home/affiah/eos/config.json'

I navigated to the '/home/affiah/eos/config.json' directory to remove the config.json file and served the model again. The model serving was successful.

This is the new error.

(ersilia) affiah@affiah-Latitude-E7450:~/Desktop$ ersilia -v test
/home/affiah/anaconda3/envs/ersilia/lib/python3.10/site-packages/fuzzywuzzy/fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
  warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
Usage: ersilia test [OPTIONS] MODEL
Try 'ersilia test --help' for help.

Error: Missing argument 'MODEL'.
(ersilia) affiah@affiah-Latitude-E7450:~/Desktop$ ersilia -v test eos2r5a
/home/affiah/anaconda3/envs/ersilia/lib/python3.10/site-packages/fuzzywuzzy/fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
  warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
15:07:20 | DEBUG    | Reading model information from /home/affiah/eos/dest/eos2r5a/information.json
15:07:20 | DEBUG    | Reading model information from /home/affiah/eos/dest/eos2r5a/information.json
15:07:20 | DEBUG    | Checking that model information is correct
Beginning checks for eos2r5a model information:
Checking model ID...
Checking model slug...
Checking model description...
Checking model task...
Checking model input...
Checking model input shape...
Checking model output...
Checking model output type...
Checking model output shape...
SUCCESS! Model information verified.

15:07:20 | DEBUG    | Getting session from /home/affiah/eos/session.json
Testing model on single smiles input...

15:07:20 | DEBUG    | Is fetched: True
15:07:20 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:20 | DEBUG    | Setting AutoService for eos2r5a
15:07:20 | INFO     | Service class provided
15:07:21 | INFO     | Done with initialization!
15:07:21 | INFO     | Starting runner
15:07:21 | DEBUG    | Trying standard API
15:07:21 | 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.
15:07:21 | DEBUG    | Standard API processor started at http://127.0.0.1:39761
15:07:21 | DEBUG    | This is the input type: ['Compound']
15:07:21 | WARNING  | Standard run did not work with exception [Errno 2] No such file or directory: '/home/affiah/eos/dest/eos2r5a/example_standard_output.csv'
15:07:21 | DEBUG    | We will try conventional run.
15:07:21 | DEBUG    | Trying conventional run
15:07:21 | DEBUG    | No file splitting necessary!
15:07:21 | DEBUG    | Reading card from eos2r5a
15:07:21 | DEBUG    | Reading shape from eos2r5a
15:07:21 | DEBUG    | Input Shape: Single
15:07:21 | DEBUG    | Input type is: compound
15:07:21 | DEBUG    | Input shape is: Single
15:07:21 | DEBUG    | Importing module: .types.compound
15:07:21 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
15:07:21 | DEBUG    | InputShapeSingle shape: Single
15:07:21 | DEBUG    | API eos2r5a:run initialized at URL http://127.0.0.1:39761
15:07:21 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
Printing output...
15:07:21 | DEBUG    | Posting to run
15:07:21 | DEBUG    | Batch size 100
15:07:21 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:21 | DEBUG    | Checking for already available calculations in the data lake
15:07:21 | DEBUG    | Inspecting 0...
15:07:22 | DEBUG    | Calculating using model eos2r5a
15:07:22 | DEBUG    | Saving in /tmp/ersilia-m02jhrfc/todo_output.json
15:07:22 | DEBUG    | Expected number: 1
15:07:22 | DEBUG    | Entity is list: False
15:07:22 | DEBUG    | Resolving columns
15:07:22 | DEBUG    | Done with sniffing the file
15:07:22 | DEBUG    | Input: {2: 1, 3: 1}
15:07:22 | DEBUG    | Key: {1: 1}
15:07:22 | DEBUG    | Key: [1]
15:07:22 | DEBUG    | Input: [2]
15:07:22 | DEBUG    | Candidate header is ['0', 'VQPBIJGXSXEOCU-UHFFFAOYSA-N', 'COc1ccc2c(NC(=O)Nc3cccc(C(F)(F)F)n3)ccnc2c1', 'COc1ccc2c(NC(=O)Nc3cccc(C(F)(F)F)n3)ccnc2c1']
15:07:22 | DEBUG    | Matching for input is [2]
15:07:22 | DEBUG    | Has header False
15:07:22 | DEBUG    | Schema {'input': [2], 'key': [1]}
15:07:22 | DEBUG    | Standardizing input single
15:07:22 | DEBUG    | Writing standardized input to /tmp/ersilia-l3s8n65a/standard_input_file.csv
15:07:22 | DEBUG    | Reading standard file from /tmp/ersilia-l3s8n65a/standard_input_file.csv
15:07:26 | DEBUG    | Status code: 200
15:07:26 | DEBUG    | Working on output: /tmp/ersilia-0lsgcex4/todo_output-chunk-0.json
15:07:26 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:26 | DEBUG    | Merging 1 files into /tmp/ersilia-m02jhrfc/todo_output.json
15:07:26 | DEBUG    | Saving calculations in the lake
15:07:26 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:33 | DEBUG    | Data: outcome
15:07:33 | DEBUG    | Values: [0.9974063]
15:07:33 | DEBUG    | Getting pure dtype for outcome
15:07:33 | DEBUG    | This is the pure datatype: numeric_array
15:07:33 | DEBUG    | Datatype: numeric_array
15:07:33 | DEBUG    | Datatype has been matched: numeric_array over {'array', 'string_array', 'mixed_array', 'numeric_array'}
15:07:33 | DEBUG    | No merge key
15:07:33 | DEBUG    | [0.9974063]
15:07:33 | DEBUG    | numeric_array
15:07:33 | DEBUG    | outcome
15:07:33 | DEBUG    | Rearranging and returning
15:07:33 | DEBUG    | Done with unique posting
{
    "input": {
        "key": "VQPBIJGXSXEOCU-UHFFFAOYSA-N",
        "input": "COc1ccc2c(NC(=O)Nc3cccc(C(F)(F)F)n3)ccnc2c1",
        "text": "COc1ccc2c(NC(=O)Nc3cccc(C(F)(F)F)n3)ccnc2c1"
    },
    "output": {
        "outcome": [
            0.9974063
        ]
    }
}
15:07:33 | DEBUG    | Getting session from /home/affiah/eos/session.json
15:07:34 | DEBUG    | Reading card from eos2r5a
15:07:34 | DEBUG    | Reading shape from eos2r5a
15:07:34 | DEBUG    | Input Shape: Single
15:07:34 | DEBUG    | Input type is: compound
15:07:34 | DEBUG    | Input shape is: Single
15:07:34 | DEBUG    | Importing module: .types.compound
15:07:34 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
15:07:34 | DEBUG    | InputShapeSingle shape: Single

Testing model on input of 5 smiles given by 'example' command...

15:07:35 | DEBUG    | Is fetched: True
15:07:35 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:35 | DEBUG    | Setting AutoService for eos2r5a
15:07:35 | INFO     | Service class provided
15:07:36 | INFO     | Done with initialization!
15:07:36 | INFO     | Starting runner
15:07:36 | DEBUG    | Trying standard API
15:07:36 | 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.
15:07:36 | DEBUG    | Standard API processor started at http://127.0.0.1:39761
15:07:36 | DEBUG    | This is the input type: ['Compound']
15:07:36 | WARNING  | Standard run did not work with exception [Errno 2] No such file or directory: '/home/affiah/eos/dest/eos2r5a/example_standard_output.csv'
15:07:36 | DEBUG    | We will try conventional run.
15:07:36 | DEBUG    | Trying conventional run
15:07:36 | DEBUG    | No file splitting necessary!
15:07:36 | DEBUG    | Reading card from eos2r5a
15:07:36 | DEBUG    | Reading shape from eos2r5a
15:07:36 | DEBUG    | Input Shape: Single
15:07:36 | DEBUG    | Input type is: compound
15:07:36 | DEBUG    | Input shape is: Single
15:07:36 | DEBUG    | Importing module: .types.compound
15:07:36 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
15:07:36 | DEBUG    | InputShapeSingle shape: Single
15:07:36 | DEBUG    | API eos2r5a:run initialized at URL http://127.0.0.1:39761
15:07:36 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
Printing output...
15:07:36 | DEBUG    | Posting to run
15:07:36 | DEBUG    | Batch size 100
15:07:36 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:36 | DEBUG    | Checking for already available calculations in the data lake
15:07:36 | DEBUG    | Inspecting 0...
15:07:36 | DEBUG    | Calculating using model eos2r5a
15:07:36 | DEBUG    | Saving in /tmp/ersilia-qom9pnsh/todo_output.json
15:07:36 | DEBUG    | Expected number: 1
15:07:36 | DEBUG    | Entity is list: False
15:07:36 | DEBUG    | Resolving columns
15:07:36 | DEBUG    | Done with sniffing the file
15:07:36 | DEBUG    | Input: {2: 5, 3: 5}
15:07:36 | DEBUG    | Key: {1: 5}
15:07:36 | DEBUG    | Key: [1]
15:07:36 | DEBUG    | Input: [2]
15:07:36 | DEBUG    | Candidate header is ['0', 'TWHPPRXFYWSOQF-UHFFFAOYSA-J', 'OC1=CN(C=C(O)O[Sr]O1)c1sc2c(CC(=O)O[Sr]OC2=O)c1C#N', 'OC1=CN(C=C(O)O[Sr]O1)c1sc2c(CC(=O)O[Sr]OC2=O)c1C#N']
15:07:36 | DEBUG    | Matching for input is [2]
15:07:36 | DEBUG    | Has header False
15:07:36 | DEBUG    | Schema {'input': [2], 'key': [1]}
15:07:36 | DEBUG    | Standardizing input single
15:07:36 | DEBUG    | Writing standardized input to /tmp/ersilia-b6tnjbif/standard_input_file.csv
15:07:36 | DEBUG    | Reading standard file from /tmp/ersilia-b6tnjbif/standard_input_file.csv
15:07:40 | DEBUG    | Status code: 200
15:07:40 | DEBUG    | Working on output: /tmp/ersilia-wb456z3c/todo_output-chunk-0.json
15:07:40 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:40 | DEBUG    | Merging 1 files into /tmp/ersilia-qom9pnsh/todo_output.json
15:07:40 | DEBUG    | Saving calculations in the lake
15:07:40 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:43 | DEBUG    | Data: outcome
15:07:43 | DEBUG    | Values: [0.16362353]
15:07:43 | DEBUG    | Getting pure dtype for outcome
15:07:43 | DEBUG    | This is the pure datatype: numeric_array
15:07:43 | DEBUG    | Datatype: numeric_array
15:07:43 | DEBUG    | Datatype has been matched: numeric_array over {'array', 'string_array', 'mixed_array', 'numeric_array'}
15:07:43 | DEBUG    | No merge key
15:07:43 | DEBUG    | [0.16362353]
15:07:43 | DEBUG    | numeric_array
15:07:43 | DEBUG    | outcome
15:07:43 | DEBUG    | [0.99699533]
15:07:43 | DEBUG    | numeric_array
15:07:43 | DEBUG    | outcome
15:07:43 | DEBUG    | [0.29688534]
15:07:43 | DEBUG    | numeric_array
15:07:43 | DEBUG    | outcome
15:07:43 | DEBUG    | [0.9590893]
15:07:43 | DEBUG    | numeric_array
15:07:43 | DEBUG    | outcome
15:07:43 | DEBUG    | [0.97686607]
15:07:43 | DEBUG    | numeric_array
15:07:43 | DEBUG    | outcome
15:07:43 | DEBUG    | Rearranging and returning
15:07:43 | DEBUG    | Done with unique posting
{
    "input": {
        "key": "TWHPPRXFYWSOQF-UHFFFAOYSA-J",
        "input": "OC1=CN(C=C(O)O[Sr]O1)c1sc2c(CC(=O)O[Sr]OC2=O)c1C#N",
        "text": "OC1=CN(C=C(O)O[Sr]O1)c1sc2c(CC(=O)O[Sr]OC2=O)c1C#N"
    },
    "output": {
        "outcome": [
            0.16362353
        ]
    }
}
{
    "input": {
        "key": "XRVDGNKRPOAQTN-FQEVSTJZSA-N",
        "input": "CC(C)Oc1ccc(cc1C#N)-c1nc(no1)-c1cccc2[C@H](CCc12)NCCO",
        "text": "CC(C)Oc1ccc(cc1C#N)-c1nc(no1)-c1cccc2[C@H](CCc12)NCCO"
    },
    "output": {
        "outcome": [
            0.99699533
        ]
    }
}
{
    "input": {
        "key": "WIJZXSAJMHAVGX-DHLKQENFSA-N",
        "input": "Fc1cncc(c1)N([C@H](C(=O)NC1CC(F)(F)C1)c1ccccc1Cl)C(=O)[C@@H]1CCC(=O)N1c1cc(ccn1)C#N",
        "text": "Fc1cncc(c1)N([C@H](C(=O)NC1CC(F)(F)C1)c1ccccc1Cl)C(=O)[C@@H]1CCC(=O)N1c1cc(ccn1)C#N"
    },
    "output": {
        "outcome": [
            0.29688534
        ]
    }
}
{
    "input": {
        "key": "OONFNUWBHFSNBT-HXUWFJFHSA-N",
        "input": "CCN1CCN(Cc2ccc(cc2)-c2cc3c(N[C@H](C)c4ccccc4)ncnc3[nH]2)CC1",
        "text": "CCN1CCN(Cc2ccc(cc2)-c2cc3c(N[C@H](C)c4ccccc4)ncnc3[nH]2)CC1"
    },
    "output": {
        "outcome": [
            0.9590893
        ]
    }
}
{
    "input": {
        "key": "SDYYIRPAZHJOLM-UHFFFAOYSA-N",
        "input": "CN1CCN(CC1)c1cc2N(C)c3ccccc3Oc2nn1",
        "text": "CN1CCN(CC1)c1cc2N(C)c3ccccc3Oc2nn1"
    },
    "output": {
        "outcome": [
            0.97686607
        ]
    }
}

Confirming model produces consistent output...
15:07:43 | DEBUG    | Getting session from /home/affiah/eos/session.json
15:07:44 | DEBUG    | Reading card from eos2r5a
15:07:44 | DEBUG    | Reading shape from eos2r5a
15:07:44 | DEBUG    | Input Shape: Single
15:07:44 | DEBUG    | Input type is: compound
15:07:44 | DEBUG    | Input shape is: Single
15:07:44 | DEBUG    | Importing module: .types.compound
15:07:44 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
15:07:44 | DEBUG    | InputShapeSingle shape: Single
15:07:44 | DEBUG    | Is fetched: True
15:07:44 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:44 | DEBUG    | Setting AutoService for eos2r5a
15:07:44 | INFO     | Service class provided
15:07:45 | INFO     | Done with initialization!
15:07:45 | DEBUG    | Is fetched: True
15:07:45 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:45 | DEBUG    | Setting AutoService for eos2r5a
15:07:45 | INFO     | Service class provided
15:07:46 | INFO     | Done with initialization!
15:07:46 | INFO     | Starting runner
15:07:46 | DEBUG    | Trying standard API
15:07:46 | 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.
15:07:46 | DEBUG    | Standard API processor started at http://127.0.0.1:39761
15:07:46 | DEBUG    | This is the input type: ['Compound']
15:07:46 | WARNING  | Standard run did not work with exception [Errno 2] No such file or directory: '/home/affiah/eos/dest/eos2r5a/example_standard_output.csv'
15:07:46 | DEBUG    | We will try conventional run.
15:07:46 | DEBUG    | Trying conventional run
15:07:46 | DEBUG    | No file splitting necessary!
15:07:46 | DEBUG    | Reading card from eos2r5a
15:07:46 | DEBUG    | Reading shape from eos2r5a
15:07:46 | DEBUG    | Input Shape: Single
15:07:46 | DEBUG    | Input type is: compound
15:07:46 | DEBUG    | Input shape is: Single
15:07:46 | DEBUG    | Importing module: .types.compound
15:07:46 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
15:07:46 | DEBUG    | InputShapeSingle shape: Single
15:07:46 | DEBUG    | API eos2r5a:run initialized at URL http://127.0.0.1:39761
15:07:46 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:46 | INFO     | Starting runner
15:07:46 | DEBUG    | Trying standard API
15:07:46 | 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.
15:07:46 | DEBUG    | Standard API processor started at http://127.0.0.1:39761
15:07:46 | DEBUG    | This is the input type: ['Compound']
15:07:46 | WARNING  | Standard run did not work with exception [Errno 2] No such file or directory: '/home/affiah/eos/dest/eos2r5a/example_standard_output.csv'
15:07:46 | DEBUG    | We will try conventional run.
15:07:46 | DEBUG    | Trying conventional run
15:07:46 | DEBUG    | No file splitting necessary!
15:07:46 | DEBUG    | Reading card from eos2r5a
15:07:46 | DEBUG    | Reading shape from eos2r5a
15:07:46 | DEBUG    | Input Shape: Single
15:07:46 | DEBUG    | Input type is: compound
15:07:46 | DEBUG    | Input shape is: Single
15:07:46 | DEBUG    | Importing module: .types.compound
15:07:46 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
15:07:46 | DEBUG    | InputShapeSingle shape: Single
15:07:46 | DEBUG    | API eos2r5a:run initialized at URL http://127.0.0.1:39761
15:07:46 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:46 | DEBUG    | Posting to run
15:07:46 | DEBUG    | Batch size 100
15:07:46 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:46 | DEBUG    | Checking for already available calculations in the data lake
15:07:47 | DEBUG    | Inspecting 0...
15:07:47 | DEBUG    | Calculating using model eos2r5a
15:07:47 | DEBUG    | Saving in /tmp/ersilia-px5oj81z/todo_output.json
15:07:47 | DEBUG    | Expected number: 1
15:07:47 | DEBUG    | Entity is list: False
15:07:47 | DEBUG    | Resolving columns
15:07:47 | DEBUG    | Done with sniffing the file
15:07:47 | DEBUG    | Input: {2: 5, 3: 5}
15:07:47 | DEBUG    | Key: {1: 5}
15:07:47 | DEBUG    | Key: [1]
15:07:47 | DEBUG    | Input: [2]
15:07:47 | DEBUG    | Candidate header is ['0', 'QCZAWDGAVJMPTA-RNFRBKRXSA-N', 'C[C@@H](Nc1nc(N[C@H](C)C(F)(F)F)nc(n1)-c1cccc(Cl)n1)C(F)(F)F', 'C[C@@H](Nc1nc(N[C@H](C)C(F)(F)F)nc(n1)-c1cccc(Cl)n1)C(F)(F)F']
15:07:47 | DEBUG    | Matching for input is [2]
15:07:47 | DEBUG    | Has header False
15:07:47 | DEBUG    | Schema {'input': [2], 'key': [1]}
15:07:47 | DEBUG    | Standardizing input single
15:07:47 | DEBUG    | Writing standardized input to /tmp/ersilia-b_36rmsa/standard_input_file.csv
15:07:47 | DEBUG    | Reading standard file from /tmp/ersilia-b_36rmsa/standard_input_file.csv
15:07:50 | DEBUG    | Status code: 200
15:07:50 | DEBUG    | Working on output: /tmp/ersilia-vy5cp065/todo_output-chunk-0.json
15:07:50 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:50 | DEBUG    | Merging 1 files into /tmp/ersilia-px5oj81z/todo_output.json
15:07:50 | DEBUG    | Saving calculations in the lake
15:07:50 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:53 | DEBUG    | Data: outcome
15:07:53 | DEBUG    | Values: [0.93057376]
15:07:53 | DEBUG    | Getting pure dtype for outcome
15:07:53 | DEBUG    | This is the pure datatype: numeric_array
15:07:53 | DEBUG    | Datatype: numeric_array
15:07:53 | DEBUG    | Datatype has been matched: numeric_array over {'array', 'string_array', 'mixed_array', 'numeric_array'}
15:07:53 | DEBUG    | No merge key
15:07:53 | DEBUG    | [0.93057376]
15:07:53 | DEBUG    | numeric_array
15:07:53 | DEBUG    | outcome
15:07:53 | DEBUG    | [0.82823235]
15:07:53 | DEBUG    | numeric_array
15:07:53 | DEBUG    | outcome
15:07:53 | DEBUG    | [0.88104665]
15:07:53 | DEBUG    | numeric_array
15:07:53 | DEBUG    | outcome
15:07:53 | DEBUG    | [0.99636346]
15:07:53 | DEBUG    | numeric_array
15:07:53 | DEBUG    | outcome
15:07:53 | DEBUG    | [0.97966033]
15:07:53 | DEBUG    | numeric_array
15:07:53 | DEBUG    | outcome
15:07:53 | DEBUG    | Rearranging and returning
15:07:53 | DEBUG    | Done with unique posting
15:07:53 | DEBUG    | Posting to run
15:07:53 | DEBUG    | Batch size 100
15:07:53 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:53 | DEBUG    | Checking for already available calculations in the data lake
15:07:53 | DEBUG    | Inspecting 0...
15:07:53 | DEBUG    | Reading from data well of eos2r5a
15:07:53 | DEBUG    | Expected number: 1
15:07:53 | DEBUG    | Entity is list: False
15:07:53 | DEBUG    | Resolving columns
15:07:53 | DEBUG    | Done with sniffing the file
15:07:53 | DEBUG    | Input: {2: 5, 3: 5}
15:07:53 | DEBUG    | Key: {1: 5}
15:07:53 | DEBUG    | Key: [1]
15:07:53 | DEBUG    | Input: [2]
15:07:53 | DEBUG    | Candidate header is ['0', 'QCZAWDGAVJMPTA-RNFRBKRXSA-N', 'C[C@@H](Nc1nc(N[C@H](C)C(F)(F)F)nc(n1)-c1cccc(Cl)n1)C(F)(F)F', 'C[C@@H](Nc1nc(N[C@H](C)C(F)(F)F)nc(n1)-c1cccc(Cl)n1)C(F)(F)F']
15:07:53 | DEBUG    | Matching for input is [2]
15:07:53 | DEBUG    | Has header False
15:07:53 | DEBUG    | Schema {'input': [2], 'key': [1]}
15:07:53 | DEBUG    | Standardizing input single
15:07:53 | DEBUG    | Writing standardized input to /tmp/ersilia-78_th_e0/standard_input_file.csv
15:07:53 | DEBUG    | Reading standard file from /tmp/ersilia-78_th_e0/standard_input_file.csv
15:07:53 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:53 | DEBUG    | Working on output: /tmp/ersilia-7fdcx_88/done_output-chunk-0.json
15:07:53 | DEBUG    | Schema available in /home/affiah/eos/dest/eos2r5a/api_schema.json
15:07:53 | DEBUG    | Merging 1 files into /tmp/ersilia-w6kctulg/done_output.json
15:07:53 | DEBUG    | Rearranging and returning
15:07:53 | DEBUG    | Done with unique posting
{'input': {'key': 'QCZAWDGAVJMPTA-RNFRBKRXSA-N', 'input': 'C[C@@H](Nc1nc(N[C@H](C)C(F)(F)F)nc(n1)-c1cccc(Cl)n1)C(F)(F)F', 'text': 'C[C@@H](Nc1nc(N[C@H](C)C(F)(F)F)nc(n1)-c1cccc(Cl)n1)C(F)(F)F'}, 'output': {'outcome': [0.93057376]}}
{'input': {'key': 'QCZAWDGAVJMPTA-RNFRBKRXSA-N', 'input': 'C[C@@H](Nc1nc(N[C@H](C)C(F)(F)F)nc(n1)-c1cccc(Cl)n1)C(F)(F)F', 'text': 'C[C@@H](Nc1nc(N[C@H](C)C(F)(F)F)nc(n1)-c1cccc(Cl)n1)C(F)(F)F'}, 'output': {'outcome': 0.9305737614631653}}

{'input': {'key': 'MZDKLVOWGIOKTN-UHFFFAOYSA-N', 'input': 'CN(c1ncccc1CNc1nc(Nc2ccc3NC(=O)Cc3c2)ncc1C(F)(F)F)S(C)(=O)=O', 'text': 'CN(c1ncccc1CNc1nc(Nc2ccc3NC(=O)Cc3c2)ncc1C(F)(F)F)S(C)(=O)=O'}, 'output': {'outcome': [0.82823235]}}
{'input': {'key': 'MZDKLVOWGIOKTN-UHFFFAOYSA-N', 'input': 'CN(c1ncccc1CNc1nc(Nc2ccc3NC(=O)Cc3c2)ncc1C(F)(F)F)S(C)(=O)=O', 'text': 'CN(c1ncccc1CNc1nc(Nc2ccc3NC(=O)Cc3c2)ncc1C(F)(F)F)S(C)(=O)=O'}, 'output': {'outcome': 0.8282323479652405}}

{'input': {'key': 'WFWLQNSHRPWKFK-ZCFIWIBFSA-N', 'input': 'Fc1cn([C@H]2CCCO2)c(=O)[nH]c1=O', 'text': 'Fc1cn([C@H]2CCCO2)c(=O)[nH]c1=O'}, 'output': {'outcome': [0.88104665]}}
{'input': {'key': 'WFWLQNSHRPWKFK-ZCFIWIBFSA-N', 'input': 'Fc1cn([C@H]2CCCO2)c(=O)[nH]c1=O', 'text': 'Fc1cn([C@H]2CCCO2)c(=O)[nH]c1=O'}, 'output': {'outcome': 0.8810466527938843}}

{'input': {'key': 'WVAKABMNNSMCDK-UHFFFAOYSA-N', 'input': 'NC(=O)NS(=O)(=O)c1ccc(N)cc1', 'text': 'NC(=O)NS(=O)(=O)c1ccc(N)cc1'}, 'output': {'outcome': [0.99636346]}}
{'input': {'key': 'WVAKABMNNSMCDK-UHFFFAOYSA-N', 'input': 'NC(=O)NS(=O)(=O)c1ccc(N)cc1', 'text': 'NC(=O)NS(=O)(=O)c1ccc(N)cc1'}, 'output': {'outcome': 0.9963634610176086}}

{'input': {'key': 'JLPURTXCSILYLW-UHFFFAOYSA-N', 'input': 'CC(C)(O)c1cn(c(n1)C(C)(C)c1ccccc1Cl)-c1ccc(cc1)-c1cccc(c1)S(C)(=O)=O', 'text': 'CC(C)(O)c1cn(c(n1)C(C)(C)c1ccccc1Cl)-c1ccc(cc1)-c1cccc(c1)S(C)(=O)=O'}, 'output': {'outcome': [0.97966033]}}
{'input': {'key': 'JLPURTXCSILYLW-UHFFFAOYSA-N', 'input': 'CC(C)(O)c1cn(c(n1)C(C)(C)c1ccccc1Cl)-c1ccc(cc1)-c1cccc(c1)S(C)(=O)=O', 'text': 'CC(C)(O)c1cn(c(n1)C(C)(C)c1ccccc1Cl)-c1ccc(cc1)-c1cccc(c1)S(C)(=O)=O'}, 'output': {'outcome': 0.9796603322029114}}

15:07:53 | ERROR    | Ersilia exception class:
InconsistentOutputTypes

Detailed error:
Model output types are inconsistent.

Hints:
Observe the output comparisons above for each input, and pay attention to the type of the output (string, float, list, etc.) because they do not match.

🚨🚨🚨 Something went wrong with Ersilia 🚨🚨🚨

Error message:

Ersilia exception class:
InconsistentOutputTypes

Detailed error:
Model output types are inconsistent.

Hints:
Observe the output comparisons above for each input, and pay attention to the type of the output (string, float, list, etc.) because they do not match.

If this error message is not helpful, open an issue at:
 - https://github.com/ersilia-os/ersilia
Or feel free to reach out to us at:
 - hello[at]ersilia.io

If you haven't, try to run your command in verbose mode (-v in the CLI)
 - You will find the console log file in: /home/affiah/eos/current.log

It’s showing inconsistent output types. I don’t know if this is specific to the eos2r5a model. I will try testing another model.

Inyrkz commented 10 months ago

The command works fine with the eos5505 model.

I think there are some checks in the eos2r5a model that did not meet the requirements of the ersilia test command.

Here is the output of the test for the eos5505 model.

(base) affiah@affiah-Latitude-E7450:~$ ersilia -v test eos5505
/home/affiah/anaconda3/lib/python3.11/site-packages/fuzzywuzzy/fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
  warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
16:50:47 | DEBUG    | Reading model information from /home/affiah/eos/dest/eos5505/information.json
16:50:47 | DEBUG    | Reading model information from /home/affiah/eos/dest/eos5505/information.json
16:50:47 | DEBUG    | Checking that model information is correct
Beginning checks for eos5505 model information:
Checking model ID...
Checking model slug...
Checking model description...
Checking model task...
Checking model input...
Checking model input shape...
Checking model output...
Checking model output type...
Checking model output shape...
SUCCESS! Model information verified.

16:50:47 | DEBUG    | Getting session from /home/affiah/eos/session.json
Testing model on single smiles input...

16:50:47 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
16:50:47 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
16:50:48 | DEBUG    | Is fetched: True
16:50:48 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:50:48 | DEBUG    | Setting AutoService for eos5505
16:50:48 | INFO     | Service class provided
16:50:48 | INFO     | Done with initialization!
16:50:48 | INFO     | Starting runner
16:50:48 | DEBUG    | Trying standard API
16:50:48 | 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.
16:50:48 | DEBUG    | Standard API processor started at http://127.0.0.1:48489
16:50:48 | DEBUG    | This is the input type: ['Compound']
16:50:49 | WARNING  | Standard run did not work with exception [Errno 2] No such file or directory: '/home/affiah/eos/dest/eos5505/example_standard_output.csv'
16:50:49 | DEBUG    | We will try conventional run.
16:50:49 | DEBUG    | Trying conventional run
16:50:49 | DEBUG    | No file splitting necessary!
16:50:49 | DEBUG    | Reading card from eos5505
16:50:49 | DEBUG    | Reading shape from eos5505
16:50:49 | DEBUG    | Input Shape: Single
16:50:49 | DEBUG    | Input type is: compound
16:50:49 | DEBUG    | Input shape is: Single
16:50:49 | DEBUG    | Importing module: .types.compound
16:50:49 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
16:50:49 | DEBUG    | InputShapeSingle shape: Single
16:50:49 | DEBUG    | API eos5505:predict initialized at URL http://127.0.0.1:48489
16:50:49 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
Printing output...
16:50:49 | DEBUG    | Posting to predict
16:50:49 | DEBUG    | Batch size 100
16:50:49 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:50:57 | DEBUG    | Status code: 200
16:50:57 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:50:57 | DEBUG    | Done with unique posting
{
    "input": {
        "key": "VQPBIJGXSXEOCU-UHFFFAOYSA-N",
        "input": "COc1ccc2c(NC(=O)Nc3cccc(C(F)(F)F)n3)ccnc2c1",
        "text": "COc1ccc2c(NC(=O)Nc3cccc(C(F)(F)F)n3)ccnc2c1"
    },
    "output": {
        "outcome": [
            0.31
        ]
    }
}
16:50:57 | DEBUG    | Getting session from /home/affiah/eos/session.json
16:51:13 | DEBUG    | Reading card from eos5505
16:51:13 | DEBUG    | Reading shape from eos5505
16:51:13 | DEBUG    | Input Shape: Single
16:51:13 | DEBUG    | Input type is: compound
16:51:13 | DEBUG    | Input shape is: Single
16:51:13 | DEBUG    | Importing module: .types.compound
16:51:13 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
16:51:13 | DEBUG    | InputShapeSingle shape: Single

Testing model on input of 5 smiles given by 'example' command...

16:51:13 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
16:51:13 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
16:51:13 | DEBUG    | Is fetched: True
16:51:13 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:51:13 | DEBUG    | Setting AutoService for eos5505
16:51:13 | INFO     | Service class provided
16:51:14 | INFO     | Done with initialization!
16:51:14 | INFO     | Starting runner
16:51:14 | DEBUG    | Trying standard API
16:51:14 | 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.
16:51:14 | DEBUG    | Standard API processor started at http://127.0.0.1:48489
16:51:14 | DEBUG    | This is the input type: ['Compound']
16:51:14 | WARNING  | Standard run did not work with exception [Errno 2] No such file or directory: '/home/affiah/eos/dest/eos5505/example_standard_output.csv'
16:51:14 | DEBUG    | We will try conventional run.
16:51:14 | DEBUG    | Trying conventional run
16:51:14 | DEBUG    | No file splitting necessary!
16:51:14 | DEBUG    | Reading card from eos5505
16:51:14 | DEBUG    | Reading shape from eos5505
16:51:14 | DEBUG    | Input Shape: Single
16:51:14 | DEBUG    | Input type is: compound
16:51:14 | DEBUG    | Input shape is: Single
16:51:14 | DEBUG    | Importing module: .types.compound
16:51:14 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
16:51:14 | DEBUG    | InputShapeSingle shape: Single
16:51:14 | DEBUG    | API eos5505:predict initialized at URL http://127.0.0.1:48489
16:51:14 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
Printing output...
16:51:14 | DEBUG    | Posting to predict
16:51:14 | DEBUG    | Batch size 100
16:51:14 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:51:21 | DEBUG    | Status code: 200
16:51:21 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:51:21 | DEBUG    | Done with unique posting
{
    "input": {
        "key": "HOGVTUZUJGHKPL-HTVVRFAVSA-N",
        "input": "Cn1nc(N)c2cn([C@@H]3O[C@H](CO)[C@@H](O)[C@H]3O)c3ncnc1c23",
        "text": "Cn1nc(N)c2cn([C@@H]3O[C@H](CO)[C@@H](O)[C@H]3O)c3ncnc1c23"
    },
    "output": {
        "outcome": [
            0.001
        ]
    }
}
{
    "input": {
        "key": "FIKUEZUFASUKAH-QMMMGPOBSA-N",
        "input": "O=C1N2CCC[C@H]2COc2ncccc12",
        "text": "O=C1N2CCC[C@H]2COc2ncccc12"
    },
    "output": {
        "outcome": [
            0.776
        ]
    }
}
{
    "input": {
        "key": "RMAMGGNACJHXHO-UHFFFAOYSA-N",
        "input": "CC(=O)c1cc(c(Sc2ccc(F)cc2F)s1)[N+]([O-])=O",
        "text": "CC(=O)c1cc(c(Sc2ccc(F)cc2F)s1)[N+]([O-])=O"
    },
    "output": {
        "outcome": [
            0.994
        ]
    }
}
{
    "input": {
        "key": "JHCFQXNWYDLBOG-UHFFFAOYSA-N",
        "input": "Fc1cccc(CCn2nnc3cc4C(=O)N(COc4cc3c2=O)C2CC2)c1",
        "text": "Fc1cccc(CCn2nnc3cc4C(=O)N(COc4cc3c2=O)C2CC2)c1"
    },
    "output": {
        "outcome": [
            0.981
        ]
    }
}
{
    "input": {
        "key": "VRQMAABPASPXMW-HDICACEKSA-N",
        "input": "COc1cc(CCc2cc(NC(=O)c3ccc(cc3)N3C[C@H](C)N[C@H](C)C3)[nH]n2)cc(OC)c1",
        "text": "COc1cc(CCc2cc(NC(=O)c3ccc(cc3)N3C[C@H](C)N[C@H](C)C3)[nH]n2)cc(OC)c1"
    },
    "output": {
        "outcome": [
            0.285
        ]
    }
}

Confirming model produces consistent output...
16:51:21 | DEBUG    | Getting session from /home/affiah/eos/session.json
16:51:21 | DEBUG    | Reading card from eos5505
16:51:21 | DEBUG    | Reading shape from eos5505
16:51:21 | DEBUG    | Input Shape: Single
16:51:21 | DEBUG    | Input type is: compound
16:51:21 | DEBUG    | Input shape is: Single
16:51:21 | DEBUG    | Importing module: .types.compound
16:51:21 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
16:51:21 | DEBUG    | InputShapeSingle shape: Single
16:51:21 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
16:51:21 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
16:51:22 | DEBUG    | Is fetched: True
16:51:22 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:51:22 | DEBUG    | Setting AutoService for eos5505
16:51:22 | INFO     | Service class provided
16:51:22 | INFO     | Done with initialization!
16:51:22 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
16:51:22 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
16:51:23 | DEBUG    | Is fetched: True
16:51:23 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:51:23 | DEBUG    | Setting AutoService for eos5505
16:51:23 | INFO     | Service class provided
16:51:24 | INFO     | Done with initialization!
16:51:24 | INFO     | Starting runner
16:51:24 | DEBUG    | Trying standard API
16:51:24 | 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.
16:51:24 | DEBUG    | Standard API processor started at http://127.0.0.1:48489
16:51:24 | DEBUG    | This is the input type: ['Compound']
16:51:24 | WARNING  | Standard run did not work with exception [Errno 2] No such file or directory: '/home/affiah/eos/dest/eos5505/example_standard_output.csv'
16:51:24 | DEBUG    | We will try conventional run.
16:51:24 | DEBUG    | Trying conventional run
16:51:24 | DEBUG    | No file splitting necessary!
16:51:24 | DEBUG    | Reading card from eos5505
16:51:24 | DEBUG    | Reading shape from eos5505
16:51:24 | DEBUG    | Input Shape: Single
16:51:24 | DEBUG    | Input type is: compound
16:51:24 | DEBUG    | Input shape is: Single
16:51:24 | DEBUG    | Importing module: .types.compound
16:51:24 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
16:51:24 | DEBUG    | InputShapeSingle shape: Single
16:51:24 | DEBUG    | API eos5505:predict initialized at URL http://127.0.0.1:48489
16:51:24 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:51:24 | INFO     | Starting runner
16:51:24 | DEBUG    | Trying standard API
16:51:24 | 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.
16:51:24 | DEBUG    | Standard API processor started at http://127.0.0.1:48489
16:51:24 | DEBUG    | This is the input type: ['Compound']
16:51:24 | WARNING  | Standard run did not work with exception [Errno 2] No such file or directory: '/home/affiah/eos/dest/eos5505/example_standard_output.csv'
16:51:24 | DEBUG    | We will try conventional run.
16:51:24 | DEBUG    | Trying conventional run
16:51:24 | DEBUG    | No file splitting necessary!
16:51:25 | DEBUG    | Reading card from eos5505
16:51:25 | DEBUG    | Reading shape from eos5505
16:51:25 | DEBUG    | Input Shape: Single
16:51:25 | DEBUG    | Input type is: compound
16:51:25 | DEBUG    | Input shape is: Single
16:51:25 | DEBUG    | Importing module: .types.compound
16:51:25 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
16:51:25 | DEBUG    | InputShapeSingle shape: Single
16:51:25 | DEBUG    | API eos5505:predict initialized at URL http://127.0.0.1:48489
16:51:25 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:51:25 | DEBUG    | Posting to predict
16:51:25 | DEBUG    | Batch size 100
16:51:25 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:51:31 | DEBUG    | Status code: 200
16:51:31 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:51:31 | DEBUG    | Done with unique posting
16:51:31 | DEBUG    | Posting to predict
16:51:31 | DEBUG    | Batch size 100
16:51:31 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:51:37 | DEBUG    | Status code: 200
16:51:37 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:51:37 | DEBUG    | Done with unique posting
Model output is consistent!

Confirming there are same number of outputs as inputs...
Number of inputs: 5
Number of outputs: 5
Number of outputs and inputs are equal!

Calculating model size...

Model Size:
KB: 24.208984375
MB: 0.023641586303710938
GB: 2.3087486624717712e-05

Running the model bash script...
16:51:44 | DEBUG    | Reading card from eos5505
16:51:44 | DEBUG    | Reading shape from eos5505
16:51:44 | DEBUG    | Input Shape: Single
16:51:44 | DEBUG    | Input type is: compound
16:51:44 | DEBUG    | Input shape is: Single
16:51:44 | DEBUG    | Importing module: .types.compound
16:51:44 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
16:51:44 | DEBUG    | InputShapeSingle shape: Single
Executing 'bash run.sh'...
Bash execution completed!

Captured Output:
Loading RLM graph convolutional neural network model
Loading pretrained parameter "encoder.encoder.cached_zero_vector".
Loading pretrained parameter "encoder.encoder.W_i.weight".
Loading pretrained parameter "encoder.encoder.W_h.weight".
Loading pretrained parameter "encoder.encoder.W_o.weight".
Loading pretrained parameter "encoder.encoder.W_o.bias".
Loading pretrained parameter "ffn.1.weight".
Loading pretrained parameter "ffn.1.bias".
Loading pretrained parameter "ffn.4.weight".
Loading pretrained parameter "ffn.4.bias".
Finished loading RLM model files
Loading RLM graph convolutional neural network model
Loading pretrained parameter "encoder.encoder.cached_zero_vector".
Loading pretrained parameter "encoder.encoder.W_i.weight".
Loading pretrained parameter "encoder.encoder.W_h.weight".
Loading pretrained parameter "encoder.encoder.W_o.weight".
Loading pretrained parameter "encoder.encoder.W_o.bias".
Loading pretrained parameter "ffn.1.weight".
Loading pretrained parameter "ffn.1.bias".
Loading pretrained parameter "ffn.4.weight".
Loading pretrained parameter "ffn.4.bias".
Finished loading RLM model files
RLM: 0.023497819900512695 seconds to predict 4 molecules

Captured Error:

  0%|          | 0/4 [00:00<?, ?it/s]
100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 4/4 [00:00<00:00, 259.67it/s]

Executing ersilia run...
16:51:48 | DEBUG    | Getting session from /home/affiah/eos/session.json
16:51:48 | WARNING  | Lake manager 'isaura' is not installed! We strongly recommend installing it to store calculations persistently
16:51:48 | ERROR    | Isaura is not installed! Calculations will be done without storing and reading from the lake, unfortunately.
16:51:48 | DEBUG    | Is fetched: True
16:51:48 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:51:48 | DEBUG    | Setting AutoService for eos5505
16:51:48 | INFO     | Service class provided
16:51:49 | INFO     | Done with initialization!
16:51:49 | INFO     | Starting runner
16:51:49 | DEBUG    | Trying standard API
16:51:49 | 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.
16:51:49 | DEBUG    | Standard API processor started at http://127.0.0.1:48489
16:51:49 | DEBUG    | This is the input type: ['Compound']
16:51:49 | WARNING  | Standard run did not work with exception [Errno 2] No such file or directory: '/home/affiah/eos/dest/eos5505/example_standard_output.csv'
16:51:49 | DEBUG    | We will try conventional run.
16:51:49 | DEBUG    | Trying conventional run
16:51:49 | DEBUG    | Reading card from eos5505
16:51:49 | DEBUG    | Reading shape from eos5505
16:51:49 | DEBUG    | Input Shape: Single
16:51:49 | DEBUG    | Input type is: compound
16:51:49 | DEBUG    | Input shape is: Single
16:51:49 | DEBUG    | Importing module: .types.compound
16:51:49 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
16:51:49 | DEBUG    | InputShapeSingle shape: Single
16:51:49 | DEBUG    | Expected number: 1
16:51:49 | DEBUG    | Entity is list: False
16:51:49 | DEBUG    | Resolving columns
16:51:49 | DEBUG    | Number of columns seems to be 1: assuming input is the only column: {'input': [0], 'key': None}
16:51:49 | DEBUG    | Candidate header is ['smilesCCOc1ccc(cn1)-c1ccc(Cn2c(CC(C)(C)C(O)=O)c(SC(C)(C)C)c3cc(OCc4ccc(C)cn4)ccc23)cc1']
16:51:49 | DEBUG    | Matching for input is [0]
16:51:49 | DEBUG    | Has header True
16:51:49 | DEBUG    | Schema {'input': [0], 'key': None}
16:51:49 | DEBUG    | Standardizing input single
16:51:49 | DEBUG    | Writing standardized input to /tmp/ersilia-jjxtp3zz/standard_input_file.csv
16:51:49 | DEBUG    | Reading standard file from /tmp/ersilia-jjxtp3zz/standard_input_file.csv
16:51:49 | DEBUG    | File has 5 lines
16:51:49 | DEBUG    | No file splitting necessary!
16:51:50 | DEBUG    | Reading card from eos5505
16:51:50 | DEBUG    | Reading shape from eos5505
16:51:50 | DEBUG    | Input Shape: Single
16:51:50 | DEBUG    | Input type is: compound
16:51:50 | DEBUG    | Input shape is: Single
16:51:50 | DEBUG    | Importing module: .types.compound
16:51:50 | DEBUG    | Checking RDKIT and other requirements necessary for compound inputs
16:51:50 | DEBUG    | InputShapeSingle shape: Single
16:51:50 | DEBUG    | API eos5505:predict initialized at URL http://127.0.0.1:48489
16:51:50 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:51:50 | DEBUG    | Posting to predict
16:51:50 | DEBUG    | Batch size 100
16:51:50 | DEBUG    | Expected number: 1
16:51:50 | DEBUG    | Entity is list: False
16:51:50 | DEBUG    | Resolving columns
16:51:50 | DEBUG    | Number of columns seems to be 1: assuming input is the only column: {'input': [0], 'key': None}
16:51:50 | DEBUG    | Candidate header is ['smilesCCOc1ccc(cn1)-c1ccc(Cn2c(CC(C)(C)C(O)=O)c(SC(C)(C)C)c3cc(OCc4ccc(C)cn4)ccc23)cc1']
16:51:50 | DEBUG    | Matching for input is [0]
16:51:50 | DEBUG    | Has header True
16:51:50 | DEBUG    | Schema {'input': [0], 'key': None}
16:51:50 | DEBUG    | Standardizing input single
16:51:50 | DEBUG    | Writing standardized input to /tmp/ersilia-2uwc06io/standard_input_file.csv
16:51:50 | DEBUG    | Reading standard file from /tmp/ersilia-2uwc06io/standard_input_file.csv
16:51:50 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:51:56 | DEBUG    | Status code: 200
16:51:56 | DEBUG    | Schema available in /home/affiah/eos/dest/eos5505/api_schema.json
16:51:56 | DEBUG    | Done with unique posting
16:52:01 | DEBUG    | Data: outcome
16:52:01 | DEBUG    | Values: [0.076]
16:52:01 | DEBUG    | Getting pure dtype for outcome
16:52:01 | DEBUG    | This is the pure datatype: numeric_array
16:52:01 | DEBUG    | Datatype: numeric_array
16:52:01 | DEBUG    | Datatype has been matched: numeric_array over {'string_array', 'numeric_array', 'mixed_array', 'array'}
16:52:01 | DEBUG    | No merge key
16:52:01 | DEBUG    | [0.076]
16:52:01 | DEBUG    | numeric_array
16:52:01 | DEBUG    | outcome
16:52:01 | DEBUG    | [0.319]
16:52:01 | DEBUG    | numeric_array
16:52:01 | DEBUG    | outcome
16:52:01 | DEBUG    | [0.037]
16:52:01 | DEBUG    | numeric_array
16:52:01 | DEBUG    | outcome
16:52:01 | DEBUG    | [0.0]
16:52:01 | DEBUG    | numeric_array
16:52:01 | DEBUG    | outcome
Ersilia run completed!

Bash output:
 [{'rlm_proba1': '0.076'}, {'rlm_proba1': '0.319'}, {'rlm_proba1': '0.037'}, {'rlm_proba1': '0.0'}]

Ersilia output:
 [{'rlm_proba1': '0.076'}, {'rlm_proba1': '0.319'}, {'rlm_proba1': '0.037'}, {'rlm_proba1': '0.0'}]

SUCCESS! Bash run and Ersilia run produce consistent results.
GemmaTuron commented 10 months ago

Hi @Inyrkz,

Thanks for testing another model! If you go to the ersilia test script, you'll see the Inconsistent Error type is raised when either the result is not the same type (ie, string vs integer) or when they differ significantly. By looking at the error that you pasted, it seems we are getting in one case a list and in the other the number:

{'input': {'key': 'JLPURTXCSILYLW-UHFFFAOYSA-N', 'input': 'CC(C)(O)c1cn(c(n1)C(C)(C)c1ccccc1Cl)-c1ccc(cc1)-c1cccc(c1)S(C)(=O)=O', 'text': 'CC(C)(O)c1cn(c(n1)C(C)(C)c1ccccc1Cl)-c1ccc(cc1)-c1cccc(c1)S(C)(=O)=O'}, 'output': {'outcome': [0.97966033]}}
{'input': {'key': 'JLPURTXCSILYLW-UHFFFAOYSA-N', 'input': 'CC(C)(O)c1cn(c(n1)C(C)(C)c1ccccc1Cl)-c1ccc(cc1)-c1cccc(c1)S(C)(=O)=O', 'text': 'CC(C)(O)c1cn(c(n1)C(C)(C)c1ccccc1Cl)-c1ccc(cc1)-c1cccc(c1)S(C)(=O)=O'}, 'output': {'outcome': 0.9796603322029114}}

This might very well be the cause of the test failure, and indeed, we should not get a list but simply the number. There must be a small issue with the parsing of the output in eos2r5a, let me know if you can spot it so we can fix it.

Thanks!

Gemma

miquelduranfrigola commented 10 months ago

Great catch, @GemmaTuron. This seems to be the cause of the issue. Weird that the output type is "numeric array" when there is only one float...

Inyrkz commented 10 months ago

@GemmaTuron, I checked the main.py file and ran the model locally, It seems to be working fine. It gives a float in the output CSV file.

I don't know why it's giving two different data types in the test. Is there any part of the repo I should check?

Inyrkz commented 10 months ago

In this part of the code (from the test.py script), two models are being initialized. Is it the same model being initialized twice or is this a comparison between Ersilia's model and the original model?

       eg = ExampleGenerator(model_id=self.model_id)
        input = eg.example(n_samples=NUM_SAMPLES, file_name=None, simple=True)

        mdl1 = ErsiliaModel(
            self.model_id, service_class=service_class, config_json=None
        )
        mdl2 = ErsiliaModel(
            self.model_id, service_class=service_class, config_json=None
        )
        result = mdl1.run(input=input, output=None, batch_size=100)
        result2 = mdl2.run(input=input, output=None, batch_size=100)

        zipped = list(zip(result, result2))

        for item1, item2 in zipped:
            output1 = item1["output"]
            output2 = item2["output"]

            keys1 = list(output1.keys())
            keys2 = list(output2.keys())

            for key1, key2 in zip(keys1, keys2):
                # check if the output types are not the same
                if not isinstance(output1[key1], type(output2[key2])):
                    for item1, item2 in zipped:
                        print(item1)
                        print(item2)
                        print("\n")
                    raise texc.InconsistentOutputTypes(self.model_id)
GemmaTuron commented 10 months ago

Hi @Inyrkz If I am not wrong, it is the same model and we are trying to see if running two times with the same input will produce consistent results. - I do not know why the type of output1 and 2 is different if the model is instantiated exactly the same, plus it seems to be model dependent? can you check a third model?

Inyrkz commented 10 months ago

Okay, I'll test another model

On Mon, Jan 8, 2024, 5:49 PM gemmaturon @.***> wrote:

Hi @Inyrkz https://github.com/Inyrkz If I am not wrong, it is the same model and we are trying to see if running two times with the same input will produce consistent results. - I do not know why the type of output1 and 2 is different if the model is instantiated exactly the same, plus it seems to be model dependent? can you check a third model?

β€” Reply to this email directly, view it on GitHub https://github.com/ersilia-os/ersilia/issues/929#issuecomment-1881457841, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANGRFVZS2BNOJY6NV3PQBLDYNQPSTAVCNFSM6AAAAABA7YLVLCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBRGQ2TOOBUGE . You are receiving this because you were mentioned.Message ID: @.***>

GemmaTuron commented 10 months ago

@miquelduranfrigola will tackle this to have a deeper look

Inyrkz commented 10 months ago

All the models I tested are models that I have locally. I have a problem fetching new models. It usually gets stuck at the BentoML part. The first time it got stuck there, I used a keyboard interrupt to stop it (Ctrl + C). The keyboard interrupt allowed the fetching process to continue until it gets to this part 01:54:35 | DEBUG | Getting info from BentoML and storing in /tmp/ersilia-gr5cfo70/info.json.

01:41:36 | DEBUG    | Is fetched: False
01:41:36 | INFO     | Model is not available locally
Requested model eos31ve is not available locally. Do you want to fetch it? [Y/n]
y01:41:42 | DEBUG    | Initialized with URL: None
01:41:42 | DEBUG    | Starting fetching procedure
01:41:42 | DEBUG    | Trying to find an available URL where the model is hosted
01:42:01 | DEBUG    | No hosted URL found for this model
01:42:01 | DEBUG    | There is no hosted URL available for this model
01:42:01 | DEBUG    | Docker is not installed in your local
01:42:01 | DEBUG    | GitHub CLI is installed
01:42:01 | DEBUG    | Git LFS is installed
Git LFS initialized.
01:42:01 | DEBUG    | Git LFS has been activated
01:42:02 | DEBUG    | Connected to the internet
01:42:02 | DEBUG    | Conda is installed
01:42:02 | DEBUG    | EOS Home path exists
01:42:02 | INFO     | Starting delete of model eos31ve
01:42:02 | INFO     | Removing EOS folder /home/affiah/eos/dest/eos31ve
01:42:02 | INFO     | Removing bento folder first /home/affiah/bentoml/repository/eos31ve/20240109012206_4BD468
01:42:02 | INFO     | Removing bundle folder /home/affiah/eos/repository/eos31ve
01:42:02 | DEBUG    | Folder removed
01:42:02 | DEBUG    | Attempting Bento delete
^CTraceback (most recent call last):
  File "/home/affiah/anaconda3/bin/bentoml", line 5, in <module>
    from ersilia.setup.requirements import check_bentoml
  File "/home/affiah/Desktop/ersilia/ersilia/__init__.py", line 34, in <module>
    from .core.model import ErsiliaModel
  File "/home/affiah/Desktop/ersilia/ersilia/core/model.py", line 15, in <module>
    from .tracking import RunTracker
  File "/home/affiah/Desktop/ersilia/ersilia/core/tracking.py", line 3, in <module>
    import pandas as pd
  File "/home/affiah/anaconda3/lib/python3.11/site-packages/pandas/__init__.py", line 50, in <module>
    from pandas.core.api import (
  File "/home/affiah/anaconda3/lib/python3.11/site-packages/pandas/core/api.py", line 29, in <module>
    from pandas.core.arrays import Categorical
  File "/home/affiah/anaconda3/lib/python3.11/site-packages/pandas/core/arrays/__init__.py", line 9, in <module>
    from pandas.core.arrays.floating import FloatingArray
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 936, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1069, in get_code
  File "<frozen importlib._bootstrap_external>", line 729, in _compile_bytecode
KeyboardInterrupt
01:42:36 | DEBUG    | No BentoML Catalog available
01:42:36 | INFO     | Deleting conda environment eos31ve
Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/affiah/anaconda3/bin/bentoml", line 8, in <module>
Traceback (most recent call last):
  File "/home/affiah/anaconda3/bin/bentoml", line 8, in <module>
Traceback (most recent call last):
    sys.exit(check_bentoml())
    sys.exit(check_bentoml())
             ^^^^^^^^^^^^^^^
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/__init__.py", line 6, in check_bentoml
             ^^^^^^^^^^^^^^^
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/__init__.py", line 6, in check_bentoml
  File "/home/affiah/anaconda3/bin/bentoml", line 8, in <module>
Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/affiah/anaconda3/bin/bentoml", line 8, in <module>
  File "/home/affiah/anaconda3/bin/bentoml", line 8, in <module>
    sys.exit(check_bentoml())
Traceback (most recent call last):
             ^^^^^^^^^^^^^^^
Traceback (most recent call last):
  File "/home/affiah/anaconda3/bin/bentoml", line 8, in <module>
Traceback (most recent call last):
    sys.exit(check_bentoml())
    if not req.is_bentoml_ersilia_version():
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/__init__.py", line 6, in check_bentoml
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/bentoml.py", line 27, in is_bentoml_ersilia_version
    if not req.is_bentoml_ersilia_version():
    sys.exit(check_bentoml())
  File "/home/affiah/anaconda3/bin/bentoml", line 8, in <module>
  File "/home/affiah/anaconda3/bin/bentoml", line 8, in <module>
    sys.exit(check_bentoml())
  File "/home/affiah/anaconda3/bin/bentoml", line 8, in <module>
    sys.exit(check_bentoml())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
             ^^^^^^^^^^^^^^^
             ^^^^^^^^^^^^^^^
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/__init__.py", line 6, in check_bentoml
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/__init__.py", line 6, in check_bentoml
             ^^^^^^^^^^^^^^^
    if not req.is_bentoml_ersilia_version():
    if not req.is_bentoml_ersilia_version():
             ^^^^^^^^^^^^^^^
    sys.exit(check_bentoml())
    sys.exit(check_bentoml())
             ^^^^^^^^^^^^^^^
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/__init__.py", line 6, in check_bentoml
    subprocess.Popen(cmd, shell=True).wait()
    if not req.is_bentoml_ersilia_version():
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 1264, in wait
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/bentoml.py", line 27, in is_bentoml_ersilia_version
             ^^^^^^^^^^^^^^^
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/bentoml.py", line 27, in is_bentoml_ersilia_version
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/bentoml.py", line 27, in is_bentoml_ersilia_version
    subprocess.Popen(cmd, shell=True).wait()
    subprocess.Popen(cmd, shell=True).wait()
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 1264, in wait
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 1264, in wait
    return self._wait(timeout=timeout)
    return self._wait(timeout=timeout)
    if not req.is_bentoml_ersilia_version():
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    return self._wait(timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/__init__.py", line 6, in check_bentoml
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    subprocess.Popen(cmd, shell=True).wait()
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/__init__.py", line 6, in check_bentoml
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/__init__.py", line 6, in check_bentoml
    if not req.is_bentoml_ersilia_version():
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2046, in _wait
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2046, in _wait
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 1264, in wait
    return self._wait(timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2046, in _wait
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2046, in _wait
    if not req.is_bentoml_ersilia_version():
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/bentoml.py", line 27, in is_bentoml_ersilia_version
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/bentoml.py", line 27, in is_bentoml_ersilia_version
    if not req.is_bentoml_ersilia_version():
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/bentoml.py", line 27, in is_bentoml_ersilia_version
    subprocess.Popen(cmd, shell=True).wait()
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 1264, in wait
    subprocess.Popen(cmd, shell=True).wait()
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 1264, in wait
    return self._wait(timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2046, in _wait
    return self._wait(timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2046, in _wait
    (pid, sts) = self._try_wait(0)
    (pid, sts) = self._try_wait(0)
                 ^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2004, in _try_wait
    (pid, sts) = self._try_wait(0)
    (pid, sts) = self._try_wait(0)
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/bentoml.py", line 27, in is_bentoml_ersilia_version
  File "/home/affiah/Desktop/ersilia/ersilia/setup/requirements/bentoml.py", line 27, in is_bentoml_ersilia_version
                 ^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2004, in _try_wait
    subprocess.Popen(cmd, shell=True).wait()
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 1264, in wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)
    (pid, sts) = self._try_wait(0)
                 ^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2004, in _try_wait
    subprocess.Popen(cmd, shell=True).wait()
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 1264, in wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    return self._wait(timeout=timeout)
KeyboardInterrupt
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2046, in _wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt
    (pid, sts) = self._try_wait(0)
    return self._wait(timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2046, in _wait
    (pid, sts) = self._try_wait(0)
                 ^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2004, in _try_wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt
    (pid, sts) = self._try_wait(0)
                 ^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2004, in _try_wait
                 ^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2004, in _try_wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt
                 ^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2004, in _try_wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt
    (pid, sts) = os.waitpid(self.pid, wait_flags)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt
                 ^^^^^^^^^^^^^^^^^
    subprocess.Popen(cmd, shell=True).wait()
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2004, in _try_wait
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 1264, in wait
KeyboardInterrupt
    return self._wait(timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2046, in _wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt
    (pid, sts) = self._try_wait(0)
                 ^^^^^^^^^^^^^^^^^
  File "/home/affiah/anaconda3/lib/python3.11/subprocess.py", line 2004, in _try_wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt

Remove all packages in environment /home/affiah/anaconda3/envs/eos31ve:

01:42:48 | DEBUG    | Attempting temporary folder delete
01:42:48 | DEBUG    | Attempting lake delete (local)
01:42:48 | DEBUG    | Deleting /home/affiah/eos/isaura/lake/eos31ve_local.h5
01:42:48 | DEBUG    | Attempting lake delete (public)
01:42:48 | DEBUG    | Deleting /home/affiah/eos/isaura/lake/eos31ve_public.h5
01:42:48 | INFO     | Removing docker images and stopping containers related to eos31ve
01:42:49 | DEBUG    | Model entry eos31ve was not available in the fetched models registry
01:42:49 | SUCCESS  | Model eos31ve deleted successfully
01:42:52 | DEBUG    | Trying to download from S3
01:42:52 | DEBUG    | Downloading model from S3 in zipped format
01:43:47 | DEBUG    | Extracting model from /tmp/tmpiz2at2wlersilia-/model.zip
01:43:47 | DEBUG    | ...to /home/affiah/eos/dest
01:43:47 | DEBUG    | Preparing inner template if necessary
01:43:47 | DEBUG    | The pack.py file already exists
01:43:47 | DEBUG    | The Dockerfile file already exists
01:43:47 | DEBUG    | The src folder already exists
01:43:47 | DEBUG    | Changing python version if necessary
01:43:47 | DEBUG    | {'version': '0.11.0', 'slim': False, 'python': 'py37'}
01:43:47 | DEBUG    | User is not root
01:43:47 | DEBUG    | Check if model can be run with vanilla (system) code (i.e. dockerfile has no installs)
01:43:47 | DEBUG    | Check bentoml and python version
01:43:47 | INFO     | BentoML version {'version': '0.11.0', 'slim': False, 'python': 'py37'}
01:43:47 | DEBUG    | Custom Ersilia BentoML is used, no need for modifying protobuf version
01:43:47 | DEBUG    | Model needs some installs
01:43:47 | DEBUG    | Checking if only python/conda install will be sufficient
01:43:47 | DEBUG    | Mode: conda
01:43:47 | DEBUG    | BentoML path exists! Removing it: /home/affiah/bentoml/repository/eos31ve
01:43:47 | DEBUG    | Attempting Bento delete
^CTraceback (most recent call last):
  File "/home/affiah/anaconda3/bin/bentoml", line 5, in <module>
    from ersilia.setup.requirements import check_bentoml
  File "/home/affiah/Desktop/ersilia/ersilia/__init__.py", line 25, in <module>
    from .utils.exceptions_utils.throw_ersilia_exception import throw_ersilia_exception
  File "/home/affiah/Desktop/ersilia/ersilia/utils/exceptions_utils/throw_ersilia_exception.py", line 5, in <module>
    from ...utils.exceptions_utils.issue_reporting import send_exception_issue
  File "/home/affiah/Desktop/ersilia/ersilia/utils/exceptions_utils/issue_reporting.py", line 1, in <module>
    import requests
  File "/home/affiah/anaconda3/lib/python3.11/site-packages/requests/__init__.py", line 160, in <module>
    from .api import delete, get, head, options, patch, post, put, request
  File "/home/affiah/anaconda3/lib/python3.11/site-packages/requests/api.py", line 11, in <module>
    from . import sessions
  File "/home/affiah/anaconda3/lib/python3.11/site-packages/requests/sessions.py", line 15, in <module>
    from .adapters import HTTPAdapter
  File "/home/affiah/anaconda3/lib/python3.11/site-packages/requests/adapters.py", line 44, in <module>
    from .models import Response
  File "/home/affiah/anaconda3/lib/python3.11/site-packages/requests/models.py", line 54, in <module>
    from .status_codes import codes
KeyboardInterrupt
01:46:13 | DEBUG    | No BentoML Catalog available
01:46:13 | DEBUG    | Trying to remove path: /home/affiah/bentoml/repository/eos31ve
01:46:13 | DEBUG    | ...successfully
01:46:13 | DEBUG    | Initializing conda packer
01:54:32 | DEBUG    | Trying to get metadata from: /home/affiah/eos/dest/eos31ve
01:54:32 | DEBUG    | Card saved at /home/affiah/eos/dest/eos31ve/card.json
01:54:32 | DEBUG    | Saving slug ncats-hlm
01:54:32 | DEBUG    | Checking that autoservice works
01:54:32 | DEBUG    | Setting AutoService for eos31ve
01:54:32 | DEBUG    | No service class provided, deciding automatically
01:54:32 | DEBUG    | No service class file exists in /home/affiah/eos/repository/eos31ve/20240109015413_5EFEE1/service_class.txt
01:54:32 | DEBUG    | Setting virtual environment at /home/affiah/eos/dest/eos31ve
01:54:35 | DEBUG    | Service class: conda
01:54:35 | DEBUG    | Getting APIs from list file
[]
01:54:35 | DEBUG    | Getting APIs from Bento
01:54:35 | DEBUG    | Getting info from BentoML and storing in /tmp/ersilia-gr5cfo70/info.json
miquelduranfrigola commented 10 months ago

Thanks @Inyrkz - this is useful. This is in my to-do list, I'll circle back asap.

GemmaTuron commented 9 months ago

The test module needs to be reformatted in any case, I'll close this issue and keep all the conversation in #963