Skip to content

Commit

Permalink
more logging
Browse files Browse the repository at this point in the history
Signed-off-by: kalyan <[email protected]>
  • Loading branch information
rawwar committed Oct 12, 2023
1 parent 68b237a commit 9813502
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions opensearch_py_ml/ml_commons/ml_commons_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,9 @@ def load_model(self, model_id: str, wait_until_loaded: bool = True) -> object:
print("Model deployed only partially")
# TODO: need to add the test case later for this line
else:
raise Exception("Model deployment failed. Model state: " + str(model_state))
raise Exception(
f"Model deployment failed. Model state: {model_state}. Model Status: {str(ml_model_status)}"
)

return self._get_task_info(task_id)

Expand Down Expand Up @@ -355,7 +357,9 @@ def deploy_model(self, model_id: str, wait_until_deployed: bool = True) -> objec
elif model_state == "PARTIALLY_DEPLOYED":
print("Model deployed only partially")
else:
raise Exception("Model deployment failed")
raise Exception(
f"Model deployment failed. Model State: {model_state}. Model status: {str(ml_model_status)}"
)

return self._get_task_info(task_id)

Expand Down

0 comments on commit 9813502

Please sign in to comment.