def make_singleton_eval_task(observations, actions):
  """Creates an EvalTask with just one example."""
  mask = np.ones(observations.shape[:2])
  def data():
    while True:
      yield (observations, actions, observations, mask)

  return training.EvalTask(
      labeled_data=data(),
      metrics=[],
  )
Creates an EvalTask with just one example.
trax/supervised/callbacks_test.py