DataFrame IODescriptor Information - OpenAI swagger #2585
Unanswered
gaspardc-met
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello bentoml team,
My query starts from a somewhat broad concern: how can the user/consumer of the my service know the name/order of the expected input data from the different model API endpoints ? You can stop me right there if the concern is unfounded and a better pattern exists 👍
From a human standpoint, this is possible thanks to the great
PandasDataFrame
IODescriptor:in
service.py
:@service.api(input=PandasDataFrame(columns=FEATURES), output=PandasDataFrame(columns=[TARGET]))
in the swagger UI we get a nice display of the columns from the input and output (dummy example):

However, programmatically, when one tries to read the

docs.json
attached to the swagger, the columns are not stored in a list but in a text description undersummary
ordescription
:And the schema from the 200 response is pretty uninformative (in this use case) :

Would it be possible to store the columns in a manner that is easy to extract from the
docs.json
?I know the format is constrained, but maybe the unused fields like
examples
(BentoML/bentoml/_internal/service/openapi.py
Line 109 in 03ee3e4
Bonus: Anyone else having a different solution to a similar use case ?
Thanks in advance !
Note: currently not impossible, albeit not ideal
Beta Was this translation helpful? Give feedback.
All reactions