Matan Perelmuter
10/29/2024, 6:04 PM@bentoml.api
def predict(
self,
dataframe: pd.DataFrame,
params: dict
) -> dict:
return self.model.predict(dataframe, params)
and I access it with:
with bentoml.SyncHTTPClient('<https://aaaa.bentoml.ai>') as client:
response = client.predict(dataframe=df, params={})
when doing locally bentoml serve it works but on the cloud I get
bentoml.exceptions.InvalidArgument: {"error":"1 validation error for IORootModel[dict]","detail":[{"type":"dict_type","loc":[],"msg":"Input should be a valid dictionary","url":"<https://errors.pydantic.dev/2.9/v/dict_type>"}]}
any idea why?Matan Perelmuter
10/29/2024, 8:07 PM