Bug 266311 - math/py-keras: Update to 2.9.0
Summary: math/py-keras: Update to 2.9.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on: 266303
Blocks:
  Show dependency treegraph
 
Reported: 2022-09-09 07:23 UTC by Anthony Donnelly
Modified: 2022-09-13 20:33 UTC (History)
2 users (show)

See Also:
amzo1337: maintainer-feedback? (yuri)


Attachments
Keras 2.9.0 (67.62 KB, text/plain)
2022-09-09 07:23 UTC, Anthony Donnelly
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Donnelly 2022-09-09 07:23:59 UTC
Created attachment 236448 [details]
Keras 2.9.0

I've created an updated port of keras 2.9.0 to allow the use of the keras extensions within tensorflow. Tested the build within poudriere.

Quick test with python 3.9

>>> import platform
>>> platform.system()
'FreeBSD'
>>> import tensorflow as tf
>>> mnist = tf.keras.datasets.mnist
>>> (x_train, y_train), (x_test, y_test) = mnist.load_data()
>>> 


Tensorflow requires a newer version of keras to make use of the tf.keras.* modules. The one in the ports is currently too old.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2022-09-09 07:49:28 UTC
It says:
> [00:00:14] Error: Dependency loop detected:
> These packages depend on each other: py39-tensorflow-1.15.5_7 py39-keras-2.9
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2022-09-09 07:50:02 UTC
Also WWW is now in Makefile.
And USE_PYTHON=flavors should be in the Makefile.
Comment 3 Anthony Donnelly 2022-09-09 08:00:26 UTC
Yeah, the old tensorflow port 1.5 depended on keras. However the dependency has changed.

This port relies on bug 266303 to resolve as the new tensorflow 2.9.1 package doesn't depend on keras.
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2022-09-13 20:33:08 UTC
Committed, thanks!
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-09-13 20:33:32 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2dd8869d4b07e101d86d00bb01f83c9787ed9007

commit 2dd8869d4b07e101d86d00bb01f83c9787ed9007
Author:     Anthony Donnelly <amzo1337@gmail.com>
AuthorDate: 2022-09-13 20:30:31 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-09-13 20:32:36 +0000

    math/py-keras: Update 2.4.3 -> 2.9.0

    PR:             266311

 math/py-keras/Makefile                             | 100 +++-
 math/py-keras/Makefile.MASTER_SITES (new)          |   5 +
 math/py-keras/distinfo                             |  10 +-
 math/py-keras/files/bazelrc (new)                  |  18 +
 math/py-keras/files/freebsd/BUILD (new)            |  88 ++++
 .../files/freebsd/cc_toolchain_config.bzl (new)    | 287 +++++++++++
 math/py-keras/files/patch-.bazelrc (new)           |  13 +
 math/py-keras/files/patch-WORKSPACE (new)          |  57 ++
 .../files/patch-keras_protobuf_BUILD (new)         |  11 +
 .../files/patch-keras_protobuf_protobuf.bzl (new)  | 220 ++++++++
 ...tools_pip__package_build__pip__package.sh (new) |  20 +
 math/py-keras/files/patch-third__party_BUILD (new) |  19 +
 math/py-keras/files/pkg-message.in (gone)          |   9 -
 math/py-keras/pkg-descr                            |   2 +
 math/py-keras/pkg-plist (new)                      | 572 +++++++++++++++++++++
 15 files changed, 1407 insertions(+), 24 deletions(-)