code: def test_invalid_config(self):
      # Invalid num epochs
      config = self._get_valid_config()
  
      bad_config = copy.deepcopy(config)
      bad_config["num_epochs"] = -1
      with self.assertRaises(ValueError):
          MultiStepParamScheduler.from_config(bad_config)
  
      # Invalid values
      bad_config["num_epochs"] = config["num_epochs"]
      del bad_config["values"]
      with self.assertRaises((AssertionError, TypeError)):
          MultiStepParamScheduler.from_config(bad_config)
  
      bad_config["values"] = {"a": "b"}
      with self.assertRaises(ValueError):
          MultiStepParamScheduler.from_config(bad_config)
  
      bad_config["values"] = []
      with self.assertRaises(ValueError):
          MultiStepParamScheduler.from_config(bad_config)
  
      # Invalid drop epochs
      bad_config["values"] = config["values"]
      bad_config["milestones"] = {"a": "b"}
      with self.assertRaises(ValueError):
          MultiStepParamScheduler.from_config(bad_config)
  
      # Too many
      bad_config["milestones"] = [3, 6, 8, 12]
      with self.assertRaises(ValueError):
          MultiStepParamScheduler.from_config(bad_config)
  
      # Too few
      bad_config["milestones"] = [3, 6]
      with self.assertRaises(ValueError):
          MultiStepParamScheduler.from_config(bad_config)
  
      # Exceeds num_epochs
      bad_config["milestones"] = [3, 6, 12]
      with self.assertRaises(ValueError):
          MultiStepParamScheduler.from_config(bad_config)
  
      # Out of order
      bad_config["milestones"] = [3, 8, 6]
      with self.assertRaises(ValueError):
          MultiStepParamScheduler.from_config(bad_config)
  
file_path: ClassyVision/test/optim_param_scheduler_multi_step_test.py
imports: import copy
  import unittest
  from classy_vision.optim.param_scheduler import build_param_scheduler, MultiStepParamScheduler
label_desc: Use image node_id 2 for calling the TestMultiStepParamScheduler obj's underlying member method code with example usage: obj.test_invalid_config() without return types