Skip to content

Commit f74fd75

Browse files
committed
Raise error early for MLFlow in local container mode
1 parent a58654e commit f74fd75

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/sagemaker/serve/builder/model_builder.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,16 @@ def build( # pylint: disable=R0911
883883

884884
if mode:
885885
self.mode = mode
886+
887+
if self.mode == Mode.LOCAL_CONTAINER and (
888+
self.model_metadata and (
889+
"MLFLOW_MODEL_PATH" in self.model_metadata or
890+
"MLFLOW_TRACKING_ARN" in self.model_metadata
891+
)
892+
):
893+
raise ValueError("MLflow model support is not available in Local Container mode. "
894+
"Please use SageMaker Endpoint mode for MLflow models.")
895+
886896
if role_arn:
887897
self.role_arn = role_arn
888898

0 commit comments

Comments
 (0)