Open aguschin opened 1 year ago
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:
We can add an optional shape
field to TorchImageSerializer
and use it. Or maybe more specific drop_alpha
boolean flag?
It's a separate issue though, nothing to do with streamlit or fastapi
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 https://github.com/iterative/mlem/issues/512#issuecomment-1344452928