Closed github-actions[bot] closed 1 year ago
@masroor07 can you check that the model works? Thanks
@masroor07 can you check that the model works? Thanks
Yes, sure!
Fetch: I was successfully able to fetch the model using the CLI (UBUNTU WSL): Fetching eos31ve done in time: 0:20:11.055298s 05:44:05 | INFO | Fetching eos31ve done successfully: 0:20:11.055298 👍 Model eos31ve fetched successfully!
Serve: Model served successfully api name: -run I tried running the model for SMILE inputs from eml. I tried running the model for single SMILE inputs: 1. Nc1nc(NC2CC2)c2ncn([C@H]3C=CC@@HC3)c2n1
{
"input": {
"key": "MCGSCOLBFJQGHM-SCZZXKLOSA-N",
"input": "Nc1nc(NC2CC2)c2ncn([C@H]3C=C[C@@H](CO)C3)c2n1",
"text": "Nc1nc(NC2CC2)c2ncn([C@H]3C=C[C@@H](CO)C3)c2n1"
},
"output": {
"outcome": [
0.009
]
}
2. O=C(O[C@H]1C[N+]2(CCCOc3ccccc3)CCC1CC2)C(O)(c1cccs1)c1cccs1
{
"input": {
"key": "ASMXXROZKSBQIH-VITNCHFBSA-N",
"input": "O=C(O[C@H]1C[N+]2(CCCOc3ccccc3)CCC1CC2)C(O)(c1cccs1)c1cccs1",
"text": "O=C(O[C@H]1C[N+]2(CCCOc3ccccc3)CCC1CC2)C(O)(c1cccs1)c1cccs1"
},
"output": {
"outcome": [
0.885
]
}
}
Then, I tried passing a csv file as an input which it hasn't been able to process. Here is the log file: smile.txt It isn't able to write the output to the file. But when I try to process the input file without storing the output to a csv, it works fine.
Also, when processing a single smile value, it rounds off the output to the ceil value.
Can you paste the error file when trying to save the csv? I could not reproduce it
Can you paste the error file when trying to save the csv? I could not reproduce it
(ersilia) masroorshah@DESKTOP-0P188GE:~$ ersilia api run -i 10_SMILES.csv -o output.csv
Traceback (most recent call last):
File "/home/masroorshah/miniconda3/envs/ersilia/bin/ersilia", line 33, in <module>
sys.exit(load_entry_point('ersilia', 'console_scripts', 'ersilia')())
File "/home/masroorshah/miniconda3/envs/ersilia/lib/python3.7/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/masroorshah/miniconda3/envs/ersilia/lib/python3.7/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/masroorshah/miniconda3/envs/ersilia/lib/python3.7/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/masroorshah/miniconda3/envs/ersilia/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/masroorshah/miniconda3/envs/ersilia/lib/python3.7/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/masroorshah/miniconda3/envs/ersilia/lib/python3.7/site-packages/bentoml/cli/click_utils.py", line 138, in wrapper
return func(*args, **kwargs)
File "/home/masroorshah/miniconda3/envs/ersilia/lib/python3.7/site-packages/bentoml/cli/click_utils.py", line 115, in wrapper
return_value = func(*args, **kwargs)
File "/home/masroorshah/miniconda3/envs/ersilia/lib/python3.7/site-packages/bentoml/cli/click_utils.py", line 99, in wrapper
return func(*args, **kwargs)
File "/home/masroorshah/ersilia/ersilia/cli/commands/api.py", line 38, in api
api_name=api_name, input=input, output=output, batch_size=batch_size
File "/home/masroorshah/ersilia/ersilia/core/model.py", line 343, in api
api_name=api_name, input=input, output=output, batch_size=batch_size
File "/home/masroorshah/ersilia/ersilia/core/model.py", line 357, in api_task
for r in result:
File "/home/masroorshah/ersilia/ersilia/core/model.py", line 184, in _api_runner_iter
for result in api.post(input=input, output=output, batch_size=batch_size):
File "/home/masroorshah/ersilia/ersilia/serve/api.py", line 330, in post
results, output, model_id=self.model_id, api_name=self.api_name
File "/home/masroorshah/ersilia/ersilia/io/output.py", line 283, in adapt
df = self._to_dataframe(result)
File "/home/masroorshah/ersilia/ersilia/io/output.py", line 229, in _to_dataframe
output_keys_expanded = self.__expand_output_keys(vals, output_keys)
File "/home/masroorshah/ersilia/ersilia/io/output.py", line 205, in __expand_output_keys
assert len(m) == len(v)
TypeError: object of type 'float' has no len()
Just to be double sure, I tried running the csv file for some other models from the hub.
Hi @masroor07
Are you passing the right path to the input and output files? I have tried to reproduce the error but in my case it does work.. are you trying to store the file in a location that does not have writing permissions or sth like it? Can you share the file you are passing as input so I can try it as well?
the rounding of the values is set to 3 decimals for simplicity, I manually changed this
Hi @masroor07
Are you passing the right path to the input and output files? I have tried to reproduce the error but in my case it does work.. are you trying to store the file in a location that does not have writing permissions or sth like it? Can you share the file you are passing as input so I can try it as well?
the rounding of the values is set to 3 decimals for simplicity, I manually changed this
This is the file that i am trying to pass: 10_SMILES.csv
Yes, the location does have writing permissions.
Hi @masroor07
It must be something you are not passing right to the CLI, I run the following command from the Desktop, where I have placed your input file, and the output comes in a .csv file without problems
ersilia -v api -i 10_SMILES.csv -o eos31ve.csv
Hi @masroor07
It must be something you are not passing right to the CLI, I run the following command from the Desktop, where I have placed your input file, and the output comes in a .csv file without problems
ersilia -v api -i 10_SMILES.csv -o eos31ve.csv
Yes, turns out there was some issue with the input file. I changed the directory for the input file and it works fine. Sorry for the trouble. I was able to reproduce the same results this timme around.
This model is ready for testing. If you are assigned to this issue, please try it out both on the CLI and Google Colab and let us know if it works!