tensorflow/models · error · ValueError

Missing the required key `{}` in groundtruths!

Error message

Missing the required key `{}` in groundtruths!

What it means

Error "Missing the required key `{}` in groundtruths!" thrown in tensorflow/models.

Source

Thrown at official/vision/evaluation/coco_evaluator.py:378

    for k in self._required_prediction_fields:
      if k not in predictions:
        raise ValueError(
            'Missing the required key `{}` in predictions!'.format(k))
    if self._need_rescale_bboxes:
      self._process_bbox_predictions(predictions)
    if self._need_rescale_keypoints:
      self._process_keypoints_predictions(predictions)
    for k, v in six.iteritems(predictions):
      if k not in self._predictions:
        self._predictions[k] = [v]
      else:
        self._predictions[k].append(v)

    if not self._annotation_file:
      assert groundtruths
      for k in self._required_groundtruth_fields:
        if k not in groundtruths:
          raise ValueError(
              'Missing the required key `{}` in groundtruths!'.format(k))
      for k, v in six.iteritems(groundtruths):
        if k not in self._groundtruths:
          self._groundtruths[k] = [v]
        else:
          self._groundtruths[k].append(v)

View on GitHub (pinned to e006f5f0d5)

When it happens

Trigger: Thrown at official/vision/evaluation/coco_evaluator.py:378 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24). Data as JSON: /api/errors/e82d3ae4c0711e57. Report an issue: GitHub.