repo/gentoo:master commit in: sci-ml/transformers/
"Alfredo Tupone" <[email protected]>
| Newsgroups | gmane.linux.gentoo.cvs |
|---|---|
| Message-ID | <1786048198.5bfd764408694c1e0592c76d58019ef5cb673492.tupone@gentoo> |
commit: 5bfd764408694c1e0592c76d58019ef5cb673492
Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 6 20:28:59 2026 +0000
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Thu Aug 6 20:29:58 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bfd7644
sci-ml/transformers: add 5.4.0
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
sci-ml/transformers/Manifest | 1 +
sci-ml/transformers/transformers-5.4.0.ebuild | 57 +++++++++++++++++++++++++++
2 files changed, 58 insertions(+)
diff --git a/sci-ml/transformers/Manifest b/sci-ml/transformers/Manifest
index 4b446af61a96..017ff4c29d8c 100644
--- a/sci-ml/transformers/Manifest
+++ b/sci-ml/transformers/Manifest
@@ -1 +1,2 @@
DIST transformers-5.3.0.gh.tar.gz 17931790 BLAKE2B a1f514ed6bb4eca1cf549e04a9470bc1c0c2cc3f4af9966d1fcba222b3d774051e27db2b6abb14e0cc4319d541c79bc244b01a0a6d431cfb2ffa8b2a05491422 SHA512 c7cc25e03c74ad58c2977bcdb968b3a7c0788f51c317d56fb09f59d11cd5b0abb3f05f94810922ec6ae5521131138050208323b17880f02800d1dfea055ae97c
+DIST transformers-5.4.0.gh.tar.gz 17364377 BLAKE2B 728037f7819cb270fabd10b23f6f88fde23fc6e5bde4aa45225e378a439b3eda64a8860f772d53bf732012c7bd819765d8b1c24980e696e7b8b49c243fb70ae9 SHA512 0d4bad8b2a982d9e5ebcbfe98caf063419f33824444f4933828c83acbbda45de2f6c2f5c6f13026743428536f802cba604d67114fd50324e0713c8d01ac3bfeb
diff --git a/sci-ml/transformers/transformers-5.4.0.ebuild b/sci-ml/transformers/transformers-5.4.0.ebuild
new file mode 100644
index 000000000000..7bbe130eaa9a
--- /dev/null
+++ b/sci-ml/transformers/transformers-5.4.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 2023-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{12..14} )
+DISTUTILS_SINGLE_IMPL=1
+inherit distutils-r1
+
+DESCRIPTION="State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow"
+HOMEPAGE="
+ https://pypi.org/project/transformers/
+ https://huggingface.co/
+"
+SRC_URI="https://github.com/huggingface/${PN}/archive/refs/tags/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test torch"
+
+RDEPEND="
+ >=sci-ml/huggingface_hub-1.5.0[${PYTHON_SINGLE_USEDEP}]
+ <sci-ml/huggingface_hub-2
+ =sci-ml/tokenizers-0.22*[${PYTHON_SINGLE_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/filelock[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/packaging[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/regex[${PYTHON_USEDEP}]
+ dev-python/tqdm[${PYTHON_USEDEP}]
+ dev-python/typer[${PYTHON_USEDEP}]
+ sci-ml/safetensors[${PYTHON_USEDEP}]
+ ')
+ torch? (
+ sci-ml/accelerate[${PYTHON_SINGLE_USEDEP}]
+ sci-ml/pytorch[${PYTHON_SINGLE_USEDEP}]
+ )
+ test? (
+ sci-ml/datasets[${PYTHON_SINGLE_USEDEP}]
+ sci-ml/caffe2[distributed]
+ )
+"
+
+EPYTEST_PLUGINS=( pytest-xdist )
+distutils_enable_tests pytest
+
+python_test() {
+ epytest \
+ tests/models/bert \
+ tests/models/gpt2 \
+ tests/models/roberta \
+ tests/models/distilbert
+}