freebsd.org; s=dkim; t=1775498151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M1ZmIaaf/xEjcq9dC+Y9DSnNL3kJdt6Iw5hk46mnoGc=; b=yIZq9XbEr2JUi2YbhroPhelLlS17EUboHWGfJoESdbi7c73dTnFKjC7ELM66tjjV2Beh/P G4zIULtaI/nbsWsFuKbvbVgnFY8Ccmb8EuGwo5v77baFDmhrBcZlJXBCBj2hF3T/2zlH/Y LEKrBXRhPorZEAzWhQPngQaN3gi1Dor37jQ0+S+KSvvb3b5w27YGS1/1abXZ1gb3nqSvzH 1UzsdlmUHny6K/mfGJd8PMbIvwiJtAjGNGVtOhlGq4ctwMQPH7VZRCQNgUPMeYmaqQluZQ vNR34AkqDpvCitR7OLuNmCw5V6ngfLW0xeHQX5CiVVXUXx6aGjVfAsGlEhyS1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775498151; a=rsa-sha256; cv=none; b=hIYXptqRxZjsyQweVge8RN5+VT008zAcKeElEEk+03WN+ooRwk7b6FBS6FDbS5l8MsemvN /eewZHLdtxJpLG3W0t1Zng3IrsrZtBeMdlm7UOZfm/W9biPdNGRL1jz5j6FVfeY/iqfFtd PwOayIfFTvE/SXRsCsu2jbw+ODIilCWq/C4qhke7t2QDo+uY8iB8VHVk5was7v4naTeLOs I0iZRUUjmSG1jgLoKon54/7Dlj6xRAaKzIp6KBRmkeMr+ZY76gL2Cg3QMA5HTuynEWjrTK 1/gX3Xfqah91L3qSKukpR3Ab/UXhZ8Mf7goqQsOz5PddD4tyOl8Po/fggQLbvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775498151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M1ZmIaaf/xEjcq9dC+Y9DSnNL3kJdt6Iw5hk46mnoGc=; b=kmYg+H2SL4ZIrOPROh7Q765nSCGX4OHTWQ7u626Q9MzkI5TZen1Jk+9m5vq1KZNyZ06CLe KMW9E9Mev8jfV0Jhmni+qr5GOI2IsogOJ5uaDsl7BVSxJi/rPzrQs2ti+XEQQlRtKjFHtO yc9Xr3daloej7u3DhkicX8sfaq0HPBIMKURbDV7Sn8qLfSZcFuL5c2C0g0sErkHKioasWv YsDGHfPhtfk5Dvt4ifQ+pkflpF2UA1Xj/l332AKcVHtPnzcyrB4dr2sBhc8pXrHoeVlNNI ImKbDehw5nYI0eamPlE892xwQbJFcxahpzaQE5xATxkMZvE8Z8sEou+GRzFv4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fqH7C5FdDz13d8 for ; Mon, 06 Apr 2026 17:55:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2260b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Apr 2026 17:55:51 +0000 To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: 57c1235513b9 - main - math/py-keras: update 3.1=?utf-8?Q?2.0 =E2=86=92?= 3.14.0 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 57c1235513b9043c56f7fa174726d8d4c6ff41fe Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 17:55:51 +0000 Message-Id: <69d3f3a7.2260b.8d2f738@gitrepo.freebsd.org> The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=57c1235513b9043c56f7fa174726d8d4c6ff41fe commit 57c1235513b9043c56f7fa174726d8d4c6ff41fe Author: Yuri Victorovich AuthorDate: 2026-04-06 16:24:32 +0000 Commit: Yuri Victorovich CommitDate: 2026-04-06 17:55:47 +0000 math/py-keras: update 3.12.0 → 3.14.0 --- math/py-keras/Makefile | 21 ++++++++++------- math/py-keras/distinfo | 6 ++--- math/py-keras/files/patch-pyproject.toml | 2 +- math/py-keras/files/test-simple-1.py | 40 ++++++++++++++++++++++++++++++++ math/py-keras/pkg-descr | 9 +++++-- 5 files changed, 64 insertions(+), 14 deletions(-) diff --git a/math/py-keras/Makefile b/math/py-keras/Makefile index f14617d74dfb..d88d2baf72c0 100644 --- a/math/py-keras/Makefile +++ b/math/py-keras/Makefile @@ -1,28 +1,28 @@ PORTNAME= keras -DISTVERSION= 3.12.0 -PORTREVISION= 1 +DISTVERSION= 3.14.0 CATEGORIES= math python # machine-learning MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= yuri@FreeBSD.org COMMENT= Multi-backend deep learning library for Python -WWW= https://keras.io/ +WWW= https://keras.io/ \ + https://github.com/keras-team/keras LICENSE= APACHE20 BUILD_DEPENDS= ${PY_SETUPTOOLS} \ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy1>=1.16:math/py-numpy1@${PY_FLAVOR} \ +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy1>0:math/py-numpy1@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}absl-py>0:devel/py-absl-py@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}h5py>0:science/py-h5py@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}ml-dtypes>0:math/py-ml-dtypes@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}namex>0:devel/py-namex@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}optree>0:devel/py-optree@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}rich>0:textproc/py-rich@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}tensorflow>=2.12.0:science/py-tensorflow@${PY_FLAVOR} -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}scipy>=1.0:science/py-scipy@${PY_FLAVOR} + ${PYTHON_PKGNAMEPREFIX}rich>0:textproc/py-rich@${PY_FLAVOR} +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}scipy>=1.0:science/py-scipy@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}tensorflow>0:science/py-tensorflow@${PY_FLAVOR} # Extra dependencies for optional backends (jax, torch) # openvino backend not available as FreeBSD port @@ -30,8 +30,13 @@ EXTRA_DEPENDS= ${PYTHON_PKGNAMEPREFIX}jax>0:math/py-jax@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytorch>0:misc/py-pytorch@${PY_FLAVOR} USES= python -USE_PYTHON= autoplist concurrent pep517 +USE_PYTHON= pep517 concurrent autoplist NO_ARCH= yes +TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + +test-simple: + ${SETENV} ${TEST_ENV} ${PYTHON_CMD} ${FILESDIR}/test-simple-1.py + .include diff --git a/math/py-keras/distinfo b/math/py-keras/distinfo index 71f79dad70e0..82113b540b66 100644 --- a/math/py-keras/distinfo +++ b/math/py-keras/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1730473740 -SHA256 (keras-3.12.0.tar.gz) = 536e3f8385a05ae04e82e08715a1a59988578087e187b04cb0a6fad11743f07f -SIZE (keras-3.12.0.tar.gz) = 1129187 +TIMESTAMP = 1775491282 +SHA256 (keras-3.14.0.tar.gz) = 86fcf8249a25264a566ac393c287c7ad657000e5e62615dcaad4b3472a17aeda +SIZE (keras-3.14.0.tar.gz) = 1263098 diff --git a/math/py-keras/files/patch-pyproject.toml b/math/py-keras/files/patch-pyproject.toml index 16e73477ceb8..66dceeb8110c 100644 --- a/math/py-keras/files/patch-pyproject.toml +++ b/math/py-keras/files/patch-pyproject.toml @@ -5,7 +5,7 @@ requires-python = ">=3.10" license = {text = "Apache License 2.0"} -dynamic = ["version"] -+version = "3.12.0" ++version = "3.14.0" classifiers = [ "Development Status :: 4 - Beta", "Programming Language :: Python :: 3", diff --git a/math/py-keras/files/test-simple-1.py b/math/py-keras/files/test-simple-1.py new file mode 100644 index 000000000000..2f273a263e7c --- /dev/null +++ b/math/py-keras/files/test-simple-1.py @@ -0,0 +1,40 @@ +from keras.models import Sequential +from keras.layers import Dense +import numpy as np + +# 1. Generate dummy data (replace with your actual data) +# For binary classification, let's create a simple dataset +X = np.random.rand(100, 5) # 100 samples, 5 features +y = (X.sum(axis=1) > 2.5).astype(int) # Binary labels based on feature sum + +# 2. Define the Keras Sequential model +model = Sequential() + +# Add a Dense (fully connected) hidden layer +# 12 nodes, 'relu' activation, input_shape specifies the number of features in your input +model.add(Dense(12, input_shape=(5,), activation='relu')) + +# Add another Dense hidden layer +model.add(Dense(8, activation='relu')) + +# Add the output layer +# 1 node for binary classification, 'sigmoid' activation for probabilities +model.add(Dense(1, activation='sigmoid')) + +# 3. Compile the Keras model +# 'adam' optimizer is a good general-purpose optimizer +# 'binary_crossentropy' is suitable for binary classification +# 'accuracy' is a common metric to monitor during training +model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy']) + +# 4. Train the model +# epochs: number of times to iterate over the entire dataset +# batch_size: number of samples per gradient update +model.fit(X, y, epochs=50, batch_size=32, verbose=0) # verbose=0 suppresses training output + +# 5. Evaluate the model (optional) +loss, accuracy = model.evaluate(X, y, verbose=0) +print(f"Model Loss: {loss:.4f}, Accuracy: {accuracy:.4f}") + +# 6. Make predictions (optional) +predictions = model.predict(X) diff --git a/math/py-keras/pkg-descr b/math/py-keras/pkg-descr index 6a2f8f1c0594..41e0b7ca519b 100644 --- a/math/py-keras/pkg-descr +++ b/math/py-keras/pkg-descr @@ -1,2 +1,7 @@ -Deep Learning library for Python. Convnets, recurrent neural networks, and -more. Runs on Theano, TensorFlow, JAX, OpenVino. +Keras is a high-level, multi-backend deep learning API that allows you +to run the same code on JAX, PyTorch, or TensorFlow. + +It is designed for human beings, not machines. Keras follows best +practices for reducing cognitive load: it offers consistent & simple +APIs, it minimizes the number of user actions required for common use +cases, and it provides clear & actionable error messages.