class_docstr: Test train utilities.
class_docstr_tok: ["Test","train","utilities","."]
docstr: Test that evaluation on part of the dataset works.
docstr_tok: ["Test","that","evaluation","on","part","of","the","dataset","works","."]
code: def test_coco_global_val_metrics_function_subset(self):
      """Test that evaluation on part of the dataset works."""
      # Instatiate evaluator with default annotations file:
      outputs, targets = _get_fake_detection_example()
      included_image_ids = {int(targets["image/id"])}
      global_metrics_evaluator = detr_train_utils.DetrGlobalEvaluator(
          "coco_detr_detection"
      )
      global_metrics_evaluator.add_example(
          prediction=outputs, target=targets
      )
      global_metrics_evaluator.compute_metrics(
          included_image_ids=included_image_ids
      )
  
file_path: scenic/scenic/projects/baselines/detr/tests/test_train_utils.py
imports: import collections
  import os
  from absl.testing import absltest
  from absl.testing import parameterized
  import jax
  import jax.numpy
  import numpy
  from scenic.projects.baselines.detr import train_utils
label_desc: Use image node_id 3 for calling the TrainUtilsTest obj's underlying member method code with example usage: obj.test_coco_global_val_metrics_function_subset() without return types