Skip to content

Commit 333cdbf

Browse files
author
pialidas
committed
Allow selecting inference response for Autopilot generated models
1. Added attach() method to AutoML to allow attaching an AutoML object to an existing AutoMLJob 2. Added create_model() method to AutoML that returns a PipelineModel that can be used by the 3. Added a util function validate_and_update_inference_response() to update the inference container list based on the requested inference response keys 4. Updated and added unit tests
1 parent 6965758 commit 333cdbf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/sagemaker/automl/automl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ def _get_supported_inference_keys(cls, container, default=None):
467467
try:
468468
return [
469469
x.strip()
470-
for x in container["Environment"]["SAGEMAKER_INFERENCE_SUPPORT"].split(",")
470+
for x in container["Environment"]["SAGEMAKER_INFERENCE_SUPPORTED"].split(",")
471471
]
472472
except KeyError:
473473
if default is None:

tests/unit/sagemaker/automl/test_auto_ml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
{
115115
"Environment": {
116116
"MAX_CONTENT_LENGTH": "20000000",
117-
"SAGEMAKER_INFERENCE_SUPPORT": "probability,probabilities,predicted_label",
117+
"SAGEMAKER_INFERENCE_SUPPORTED": "probability,probabilities,predicted_label",
118118
"SAGEMAKER_INFERENCE_OUTPUT": "predicted_label",
119119
},
120120
"Image": "account.dkr.ecr.us-west-2.amazonaws.com/sagemaker-auto-ml-training:1.0-cpu-py3",
@@ -123,7 +123,7 @@
123123
{
124124
"Environment": {
125125
"INVERSE_LABEL_TRANSFORM": "1",
126-
"SAGEMAKER_INFERENCE_SUPPORT": "probability,probabilities,predicted_label,labels",
126+
"SAGEMAKER_INFERENCE_SUPPORTED": "probability,probabilities,predicted_label,labels",
127127
"SAGEMAKER_INFERENCE_OUTPUT": "predicted_label",
128128
"SAGEMAKER_INFERENCE_INPUT": "predicted_label",
129129
},

0 commit comments

Comments
 (0)