Skip to content

Commit 0f3caa8

Browse files
authored
Merge branch 'master' into new-regions
2 parents 7b38c77 + b2423ea commit 0f3caa8

20 files changed

+264
-116
lines changed

CHANGELOG.md

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,108 @@
11
# Changelog
22

3+
## v2.0.1 (2020-08-05)
4+
5+
### Bug Fixes and Other Changes
6+
7+
* use pathlib.PurePosixPath for S3 URLs and Unix paths
8+
* fix regions for updated RL images
9+
10+
### Documentation Changes
11+
12+
* update CHANGELOG to reflect v2.0.0 changes
13+
14+
### Testing and Release Infrastructure
15+
16+
* remove v2-incompatible notebooks from notebook build
17+
318
## v2.0.0 (2020-08-04)
419

520
### Breaking Changes
621

7-
* merge v2 changes into master
22+
* rename s3_input to TrainingInput
23+
* Move _NumpyDeserializer to sagemaker.deserializers.NumpyDeserializer
24+
* rename numpy_to_record_serializer to RecordSerializer
25+
* Move _CsvDeserializer to sagemaker.deserializers and rename to CSVDeserializer
26+
* Move _JsonSerializer to sagemaker.serializers.JSONSerializer
27+
* Move _NPYSerializer to sagemaker.serializers and rename to NumpySerializer
28+
* Move _JsonDeserializer to sagemaker.deserializers.JSONDeserializer
29+
* Move _CsvSerializer to sagemaker.serializers.CSVSerializer
30+
* preserve script path when S3 source_dir is provided
31+
* use image_uris.retrieve() for XGBoost URIs
32+
* deprecate sagemaker.amazon.amazon_estimator.get_image_uri()
33+
* deprecate fw_registry module and use image_uris.retrieve() for SparkML
34+
* deprecate Python SDK CLI
35+
* Remove the content_types module
36+
* deprecate unused parameters
37+
* deprecate fw_utils.create_image_uri()
38+
* use images_uris.retrieve() for Debugger
39+
* deprecate fw_utils.parse_s3_url in favor of s3.parse_s3_url
40+
* deprecate unused functions from utils and fw_utils
41+
* Remove content_type and accept parameters from Predictor
42+
* Add parameters to deploy and remove parameters from create_model
43+
* Add LibSVM serializer for XGBoost predictor
44+
* move ShuffleConfig from sagemaker.session to sagemaker.inputs
45+
* deprecate get_ecr_image_uri_prefix
46+
* rename estimator.train_image() to estimator.training_image_uri()
47+
* deprecate is_version_equal_or_higher and is_version_equal_or_lower
48+
* default wait=True for HyperparameterTuner.fit() and Transformer.transform()
49+
* remove unused bin/sagemaker-submit file
50+
51+
### Features
52+
53+
* start new module for retrieving prebuilt SageMaker image URIs
54+
* handle separate training/inference images and EI in image_uris.retrieve
55+
* add support for Amazon algorithms in image_uris.retrieve()
56+
* Add pandas deserializer
57+
* Remove LegacySerializer and LegacyDeserializer
58+
* Add sparse matrix serializer
59+
* Add v2 SerDe compatability
60+
* Add JSON Lines serializer
61+
* add framework upgrade tool
62+
* add 1p algorithm image_uris migration tool
63+
* Update migration tool to support breaking changes to create_model
64+
* support PyTorch 1.6 training
65+
66+
### Bug Fixes and Other Changes
67+
68+
* handle named variables in v2 migration tool
69+
* add modifier for s3_input class
70+
* add XGBoost support to image_uris.retrieve()
71+
* add MXNet configuration to image_uris.retrieve()
72+
* add remaining Amazon algorithms for image_uris.retrieve()
73+
* add PyTorch configuration for image_uris.retrieve()
74+
* make image_scope optional for some images in image_uris.retrieve()
75+
* separate logs() from attach()
76+
* use image_uris.retrieve instead of fw_utils.create_image_uri for DLC frameworks
77+
* use images_uris.retrieve() for scikit-learn classes
78+
* use image_uris.retrieve() for RL images
79+
* Rename BaseDeserializer.deserialize data parameter
80+
* Add allow_pickle parameter to NumpyDeserializer
81+
* Fix scipy.sparse imports
82+
* Improve code style of SerDe compatibility
83+
* use image_uris.retrieve for Neo and Inferentia images
84+
* use generated RL version fixtures and update Ray version
85+
* use image_uris.retrieve() for ModelMonitor default image
86+
* use _framework_name for 'protected' attribute
87+
* Fix JSONLinesDeserializer
88+
* upgrade TFS version and fix py_versions KeyError
89+
* Fix PandasDeserializer tests to more accurately mock response
90+
* don't require instance_type for image_uris.retrieve() if only one option
91+
* ignore code cells with shell commands in v2 migration tool
92+
* Support multiple Accept types
93+
94+
### Documentation Changes
95+
96+
* fix pip install command
97+
* document name changes for TFS classes
98+
* document v2.0.0 changes
99+
* update KFP full pipeline
100+
101+
### Testing and Release Infrastructure
102+
103+
* generate Chainer latest version fixtures from config
104+
* use generated TensorFlow version fixtures
105+
* use generated MXNet version fixtures
8106

9107
## v1.72.0 (2020-07-29)
10108

README.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
+-------------------------------------------------------------------------------------------------+
2-
| **NOTE**: We are working on v2.0.0. See https://github.com/aws/sagemaker-python-sdk/issues/1459 |
3-
| for more info on our plans and to leave feedback! |
4-
+-------------------------------------------------------------------------------------------------+
5-
61
.. image:: https://github.com/aws/sagemaker-python-sdk/raw/master/branding/icon/sagemaker-banner.png
72
:height: 100px
83
:alt: SageMaker

