{"record":{"id":"5c88cd947e6f51c0","repo":"tensorflow/models","slug":"the-config-has-been-locked-no-change-is-allowed","errorCode":null,"errorMessage":"The Config has been locked. No change is allowed.","messagePattern":"The Config has been locked\\. No change is allowed\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/modeling/hyperparams/base_config.py","lineNumber":278,"sourceCode":"        logging.warning(\n            \"The list/tuple don't match the value dictionaries provided. Thus, \"\n            'the list/tuple is determined by the type annotation and '\n            'values provided. This is error-prone.')\n        self.__dict__[k] = self._import_config(v, subconfig_type)\n      else:\n        self.__dict__[k] = self._import_config(v, subconfig_type)\n    else:\n      self.__dict__[k] = self._import_config(v, subconfig_type)\n\n  def __setattr__(self, k, v):\n    if k == 'BUILDER' or k == '_BUILDER':\n      raise AttributeError('`BUILDER` is a property and `_BUILDER` is the '\n                           'reserved class attribute. We should only assign '\n                           '`_BUILDER` at the class level.')\n\n    if k not in self.RESERVED_ATTR:\n      if getattr(self, '_locked', False):\n        raise ValueError('The Config has been locked. ' 'No change is allowed.')\n    self._set(k, v)\n\n  def _override(self, override_dict, is_strict=True):\n    \"\"\"Overrides same method in ParamsDict.\n\n    Also called by ParamsDict methods.\n\n    Args:\n      override_dict: dictionary to write to .\n      is_strict: If True, not allows to add new keys.\n\n    Raises:\n      KeyError: overriding reserved keys or keys not exist (is_strict=True).\n    \"\"\"\n    for k, v in sorted(override_dict.items()):\n      if k in self.RESERVED_ATTR:\n        raise KeyError('The key {!r} is internally reserved. '\n                       'Can not be overridden.'.format(k))","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/modeling/hyperparams/base_config.py#L260-L296","documentation":"Error \"The Config has been locked. No change is allowed.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/modeling/hyperparams/base_config.py:278 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"}