{"record":{"id":"4e05f0ad6479ebc5","repo":"tensorflow/models","slug":"missing-the-required-key-in-predictions-4e05f0","errorCode":null,"errorMessage":"Missing the required key `{}` in predictions!","messagePattern":"Missing the required key `(.+?)` in predictions!","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/vision/evaluation/coco_evaluator.py","lineNumber":362,"sourceCode":"          - image_info [if `need_rescale_bboxes` is True]: a numpy array of\n            float of shape [batch_size, 4, 2].\n          - num_detections: a numpy array of\n            int of shape [batch_size].\n          - detection_boxes: a numpy array of float of shape [batch_size, K, 4].\n          - detection_classes: a numpy array of int of shape [batch_size, K].\n          - detection_scores: a numpy array of float of shape [batch_size, K].\n        Optional fields:\n          - detection_masks: a numpy array of float of shape\n              [batch_size, K, mask_height, mask_width].\n    Raises:\n      ValueError: if the required prediction or ground-truth fields are not\n        present in the incoming `predictions` or `groundtruths`.\n    \"\"\"\n    groundtruths, predictions = self._convert_to_numpy(groundtruths,\n                                                       predictions)\n    for k in self._required_prediction_fields:\n      if k not in predictions:\n        raise ValueError(\n            'Missing the required key `{}` in predictions!'.format(k))\n    if self._need_rescale_bboxes:\n      self._process_bbox_predictions(predictions)\n    if self._need_rescale_keypoints:\n      self._process_keypoints_predictions(predictions)\n    for k, v in six.iteritems(predictions):\n      if k not in self._predictions:\n        self._predictions[k] = [v]\n      else:\n        self._predictions[k].append(v)\n\n    if not self._annotation_file:\n      assert groundtruths\n      for k in self._required_groundtruth_fields:\n        if k not in groundtruths:\n          raise ValueError(\n              'Missing the required key `{}` in groundtruths!'.format(k))\n      for k, v in six.iteritems(groundtruths):","sourceCodeStart":344,"sourceCodeEnd":380,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/vision/evaluation/coco_evaluator.py#L344-L380","documentation":"Error \"Missing the required key `{}` in predictions!\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/vision/evaluation/coco_evaluator.py:362 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"}