AWS sagemaker documentation change
Summary
Updated ModelBuilder documentation link and added SageMaker Python SDK v3 deployment example for MLflow models
Security assessment
The changes update a documentation URL and provide a new SDK deployment example. The code snippet shows standard model deployment without IAM policies, encryption settings, or other security configurations. No security advisories or vulnerability fixes are present.
Diff
diff --git a/sagemaker/latest/dg/mlflow-track-experiments-model-deployment.md b/sagemaker/latest/dg/mlflow-track-experiments-model-deployment.md index 138752200..2f729e6f4 100644 --- a//sagemaker/latest/dg/mlflow-track-experiments-model-deployment.md +++ b//sagemaker/latest/dg/mlflow-track-experiments-model-deployment.md @@ -13 +13 @@ You can deploy MLflow models to a SageMaker AI endpoint using Amazon SageMaker A -`ModelBuilder` is a Python class that takes a framework model or a user-specified inference specification and converts it to a deployable model. For more details about the `ModelBuilder` class, see [ModelBuilder](https://sagemaker.readthedocs.io/en/stable/api/inference/model_builder.html#sagemaker.serve.builder.model_builder.ModelBuilder). +`ModelBuilder` is a Python class that takes a framework model or a user-specified inference specification and converts it to a deployable model. For more details about the `ModelBuilder` class, see [ModelBuilder](https://sagemaker.readthedocs.io/en/stable/api/sagemaker_serve.html). @@ -69,0 +70,29 @@ Use the following code example for reference. For end-to-end examples that show +SageMaker Python SDK v3 + + + + from sagemaker.serve import ModelBuilder + from sagemaker.serve.mode.function_pointers import Mode + from sagemaker.serve import SchemaBuilder + + my_schema = SchemaBuilder( + sample_input=sample_input, + sample_output=sample_output + ) + + model_builder = ModelBuilder( + mode=Mode.SAGEMAKER_ENDPOINT, + schema_builder=my_schema, + role_arn="Your-service-role-ARN", + model_metadata={ + # both model path and tracking server ARN are required if you use an mlflow run ID or mlflow model registry path as input + "MLFLOW_MODEL_PATH": "models:/sklearn-model/1" + "MLFLOW_TRACKING_ARN": "arn:aws:sagemaker:region:account-id:mlflow-tracking-server/tracking-server-name" + } + ) + model = model_builder.build() + endpoint = model_builder.deploy(endpoint_name="my-endpoint", instance_type="ml.c6i.xlarge") + +SageMaker Python SDK v2 (Legacy) + +