bentoml / BentoML

The easiest way to serve AI apps and models - Build Model Inference APIs, Job queues, LLM apps, Multi-model pipelines, and more!
https://bentoml.com
Apache License 2.0
7.17k stars 792 forks source link

bentoml list not working #2165

Closed alexdivet closed 2 years ago

alexdivet commented 2 years ago

Describe the bug BentoML 1.0 fails to list my services using bentoml list

To Reproduce

  1. Just run bentoml list

Expected behavior Get a list of all my services

Screenshots/Logs

Tag  Service  Path  Size  Creation Time 
Traceback (most recent call last):
  File "/Users/e056232/opt/miniconda3/lib/python3.8/site-packages/bentoml/_internal/cli/click_utils.py", line 129, in wrapper
    track(TRACK_CLI_EVENT_NAME, track_properties)
  File "/Users/e056232/opt/miniconda3/lib/python3.8/site-packages/bentoml/_internal/utils/usage_stats.py", line 94, in track
    return _send_amplitude_event(event_type, event_properties)
  File "/Users/e056232/opt/miniconda3/lib/python3.8/site-packages/bentoml/_internal/utils/usage_stats.py", line 62, in _send_amplitude_event
    event_data = {"api_key": _api_key(), "event": json.dumps(event)}
  File "/Users/e056232/opt/miniconda3/lib/python3.8/site-packages/bentoml/_internal/utils/usage_stats.py", line 42, in _api_key
    if is_pypi_installed_bentoml():
  File "/Users/e056232/opt/miniconda3/lib/python3.8/site-packages/bentoml/_internal/configuration/__init__.py", line 61, in is_pypi_installed_bentoml
    is_clean = not version_mod.version_tuple[-1].split(".")[-1].startswith("d")
AttributeError: 'int' object has no attribute 'split'

Environment:

alexdivet commented 2 years ago

I installed bentoml with pip install bentoml==1.0.0a1, I guess the configuration should consider it as a clean install

aarnphm commented 2 years ago

can you try pip install bentoml --pre instead?

alexdivet commented 2 years ago

just tried pip install bentoml --pre but it collects the same version:

Installing collected packages: bentoml
Successfully installed bentoml-1.0.0a1

and I've got the exact same error from bentoml list

aarnphm commented 2 years ago

I can't seem to replicate this issue, everything works on my end. Can you do this and post the content of the following?

cd /Users/e056232/opt/miniconda3/lib/python3.8/site-packages/bentoml/ && cat _version.py
alexdivet commented 2 years ago
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
version = '1.0.0a1'
version_tuple = (1, 0, 0)
aarnphm commented 2 years ago

Thank you. I will address this

aarnphm commented 2 years ago

@alexdivet I wonder which version of conda you are using? Because I cannot seem to replicate this issue on my local machine. I have tested this on pyenv and poetry and everything seems to work as expected.

aarnphm commented 2 years ago

This should be fixed with a upcoming releases.

alexdivet commented 2 years ago

@alexdivet I wonder which version of conda you are using? Because I cannot seem to replicate this issue on my local machine. I have tested this on pyenv and poetry and everything seems to work as expected.

I'm using conda 4.10.3 / python 3.8.5

Thanks for having fixed it šŸ™šŸ»

alexdivet commented 2 years ago

confirming it's been fixed in 1.0.0a2

thanks for your support āœŒšŸ»