Skip to content

Commit baf9f6e

Browse files
authored
Merge branch 'master' into master
2 parents e068276 + 6a74d07 commit baf9f6e

File tree

9 files changed

+44
-11
lines changed

9 files changed

+44
-11
lines changed

.codecov.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignore:
2+
- "**/tensorflow/tensorflow_serving/.*"

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ language: python
22
python:
33
- '2.7'
44
- '3.5'
5-
install: pip install tox-travis
5+
install: pip install tox-travis codecov
66
script:
77
- tox tests/unit
8+
after_success:
9+
- codecov
10+

CHANGELOG.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
CHANGELOG
33
=========
44

5+
1.1.2
6+
=======
7+
8+
* bug-fix: AmazonEstimators: do not call create bucket if data location is provided
9+
10+
1.1.1
11+
========
12+
13+
* feature: Estimators: add ``requirements.txt`` support for TensorFlow
14+
15+
516
1.1.0
617
=====
718

README.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
SageMaker Python SDK
77
====================
88

9+
.. image:: https://travis-ci.org/aws/sagemaker-python-sdk.svg?branch=master
10+
:target: https://travis-ci.org/aws/sagemaker-python-sdk
11+
:alt: Build Status
12+
13+
.. image:: https://codecov.io/gh/aws/sagemaker-python-sdk/branch/master/graph/badge.svg
14+
:target: https://codecov.io/gh/aws/sagemaker-python-sdk
15+
:alt: CodeCov
16+
917
SageMaker Python SDK is an open source library for training and deploying machine learning models on Amazon SageMaker.
1018

1119
With the SDK, you can train and deploy models using popular deep learning frameworks: **Apache MXNet** and **TensorFlow**. You can also train and deploy models with **Amazon algorithms**, these are scalable implementations of core machine learning algorithms that are optimized for SageMaker and GPU training. If you have **your own algorithms** built into SageMaker compatible Docker containers, you can train and host models using these as well.
@@ -39,7 +47,7 @@ You can install from source by cloning this repository and issuing a pip install
3947

4048
git clone https://github.com/aws/sagemaker-python-sdk.git
4149
python setup.py sdist
42-
pip install dist/sagemaker-1.1.0.tar.gz
50+
pip install dist/sagemaker-1.1.2.tar.gz
4351

4452
Supported Python versions
4553
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -914,9 +922,10 @@ More details on how to create input functions can be find in `Building Input Fun
914922
Creating a ``serving_input_fn``
915923
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
916924
917-
During training, ``train_input_fn`` ingests data and prepares it for use by the model.
918-
At the end of training, similarly, ``serving_input_fn`` is used to create the model that
919-
is exported for TensorFlow Serving. This function has the following purposes:
925+
``serving_input_fn`` is used to define the shapes and types of the inputs
926+
the model accepts when the model is exported for Tensorflow Serving. ``serving_input_fn`` is called
927+
at the end of model training and is not called during inference. (If you'd like to preprocess inference data,
928+
please see ``input_fn``). This function has the following purposes:
920929
921930
- To add placeholders to the graph that the serving system will feed with inference requests.
922931
- To add any additional ops needed to convert data from the input format into the feature Tensors
@@ -1139,7 +1148,7 @@ You need to add them inside the hyperparameters dictionary in the
11391148
- ``eval_hooks (list)`` A list of `SessionRunHook` hooks to pass during evaluation.
11401149
- ``eval_delay_secs (int)`` Start evaluating after waiting for this many seconds.
11411150
- ``continuous_eval_throttle_secs (int)`` Do not re-evaluate unless the last evaluation was started at least this many seconds ago.
1142-
- ``min_eval_frequency (int)`` The minimum number of steps between evaluations. Of course, evaluation does not occur if no new snapshot is available, hence, this is the minimum. If 0, the evaluation will only happen after training. If None, defaults to default is 1000.
1151+
- ``min_eval_frequency (int)`` The minimum number of steps between evaluations. Of course, evaluation does not occur if no new snapshot is available, hence, this is the minimum. If 0, the evaluation will only happen after training. If None, defaults to 1000.
11431152
- ``delay_workers_by_global_step (bool)`` if ``True`` delays training workers based on global step instead of time.
11441153
- ``train_steps_per_iteration (int)`` Perform this many (integer) number of train steps for each training-evaluation iteration. With a small value, the model will be evaluated more frequently with more checkpoints saved.
11451154

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __getattr__(cls, name):
1818
'tensorflow.python.framework', 'tensorflow_serving', 'tensorflow_serving.apis']
1919
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
2020

21-
version = '1.1.0'
21+
version = '1.1.2'
2222
project = u'sagemaker'
2323

2424
# Add any Sphinx extension module names here, as strings. They can be extensions

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def read(fname):
1111

1212

1313
setup(name="sagemaker",
14-
version="1.1.0",
14+
version="1.1.2",
1515
description="Open source library for training and deploying models on Amazon SageMaker.",
1616
packages=find_packages('src'),
1717
package_dir={'': 'src'},

src/sagemaker/amazon/amazon_estimator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def __init__(self, role, train_instance_count, train_instance_type, data_locatio
4242
super(AmazonAlgorithmEstimatorBase, self).__init__(role, train_instance_count, train_instance_type,
4343
**kwargs)
4444

45-
default_location = "s3://{}/sagemaker-record-sets/".format(self.sagemaker_session.default_bucket())
46-
data_location = data_location or default_location
45+
data_location = data_location or "s3://{}/sagemaker-record-sets/".format(
46+
self.sagemaker_session.default_bucket())
4747
self.data_location = data_location
4848

4949
def train_image(self):

tests/unit/test_amazon_estimator.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ def test_data_location_validation(sagemaker_session):
116116
pca.data_location = "nots3://abcd/efgh"
117117

118118

119+
def test_data_location_does_not_call_default_bucket(sagemaker_session):
120+
data_location = "s3://my-bucket/path/"
121+
pca = PCA(num_components=2, sagemaker_session=sagemaker_session, data_location=data_location, **COMMON_ARGS)
122+
assert pca.data_location == data_location
123+
assert not sagemaker_session.default_bucket.called
124+
125+
119126
def test_pca_hyperparameters(sagemaker_session):
120127
pca = PCA(num_components=55, algorithm_mode='randomized',
121128
subtract_mean=True, extra_components=33, sagemaker_session=sagemaker_session,

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ passenv =
3535
# {posargs} can be passed in by additional arguments specified when invoking tox.
3636
# Can be used to specify which tests to run, e.g.: tox -- -s
3737
commands =
38-
pytest {posargs}
38+
coverage run --source sagemaker -m py.test {posargs}
39+
{env:IGNORE_COVERAGE:} coverage report --fail-under=90 --omit */tensorflow/tensorflow_serving/*
3940
deps =
4041
pytest
4142
pytest-cov

0 commit comments

Comments
 (0)