ersilia-os / eos2b6f

GNU General Public License v3.0
1 stars 1 forks source link

Requesting a more informative error when model pushed but not yet added to the Airtable #1

Closed svolk19-stanford closed 2 years ago

svolk19-stanford commented 2 years ago

After pushing the completed model to the Ersilia repo, I attempted to fetch the model using the Ersilia CLI. However, the command ersilia -v fetch pkasolver returned the error message below. The issue was resolved by adding the new model to the Airtable. An error message that includes a reference to Airtable would be useful.

⬇️ Fetching model None: pkasolver Traceback (most recent call last): File "/home/svolk19/anaconda3/envs/ersilia/bin/ersilia", line 33, in sys.exit(load_entry_point('ersilia', 'console_scripts', 'ersilia')()) File "/home/svolk19/anaconda3/envs/ersilia/lib/python3.7/site-packages/click/core.py", line 1130, in call return self.main(args, kwargs) File "/home/svolk19/anaconda3/envs/ersilia/lib/python3.7/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/home/svolk19/anaconda3/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/svolk19/anaconda3/envs/ersilia/lib/python3.7/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/svolk19/anaconda3/envs/ersilia/lib/python3.7/site-packages/click/core.py", line 760, in invoke return __callback(args, kwargs) File "/home/svolk19/anaconda3/envs/ersilia/lib/python3.7/site-packages/bentoml/cli/click_utils.py", line 138, in wrapper return func(*args, *kwargs) File "/home/svolk19/anaconda3/envs/ersilia/lib/python3.7/site-packages/bentoml/cli/click_utils.py", line 115, in wrapper return_value = func(args, kwargs) File "/home/svolk19/anaconda3/envs/ersilia/lib/python3.7/site-packages/bentoml/cli/click_utils.py", line 99, in wrapper return func(*args, *kwargs) File "/mnt/c/Users/samvo/Desktop/ersilia/ersilia/ersilia/cli/commands/fetch.py", line 44, in fetch _fetch(mf, model_id) File "/mnt/c/Users/samvo/Desktop/ersilia/ersilia/ersilia/cli/commands/fetch.py", line 15, in _fetch mf.fetch(model_id) File "/mnt/c/Users/samvo/Desktop/ersilia/ersilia/ersilia/hub/fetch/fetch.py", line 94, in fetch self._prepare() File "/mnt/c/Users/samvo/Desktop/ersilia/ersilia/ersilia/hub/fetch/fetch.py", line 48, in _prepare mp.prepare() File "/mnt/c/Users/samvo/Desktop/ersilia/ersilia/ersilia/hub/fetch/actions/prepare.py", line 16, in prepare if self.status.is_downloaded(self.model_id): File "/mnt/c/Users/samvo/Desktop/ersilia/ersilia/ersilia/hub/bundle/status.py", line 16, in is_downloaded dst_dir = os.path.join(self._dest_dir, model_id) File "/home/svolk19/anaconda3/envs/ersilia/lib/python3.7/posixpath.py", line 94, in join genericpath._check_arg_types('join', a, p) File "/home/svolk19/anaconda3/envs/ersilia/lib/python3.7/genericpath.py", line 153, in _check_arg_types (funcname, s.class.name)) from None TypeError: join() argument must be str or bytes, not 'NoneType'

miquelduranfrigola commented 2 years ago

Hi @svolk19-stanford this has now been solved.

If a model is not listed in our AirTable database, an error is raised. Currently, it looks like this:

(ersilia) macbook:ersilia mduran$ ersilia serve blahblah
Something went wrong with Ersilia...

InvalidModelIdentifierError

Error message:
Could not identify model identifier or slug: blahblah

Hints:
Please check that blahblah exists in the Ersilia Model Hub:
 - https://ersilia.io/model-hub (for approved models)
 - https://airtable.com/shrUcrUnd7jB9ChZV (for approved and in preparation models)

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)