Skip to content

ReduceLROnPlateau unexpected keyword argument #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Samoed opened this issue May 11, 2025 · 1 comment
Open

ReduceLROnPlateau unexpected keyword argument #173

Samoed opened this issue May 11, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@Samoed
Copy link

Samoed commented May 11, 2025

🐛 Bug

Environment

  1. lightautoml version: 0.4.1
  2. python version: 3.11
  3. OS: linux
  4. pip freeze file:

To Reproduce

Steps to reproduce the behavior:

from lightautoml.automl.presets.text_presets import TabularNLPAutoML
from lightautoml.tasks import Task

automl = TabularNLPAutoML(task = Task(name = 'multiclass', metric = 'f1_macro'))
oof_preds = automl.fit_predict(train_df, roles = {'target': 'label'}).data
ReduceLROnPlateau.__init__() got an unexpected keyword argument 'verbose'
INFO3:lightautoml.ml_algo.utils:Traceback (most recent call last):
  File "/home/samoed/Desktop/AutoIntent/.venv/lib/python3.11/site-packages/lightautoml/ml_algo/utils.py", line 77, in tune_and_fit_predict
    preds = ml_algo.fit_predict(train_valid)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/samoed/Desktop/AutoIntent/.venv/lib/python3.11/site-packages/lightautoml/ml_algo/dl_model.py", line 556, in fit_predict
    return super().fit_predict(train_valid_iterator)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/samoed/Desktop/AutoIntent/.venv/lib/python3.11/site-packages/lightautoml/ml_algo/base.py", line 275, in fit_predict
    model, pred = self.fit_predict_single_fold(train, valid)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/samoed/Desktop/AutoIntent/.venv/lib/python3.11/site-packages/lightautoml/ml_algo/dl_model.py", line 582, in fit_predict_single_fold
    val_pred = model.fit(dataloaders)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/samoed/Desktop/AutoIntent/.venv/lib/python3.11/site-packages/lightautoml/text/trainer.py", line 430, in fit
    self._init()
  File "/home/samoed/Desktop/AutoIntent/.venv/lib/python3.11/site-packages/lightautoml/text/trainer.py", line 346, in _init
    self.scheduler = self.sch(self.optimizer, **self.scheduler_params) if self.sch is not None else None
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ReduceLROnPlateau.__init__() got an unexpected keyword argument 'verbose'
@Samoed Samoed added the bug Something isn't working label May 11, 2025
@Uptimolli
Copy link
Contributor

Hi, thank you for using our library.

The reason for this error is that in the new version of torch (torch==2.7.0) the verbose parameter is removed, we will add a bugfix in the next release, but in the meantime you can use an earlier version of torch (e.g. torch==2.6.0) with latest LightAutoML version.

Sincerely, LightAutoML team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants