Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Apr 2026 07:43:27 +0000
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 7cab9292006a - main - misc/py-peft: update 0.17=?utf-8?Q?=2E1 =E2=86=92 0?=.19.0
Message-ID:  <69df419f.460a0.13f3a360@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7cab9292006adb91055ba063adac6543567de3e0

commit 7cab9292006adb91055ba063adac6543567de3e0
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-04-15 07:32:55 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-04-15 07:43:17 +0000

    misc/py-peft: update 0.17.1 → 0.19.0
---
 misc/py-peft/Makefile                            | 14 +++++++++++---
 misc/py-peft/distinfo                            |  6 +++---
 misc/py-peft/files/patch-pyproject.toml          | 21 +++++++++++++++++++++
 misc/py-peft/files/patch-tests_test__mixed.py    | 13 +++++++++++++
 misc/py-peft/files/patch-tests_testing__utils.py | 19 +++++++++++++++++++
 5 files changed, 67 insertions(+), 6 deletions(-)

diff --git a/misc/py-peft/Makefile b/misc/py-peft/Makefile
index 63507f40f150..300bb7f6a832 100644
--- a/misc/py-peft/Makefile
+++ b/misc/py-peft/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	peft
-DISTVERSION=	0.17.1
-PORTREVISION=	2
+DISTVERSION=	0.19.0
 CATEGORIES=	misc python # machine-learning
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -36,9 +35,18 @@ USES=		python
 USE_PYTHON=	distutils autoplist pytest
 
 TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+TEST_ARGS=	-p no:relaxed
+
+post-patch:
+	@${TOUCH} ${WRKSRC}/tests/__init__.py
 
 NO_ARCH=	yes
 
-# tests fail to run, see https://github.com/huggingface/peft/issues/2789
+# tests as of 0.19.0:
+# Results (885.15s):
+#      70278 passed
+#       3362 skipped
+#         10 xfailed
+#      18751 warnings
 
 .include <bsd.port.mk>
diff --git a/misc/py-peft/distinfo b/misc/py-peft/distinfo
index b4a8bb7b5348..9fe5447f18fd 100644
--- a/misc/py-peft/distinfo
+++ b/misc/py-peft/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1758189811
-SHA256 (peft-0.17.1.tar.gz) = e6002b42517976c290b3b8bbb9829a33dd5d470676b2dec7cb4df8501b77eb9f
-SIZE (peft-0.17.1.tar.gz) = 568192
+TIMESTAMP = 1776227230
+SHA256 (peft-0.19.0.tar.gz) = a2917070092184a462093443029bc4f9292a91b9b99880488e319309ff0a172d
+SIZE (peft-0.19.0.tar.gz) = 762553
diff --git a/misc/py-peft/files/patch-pyproject.toml b/misc/py-peft/files/patch-pyproject.toml
new file mode 100644
index 000000000000..3766106b990c
--- /dev/null
+++ b/misc/py-peft/files/patch-pyproject.toml
@@ -0,0 +1,21 @@
+--- pyproject.toml.orig	2026-04-14 13:46:22 UTC
++++ pyproject.toml
+@@ -34,14 +34,16 @@ known-first-party = ["peft"]
+ lines-after-imports = 2
+ known-first-party = ["peft"]
+ 
+-[tool.pytest]
++[tool.pytest.ini_options]
+ doctest_optionflags = [
+     "NORMALIZE_WHITESPACE",
+     "ELLIPSIS",
+     "NUMBER",
+ ]
+ 
+-addopts = ["--cov=src/peft", "--cov-report=term-missing", "--durations=10"]
++addopts = ["--durations=10"]
++testpaths = ["tests"]
++pythonpath = ["."]
+ 
+ markers = [
+     "single_gpu_tests: tests that run on a single GPU",
diff --git a/misc/py-peft/files/patch-tests_test__mixed.py b/misc/py-peft/files/patch-tests_test__mixed.py
new file mode 100644
index 000000000000..7e9d240efdcc
--- /dev/null
+++ b/misc/py-peft/files/patch-tests_test__mixed.py
@@ -0,0 +1,13 @@
+--- tests/test_mixed.py.orig	2026-04-15 06:22:00 UTC
++++ tests/test_mixed.py
+@@ -525,8 +525,8 @@ class TestMixedAdapterTypes(unittest.TestCase):
+ 
+     def test_deeply_nested(self):
+         # a somewhat absurdly nested model using different adapter types
+-        if platform.system() == "Linux":
+-            pytest.skip("This test fails but only on GitHub CI with Linux systems.")
++        if self.torch_device != "cuda":
++            pytest.skip("This test requires CUDA to pass numerical precision checks.")
+ 
+         atol = 1e-5
+         rtol = 1e-5
diff --git a/misc/py-peft/files/patch-tests_testing__utils.py b/misc/py-peft/files/patch-tests_testing__utils.py
new file mode 100644
index 000000000000..010d5206793e
--- /dev/null
+++ b/misc/py-peft/files/patch-tests_testing__utils.py
@@ -0,0 +1,19 @@
+--- tests/testing_utils.py.orig	2026-04-15 06:22:00 UTC
++++ tests/testing_utils.py
+@@ -177,11 +177,15 @@ def require_bitsandbytes(test_case):
+ 
+ def require_bitsandbytes(test_case):
+     """
+-    Decorator marking a test that requires the bitsandbytes library. Will be skipped when the library is not installed.
++    Decorator marking a test that requires the bitsandbytes library. Will be skipped when the library is not installed
++    or when CUDA is not available (8-bit optimizers require CUDA).
+     """
+     try:
+         import bitsandbytes  # noqa: F401
++        import torch
+ 
++        if not torch.cuda.is_available():
++            return pytest.mark.skip(reason="test requires bitsandbytes with CUDA")(test_case)
+         test_case = pytest.mark.bitsandbytes(test_case)
+     except ImportError:
+         test_case = pytest.mark.skip(reason="test requires bitsandbytes")(test_case)


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69df419f.460a0.13f3a360>