class_docstr: Class for testing optimizers.py.
class_docstr_tok: ["Class","for","testing","optimizers.py","."]
docstr: Invalid configuration should raise error instead of failing silently.
docstr_tok: ["Invalid","configuration","should","raise","error","instead","of","failing","silently","."]
code: def test_invalid_config_raises_type_error(self):
      """Invalid configuration should raise error instead of failing silently."""
      optimizer_config = ml_collections.ConfigDict()
      optimizer_config.optimizer = "sgd"
      optimizer_config.invalid_field = "invalid"
      with self.assertRaises(TypeError):
          optimizers.get_optimizer(
              optimizer_config, self.lr, self.params
          )
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import flax
  import flax.linen
  import jax
  import jax.numpy
  import ml_collections
  import optax
  from scenic.train_lib import optimizers
  from scenic.train_lib import train_utils
  import tensorflow
label_desc: Use image node_id 9 for calling the OptimizersTest obj's underlying member method code with example usage: obj.test_invalid_config_raises_type_error() without return types