From 94be36989d47da380f3b34d1f7874c546c288d4b Mon Sep 17 00:00:00 2001 From: Lauren Yu <6631887+laurenyu@users.noreply.github.com> Date: Thu, 4 Jun 2020 13:33:38 -0700 Subject: [PATCH 1/2] infra: remove TF from optional dependencies --- doc/conf.py | 27 --------------------------- setup.py | 1 - tox.ini | 2 +- 3 files changed, 1 insertion(+), 29 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 4184a79c1f..61b42bef1e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -14,34 +14,7 @@ from __future__ import absolute_import import pkg_resources -import sys from datetime import datetime -from unittest.mock import MagicMock - - -class Mock(MagicMock): - @classmethod - def __getattr__(cls, name): - """ - Args: - name: - """ - if name == "__version__": - return "1.4.0" - else: - return MagicMock() - - -MOCK_MODULES = [ - "tensorflow", - "tensorflow.core", - "tensorflow.core.framework", - "tensorflow.python", - "tensorflow.python.framework", - "tensorflow_serving", - "tensorflow_serving.apis", -] -sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) project = u"sagemaker" version = pkg_resources.require(project)[0].version diff --git a/setup.py b/setup.py index 4ef432d47f..43b573956a 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,6 @@ def read_version(): "docker-compose>=1.25.2", "PyYAML>=5.3, <6", # PyYAML version has to match docker-compose requirements ], - "tensorflow": ["tensorflow>=1.3.0"], "scipy": ["scipy>=0.19.0"], } # Meta dependency groups diff --git a/tox.ini b/tox.ini index 69a9509335..2c5a8f60c6 100644 --- a/tox.ini +++ b/tox.ini @@ -63,7 +63,7 @@ passenv = # Can be used to specify which tests to run, e.g.: tox -- -s commands = coverage run --source sagemaker -m pytest {posargs} - {env:IGNORE_COVERAGE:} coverage report --fail-under=86 --omit */tensorflow/tensorflow_serving/* + {env:IGNORE_COVERAGE:} coverage report --fail-under=86 extras = test [testenv:flake8] From f3c6a96c45c68991f2a96b283303e32685feaedc Mon Sep 17 00:00:00 2001 From: Lauren Yu <6631887+laurenyu@users.noreply.github.com> Date: Thu, 4 Jun 2020 13:46:25 -0700 Subject: [PATCH 2/2] add pasta explicitly --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 43b573956a..aa0885ab0a 100644 --- a/setup.py +++ b/setup.py @@ -35,6 +35,7 @@ def read_version(): # Declare minimal set for installation required_packages = [ "boto3>=1.13.6", + "google-pasta", "numpy>=1.9.0", "protobuf>=3.1", "protobuf3-to-dict>=0.1.5",