Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2023 01:13 AM
I am running the code for prediction which will take the model from mlflow deployment. Code I have copied from the example given by mlflow experiment tab.
import mlflow
logged_model = 'runs:/id/model'
# Load model as a PyFuncModel.
loaded_model = mlflow.pyfunc.load_model(logged_model)
# Predict on a Pandas DataFrame.
import pandas as pd
loaded_model.predict(pd.DataFrame(data))Here I am getting the error on this line
loaded_model.predict(pd.DataFrame(data))MlflowException: The input pandas data frame column 'None' contains scalar values, which requires the shape to be (-1,), but got tensor spec shape of (-1, "Some big integer").
Can anyone help me how to resolve this error?
Labels:
- Labels:
-
MlFlow