This message was deleted.
# ask-for-help
s
This message was deleted.
y
Any help will be greatly appreciated.
c
Hi Yash, pipeline is the recommended inference api in transformers. We support the other methods only because there are some use cases where pipeline is not applicable
y
When I save a pipeline as bentoml model for multi label classification with top_k=None even though the pipeline returns all the labels, the model when served returns only the top label. code for pipeline:
Copy code
bento_model = pipeline('text-classification', model=model, tokenizer=tokenizer, top_k=None)

bentoml.transformers.save_model(name="bento-model", pipeline=bento_model)
code for service:
Copy code
runner = bentoml.transformers.get("bento-model:latest").to_runner()

svc = bentoml.Service("bento-model", runners=[runner])

@svc.api(input=Text(), output=JSON())
def bento_model(input_series: str):
    return runner.run(input_series)
@Kaustabh Choudhury