code: def test_exponential_lr(self):
      # Test making minimal changes to the dataclass defaults.
      if not interactive_testing_requested():
          return
      cfg = OmegaConf.structured(experiment.Experiment)
      cfg.data_source_ImplicitronDataSource_args.dataset_map_provider_class_type = (
          "JsonIndexDatasetMapProvider"
      )
      dataset_args = (
          cfg.data_source_ImplicitronDataSource_args.dataset_map_provider_JsonIndexDatasetMapProvider_args
      )
      dataloader_args = (
          cfg.data_source_ImplicitronDataSource_args.data_loader_map_provider_SequenceDataLoaderMapProvider_args
      )
      dataset_args.category = "skateboard"
      dataset_args.test_restrict_sequence_id = 0
      dataset_args.dataset_root = "manifold://co3d/tree/extracted"
      dataset_args.dataset_JsonIndexDataset_args.limit_sequences_to = 5
      dataset_args.dataset_JsonIndexDataset_args.image_height = 80
      dataset_args.dataset_JsonIndexDataset_args.image_width = 80
      dataloader_args.dataset_length_train = 1
      dataloader_args.dataset_length_val = 1
      cfg.training_loop_ImplicitronTrainingLoop_args.max_epochs = 2
      cfg.training_loop_ImplicitronTrainingLoop_args.store_checkpoints = (
          False
      )
      cfg.optimizer_factory_ImplicitronOptimizerFactory_args.lr_policy = (
          "Exponential"
      )
      cfg.optimizer_factory_ImplicitronOptimizerFactory_args.exponential_lr_step_size = (
          2
      )
  
      if DEBUG:
          experiment.dump_cfg(cfg)
      with intercept_logs(
          logger_name="projects.implicitron_trainer.impl.training_loop",
          regexp="LR change!",
      ) as intercepted_logs:
          experiment_runner = experiment.Experiment(**cfg)
          experiment_runner.run()
  
          # Make sure we followed the exponential lr schedule with gamma=0.1,
          # exponential_lr_step_size=2 -- so after two epochs, should
          # decrease lr 10x to 5e-5.
          self.assertEqual(
              intercepted_logs[0].split()[-1], "0.00015811388300841897"
          )
          self.assertEqual(intercepted_logs[1].split()[-1], "5e-05")
  
imports: import os
  import tempfile
  import unittest
  from pathlib import Path
  import torch
  from hydra import compose, initialize_config_dir
  from omegaconf import OmegaConf
  from projects.implicitron_trainer.impl.optimizer_factory import ImplicitronOptimizerFactory
  from ..None import experiment
  from .utils import interactive_testing_requested, intercept_logs
label_desc: Use image node_id 3 for calling the TestExperiment obj's underlying member method code with example usage: obj.test_exponential_lr() without return types