Slackbot
05/03/2023, 1:39 PMChaoyu
05/03/2023, 11:00 PMrunner.run
or runner.async_run
from your fastapi endpoints.
The only thing you need to do to ensure the Runner architecture is applicable:
1. make sure to pass all runner references to the Service instance, e.g. svc = bentoml.Service("MyService", runners = […])
2. make sure to use bentoml serve
to launch the service
FastAPI in this case only runs in the API server processes, along side with other svc.api
logic if you have defined any.Ashish Singh
05/03/2023, 11:04 PMsvc = bentoml.Service("MyService", runners = […])
and then mounted the fastapi svc to this svc
Okay, I was worried if I don't define the decorator, the svc inference won't work, since i use runner inside fastapi route 🤦
Thank you so much for clearing that out for me 🙏Chaoyu
05/04/2023, 4:07 AMAshish Singh
05/04/2023, 12:21 PM