Skip to content

Commit

Permalink
feature: Support Python 3.9 (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
navinsoni authored and navinns committed Feb 24, 2022
1 parent 926abbf commit f39955f
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 13 deletions.
10 changes: 7 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SageMaker TensorFlow

This package contains SageMaker-specific extensions to TensorFlow, including the :python:`PipeModeDataset` class, that allows SageMaker Pipe Mode channels to be read using TensorFlow Datasets.

This package supports Python 3.7-3.8 and TensorFlow versions 1.7 and higher, including 2.0-2.8.0.
This package supports Python 3.7-3.9 and TensorFlow versions 1.7 and higher, including 2.0-2.8.0.
For TensorFlow 1.x support, see the `master branch <https://github.com/aws/sagemaker-tensorflow-extensions>`_.
``sagemaker-tensorflow`` releases for all supported versions are available on `PyPI <https://pypi.org/project/sagemaker-tensorflow/#history>`_.

Expand Down Expand Up @@ -85,7 +85,7 @@ Release branching is used to track different versions of TensorFlow. To build fo

Requirements
------------
SageMaker TensorFlow extensions builds on Python 3.4-3.8 in Linux with a TensorFlow version >= 1.7. Older versions of TensorFlow are not supported. Please make sure to checkout the branch of sagemaker-tensorflow-extensions that matches your TensorFlow version.
SageMaker TensorFlow extensions builds on Python 3.4-3.9 in Linux with a TensorFlow version >= 1.7. Older versions of TensorFlow are not supported. Please make sure to checkout the branch of sagemaker-tensorflow-extensions that matches your TensorFlow version.

Please refer to below table for release support information:

Expand All @@ -97,8 +97,12 @@ Please refer to below table for release support information:
- Sagemaker TensorFlow Extensions Release Version
- TensorFlow Release Version
- Sagemaker TensorFlow Extentions Supported Python Versions
* - 2.8.0.1.14.x
- v1.14.x
- 2.8.0
- 3.7, 3.8, 3.9
* - 2.8.0.1.13.x
- v1.12.x
- v1.13.x
- 2.8.0
- 3.7, 3.8
* - 2.7.1.1.12.x
Expand Down
4 changes: 4 additions & 0 deletions buildspec-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ phases:
commands:
- PACKAGE_FILE_37="$CODEBUILD_SRC_DIR_ARTIFACT_1/sagemaker_tensorflow-*-cp37-*.whl"
- PACKAGE_FILE_38="$CODEBUILD_SRC_DIR_ARTIFACT_1/sagemaker_tensorflow-*-cp38-*.whl"
- PACKAGE_FILE_39="$CODEBUILD_SRC_DIR_ARTIFACT_1/sagemaker_tensorflow-*-cp39-*.whl"
- PYPI_USER=$(aws secretsmanager get-secret-value --secret-id /codebuild/pypi/user --query SecretString --output text)
- PYPI_PASSWORD=$(aws secretsmanager get-secret-value --secret-id /codebuild/pypi/password --query SecretString --output text)
- GPG_PRIVATE_KEY=$(aws secretsmanager get-secret-value --secret-id /codebuild/gpg/private_key --query SecretString --output text)
Expand All @@ -13,12 +14,15 @@ phases:
- echo 'md5sum of python packages:'
- md5sum $PACKAGE_FILE_37
- md5sum $PACKAGE_FILE_38
- md5sum $PACKAGE_FILE_39

# import private key and ensure passphrase is cached
- echo "$GPG_PRIVATE_KEY" | gpg --batch --import
- gpg --pinentry-mode loopback --passphrase "$GPG_PASSWORD" --detach-sign -a -o /dev/null $PACKAGE_FILE_37
- gpg --pinentry-mode loopback --passphrase "$GPG_PASSWORD" --detach-sign -a -o /dev/null $PACKAGE_FILE_38
- gpg --pinentry-mode loopback --passphrase "$GPG_PASSWORD" --detach-sign -a -o /dev/null $PACKAGE_FILE_39

# publish to pypi
- python3 -m twine upload --skip-existing $PACKAGE_FILE_37 --sign -u $PYPI_USER -p $PYPI_PASSWORD
- python3 -m twine upload --skip-existing $PACKAGE_FILE_38 --sign -u $PYPI_USER -p $PYPI_PASSWORD
- python3 -m twine upload --skip-existing $PACKAGE_FILE_39 --sign -u $PYPI_USER -p $PYPI_PASSWORD
9 changes: 5 additions & 4 deletions buildspec-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ phases:
commands:
- apt-get update
- apt-get -y install libcurl4-openssl-dev g++-9
- python3.8 -m pip install cpplint
- python3.9 -m pip install cpplint==1.5.5
- start-dockerd

build:
Expand All @@ -15,15 +15,15 @@ phases:

- tox -e flake8

- python3.8 -m cpplint --linelength=120 --filter=-build/c++11,-build/header_guard --extensions=cpp,hpp --quiet --recursive src/
- python3.9 -m cpplint --linelength=120 --filter=-build/c++11,-build/header_guard --extensions=cpp,hpp --quiet --recursive src/

# run tests
- tox -e py37,py38 -- test/
- tox -e py37,py38,py39 -- test/

# generate the distribution package
- python setup.py sdist
- |
PYTHON_VERSIONS="python3.8 python3.7"
PYTHON_VERSIONS="python3.9 python3.8 python3.7"
for PYTHON in ${PYTHON_VERSIONS}; do
$PYTHON -m pip install -U pip
$PYTHON -m pip install wheel tensorflow==2.8.0 twine==1.11 cmake
Expand All @@ -37,5 +37,6 @@ artifacts:
files:
- dist/sagemaker_tensorflow-*-cp37-*.whl
- dist/sagemaker_tensorflow-*-cp38-*.whl
- dist/sagemaker_tensorflow-*-cp39-*.whl
name: ARTIFACT_1
discard-paths: yes
6 changes: 3 additions & 3 deletions buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ phases:
commands:
- apt-get update
- apt-get -y install libcurl4-openssl-dev g++-9
- python3.8 -m pip install cpplint
- python3.9 -m pip install cpplint==1.5.5
- start-dockerd
build:
commands:
- tox -e flake8

- python3.8 -m cpplint --linelength=120 --filter=-build/c++11 --extensions=cpp,hpp --quiet --recursive src/
- python3.9 -m cpplint --linelength=120 --filter=-build/c++11 --extensions=cpp,hpp --quiet --recursive src/

- tox -e py37,py38 -- test/
- tox -e py37,py38,py39 -- test/
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def build_extension(self, ext):

setup(
name='sagemaker_tensorflow',
version='2.8.0.1.13.0',
version='2.8.0.1.14.0',
description='Amazon Sagemaker specific TensorFlow extensions.',
packages=find_packages(where='src', exclude=('test',)),
package_dir={'': 'src'},
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py37,py38,flake8,cpplint
envlist = py37,py38,py39,flake8,cpplint

skip_missing_interpreters = False

Expand Down Expand Up @@ -56,7 +56,7 @@ deps =
cmake==3.21.2

[testenv:flake8]
basepython = python3.8
basepython = python3.9
deps =
cmake==3.21.2
flake8==3.9.2
Expand Down

0 comments on commit f39955f

Please sign in to comment.