Skip to content

Commit c300183

Browse files
authored
Merge branch 'master' into feat/jumpstart-model-id-list
2 parents f9072ed + 7fa81b2 commit c300183

File tree

6 files changed

+46
-4
lines changed

6 files changed

+46
-4
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Changelog
22

3+
## v2.86.0 (2022-04-12)
4+
5+
### Features
6+
7+
* Adds Spark Processing Notebook to Notebook Tests
8+
9+
## v2.85.0 (2022-04-11)
10+
11+
### Features
12+
13+
* update lambda code on pipeline create/update/upsert for Lamb…
14+
* jumpstart model url
15+
* add serverless inference image_uri retrieve support
16+
17+
### Bug Fixes and Other Changes
18+
19+
* Add back the Fix for Pipeline variables related customer issues
20+
* Support file URIs in ProcessingStep's code parameter
21+
322
## v2.84.0 (2022-04-07)
423

524
### Features

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.84.1.dev0
1+
2.86.1.dev0

doc/frameworks/tensorflow/deploying_tensorflow_serving.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ More information on how to create ``export_outputs`` can be found in `specifying
272272
refer to TensorFlow's `Save and Restore <https://www.tensorflow.org/guide/saved_model>`_ documentation for other ways to control the
273273
inference-time behavior of your SavedModels.
274274

275-
Providing Python scripts for pre/pos-processing
276-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
275+
Providing Python scripts for pre/post-processing
276+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
277277

278278
You can add your customized Python code to process your input and output data.
279279
This customized Python code must be named ``inference.py`` and specified through the ``entry_point`` parameter:

src/sagemaker/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ def _script_mode_env_vars(self):
478478
dir_name = None
479479
if self.uploaded_code:
480480
script_name = self.uploaded_code.script_name
481-
if self.enable_network_isolation():
481+
if self.repacked_model_data or self.enable_network_isolation():
482482
dir_name = "/opt/ml/model/code"
483483
else:
484484
dir_name = self.uploaded_code.s3_prefix

tests/scripts/run-notebook-test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ echo "set SAGEMAKER_ROLE_ARN=$SAGEMAKER_ROLE_ARN"
119119
--region us-west-2 \
120120
--lifecycle-config-name $LIFECYCLE_CONFIG_NAME \
121121
--notebook-instance-role-arn $SAGEMAKER_ROLE_ARN \
122+
./amazon-sagemaker-examples/sagemaker_processing/spark_distributed_data_processing/sagemaker-spark-processing.ipynb \
122123
./amazon-sagemaker-examples/advanced_functionality/kmeans_bring_your_own_model/kmeans_bring_your_own_model.ipynb \
123124
./amazon-sagemaker-examples/advanced_functionality/tensorflow_iris_byom/tensorflow_BYOM_iris.ipynb \
124125
./amazon-sagemaker-examples/sagemaker-python-sdk/1P_kmeans_highlevel/kmeans_mnist.ipynb \

tests/unit/sagemaker/model/test_model.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,3 +665,25 @@ def test_all_framework_models_add_jumpstart_base_name(
665665

666666
sagemaker_session.create_model.reset_mock()
667667
sagemaker_session.endpoint_from_production_variants.reset_mock()
668+
669+
670+
@patch("sagemaker.utils.repack_model")
671+
def test_script_mode_model_uses_proper_sagemaker_submit_dir(repack_model, sagemaker_session):
672+
673+
source_dir = "s3://blah/blah/blah"
674+
t = Model(
675+
entry_point=ENTRY_POINT_INFERENCE,
676+
role=ROLE,
677+
sagemaker_session=sagemaker_session,
678+
source_dir=source_dir,
679+
image_uri=IMAGE_URI,
680+
model_data=MODEL_DATA,
681+
)
682+
t.deploy(instance_type=INSTANCE_TYPE, initial_instance_count=INSTANCE_COUNT)
683+
684+
assert (
685+
sagemaker_session.create_model.call_args_list[0][0][2]["Environment"][
686+
"SAGEMAKER_SUBMIT_DIRECTORY"
687+
]
688+
== "/opt/ml/model/code"
689+
)

0 commit comments

Comments
 (0)