Skip to content

Commit 55356dc

Browse files
committed
Merge branch 'zwei' into script-path
2 parents 2b58b04 + 9aa708e commit 55356dc

File tree

283 files changed

+15567
-12197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

283 files changed

+15567
-12197
lines changed

.coveragerc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
[run]
2-
omit = sagemaker/tests/*, sagemaker/tensorflow/tensorflow_serving/*
2+
concurrency = threading
3+
omit = sagemaker/tests/*
4+
timid = True

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
name: Feature request
3-
about: Suggest an improvement for this library
3+
about: Suggest new functionality for this library
44
title: ''
55
labels: ''
66
assignees: ''
77

88
---
99

10-
**Is your feature request related to a problem? Please describe.**
11-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
10+
**Describe the feature you'd like**
11+
A clear and concise description of the functionality you want.
1212

13-
**Describe the solution you'd like**
14-
A clear and concise description of what you want to happen.
13+
**How would this feature be used? Please describe.**
14+
A clear and concise description of the use case for this feature. Please provide an example, if possible.
1515

1616
**Describe alternatives you've considered**
1717
A clear and concise description of any alternative solutions or features you've considered.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ _Put an `x` in the boxes that apply. You can also fill these out after creating
1212

1313
- [ ] I have read the [CONTRIBUTING](https://github.com/aws/sagemaker-python-sdk/blob/master/CONTRIBUTING.md) doc
1414
- [ ] I used the commit message format described in [CONTRIBUTING](https://github.com/aws/sagemaker-python-sdk/blob/master/CONTRIBUTING.md#committing-your-change)
15-
- [ ] I have passed the region in to any/all clients that I've initialized as part of this change.
15+
- [ ] I have passed the region in to all S3 and STS clients that I've initialized as part of this change.
1616
- [ ] I have updated any necessary documentation, including [READMEs](https://github.com/aws/sagemaker-python-sdk/blob/master/README.rst) and [API docs](https://github.com/aws/sagemaker-python-sdk/tree/master/doc) (if appropriate)
1717

1818
#### Tests

.pylintrc

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,22 @@ confidence=
7676
# --disable=W"
7777
disable=
7878
C0330, # Black disagrees with and explicitly violates this: https://github.com/python/black/issues/48
79-
too-many-locals,
79+
abstract-method, # TODO: Fix abstract methods
8080
arguments-differ,
81-
too-many-lines,
81+
cyclic-import, # TODO: Resolve cyclic imports
8282
fixme,
83-
too-many-arguments,
8483
invalid-name,
85-
too-many-instance-attributes,
86-
len-as-condition, # TODO: Enable this check once pylint 2.4.0 is released and consumed due to the fix in https://github.com/PyCQA/pylint/issues/2684
8784
import-error, # Since we run Pylint before any of our builds in tox, this will always fail
88-
protected-access, # TODO: Fix access
89-
abstract-method, # TODO: Fix abstract methods
90-
useless-object-inheritance, # TODO: Enable this check and fix code once Python 2 is no longer supported.
91-
cyclic-import, # TODO: Resolve cyclic imports
85+
import-outside-toplevel,
9286
no-self-use, # TODO: Convert methods to functions where appropriate
87+
protected-access, # TODO: Fix access
88+
signature-differs, # TODO: fix kwargs
89+
too-many-arguments,
9390
too-many-branches, # TODO: Simplify or ignore as appropriate
91+
too-many-instance-attributes,
92+
too-many-lines,
93+
too-many-locals,
94+
useless-object-inheritance, # TODO: Enable this check and fix code once Python 2 is no longer supported.
9495

9596
[REPORTS]
9697
# Set the output format. Available formats are text, parseable, colorized, msvs

CHANGELOG.md

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

3+
## v2.0.0.rc1 (2020-07-08)
4+
5+
### Breaking Changes
6+
7+
* Move StreamDeserializer to sagemaker.deserializers
8+
* Move StringDeserializer to sagemaker.deserializers
9+
* rename record_deserializer to RecordDeserializer
10+
* remove "train_" where redundant in parameter/variable names
11+
* Add BytesDeserializer
12+
* rename image to image_uri
13+
* rename image_name to image_uri
14+
* create new inference resources during model.deploy() and model.transformer()
15+
* rename session parameter to sagemaker_session in S3 utility classes
16+
* rename distributions to distribution in TF/MXNet estimators
17+
* deprecate update_endpoint arg in deploy()
18+
* create new inference resources during estimator.deploy() or estimator.transformer()
19+
* deprecate delete_endpoint() for estimators and HyperparameterTuner
20+
* refactor Predictor attribute endpoint to endpoint_name
21+
* make instance_type optional for Airflow model configs
22+
* refactor name of RealTimePredictor to Predictor
23+
* remove check for Python 2 string in sagemaker.predictor._is_sequence_like()
24+
* deprecate sagemaker.utils.to_str()
25+
* drop Python 2 support
26+
27+
### Features
28+
29+
* add BaseSerializer and BaseDeserializer
30+
* add Predictor.update_endpoint()
31+
32+
### Bug Fixes and Other Changes
33+
34+
* handle "train_*" renames in v2 migration tool
35+
* handle image_uri rename for Session methods in v2 migration tool
36+
* Update BytesDeserializer accept header
37+
* handle image_uri rename for estimators and models in v2 migration tool
38+
* handle image_uri rename in Airflow model config functions in v2 migration tool
39+
* update migration tool for S3 utility functions
40+
* set _current_job_name and base_tuning_job_name in HyperparameterTuner.attach()
41+
* infer base name from job name in estimator.attach()
42+
* ensure generated names are < 63 characters when deploying compiled models
43+
* add TF migration documentation to error message
44+
45+
### Documentation Changes
46+
47+
* update documentation with v2.0.0.rc1 changes
48+
* remove 'train_*' prefix from estimator parameters
49+
* update documentation for image_name/image --> image_uri
50+
51+
### Testing and Release Infrastructure
52+
53+
* refactor matching logic in v2 migration tool
54+
* add cli modifier for RealTimePredictor and derived classes
55+
* change coverage settings to reduce intermittent errors
56+
* clean up pickle.load logic in integ tests
57+
* use fixture for Python version in framework integ tests
58+
* remove assumption of Python 2 unit test runs
59+
60+
## v1.68.0 (2020-07-07)
61+
62+
### Features
63+
64+
* add spot instance support for AlgorithmEstimator
65+
66+
### Documentation Changes
67+
68+
* add xgboost documentation for inference
69+
70+
## v1.67.1.post0 (2020-07-01)
71+
72+
### Documentation Changes
73+
74+
* add Step Functions SDK info
75+
76+
## v1.67.1 (2020-06-30)
77+
78+
### Bug Fixes and Other Changes
79+
80+
* add deprecation warnings for estimator.delete_endpoint() and tuner.delete_endpoint()
81+
82+
## v1.67.0 (2020-06-29)
83+
84+
### Features
85+
86+
* Apache Airflow integration for SageMaker Processing Jobs
87+
88+
### Bug Fixes and Other Changes
89+
90+
* fix punctuation in warning message
91+
92+
### Testing and Release Infrastructure
93+
94+
* address warnings about pytest custom marks, error message checking, and yaml loading
95+
* mark long-running cron tests
96+
* fix tox test dependencies and bump coverage threshold to 86%
97+
98+
## v1.66.0 (2020-06-25)
99+
100+
### Features
101+
102+
* add 3.8 as supported python version
103+
104+
### Testing and Release Infrastructure
105+
106+
* upgrade airflow to latest stable version
107+
* update feature request issue template
108+
109+
## v1.65.1.post1 (2020-06-24)
110+
111+
### Testing and Release Infrastructure
112+
113+
* add py38 to buildspecs
114+
115+
## v1.65.1.post0 (2020-06-22)
116+
117+
### Documentation Changes
118+
119+
* document that Local Mode + local code doesn't support dependencies arg
120+
121+
### Testing and Release Infrastructure
122+
123+
* upgrade Sphinx to 3.1.1
124+
125+
## v1.65.1 (2020-06-18)
126+
127+
### Bug Fixes and Other Changes
128+
129+
* remove include_package_data=True from setup.py
130+
131+
### Documentation Changes
132+
133+
* add some clarification to Processing docs
134+
135+
### Testing and Release Infrastructure
136+
137+
* specify what kinds of clients in PR template
138+
139+
## v1.65.0 (2020-06-17)
140+
141+
### Features
142+
143+
* support for describing hyperparameter tuning job
144+
145+
### Bug Fixes and Other Changes
146+
147+
* update distributed GPU utilization warning message
148+
* set logs to False if wait is False in AutoML
149+
* workflow passing spot training param to training job
150+
151+
## v2.0.0.rc0 (2020-06-17)
152+
153+
### Breaking Changes
154+
155+
* remove estimator parameters for TF legacy mode
156+
* remove legacy `TensorFlowModel` and `TensorFlowPredictor` classes
157+
* force image URI to be passed for legacy TF images
158+
* rename `sagemaker.tensorflow.serving` to `sagemaker.tensorflow.model`
159+
* require `framework_version` and `py_version` for framework estimator and model classes
160+
* change `Model` parameter order to make `model_data` optional
161+
162+
### Bug Fixes and Other Changes
163+
164+
* add v2 migration tool
165+
166+
### Documentation Changes
167+
168+
* update TF documentation to reflect breaking changes and how to upgrade
169+
* start v2 usage and migration documentation
170+
171+
### Testing and Release Infrastructure
172+
173+
* remove scipy from dependencies
174+
* remove TF from optional dependencies
175+
176+
## v1.64.1 (2020-06-16)
177+
178+
### Bug Fixes and Other Changes
179+
180+
* include py38 tox env and some dependency upgrades
181+
182+
## v1.64.0 (2020-06-15)
183+
184+
### Features
185+
186+
* add support for SKLearn 0.23
187+
188+
## v1.63.0 (2020-06-12)
189+
190+
### Features
191+
192+
* Allow selecting inference response content for automl generated models
193+
* Support for multi variant endpoint invocation with target variant param
194+
195+
### Documentation Changes
196+
197+
* improve docstring and remove unavailable links
198+
199+
## v1.62.0 (2020-06-11)
200+
201+
### Features
202+
203+
* Support for multi variant endpoint invocation with target variant param
204+
205+
### Bug Fixes and Other Changes
206+
207+
* Revert "feature: Support for multi variant endpoint invocation with target variant param (#1571)"
208+
* make instance_type optional for prepare_container_def
209+
* docs: workflows navigation
210+
211+
### Documentation Changes
212+
213+
* fix typo in MXNet documentation
214+
215+
## v1.61.0 (2020-06-09)
216+
217+
### Features
218+
219+
* Use boto3 DEFAULT_SESSION when no boto3 session specified.
220+
221+
### Bug Fixes and Other Changes
222+
223+
* remove v2 Session warnings
224+
* upgrade smdebug-rulesconfig to 0.1.4
225+
* explicitly handle arguments in create_model for sklearn and xgboost
226+
3227
## v1.60.2 (2020-05-29)
4228

5229
### Bug Fixes and Other Changes

MANIFEST.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
recursive-include src/sagemaker *
1+
recursive-include src/sagemaker *.py
2+
3+
include src/sagemaker/image_uri_config/*.json
24

35
include VERSION
46
include LICENSE.txt

README.rst

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ Supported Python Versions
9393

9494
SageMaker Python SDK is tested on:
9595

96-
- Python 2.7
9796
- Python 3.6
9897
- Python 3.7
98+
- Python 3.8
9999

100100
AWS Permissions
101101
~~~~~~~~~~~~~~~
@@ -121,10 +121,9 @@ You can install the libraries needed to run the tests by running :code:`pip inst
121121

122122
**Unit tests**
123123

124-
125124
We run unit tests with tox, which is a program that lets you run unit tests for multiple Python versions, and also make sure the
126-
code fits our style guidelines. We run tox with Python 2.7, 3.6 and 3.7, so to run unit tests
127-
with the same configuration we do, you'll need to have interpreters for Python 2.7, Python 3.6 and Python 3.7 installed.
125+
code fits our style guidelines. We run tox with `all of our supported Python versions <#supported-python-versions>`_, so to run unit tests
126+
with the same configuration we do, you need to have interpreters for those Python versions installed.
128127

129128
To run the unit tests with tox, run:
130129

@@ -164,23 +163,26 @@ You can also run them in parallel:
164163
Building Sphinx docs
165164
~~~~~~~~~~~~~~~~~~~~
166165

167-
Setup a Python environment with ``sphinx`` and ``sagemaker``:
166+
Setup a Python environment, and install the dependencies listed in ``doc/requirements.txt``:
168167

169168
::
170169

170+
# conda
171171
conda create -n sagemaker python=3.7
172172
conda activate sagemaker
173-
conda install sphinx==2.2.2
174-
pip install sagemaker --user
173+
conda install --file doc/requirements.txt
175174

176-
Install the Read The Docs theme:
175+
# pip
176+
pip install -r doc/requirements.txt
177177

178-
::
179178

180-
pip install sphinx_rtd_theme --user
179+
Clone/fork the repo, and install your local version:
180+
181+
::
181182

183+
pip install --upgrade .
182184

183-
Clone/fork the repo, ``cd`` into the ``sagemaker-python-sdk/doc`` directory and run:
185+
Then ``cd`` into the ``sagemaker-python-sdk/doc`` directory and run:
184186

185187
::
186188

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.60.3.dev0
1+
2.0.0.rc1

bin/sagemaker-submit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ if __name__ == '__main__':
5656
hyperparameters=hyperparameters,
5757
instance_count=args.instance_count,
5858
instance_type=args.instance_type)
59-
estimator.fit(sagemaker.s3_input(args.data))
59+
estimator.fit(sagemaker.TrainingInput(args.data))

buildspec-localmodetests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ phases:
1111

1212
# local mode tests
1313
- start_time=`date +%s`
14-
- execute-command-if-has-matching-changes "tox -e py27,py37 -- tests/integ -m local_mode --durations 50" "tests/integ" "tests/data" "tests/conftest.py" "tests/__init__.py" "src/*.py" "setup.py" "setup.cfg" "buildspec-localmodetests.yml"
15-
- ./ci-scripts/displaytime.sh 'py27,py37 local mode' $start_time
14+
- execute-command-if-has-matching-changes "tox -e py38 -- tests/integ -m local_mode --durations 50" "tests/integ" "tests/data" "tests/conftest.py" "tests/__init__.py" "src/*.py" "setup.py" "setup.cfg" "buildspec-localmodetests.yml"
15+
- ./ci-scripts/displaytime.sh 'py38 local mode' $start_time

buildspec-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ phases:
1818
# run unit tests
1919
- AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_SESSION_TOKEN=
2020
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI= AWS_DEFAULT_REGION=
21-
tox -e py27,py36,py37 -- tests/unit
21+
tox -e py36,py37,py38 -- tests/unit
2222

2323
# run a subset of the integration tests
2424
- IGNORE_COVERAGE=- tox -e py36 -- tests/integ -m canary_quick -n 64 --boxed --reruns 2

buildspec-unittests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ phases:
1818
- start_time=`date +%s`
1919
- AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_SESSION_TOKEN=
2020
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI= AWS_DEFAULT_REGION=
21-
tox -e py27,py36,py37 --parallel all -- tests/unit
22-
- ./ci-scripts/displaytime.sh 'py27,py36,py37 unit' $start_time
21+
tox -e py36,py37,py38 --parallel all -- tests/unit
22+
- ./ci-scripts/displaytime.sh 'py36,py37,py38 unit' $start_time

0 commit comments

Comments
 (0)