|
The official documentation states the following: The recommendation is for the a list of JSON to be returned (and NOT a single JSON object). However, in one of our recent discussions on Shadow Model Inference - #1051 - @yubozhao added the following code - where a single JSON response object was returned. Is the correct thing to do actually the below:
|
Replies: 2 comments
|
Hi @jiyer2016 - you are absolutely right on this. The example @yubozhao provided will not work with the current version of BentoML. It should be returning a list as you pointed out. Btw, with the revamped adapters implementation coming out next release #1056, the possible return value of API function is more clearly defined and gives users more flexibility to customize the HTTP response, while working with micro-batching mechanism in BentoML. |
|
Yes, I missed the |
Hi @jiyer2016 - you are absolutely right on this. The example @yubozhao provided will not work with the current version of BentoML. It should be returning a list as you pointed out.
Btw, with the revamped adapters implementation coming out next release #1056, the possible return value of API function is more clearly defined and gives users more flexibility to customize the HTTP response, while working with micro-batching mechanism in BentoML.