From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GFngIacBtmMPwwAAbAwnHQ (envelope-from ) for ; Wed, 04 Jan 2023 23:45:59 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id oCiYIacBtmM3DQEAauVa8A (envelope-from ) for ; Wed, 04 Jan 2023 23:45:59 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 16313B23F for ; Wed, 4 Jan 2023 23:45:58 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDCTg-0000HQ-GZ; Wed, 04 Jan 2023 17:43:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCyIk-0007fX-TN for bug-guix@gnu.org; Wed, 04 Jan 2023 02:35:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pCyIh-0000qD-Gz for bug-guix@gnu.org; Wed, 04 Jan 2023 02:35:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pCyIh-0006lW-7p for bug-guix@gnu.org; Wed, 04 Jan 2023 02:35:03 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#60545: Keras h5py Version Mismatch Resent-From: Zacchaeus Scheffer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 04 Jan 2023 07:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60545 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 60545@debbugs.gnu.org X-Debbugs-Original-To: "bug-guix@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.167281766025923 (code B ref -1); Wed, 04 Jan 2023 07:35:03 +0000 Received: (at submit) by debbugs.gnu.org; 4 Jan 2023 07:34:20 +0000 Received: from localhost ([127.0.0.1]:47537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCyHz-0006k3-KO for submit@debbugs.gnu.org; Wed, 04 Jan 2023 02:34:20 -0500 Received: from lists.gnu.org ([209.51.188.17]:60004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCsnj-0003HS-4i for submit@debbugs.gnu.org; Tue, 03 Jan 2023 20:42:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCsni-0007zv-Ce for bug-guix@gnu.org; Tue, 03 Jan 2023 20:42:42 -0500 Received: from mail-bn7nam10on20611.outbound.protection.outlook.com ([2a01:111:f400:7e8a::611] helo=NAM10-BN7-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCsng-0006mS-Av for bug-guix@gnu.org; Tue, 03 Jan 2023 20:42:42 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ngn4Z8lRx1vSx+gyr5PbwZiMV+I+K/FMcAl/Mg2rat8OTn6HolMXnYQ30YOa3c8urWkq3kWOL1Gtf+sj2hcehuIf0nsjqZouqy2Oq8JAu0n4bPC7c86p2s1OKpN/ShM0SxPqg0efYgQJtApchVKpGBuPbEolIujRTHOf/nfgkbS50z3kR27KLlACprJpml1fUzCrxzCSg/SW17jEQnPqSf+Uif46gAZPFzTphwehl9pzovXn69Fsf/jz3ZDkYjMbXW/Rrn49+7Yl/0GUGpk5X7V6LRF1KJhr+ImlcpHYZ6cc5XhJOku8N0wZtzBwRKBeyc/q7UKB/qbKXLdH2NW0AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=W1Fo/KQajhqhpOiuMFYuSbkRpk3foNk57vVQxqwHbTE=; b=a3AcjjFve2hyQyDSaHMdwIMmROi/th6NgrLcb8jKdIWDeIFrogC5d4ORjADDcDYHN3o3Ozgrbsen4u9JNgJwYTeWnltSwQDdJFvzL8IRpMQn6jJFbiLyHHKjGAZvsy/0sZR/2Q+P/QxEMLkcQcnOlzcH3JMd4Ggx4GTuSfaFvq2RXE3Ss78/fvtebkYk4in68pot8pbCn6S868GGjV6qXkbPgCrvUtk7ed3S+VOkw0dO8iyVKfVBEAGjtp1mTDDbkmm9zuwZoOzLLEwwhiMg8mEDUAAy1vkmZ5DdWiUd3FYNkoyFchyk825/F8dGSDpzCsN43qebaLacu+OU8YO38w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synaptics.com; dmarc=pass action=none header.from=synaptics.com; dkim=pass header.d=synaptics.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector2-Synaptics-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W1Fo/KQajhqhpOiuMFYuSbkRpk3foNk57vVQxqwHbTE=; b=Epv9d/YI63Z+8FutxkR7lgFTfWYpD8sQTjVT6DKq6L5P5CIKIliTo8IjcIr8ccWxnF5fFaSfBmGmtGb1OEC/G0IswSoFBJCEZuNbcKORWg+v5dG+YkTcay8KcT25ER34cT+RDeWZcP5x5R8/x4cs6OU0Z4mjbZe6G4iGHlcnnj8= Received: from CY4PR03MB2759.namprd03.prod.outlook.com (2603:10b6:903:6a::10) by BY5PR03MB4966.namprd03.prod.outlook.com (2603:10b6:a03:1eb::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Wed, 4 Jan 2023 01:37:35 +0000 Received: from CY4PR03MB2759.namprd03.prod.outlook.com ([fe80::affe:7339:9ca3:1ab]) by CY4PR03MB2759.namprd03.prod.outlook.com ([fe80::affe:7339:9ca3:1ab%10]) with mapi id 15.20.5944.019; Wed, 4 Jan 2023 01:37:35 +0000 From: Zacchaeus Scheffer Thread-Topic: Keras h5py Version Mismatch Thread-Index: AQHZH9Wh0MLpLigzvEqp8wKBTEZluA== Date: Wed, 4 Jan 2023 01:37:34 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CY4PR03MB2759:EE_|BY5PR03MB4966:EE_ x-ms-office365-filtering-correlation-id: 8ec937f6-907f-4354-f109-08daedf4412a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 4OlFfDZR1FE/CxEd8NfeKuO2WefNF+BR/oVowOcW25RVe9GetfklUWGASzUyoH7byTrGy966/vyJQumL5lMSDQVITeaWC0zIqEEjf+hVEzpVy1j4S/DJdAkyYgVs4HMhSdkYHe6P6LDNlVd+2wIajjotxm8PQtiBUpfbCf7ja6cSsjw00zWe6MTjCafwHRzfEaVbcOB9XlPklKeVstbClmvuuAh/7mtMcfq9WaP5nlZY/gXXylNt16a3taTtB4G4F2KA9Uxz8u6bMc/DKUo8BTutYAOvCyBuoZNyj2W/DVaw8NZ62z0i54FLqvhqZ/1o8eRw5WurilaHv5b6wdLUIKWg5SrcPA4b0brzh/yyAFV+W4b+LFJ2PfWF3RSLLaofGF/B0YPelOtS5hg8G0rv2vP7PMNcbVtUvmAKfwvkrqjAVox93KqLNxnCEDwWLKlZbZPDwzjYD5GGBuroD26aICrIE0c9HZTO3xqJseGveUzIchkB9orNu9nFwXRP0NaTweUFtpG6qo0GyC1tyuAMEEbia+herY2iK+qIY8hfhbxXSqAcC0xLculcUtNnR+nlHdVu0n88LzNnNld1KIvUxvYsH2x6d4eN5I2fughvQSonbTfQlc7RVQhERtWlA8IuAS6s9qvDLpdCYpk1hDJOHjxE5zX5j5LHHW2G8zrvBuo9OV5TpXAsg8mxzzhPJHmadtcm64JML4d9bPu2VkFHUI7EBcph6UoK/ZInJEBx3acav4Hdt7wt0ZumaorpWJpF x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR03MB2759.namprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(396003)(376002)(346002)(136003)(39850400004)(366004)(451199015)(83380400001)(9686003)(26005)(55016003)(7696005)(33656002)(6506007)(38070700005)(86362001)(122000001)(38100700002)(186003)(478600001)(41300700001)(8676002)(2906002)(52536014)(19627405001)(5660300002)(8936002)(66556008)(71200400001)(66946007)(76116006)(66476007)(316002)(91956017)(64756008)(66446008)(6916009)(42413004)(32563001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: MHWyx5m8C4x5Pk/Ox2p/s6AEWh6mCYpyfiZTdAoDdheVNpNAZ1eqP1tYJrafNmFfn6+G61QgeSgGnD26H68RMn/Kw6uZoNdJqdbHfHYqxzeR900l/a56fdZCDtATR0DyVavZAnaxYg1TTcpvPj/0e59hALxGUOIt/XImlX5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9UKLsj6BWBlVBqe2DvT5YP5sUCXax2I6QEaMPEJ6wz5AE4UA6Jt99uqgO0H8C+yephUfHkY/VNnls7aW3csaksDQgW5Zv1hdkBPTLE7fhJF3dugLrFmgvYfxFeueH4B/9z6/BfdQ4AeKs/trSRCKmIOOn3wryHx1zMXTJj+ECyb+JN0zwl4JrjSTNeas74RDwea0VZjND1Inn7Si/Feo0jtVL1SUL8juycnJlPT/WbbU9a0Qk62IVG1eqy+ksm5GkGaZoA/hriz9dOjCywBkfPtzB72aBszKO7ssj8+x6wW1ZzR0Bs03FXo Content-Type: multipart/alternative; boundary="_000_CY4PR03MB27591E805538BEE2A385256098F59CY4PR03MB2759namp_" MIME-Version: 1.0 X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR03MB2759.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ec937f6-907f-4354-f109-08daedf4412a X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jan 2023 01:37:34.6857 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: HoeM3oP5l6NvTMNwCCuzV6t6dTv5v0IsBpT1edT6elnonklUN15yl7fWn7nYAovPiWF+ttBYrzjqBqCVS7qwew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR03MB4966 Received-SPF: pass client-ip=2a01:111:f400:7e8a::611; envelope-from=Zacchaeus.Scheffer@synaptics.com; helo=NAM10-BN7-obe.outbound.protection.outlook.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 04 Jan 2023 02:34:18 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Wed, 04 Jan 2023 17:43:18 -0500 X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672872359; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=W1Fo/KQajhqhpOiuMFYuSbkRpk3foNk57vVQxqwHbTE=; b=rWJ76Qyt6g1HgbwNTmRhuV/IViQTTdfL3Od3r5RQraX0sGnS4bug5u+IkYvkmqIlmkSVFu y4g+rkdexdUvKSekZuDCQ94LBD6BCpukychC5/7+Cn5qQ/Fou36sPc83GKndZigO/pPHha W97qfW/GWYjEgw/sI0EjSscd0ByAzxsxHsxHQPbcqjuufpVssMczjrdJvdcP3jPgGqqeAc 3gvj+fvBBlf8woph61je6lfpxT6XkWgBxQOKg3jsgNsFWt2JdsaoGlontQkCB0zz7Jp72z FHKuQvrZaIDj+e2Wnhmnwng5GT1JdCq+sI3aGrMYtmIA1mIL/s1+1UpJe6rkvg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b="Epv9d/YI"; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=synaptics.com (policy=none) ARC-Seal: i=2; s=key1; d=yhetil.org; t=1672872359; a=rsa-sha256; cv=fail; b=SL/MzZhm4TcORSPC2DVuhcipBRfLzCrhJZrLatcppXrFO6NiGDN0JOlW3FDKiXLI92qwrQ nYxPu65oW2ED71tu1oi+y6MSQSuqf37z4L6C/2hwbPl+L38TeW5cL0qaXSFp7UpDsCFESa mfiqFneOkfES/4oWhWSbqEFjRZwscJ2LU/Zz6M2JjzFrZ4qsq7h4DSzgtK9vngNjXPZ9KI cb03HdpCswxRVesL0UJOb2GUu85PUsI7uYUosdyb7dE2jdBuG4b5G4mAi9JedzMvPZLXpc 8hk4uvFB/M7yrHpPQsZ7wRQZl58kFFlKeDSbZgp0wjUuwG5xjvtkdSlPq19JdQ== X-Spam: Yes X-Migadu-Queue-Id: 16313B23F X-Migadu-Spam: Yes X-Spam-Score: 6.74 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b="Epv9d/YI"; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=synaptics.com (policy=none) X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: 6.74 X-TUID: o/Y4YCxCiLPc --_000_CY4PR03MB27591E805538BEE2A385256098F59CY4PR03MB2759namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Guix! It would seem that the current keras version expects an earlier h5py versio= n for loading models. Specifically, running: from tensorflow.keras.models import load_model model =3D load_model("model.h5") fails with: File "/gnu/store/idfn4l2kxil9id21v1yci4jcw6103fah-profile/lib/python3.9/s= ite-packages/tensorflow/python/keras/engine/saving.py", line 228, in load_m= odel model_config =3D 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 sear= ch 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, bu= t upgrading keras sounds much more involved. For a short-term fix, would i= t be possible to add back a package definition for an earlier h5py in addit= ion to the current version? I'm sure an appropriate version exists somewhe= re 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 --_000_CY4PR03MB27591E805538BEE2A385256098F59CY4PR03MB2759namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Guix!


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

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

fails with:

  File "/gnu/store/idfn4l2kxil9id21v1yci4jcw6103fah-profile/lib/p= ython3.9/site-packages/tensorflow/python/keras/engine/saving.py", line= 228, in load_model
    model_config = =3D 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 vers= ion 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, bu= t upgrading keras sounds much more involved.  For a short-term fix, wo= uld 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
--_000_CY4PR03MB27591E805538BEE2A385256098F59CY4PR03MB2759namp_--