Skip to content

Commit

Permalink
remove deprecated verbose parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
helpmefindaname committed Feb 2, 2024
1 parent 9161c83 commit 85f4c89
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions flair/optim.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,6 @@ class ReduceLRWDOnPlateau(ReduceLROnPlateau):
with no improvement, and will only decrease the LR after the
3rd epoch if the loss still hasn't improved then.
Default: 10.
verbose (bool): If ``True``, prints a message to stdout for
each update. Default: ``False``.
threshold (float): Threshold for measuring the new optimum,
to only focus on significant changes. Default: 1e-4.
threshold_mode (str): One of `rel`, `abs`. In `rel` mode,
Expand Down
4 changes: 2 additions & 2 deletions flair/trainers/language_model_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ def train(

if isinstance(optimizer, (AdamW, SGDW)):
scheduler: ReduceLROnPlateau = ReduceLRWDOnPlateau(
optimizer, verbose=True, factor=anneal_factor, patience=patience
optimizer, factor=anneal_factor, patience=patience
)
else:
scheduler = ReduceLROnPlateau(optimizer, verbose=True, factor=anneal_factor, patience=patience)
scheduler = ReduceLROnPlateau(optimizer, factor=anneal_factor, patience=patience)

training_generator = DataLoader(self.corpus.train, shuffle=False, num_workers=num_workers)

Expand Down
1 change: 0 additions & 1 deletion flair/trainers/plugins/functional/anneal_on_plateau.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def after_setup(
patience=self.patience,
initial_extra_patience=self.initial_extra_patience,
mode=anneal_mode,
verbose=False,
optimizer=self.trainer.optimizer,
)

Expand Down

0 comments on commit 85f4c89

Please sign in to comment.