You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 13, 2023. It is now read-only.
When request via streamlit fails, it prints something like
HTTPError: 500 Server Error: Internal Server Error for url: http://0.0.0.0:8080/predict
Traceback:
File "/Users/aguschin/.local/share/virtualenvs/mlem-Utz6DvOn/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 564, in _run_script
exec(code, module.__dict__)
File "/private/var/folders/tv/l60j0x050p536g3bh8g2w1n80000gn/T/mlem_streamlit_script_v6wsv2qt/script.py", line 64, in <module>
response = getattr(client, method_name)(
File "/Users/aguschin/Git/iterative/mlem/mlem/runtime/client.py", line 153, in __call__
out = self.call_method(self.name, data, return_raw)
File "/Users/aguschin/Git/iterative/mlem/mlem/runtime/client.py", line 201, in _call_method
ret.raise_for_status()
File "/Users/aguschin/.local/share/virtualenvs/mlem-Utz6DvOn/lib/python3.9/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
but underneath, FastAPI fails with a different error. This is strange, maybe we eventually will need to either redirect failures, or use MLEM model directly instead of forwarding this to FastAPI, which seems more reasonable to me. For now should work though :)
Hit this again with CV blog post. It happened that for some png images the service https://mlem-cv.fly.dev worked.
Turned out the problem is with the image shapes. Png images that have 0 shape of 4, fails to be processed by the model. E.g.
Unfortunately, the real error can be only found out when you use FastAPI or inspect model manually:
but underneath, FastAPI fails with a different error. This is strange, maybe we eventually will need to either redirect failures, or use MLEM model directly instead of forwarding this to FastAPI, which seems more reasonable to me. For now should work though :)
Originally posted by @aguschin in #512 (comment)
The text was updated successfully, but these errors were encountered: