unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#60545: Keras h5py Version Mismatch
@ 2023-01-04  1:37 Zacchaeus Scheffer
  2023-01-06 14:40 ` zimoun
  0 siblings, 1 reply; 3+ messages in thread
From: Zacchaeus Scheffer @ 2023-01-04  1:37 UTC (permalink / raw)
  To: 60545

[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]

Hi Guix!


It would seem that the current keras version expects an earlier h5py version for loading models.  Specifically, running:

from tensorflow.keras.models import load_model
model = load_model("model.h5")

fails with:

  File "/gnu/store/idfn4l2kxil9id21v1yci4jcw6103fah-profile/lib/python3.9/site-packages/tensorflow/python/keras/engine/saving.py", line 228, in load_model
    model_config = json.loads(model_config.decode('utf-8'))
AttributeError: 'str' object has no attribute 'decode'

The above works fine in my local pip environment (see below).  A quick search online indicates that this can be fixed by downgrading h5py to version 2.10.  The current h5py version in guix is 3.6.

My assumption is that this could also be fixed with an upgrade to keras, but upgrading keras sounds much more involved.  For a short-term fix, would it be possible to add back a package definition for an earlier h5py in addition to the current version?  I'm sure an appropriate version exists somewhere in guix's git history, though my git-foo is too weak for me to check.


Thanks,
Zacchae


P.S.
working (pip): keras 2.10.0, h5py 3.7.0
not working (current guix): keras 2.2.4, h5py 3.6.0

[-- Attachment #2: Type: text/html, Size: 5052 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-01  1:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-04  1:37 bug#60545: Keras h5py Version Mismatch Zacchaeus Scheffer
2023-01-06 14:40 ` zimoun
2023-01-31 23:01   ` Zacchaeus Scheffer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).