From dd79bd6197e5236d657a2d18afe02800d6cd13d0 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Thu, 22 Dec 2022 21:54:13 +0200 Subject: [PATCH] Fix tensorflow_macos support --- clearml/binding/jsonargs_bind.py | 2 +- clearml/utilities/pigar/reqs.py | 6 ++++++ examples/frameworks/matplotlib/requirements.txt | 3 ++- examples/frameworks/tensorflow/requirements.txt | 3 ++- examples/frameworks/xgboost/requirements.txt | 1 + examples/reporting/requirements.txt | 1 + 6 files changed, 13 insertions(+), 3 deletions(-) diff --git a/clearml/binding/jsonargs_bind.py b/clearml/binding/jsonargs_bind.py index 0a27e786..eff8483b 100644 --- a/clearml/binding/jsonargs_bind.py +++ b/clearml/binding/jsonargs_bind.py @@ -14,7 +14,7 @@ except ImportError: from ..config import running_remotely, get_remote_task_id from .frameworks import _patched_call # noqa -from ..utilities.proxy_object import verify_basic_type +from ..utilities.proxy_object import verify_basic_type, flatten_dictionary class PatchJsonArgParse(object): diff --git a/clearml/utilities/pigar/reqs.py b/clearml/utilities/pigar/reqs.py index cd41521e..35560960 100644 --- a/clearml/utilities/pigar/reqs.py +++ b/clearml/utilities/pigar/reqs.py @@ -360,6 +360,12 @@ def get_installed_pkgs_detail(): if 'tensorflow_gpu' in mapping: mapping['tensorflow'] = mapping['tensorflow_gpu'] + # HACK: prefer tensorflow_macos over tensorflow + if 'tensorflow_macos' in mapping: + p = mapping.pop('tensorflow_macos', None) + if p and isinstance(p, (tuple, list)) and len(p) == 2: + mapping['tensorflow'] = ('tensorflow', p[1]) + return mapping diff --git a/examples/frameworks/matplotlib/requirements.txt b/examples/frameworks/matplotlib/requirements.txt index fdcc6684..e74f84e2 100644 --- a/examples/frameworks/matplotlib/requirements.txt +++ b/examples/frameworks/matplotlib/requirements.txt @@ -1,4 +1,5 @@ +numpy != 1.24.0 # https://github.com/numpy/numpy/issues/22826 matplotlib >= 3.1.1 ; python_version >= '3.6' matplotlib >= 2.2.4 ; python_version < '3.6' seaborn -clearml \ No newline at end of file +clearml diff --git a/examples/frameworks/tensorflow/requirements.txt b/examples/frameworks/tensorflow/requirements.txt index 07c070b3..2492b674 100644 --- a/examples/frameworks/tensorflow/requirements.txt +++ b/examples/frameworks/tensorflow/requirements.txt @@ -1,4 +1,5 @@ +numpy != 1.24.0 # https://github.com/numpy/numpy/issues/22826 absl-py>=0.7.1 tensorboard>=2.0 tensorflow>=2.0 -clearml \ No newline at end of file +clearml diff --git a/examples/frameworks/xgboost/requirements.txt b/examples/frameworks/xgboost/requirements.txt index 693c4a74..71169b2d 100644 --- a/examples/frameworks/xgboost/requirements.txt +++ b/examples/frameworks/xgboost/requirements.txt @@ -1,3 +1,4 @@ +numpy != 1.24.0 # https://github.com/numpy/numpy/issues/22826 matplotlib >= 3.1.1 ; python_version >= '3.6' matplotlib >= 2.2.4 ; python_version < '3.6' scikit-learn diff --git a/examples/reporting/requirements.txt b/examples/reporting/requirements.txt index f02c1f79..c84ef9cf 100644 --- a/examples/reporting/requirements.txt +++ b/examples/reporting/requirements.txt @@ -1,3 +1,4 @@ +numpy != 1.24.0 # https://github.com/numpy/numpy/issues/22826 bokeh>=1.4.0 matplotlib >= 3.1.1 ; python_version >= '3.6' matplotlib >= 2.2.4 ; python_version < '3.6'