def testKeyValueOverrideBadKey(self):
    """Tests that overwriting with a bad key causes an exception."""
    pipeline_config = pipeline_pb2.TrainEvalPipelineConfig()
    configs = self._create_and_load_test_configs(pipeline_config)
    hparams = contrib_training.HParams(**{"train_config.no_such_field": 10})
    with self.assertRaises(ValueError):
      config_util.merge_external_params_with_configs(configs, hparams)
Tests that overwriting with a bad key causes an exception.
inference_api/src/main/object_detection/utils/config_util_test.py