Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
torzdf committed Dec 20, 2022
2 parents ef55d24 + ddedb52 commit bcef3b4
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/cli/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _test_for_tf_version(self) -> None:
"""
amd_ver = (2, 2)
min_ver = (2, 7)
max_ver = (2, 9)
max_ver = (2, 10)
try:
import tensorflow as tf # noqa pylint:disable=import-outside-toplevel,unused-import
except ImportError as err:
Expand Down
1 change: 1 addition & 0 deletions lib/gpu_stats/amd.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def _set_plaidml_logger(self) -> None:
plaidml.DEFAULT_LOG_HANDLER.propagate = False

numeric_level = getattr(logging, self._log_level, None)
assert numeric_level is not None
if numeric_level < 10: # DEBUG Logging
plaidml._internal_set_vlog(1) # pylint:disable=protected-access
elif numeric_level < 20: # INFO Logging
Expand Down
5 changes: 3 additions & 2 deletions plugins/train/model/_base/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ def config(self) -> dict:
@property
def name(self) -> str:
""" str: The name of this model based on the plugin name. """
basename = os.path.basename(sys.modules[self.__module__].__file__)
return os.path.splitext(basename)[0].lower()
_name = sys.modules[self.__module__].__file__
assert isinstance(_name, str)
return os.path.splitext(os.path.basename(_name))[0].lower()

@property
def model_name(self) -> str:
Expand Down
2 changes: 1 addition & 1 deletion plugins/train/trainer/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def _log_tensorboard(self, loss: List[float]) -> None:
for log in zip(self._model.state.loss_names, loss)}

if get_tf_version() > (2, 7):
# Bug in TF 2.8/2.9 where batch recording got deleted.
# Bug in TF 2.8/2.9/2.10 where batch recording got deleted.
# ref: https://github.com/keras-team/keras/issues/16173
with tf.summary.record_if(True), self._tensorboard._train_writer.as_default(): # noqa pylint:disable=protected-access,not-context-manager
for name, value in logs.items():
Expand Down
4 changes: 2 additions & 2 deletions requirements/requirements_apple_silicon.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
protobuf>= 3.19.0,<3.20.0 # TF has started pulling in incompatible protobuf
numpy>=1.21.0; python_version < '3.8'
numpy>=1.22.0; python_version >= '3.8'
tensorflow-macos>=2.8.0,<2.10.0
tensorflow-deps>=2.8.0,<2.10.0
tensorflow-macos>=2.8.0,<2.11.0
tensorflow-deps>=2.8.0,<2.11.0
tensorflow-metal>=0.4.0,<0.6.0
libblas # Conda only
2 changes: 1 addition & 1 deletion requirements/requirements_cpu.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-r _requirements_base.txt
numpy>=1.21.0; python_version < '3.8'
numpy>=1.22.0; python_version >= '3.8'
tensorflow>=2.7.0,<2.10.0
tensorflow>=2.7.0,<2.11.0
2 changes: 1 addition & 1 deletion requirements/requirements_nvidia.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-r _requirements_base.txt
numpy>=1.21.0; python_version < '3.8'
numpy>=1.22.0; python_version >= '3.8'
tensorflow-gpu>=2.7.0,<2.10.0
tensorflow-gpu>=2.7.0,<2.11.0
pynvx==1.0.0 ; sys_platform == "darwin"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
_INSTALL_FAILED = False
# Revisions of tensorflow GPU and cuda/cudnn requirements. These relate specifically to the
# Tensorflow builds available from pypi
_TENSORFLOW_REQUIREMENTS = {">=2.7.0,<2.10.0": ["11.2", "8.1"]}
_TENSORFLOW_REQUIREMENTS = {">=2.7.0,<2.11.0": ["11.2", "8.1"]}
# Packages that are explicitly required for setup.py
_INSTALLER_REQUIREMENTS = [("pexpect>=4.8.0", "!Windows"), ("pywinpty==2.0.2", "Windows")]

Expand Down
2 changes: 1 addition & 1 deletion tests/startup_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ def test_backend(dummy): # pylint:disable=unused-argument
def test_keras(dummy): # pylint:disable=unused-argument
""" Sanity check to ensure that tensorflow keras is being used for CPU and standard
keras for AMD. """
assert ((_BACKEND == "cpu" and keras.__version__ in ("2.7.0", "2.8.0", "2.9.0")) or
assert ((_BACKEND == "cpu" and keras.__version__ in ("2.7.0", "2.8.0", "2.9.0", "2.10.0")) or
(_BACKEND == "amd" and keras.__version__ == "2.2.4"))

0 comments on commit bcef3b4

Please sign in to comment.