bentoml / BentoML

The easiest way to serve AI apps and models - Build reliable Inference APIs, LLM apps, Multi-model chains, RAG service, and much more!
https://bentoml.com
Apache License 2.0
6.99k stars 778 forks source link

feature: support bentoml.depends.from_url("http://already.deployed-bento.com:3000") #4745

Open KimSoungRyoul opened 4 months ago

KimSoungRyoul commented 4 months ago

Feature request


@bentoml.service(
    traffic={"timeout": 600},
    workers=8,
resources={"cpu": "1"}
)
class ControlNet:
    # Pass the dependent Service class as an argument
    # controlnet_service = bentoml.depends(SDXLControlNetService)
    controlnet_service = bentoml.depends.from_url(
       url= "http://already.deployed-bento.com:3000",
       input =  Annotated[torch.Tensor, Shape((1, 4)), DType("float32")],
       output =  Annotated[torch.Tensor, Shape((1, 4)), DType("float32")],
    )  

    @bentoml.api
    async def generate(self, image: PIL_Image, params: Params) -> PIL_Image:

Motivation

No response

Other

No response

frostming commented 1 week ago

Thanks, this will be included in 1.4, the next minor release