Date: Monday, November 2, 2020 @ 08:35:06
  Author: svenstaro
Revision: 739268

upgpkg: tensorflow 2.3.1-4: Fix h5py 3.0 compatibility (FS#68488)

Added:
  tensorflow/trunk/fix-h5py3.0.patch
Modified:
  tensorflow/trunk/PKGBUILD

-------------------+
 PKGBUILD          |    7 ++++++-
 fix-h5py3.0.patch |   18 ++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2020-11-02 08:34:40 UTC (rev 739267)
+++ PKGBUILD    2020-11-02 08:35:06 UTC (rev 739268)
@@ -7,7 +7,7 @@
 pkgname=(tensorflow tensorflow-opt tensorflow-cuda tensorflow-opt-cuda 
python-tensorflow python-tensorflow-opt python-tensorflow-cuda 
python-tensorflow-opt-cuda)
 pkgver=2.3.1
 _pkgver=2.3.1
-pkgrel=2
+pkgrel=4
 pkgdesc="Library for computation using data flow graphs for scalable machine 
learning"
 url="https://www.tensorflow.org/";
 license=('APACHE')
@@ -22,11 +22,13 @@
         
https://github.com/tensorflow/tensorflow/commit/c6769e20bf6096d5828e2590def2b25edb3189d6.patch
         
numpy1.20.patch::https://github.com/tensorflow/tensorflow/commit/75ea0b31477d6ba9e990e296bbbd8ca4e7eebadf.patch
         cuda11.1.patch
+        fix-h5py3.0.patch
         build-against-actual-mkl.patch)
 
sha512sums=('e497ef4564f50abf9f918be4522cf702f4cf945cb1ebf83af1386ac4ddc7373b3ba70c7f803f8ca06faf2c6b5396e60b1e0e9b97bfbd667e733b08b6e6d70ef0'
             
'9dcaef0dd4fdd7008a27e383ef87c97990ba883a3094f214f821a039994933ec6ec47f5a832570e5c4b783e0493ce2236e7957e596395c4dee40f9bf2621ff2f'
             
'df2e0373e2f63b8766f31933f7db57f6a7559b8f03af1db51644fba87731451a7cd3895529a3192e5394612fcb42f245b794b1c9ca3c05881ca03a547c8c9acc'
             
'0caa5170c22fdea2c708ecdb2c980d668464d9dba9c9730a9ec5e9258572576d783fa1d19da04d5f9d2b06aed36d30971526f212fc64c53d09c3e821bd1a3b5d'
+            
'9d7b71fed280ffaf4dfcd4889aa9ab5471874c153259f3e77ed6e6efa745e5c5aa8507d3d1f71dead5b6f4bea5f8b1c10c543929f37a6580c3f4a7cbec338a6a'
             
'e51e3f3dced121db3a09fbdaefd33555536095584b72a5eb6f302fa6fa68ab56ea45e8a847ec90ff4ba076db312c06f91ff672e08e95263c658526582494ce08')
 
 get_pyver () {
@@ -59,6 +61,9 @@
 
   patch -Np1 -d tensorflow-${_pkgver} -i "$srcdir"/numpy1.20.patch
 
+  # FS#68488
+  patch -Np1 -d tensorflow-${_pkgver} -i "$srcdir"/fix-h5py3.0.patch
+
   cp -r tensorflow-${_pkgver} tensorflow-${_pkgver}-opt
   cp -r tensorflow-${_pkgver} tensorflow-${_pkgver}-cuda
   cp -r tensorflow-${_pkgver} tensorflow-${_pkgver}-opt-cuda

Added: fix-h5py3.0.patch
===================================================================
--- fix-h5py3.0.patch                           (rev 0)
+++ fix-h5py3.0.patch   2020-11-02 08:35:06 UTC (rev 739268)
@@ -0,0 +1,18 @@
+diff --git a/tensorflow/python/keras/saving/hdf5_format.py 
b/tensorflow/python/keras/saving/hdf5_format.py
+index d3bb10c98d..e89f5356bb 100644
+--- a/tensorflow/python/keras/saving/hdf5_format.py
++++ b/tensorflow/python/keras/saving/hdf5_format.py
+@@ -659,11 +659,11 @@ def load_weights_from_hdf5_group(f, layers):
+           and weights file.
+   """
+   if 'keras_version' in f.attrs:
+-    original_keras_version = f.attrs['keras_version'].decode('utf8')
++    original_keras_version = f.attrs['keras_version']
+   else:
+     original_keras_version = '1'
+   if 'backend' in f.attrs:
+-    original_backend = f.attrs['backend'].decode('utf8')
++    original_backend = f.attrs['backend']
+   else:
+     original_backend = None
+ 

Reply via email to