I have an MLflow model deployed in SageMaker, but when I try to update it I get this error:
MlflowException: You are attempting to deploy an application with name: titanic-xgboost-endpoint in 'create' mode. However, an application with the same name already exists. If you want to update this application, deploy in 'add' or 'replace' mode.
However, get_deploy_client("sagemaker").create_deployment does not have a mode argument. Does anyone know what I am supposed to do here if I want to replace?
My deployment code is below:
client.create_deployment(
name=ENDPOINT_NAME,
model_uri=f"models:/{REGISTERED_MODEL_NAME}/latest",
flavor="python_function",
config={
"region_name": AWS_REGION,
"execution_role_arn": SAGEMAKER_ROLE_ARN,
"instance_type": INSTANCE_TYPE,
"instance_count": INSTANCE_COUNT,
"synchronous": True,
"timeout_seconds": 1800,
}
)