{"record":{"id":"cf05cc71e1083024","repo":"tensorflow/models","slug":"the-key-does-not-exist-to-extend-the-existi","errorCode":null,"errorMessage":"The key `%{}` does not exist. To extend the existing keys, use `override` with `is_strict` = True.","messagePattern":"The key `%(.+?)` does not exist\\. To extend the existing keys, use `override` with `is_strict` = True\\.","errorType":"exception","errorClass":"KeyError","httpStatus":null,"severity":"error","filePath":"official/modeling/hyperparams/params_dict.py","lineNumber":115,"sourceCode":"    else:\n      self.__dict__[k] = copy.deepcopy(v)\n\n  def __setattr__(self, k, v):\n    \"\"\"Sets the value of the existing key.\n\n    Note that this does not allow directly defining a new key. Use the\n    `override` method with `is_strict=False` instead.\n\n    Args:\n      k: the key string.\n      v: the value to be used to set the key `k`.\n\n    Raises:\n      KeyError: if k is not defined in the ParamsDict.\n    \"\"\"\n    if k not in ParamsDict.RESERVED_ATTR:\n      if k not in self.__dict__.keys():\n        raise KeyError('The key `%{}` does not exist. '\n                       'To extend the existing keys, use '\n                       '`override` with `is_strict` = True.'.format(k))\n      if self._locked:\n        raise ValueError('The ParamsDict has been locked. '\n                         'No change is allowed.')\n    self._set(k, v)\n\n  def __getattr__(self, k):\n    \"\"\"Gets the value of the existing key.\n\n    Args:\n      k: the key string.\n\n    Returns:\n      the value of the key.\n\n    Raises:\n      AttributeError: if k is not defined in the ParamsDict.","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/modeling/hyperparams/params_dict.py#L97-L133","documentation":"Error \"The key `%{}` does not exist. To extend the existing keys, use `override` with `is_strict` = True.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/modeling/hyperparams/params_dict.py:115 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}