Slackbot
01/23/2024, 3:22 PMTalha Yousuf
01/24/2024, 1:22 PMrunners:
timeout: 900Talha Yousuf
01/24/2024, 1:26 PMbentoml_configuration.yaml
version: 1
api_server:
workers: 1
will ensure that single runner is being executed.
But the internal request scheduling is performed better if multiple runners are being executed.
Also have a look at 📜 https://docs.bentoml.org/en/latest/guides/scheduling.htmlTalha Yousuf
01/24/2024, 2:03 PMfrom <http://bentoml.io|bentoml.io> import Image, JSON
class JsonArgs(BaseModel):
prompt: str
height: t.Optional[int] = 1024
width: t.Optional[int] = 1024
class Config:
extra = "allow"
sample = JsonArgs(prompt="custom text message")
then for service endpoint:
@svc.api(input=JSON.from_sample(sample), output=Image())Илья Бакалец
01/29/2024, 12:34 PM