{"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":"Restriction check failure in ParamsDict.validate: a declared '==', '>=', or '>' relation between two config keys (or a key and a constant) does not hold for the current values, meaning the parameter combination is internally inconsistent.","triggerScenarios":"Thrown at official/modeling/hyperparams/params_dict.py:294 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Adjust the config values so the restriction relation holds","Remove or correct the invalid restriction string","Check dependencies like 'train_steps > warmup_steps' in your yaml"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}