AWS Security ChangesHomeSearch

AWS sagemaker documentation change

Service: sagemaker · 2026-07-01 · Documentation low

File: sagemaker/latest/dg/mlflow-track-experiments-model-registration.md

Summary

Removed legacy SageMaker Python SDK v2 code examples for model registration and empty SageMaker Python SDK v3 sections

Security assessment

The deletions consist of deprecated SDK implementation examples and placeholder sections. No security-related content was modified or added, and there's no indication of security vulnerability remediation. The changes are routine documentation maintenance without security impact.

Diff

diff --git a/sagemaker/latest/dg/mlflow-track-experiments-model-registration.md b/sagemaker/latest/dg/mlflow-track-experiments-model-registration.md
index 7efe2e24f..ddee3817d 100644
--- a//sagemaker/latest/dg/mlflow-track-experiments-model-registration.md
+++ b//sagemaker/latest/dg/mlflow-track-experiments-model-registration.md
@@ -21,3 +20,0 @@ Use `create_registered_model` within your MLflow client to automatically create
-SageMaker Python SDK v3
-    
-    
@@ -35,60 +31,0 @@ SageMaker Python SDK v3
-SageMaker Python SDK v2 (Legacy)
-    
-    
-    
-    import mlflow
-    
-    from mlflow.models import infer_signature
-    
-    import pandas as pd
-    from sklearn import datasets
-    from sklearn.model_selection import train_test_split
-    from sklearn.linear_model import LogisticRegression
-    from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score
-    
-    # This is the ARN of the MLflow Tracking Server you created
-    mlflow.set_tracking_uri(your-tracking-server-arn)
-    mlflow.set_experiment("some-experiment")
-    
-    # Load the Iris dataset
-    X, y = datasets.load_iris(return_X_y=True)
-    
-    # Split the data into training and test sets
-    X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
-    
-    # Define the model hyperparameters
-    params = {"solver": "lbfgs", "max_iter": 1000, "multi_class": "auto", "random_state": 8888}
-    
-    # Train the model
-    lr = LogisticRegression(**params)
-    lr.fit(X_train, y_train)
-    
-    # Predict on the test set
-    y_pred = lr.predict(X_test)
-    
-    # Calculate accuracy as a target loss metric
-    accuracy = accuracy_score(y_test, y_pred)
-    
-    # Start an MLflow run and log parameters, metrics, and model artifacts
-    with mlflow.start_run():
-        # Log the hyperparameters
-        mlflow.log_params(params)
-    
-        # Log the loss metric
-        mlflow.log_metric("accuracy", accuracy)
-    
-        # Set a tag that we can use to remind ourselves what this run was for
-        mlflow.set_tag("Training Info", "Basic LR model for iris data")
-    
-        # Infer the model signature
-        signature = infer_signature(X_train, lr.predict(X_train))
-    
-        # Log the model
-        model_info = mlflow.sklearn.log_model(
-            sk_model=lr,
-            name="iris_model", # Changed from artifact_path to name for MLflow 3.0
-            signature=signature,
-            input_example=X_train,
-            registered_model_name="tracking-quickstart",
-        )
-
@@ -97,3 +33,0 @@ Use `mlflow.register_model()` to automatically register a model with the SageMak
-SageMaker Python SDK v3
-    
-    
@@ -123,60 +56,0 @@ SageMaker Python SDK v3
-SageMaker Python SDK v2 (Legacy)
-    
-    
-    
-    import mlflow
-    
-    from mlflow.models import infer_signature
-    
-    import pandas as pd
-    from sklearn import datasets
-    from sklearn.model_selection import train_test_split
-    from sklearn.linear_model import LogisticRegression
-    from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score
-    
-    # This is the ARN of the MLflow Tracking Server you created
-    mlflow.set_tracking_uri(your-tracking-server-arn)
-    mlflow.set_experiment("some-experiment")
-    
-    # Load the Iris dataset
-    X, y = datasets.load_iris(return_X_y=True)
-    
-    # Split the data into training and test sets
-    X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
-    
-    # Define the model hyperparameters
-    params = {"solver": "lbfgs", "max_iter": 1000, "multi_class": "auto", "random_state": 8888}
-    
-    # Train the model
-    lr = LogisticRegression(**params)
-    lr.fit(X_train, y_train)
-    
-    # Predict on the test set
-    y_pred = lr.predict(X_test)
-    
-    # Calculate accuracy as a target loss metric
-    accuracy = accuracy_score(y_test, y_pred)
-    
-    # Start an MLflow run and log parameters, metrics, and model artifacts
-    with mlflow.start_run():
-        # Log the hyperparameters
-        mlflow.log_params(params)
-    
-        # Log the loss metric
-        mlflow.log_metric("accuracy", accuracy)
-    
-        # Set a tag that we can use to remind ourselves what this run was for
-        mlflow.set_tag("Training Info", "Basic LR model for iris data")
-    
-        # Infer the model signature
-        signature = infer_signature(X_train, lr.predict(X_train))
-    
-        # Log the model
-        model_info = mlflow.sklearn.log_model(
-            sk_model=lr,
-            name="iris_model", # Changed from artifact_path to name for MLflow 3.0
-            signature=signature,
-            input_example=X_train,
-            registered_model_name="tracking-quickstart",
-        )
-