Skip to content

Commit

Permalink
Updated bs-scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
ancestor-mithril committed Dec 6, 2024
1 parent 3213e57 commit 69abb73
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions utils/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,7 @@ def scheduler_step(self, metrics):
"ReduceLROnPlateau",
"IncreaseBSOnPlateau",
):
scheduler_metric = metrics[self.scheduler_metric]

if type(self.scheduler).__name__ == "IncreaseBSOnPlateau":
self.scheduler.step(metric=scheduler_metric)
# TODO: keep the same name
else:
self.scheduler.step(scheduler_metric)
self.scheduler.step(metrics=metrics[self.scheduler_metric])
else:
self.scheduler.step()

Expand Down

0 comments on commit 69abb73

Please sign in to comment.