code: def test_logged_lr(self):
      class SchedulerMock(ClassyParamScheduler):
          def __call__(self, where):
              return where
  
      mock_lr_scheduler = SchedulerMock(UpdateInterval.STEP)
      config = get_test_mlp_task_config()
      config["num_epochs"] = 3
      config["dataset"]["train"]["batchsize_per_replica"] = 10
      config["dataset"]["test"]["batchsize_per_replica"] = 5
      task = build_task(config)
      task.set_optimizer_schedulers({"lr": mock_lr_scheduler})
      trainer = LocalTrainer()
  
      # 2 LR updates per epoch = 6
      lr_order = [0.0, 1 / 6, 2 / 6, 3 / 6, 4 / 6, 5 / 6]
      lr_list = []
  
      class LRLoggingHook(ClassyHook):
          on_end = ClassyHook._noop
          on_phase_end = ClassyHook._noop
          on_phase_start = ClassyHook._noop
          on_start = ClassyHook._noop
  
          def on_step(self, task):
              if task.train:
                  lr_list.append(task.optimizer.options_view.lr)
  
      hook = LRLoggingHook()
      task.set_hooks([hook])
      trainer.train(task)
      self.assertEqual(lr_list, lr_order)
  
file_path: ClassyVision/test/hooks_loss_lr_meter_logging_hook_test.py
imports: import copy
  import unittest
  import unittest.mock
  from itertools import product
  from classy_vision.hooks import ClassyHook, LossLrMeterLoggingHook
  from classy_vision.optim.param_scheduler import ClassyParamScheduler, UpdateInterval
  from classy_vision.tasks import build_task, ClassyTask
  from classy_vision.trainer import LocalTrainer
  from test.generic.config_utils import get_test_mlp_task_config, get_test_task_config
  from test.generic.hook_test_utils import HookTestBase
label_desc: Use image node_id 3 for calling the TestLossLrMeterLoggingHook obj's underlying member method code with example usage: obj.test_logged_lr() and returns: where