{"record":{"id":"49144d59c709c045","repo":"tensorflow/models","slug":"found-inconsistency-between-key-and-key","errorCode":null,"errorMessage":"Found inconsistency between key `{}` and key `{}`.","messagePattern":"Found inconsistency between key `(.+?)` and key `(.+?)`\\.","errorType":"exception","errorClass":"KeyError","httpStatus":null,"severity":"error","filePath":"official/modeling/hyperparams/params_dict.py","lineNumber":294,"sourceCode":"        for t in tokenized_params:\n          v = v[t]\n        return tokenized_params[-1], v\n\n    def _get_kvs(tokens, params_dict):\n      if len(tokens) != 2:\n        raise ValueError('Only support binary relation in restriction.')\n      stripped_tokens = [t.strip() for t in tokens]\n      left_k, left_v = _get_kv(stripped_tokens[0], params_dict)\n      right_k, right_v = _get_kv(stripped_tokens[1], params_dict)\n      return left_k, left_v, right_k, right_v\n\n    params_dict = self.as_dict()\n    for restriction in self._restrictions:\n      if '==' in restriction:\n        tokens = restriction.split('==')\n        _, left_v, _, right_v = _get_kvs(tokens, params_dict)\n        if left_v != right_v:\n          raise KeyError(\n              'Found inconsistency between key `{}` and key `{}`.'.format(\n                  tokens[0], tokens[1]))\n      elif '!=' in restriction:\n        tokens = restriction.split('!=')\n        _, left_v, _, right_v = _get_kvs(tokens, params_dict)\n        if left_v == right_v:\n          raise KeyError(\n              'Found inconsistency between key `{}` and key `{}`.'.format(\n                  tokens[0], tokens[1]))\n      elif '<=' in restriction:\n        tokens = restriction.split('<=')\n        _, left_v, _, right_v = _get_kvs(tokens, params_dict)\n        if left_v > right_v:\n          raise KeyError(\n              'Found inconsistency between key `{}` and key `{}`.'.format(\n                  tokens[0], tokens[1]))\n      elif '<' in restriction:\n        tokens = restriction.split('<')","sourceCodeStart":276,"sourceCodeEnd":312,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/modeling/hyperparams/params_dict.py#L276-L312","documentation":"Error \"Found inconsistency between key `{}` and key `{}`.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/modeling/hyperparams/params_dict.py:294 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"}