You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Has anyone else encountered the error: 'PyFuncModel' object has no attribute 'serve', when trying to deploy a model using Python?
I followed the MLflow guide https://mlflow.org/docs/2.12.1/deployment/deploy-model-locally.html and used the code below:
import mlflow
import os
mlflow.set_tracking_uri("https://mlflow.abc.com/")
os.environ["MLFLOW_TRACKING_USERNAME"] = ""
os.environ["MLFLOW_TRACKING_PASSWORD"] = ""
model = mlflow.pyfunc.load_model("runs://model")
model.serve(port=5000)
However, I always encounter the following error. As this is a straightforward command, am I missing anything?
Exception has occurred: AttributeError 'PyFuncModel' object has no attribute 'serve'.
Here is my requirements.txt for the reference.
cloudpickle==3.0.0
numpy==1.26.4
packaging==24.0
psutil==5.9.8
pyyaml==6.0.1
scikit-learn==1.4.2
scipy==1.13.0
virtualenv
mlflow[extras]
mlserver
mlserver-mlflow
Beta Was this translation helpful? Give feedback.
All reactions