We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 731dc71 commit d6b6b42Copy full SHA for d6b6b42
ads/model/deployment/model_deployment.py
@@ -890,9 +890,11 @@ def predict(
890
Prediction results.
891
892
"""
893
- if self.sync().lifecycle_state != "ACTIVE":
+ current_state = self.sync().lifecycle_state
894
+ if current_state != "ACTIVE":
895
raise ModelDeploymentPredictError(
- "Model Deployment must be in `ACTIVE` state before predict can be called."
896
+ f"Predict() can't be called when model deployment is in {current_state} state. "
897
+ "Make sure model deployment is `ACTIVE` before calling predict."
898
)
899
endpoint = f"{self.url}/predict"
900
signer = authutil.default_signer()["signer"]
0 commit comments