AWS sagemaker documentation change
Summary
Added deprecation notice and removed legacy SageMaker Python SDK v2 code examples
Security assessment
Combines service announcement with removal of outdated code examples. No security vulnerability mentioned. Removal of legacy code might improve maintenance but isn't security-specific.
Diff
diff --git a/sagemaker/latest/dg/model-monitor-data-capture-endpoint.md b/sagemaker/latest/dg/model-monitor-data-capture-endpoint.md index 81a350bd8..407bad88d 100644 --- a//sagemaker/latest/dg/model-monitor-data-capture-endpoint.md +++ b//sagemaker/latest/dg/model-monitor-data-capture-endpoint.md @@ -12,0 +13,4 @@ How to enable data captureDeploy your modelView Captured Data +After careful consideration, we have made the decision to close new customer access to Amazon Sagemaker Model Monitor, effective 7/30/26. Existing customers can continue to use the service as normal. AWS continues to invest in security and availability improvements for Model Monitor, but we do not plan to introduce new features. For more information, see [Amazon SageMaker Model Monitor availability change](./model-monitor-availability-change.html). + +###### Note + @@ -195,3 +198,0 @@ Create an `Endpoint` object from the SageMaker Python SDK. You will use the `End -SageMaker Python SDK v3 - - @@ -207,21 +207,0 @@ SageMaker Python SDK v3 -SageMaker Python SDK v2 (Legacy) - - - - from sagemaker.predictor import Predictor - from sagemaker.serializers import <Serializer> - from sagemaker.deserializers import <Deserializers> - - predictor = Predictor(endpoint_name=endpoint_name, - serializer = <Serializer_Class>, - deserializer = <Deserializer_Class>) - - # Example - #from sagemaker.predictor import Predictor - #from sagemaker.serializers import CSVSerializer - #from sagemaker.deserializers import JSONDeserializer - - #predictor = Predictor(endpoint_name=endpoint_name, - # serializer=CSVSerializer(), - # deserializer=JSONDeserializer()) - @@ -234,3 +213,0 @@ Suppose the model returns a probability. Probabilities range between integer val -SageMaker Python SDK v3 - - @@ -259,29 +235,0 @@ SageMaker Python SDK v3 - sleep(0.5) - print() - print("Done!") - -SageMaker Python SDK v2 (Legacy) - - - - from time import sleep - - validate_dataset = "validation_with_predictions.csv" - - # Cut off threshold of 80% - cutoff = 0.8 - - limit = 200 # Need at least 200 samples to compute standard deviations - i = 0 - with open(f"test_data/{validate_dataset}", "w") as validation_file: - validation_file.write("probability,prediction,label\n") # CSV header - with open("test_data/validation.csv", "r") as f: - for row in f: - (label, input_cols) = row.split(",", 1) - probability = float(predictor.predict(input_cols)) - prediction = "1" if probability > cutoff else "0" - baseline_file.write(f"{probability},{prediction},{label}\n") - i += 1 - if i > limit: - break - print(".", end="", flush=True)