Arnault Chazareix
04/14/2025, 11:25 AMTokenizeService that takes as input a path / key to a tokenizer.
I would like my main service to depends on
TokenizeService("my_tokenizer_1") and TokenizeService("my_tokenizer_2")
Thanks for your help and for bentoml 🙂Chaoyu
04/14/2025, 12:06 PMArnault Chazareix
04/14/2025, 1:18 PMclass MyMainService:
tokenizer_a = bentoml.depends(TokenizeService, tokenizer_path="my_tokenizer_a")
tokenizer_b = bentoml.depends(TokenizeService, tokenizer_path="my_tokenizer_b")
model_a = bentoml.depends(MyModelService, model_path="model_a")
model_b = bentoml.depends(MyModelService, model_path="model_b", gpu=2)
model_c = bentoml.depends(MyModelService, model_path="model_c")
@bentoml.api
def predict():
...
I feel like this is an antipattern with the way bentoml currently works