repo/gentoo:master commit in: sci-ml/transformers/
"Alfredo Tupone" <[email protected]>
| Newsgroups | gmane.linux.gentoo.cvs |
|---|---|
| Message-ID | <1786094455.ca7c23876489eb38119307bd36c9de5991a91b8f.tupone@gentoo> |
commit: ca7c23876489eb38119307bd36c9de5991a91b8f
Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 7 09:20:55 2026 +0000
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Fri Aug 7 09:20:55 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca7c2387
sci-ml/transformers: add 5.13.1
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
sci-ml/transformers/Manifest | 1 +
sci-ml/transformers/transformers-5.13.1.ebuild | 60 ++++++++++++++++++++++++++
2 files changed, 61 insertions(+)
diff --git a/sci-ml/transformers/Manifest b/sci-ml/transformers/Manifest
index d5d7db70f095..b60d23bbcef4 100644
--- a/sci-ml/transformers/Manifest
+++ b/sci-ml/transformers/Manifest
@@ -1,2 +1,3 @@
DIST transformers-5.12.1.gh.tar.gz 18704506 BLAKE2B 4dd09a076ddc6190c65f3b0f2e2e98a56fc98014ba04c9f9c8407c25dfbc715cb893a14fa1d4482b109714d39f03273e55b71c9a010fe700eac767c19ac3b466 SHA512 040b5e50ad4b379fbaa47e077f003c2c3f25264dfe8d4201c2823efce4ddce2036f0909f909022a328b2f06dcfb9cf33b918126051d8baa7f00ba7a14eed61cc
+DIST transformers-5.13.1.gh.tar.gz 19189541 BLAKE2B 37785966175538cb7e7ddd3af976ccf690aa9621e03147d4b8ea56facbc1b05bd416639f1155243bd036040e64ce019c6c391c27902d27dc1542643c5f3dbab3 SHA512 916cf46f51942b731b5603f603909aec7295ddf8195b81392d6a85f0da66b35da894f81953c17ca4b3981f0c94ec9bb8eb201e315ab6e245b4ccb06bc33515dc
DIST transformers-5.3.0.gh.tar.gz 17931790 BLAKE2B a1f514ed6bb4eca1cf549e04a9470bc1c0c2cc3f4af9966d1fcba222b3d774051e27db2b6abb14e0cc4319d541c79bc244b01a0a6d431cfb2ffa8b2a05491422 SHA512 c7cc25e03c74ad58c2977bcdb968b3a7c0788f51c317d56fb09f59d11cd5b0abb3f05f94810922ec6ae5521131138050208323b17880f02800d1dfea055ae97c
diff --git a/sci-ml/transformers/transformers-5.13.1.ebuild b/sci-ml/transformers/transformers-5.13.1.ebuild
new file mode 100644
index 000000000000..28f6da76e360
--- /dev/null
+++ b/sci-ml/transformers/transformers-5.13.1.ebuild
@@ -0,0 +1,60 @@
+# 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-0.8.0[${PYTHON_USEDEP}]
+ ')
+ torch? (
+ sci-ml/accelerate[${PYTHON_SINGLE_USEDEP}]
+ sci-ml/pytorch[${PYTHON_SINGLE_USEDEP}]
+ )
+ test? (
+ sci-ml/datasets[${PYTHON_SINGLE_USEDEP}]
+ >=sci-ml/pytorch-2.13[distributed]
+ )
+"
+
+EPYTEST_PLUGINS=( pytest-xdist )
+distutils_enable_tests pytest
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ tests/models/roberta/test_modeling_roberta.py::RobertaModelTest::test_eager_padding_matches_padding_free_with_position_ids
+ )
+ epytest \
+ tests/models/bert \
+ tests/models/gpt2 \
+ tests/models/roberta \
+ tests/models/distilbert
+}