From 9e49bc515876cf361ffef1c1004374c16cbd6d72 Mon Sep 17 00:00:00 2001 From: Pierre Chapuis Date: Fri, 20 Dec 2024 16:24:46 +0100 Subject: [PATCH] remove unused attribute lr_scheduler_interval --- src/refiners/training_utils/clock.py | 2 -- src/refiners/training_utils/trainer.py | 1 - tests/training_utils/test_trainer.py | 1 - 3 files changed, 4 deletions(-) diff --git a/src/refiners/training_utils/clock.py b/src/refiners/training_utils/clock.py index 753cbf29..56e374b3 100644 --- a/src/refiners/training_utils/clock.py +++ b/src/refiners/training_utils/clock.py @@ -22,12 +22,10 @@ def __init__( self, training_duration: TimeValue, gradient_accumulation: Step, - lr_scheduler_interval: Iteration | Epoch, verbose: bool = True, ) -> None: self.training_duration = training_duration self.gradient_accumulation = gradient_accumulation - self.lr_scheduler_interval = lr_scheduler_interval self.verbose = verbose self.start_time = None self.end_time = None diff --git a/src/refiners/training_utils/trainer.py b/src/refiners/training_utils/trainer.py index 2643ff92..09bf608d 100644 --- a/src/refiners/training_utils/trainer.py +++ b/src/refiners/training_utils/trainer.py @@ -139,7 +139,6 @@ def clock(self, config: ClockConfig) -> TrainingClock: return TrainingClock( training_duration=self.config.training.duration, gradient_accumulation=self.config.training.gradient_accumulation, - lr_scheduler_interval=self.config.lr_scheduler.update_interval, verbose=config.verbose, ) diff --git a/tests/training_utils/test_trainer.py b/tests/training_utils/test_trainer.py index 39f4d9e1..927b6857 100644 --- a/tests/training_utils/test_trainer.py +++ b/tests/training_utils/test_trainer.py @@ -205,7 +205,6 @@ def training_clock() -> TrainingClock: return TrainingClock( training_duration=Epoch(5), gradient_accumulation=Step(1), - lr_scheduler_interval=Epoch(1), )