Skip to content

Why do Input Adapters not take effect in test cases ? #1066

Answered by parano
jiyer2016 asked this question in General
Discussion options

You must be logged in to vote

Hey @jiyer2016 - I think the other thread here #1067 probably answered your question here. Adapters do not take effect when calling directly with the Python API. DataframeInput for example, will need the user to provide a pandas.DataFrame object as its input, the quick start example with iris classifier should be used as follow:

import pandas as pd
iris_classifier_service.predict(pd.DataFrame([[5.1, 3.5, 1.4, 0.2]]))

We could potentially make this work and convert arrays to Dataframe for the user, and we actually tried out a version with that approach when building the initial version of BentoML. But users tend to find that approach more confusing, as they expect the BentoService class me…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jiyer2016
Comment options

Answer selected by jiyer2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants