#1137391 baler: FTBFS: E TypeError: ReduceLROnPlateau.__init__() got an unexpected keyword argument 'verbose'

Package:
src:baler
Source:
src:baler
Submitter:
Santiago Vila
Date:
2026-06-19 20:47:02 UTC
Severity:
normal
Tags:
#1137391#5
Date:
2026-05-23 13:46:01 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202605/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:baler, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --with python3 --buildsystem pybuild
   dh_auto_clean -O--buildsystem=pybuild
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
 debian/rules binary
dh binary --with python3 --buildsystem pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
   dh_auto_build -O--buildsystem=pybuild
I: pybuild plugin_pyproject:142: Building wheel for python3.13 with "build" module
I: pybuild base:385: python3.13 -m build --skip-dependency-check --no-isolation --wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13
* Building wheel...
Successfully built baler-1.4.0-py3-none-any.whl
I: pybuild plugin_pyproject:168: Unpacking wheel built for python3.13 with "installer" module
   debian/rules override_dh_auto_test
make[1]: Entering directory '/<<PKGBUILDDIR>>'
PYTEST_ADDOPTS="-p no:cacheprovider --verbose" dh_auto_test
I: pybuild base:385: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build; python3.13 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.13.12, pytest-9.0.3, pluggy-1.6.0 -- /usr/bin/python3.13
hypothesis profile 'default'
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build
configfile: pyproject.toml
plugins: hypothesis-6.152.4, typeguard-4.4.4
collecting ... collected 11 items

tests/test_data_processing.py::test_import_config_success PASSED         [  9%]
tests/test_data_processing.py::test_save_model PASSED                    [ 18%]
tests/test_data_processing.py::test_find_minmax_success PASSED           [ 27%]
tests/test_data_processing.py::test_normalize PASSED                     [ 36%]
tests/test_data_processing.py::test_renormalize_std PASSED               [ 45%]
tests/test_data_processing.py::test_renormalize_func PASSED              [ 54%]
tests/test_helper.py::test_create_new_project PASSED                     [ 63%]
tests/test_utils.py::test_mse_loss_emd_l1 PASSED                         [ 72%]
tests/test_utils.py::test_mse_loss_l1 PASSED                             [ 81%]
tests/test_utils.py::test_accuracy PASSED                                [ 90%]
tests/test_utils.py::test_lr_scheduler FAILED                            [100%]

=================================== FAILURES ===================================

                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_utils.py:89:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <baler.modules.utils.LRScheduler object at 0x7f7da0f16900>
optimizer = SGD (
Parameter Group 0
    dampening: 0
    differentiable: False
    foreach: None
    fused: None
    lr: 0.1
    maximize: False
    momentum: 0
    nesterov: False
    weight_decay: 0
)
patience = 2, min_lr = 1e-05, factor = 0.5

    def __init__(self, optimizer, patience, min_lr=min_lr, factor=factor):
        self.optimizer = optimizer
        self.patience = patience
        self.min_lr = min_lr
        self.factor = factor

        # Maybe add if statements for selectment of lr schedulers
baler/modules/utils.py:313: TypeError
=========================== short test summary info ============================
FAILED tests/test_utils.py::test_lr_scheduler - TypeError: ReduceLROnPlateau....
========================= 1 failed, 10 passed in 2.54s =========================
E: pybuild pybuild:485: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build; python3.13 -m pytest tests
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.13 --parallel=2 returned exit code 13
make[1]: *** [debian/rules:13: override_dh_auto_test] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:7: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------

#1137391#10
Date:
2026-05-24 06:29:28 UTC
From:
To:
PyTorch 2.4 removed the 'verbose' keyword argument from
torch.optim.lr_scheduler.ReduceLROnPlateau.__init__() (it was deprecated
in 2.2 and dropped in 2.4). The build fails during the test suite because
baler/modules/utils.py:319 passes verbose=True to the scheduler; all 10
other tests pass.

The fix removes the single verbose=True argument. No upstream fix exists
yet; I've noted the issue for upstream in the patch header.

#1137391#17
Date:
2026-06-19 20:44:01 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
baler, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1137391@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mattias Ellert <mattias.ellert@physics.uu.se> (supplier of updated baler package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Fri, 19 Jun 2026 17:33:11 +0200
Source: baler
Architecture: source
Version: 1.4.0-2
Distribution: unstable
Urgency: medium
Maintainer: Mattias Ellert <mattias.ellert@physics.uu.se>
Changed-By: Mattias Ellert <mattias.ellert@physics.uu.se>
Closes: 1137391
Changes:
 baler (1.4.0-2) unstable; urgency=medium
 .
   * Fix FTBFS with PyTorch >= 2.4: remove deprecated verbose=True
     argument from ReduceLROnPlateau instantiation in
     baler/modules/utils.py (Closes: #1137391).
     Patch from: Azeez Syed <azeezalishah@gmail.com>
Checksums-Sha1:
 5e9b527d57cd6979499c02da0fb64f422d9d3576 2088 baler_1.4.0-2.dsc
 5e0431e53ba6961c1c8f0aca06c8a68dac56e28d 5112 baler_1.4.0-2.debian.tar.xz
 942b6b5b75aa096536a0f14e5f39a3124dd52ed3 13462 baler_1.4.0-2_source.buildinfo
Checksums-Sha256:
 7b0fbdef0b2bce7bea2b1ae2e2fd4a78f2288f0255fc9e00ad1f106cc0ae4708 2088 baler_1.4.0-2.dsc
 46aabd18fbb101d81c84a43c9cbd8d646f6114114c0336de1ba77f5e1ea5f0ae 5112 baler_1.4.0-2.debian.tar.xz
 15a489df7a3bbbbb881e5a133fdff262c8121e0c5fadd1ec11ce2402c3ca6d61 13462 baler_1.4.0-2_source.buildinfo
Files:
 5725f355e2bf247cc5dcce52b1fd2640 2088 science optional baler_1.4.0-2.dsc
 8451d66487f26e581abcffe173d96ac1 5112 science optional baler_1.4.0-2.debian.tar.xz
 b6d77ad7165cf88829261b227c29980e 13462 science optional baler_1.4.0-2_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJRBAEBCgA7FiEE6hgwr99NQxrZ4RRS6K7C/zvhqUsFAmo1lfMdHG1hdHRpYXMu
ZWxsZXJ0QHBoeXNpY3MudXUuc2UACgkQ6K7C/zvhqUsQeQ//aM3sm7mpRqxVm775
YuWN2DxD9FQbzMJb3R164838ivOTqV3Mh+ttcaTNn3tTZTR7zFQzL5VfDK34Hx2i
Cb/sM9r0wTRhOIGRTBHqeqDyaeGOKq1eqyrJb66HhMjdBN9dWtjqkdvFqPzt1fRJ
Cjy+MroV4tg5AIio4T1gnKyggnQ+Wi9neIrS2RN2ZD95O741ta7GMOV4ZMtcNPWl
4V0uzNQ491eO3mwH4h3oQaPt/MnCwJxij1i7btwyYTGAMxQDk3DjgV0ItD1J10hX
dOJEYkrbAv9GK6a1Xj5UDVJfBKMtYFhGtS+OFk0tqYb7bu3B9LDbsVbxvFVr5SEb
JS3Voh0GjQNFRvZqu0xmDQLvVvWMwUwPO5VNo2JUbzWQd9Y6xFLCD7+QFcq11YPB
7lQItfRlDShgpHw2FnrweyITE78DtwaMoAAj1L9Csfnb8DI0onZ7bQzatrdMNOOY
+dYSZU/0hUqd9Qo/RSw4RdmKk+P+UiPSEe40mz/kcmaYkQ0OpcltvY+MjSwZIKLY
lDeyKkwAILRbGRzUu2lEkPNQZ+D3Vs1DDW6KNPQY0zPkDIn2sLirdkYWAWIYJGZJ
nCsMLfGi/mHtdhRgIzCHjpxIBv9ZSMsybXM+q86CdJJmRp49FPZ/U0c1M7P/zJNQ
U2HI8x3Wqvy4U9WS/9dDCsyoc7g=
=Ztvs
-----END PGP SIGNATURE-----