VERSION

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

src/sagemaker/image_uri_config/coach-tensorflow.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,8 @@
167167
"ap-southeast-2": "462105765813",
168168
"ca-central-1": "462105765813",
169169
"eu-central-1": "462105765813",
170-
"eu-north-1": "462105765813",
171170
"eu-west-1": "462105765813",
172171
"eu-west-2": "462105765813",
173-
"eu-west-3": "462105765813",
174-
"sa-east-1": "462105765813",
175172
"us-east-1": "462105765813",
176173
"us-east-2": "462105765813",
177174
"us-west-1": "462105765813",

src/sagemaker/image_uri_config/ray-pytorch.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@
1212
"ap-southeast-2": "462105765813",
1313
"ca-central-1": "462105765813",
1414
"eu-central-1": "462105765813",
15-
"eu-north-1": "462105765813",
1615
"eu-west-1": "462105765813",
1716
"eu-west-2": "462105765813",
18-
"eu-west-3": "462105765813",
19-
"sa-east-1": "462105765813",
2017
"us-east-1": "462105765813",
2118
"us-east-2": "462105765813",
2219
"us-west-1": "462105765813",

src/sagemaker/image_uri_config/ray-tensorflow.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,8 @@
136136
"ap-southeast-2": "462105765813",
137137
"ca-central-1": "462105765813",
138138
"eu-central-1": "462105765813",
139-
"eu-north-1": "462105765813",
140139
"eu-west-1": "462105765813",
141140
"eu-west-2": "462105765813",
142-
"eu-west-3": "462105765813",
143-
"sa-east-1": "462105765813",
144141
"us-east-1": "462105765813",
145142
"us-east-2": "462105765813",
146143
"us-west-1": "462105765813",
@@ -159,11 +156,8 @@
159156
"ap-southeast-2": "462105765813",
160157
"ca-central-1": "462105765813",
161158
"eu-central-1": "462105765813",
162-
"eu-north-1": "462105765813",
163159
"eu-west-1": "462105765813",
164160
"eu-west-2": "462105765813",
165-
"eu-west-3": "462105765813",
166-
"sa-east-1": "462105765813",
167161
"us-east-1": "462105765813",
168162
"us-east-2": "462105765813",
169163
"us-west-1": "462105765813",

src/sagemaker/image_uri_config/vw.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@
1111
"ap-southeast-2": "462105765813",
1212
"ca-central-1": "462105765813",
1313
"eu-central-1": "462105765813",
14-
"eu-north-1": "462105765813",
1514
"eu-west-1": "462105765813",
1615
"eu-west-2": "462105765813",
17-
"eu-west-3": "462105765813",
18-
"sa-east-1": "462105765813",
1916
"us-east-1": "462105765813",
2017
"us-east-2": "462105765813",
2118
"us-west-1": "462105765813",

src/sagemaker/local/utils.py

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
from distutils.dir_util import copy_tree
2020
from six.moves.urllib.parse import urlparse
2121

22+
from sagemaker import s3
23+
2224

2325
def copy_directory_structure(destination_directory, relative_path):
2426
"""Create all the intermediate directories required for relative_path to
@@ -62,8 +64,8 @@ def move_to_destination(source, destination, job_name, sagemaker_session):
6264
final_uri = destination
6365
elif parsed_uri.scheme == "s3":
6466
bucket = parsed_uri.netloc
65-
path = _create_s3_prefix(parsed_uri.path, job_name)
66-
final_uri = "s3://%s/%s" % (bucket, path)
67+
path = s3.s3_path_join(parsed_uri.path, job_name)
68+
final_uri = s3.s3_path_join("s3://", bucket, path)
6769
sagemaker_session.upload_data(source, bucket, path)
6870
else:
6971
raise ValueError("Invalid destination URI, must be s3:// or file://, got: %s" % destination)
@@ -72,22 +74,6 @@ def move_to_destination(source, destination, job_name, sagemaker_session):
7274
return final_uri
7375

7476

75-
def _create_s3_prefix(path, job_name):
76-
"""Constructs a path out of the given path and job name to be
77-
used as an S3 prefix.
78-
79-
Args:
80-
path (str): the original path. If the path is only ``"/"``,
81-
then it is ignored.
82-
job_name (str): the job name to be appended to the path.
83-
84-
Returns:
85-
str: an S3 prefix of the form ``"path/job_name"``
86-
"""
87-
path = path.strip("/")
88-
return job_name if path == "" else "/".join((path, job_name))
89-
90-
9177
def recursive_copy(source, destination):
9278
"""A wrapper around distutils.dir_util.copy_tree but won't throw any
9379
exception when the source directory does not exist.

src/sagemaker/model_monitor/data_capture_config.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
"""
1717
from __future__ import print_function, absolute_import
1818

19-
import os
20-
19+
from sagemaker import s3
2120
from sagemaker.session import Session
2221

2322
_MODEL_MONITOR_S3_PATH = "model-monitor"
@@ -67,7 +66,7 @@ def __init__(
6766
self.destination_s3_uri = destination_s3_uri
6867
if self.destination_s3_uri is None:
6968
sagemaker_session = sagemaker_session or Session()
70-
self.destination_s3_uri = os.path.join(
69+
self.destination_s3_uri = s3.s3_path_join(
7170
"s3://",
7271
sagemaker_session.default_bucket(),
7372
_MODEL_MONITOR_S3_PATH,

0 commit comments

Comments
 (0)