{"record":{"id":"a986490d3987b35b","repo":"tensorflow/models","slug":"the-key-is-internally-reserved-can-not-be-o","errorCode":null,"errorMessage":"The key `%{}` is internally reserved. Can not be overridden.","messagePattern":"The key `%(.+?)` is internally reserved\\. Can not be overridden\\.","errorType":"exception","errorClass":"KeyError","httpStatus":null,"severity":"error","filePath":"official/modeling/hyperparams/params_dict.py","lineNumber":188,"sourceCode":"      override_params: a dict or a ParamsDict specifying the parameters to be\n        overridden.\n      is_strict: a boolean specifying whether override is strict or not. If\n        True, keys in `override_params` must be present in the ParamsDict. If\n        False, keys in `override_params` can be different from what is currently\n        defined in the ParamsDict. In this case, the ParamsDict will be extended\n        to include the new keys.\n    \"\"\"\n    if self._locked:\n      raise ValueError('The ParamsDict has been locked. No change is allowed.')\n    if isinstance(override_params, ParamsDict):\n      override_params = override_params.as_dict()\n    self._override(override_params, is_strict)  # pylint: disable=protected-access\n\n  def _override(self, override_dict, is_strict=True):\n    \"\"\"The implementation of `override`.\"\"\"\n    for k, v in six.iteritems(override_dict):\n      if k in ParamsDict.RESERVED_ATTR:\n        raise KeyError('The key `%{}` is internally reserved. '\n                       'Can not be overridden.')\n      if k not in self.__dict__.keys():\n        if is_strict:\n          raise KeyError('The key `{}` does not exist. '\n                         'To extend the existing keys, use '\n                         '`override` with `is_strict` = False.'.format(k))\n        else:\n          logging.warning(\n              'Adding new key `%s` to ParamsDict because is_strict=False.', k\n          )\n          self._set(k, v)\n      else:\n        if isinstance(v, dict):\n          self.__dict__[k]._override(v, is_strict)  # pylint: disable=protected-access\n        elif isinstance(v, ParamsDict):\n          self.__dict__[k]._override(v.as_dict(), is_strict)  # pylint: disable=protected-access\n        else:\n          self.__dict__[k] = copy.deepcopy(v)","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/modeling/hyperparams/params_dict.py#L170-L206","documentation":"Error \"The key `%{}` is internally reserved. Can not be overridden.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/modeling/hyperparams/params_dict.py:188 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"}