code: def eval_crps(pred, truth):
      """
      Evaluate continuous ranked probability score, averaged over all data
      elements.
  
      **References**
  
      [1] Tilmann Gneiting, Adrian E. Raftery (2007)
          `Strictly Proper Scoring Rules, Prediction, and Estimation`
          https://www.stat.washington.edu/raftery/Research/PDF/Gneiting2007jasa.pdf
  
      :param torch.Tensor pred: Forecasted samples.
      :param torch.Tensor truth: Ground truth.
      :rtype: float
      """
      return crps_empirical(pred, truth).mean().cpu().item()
  
file_path: pyro/pyro/contrib/forecast/evaluate.py
imports: import logging
  import warnings
  from timeit import default_timer
  import torch
  import pyro
  from pyro.ops.stats import crps_empirical
  from .forecaster import Forecaster
label_desc: Use image node_id 3 for calling a global function with example usage: eval_crps(pred, truth) and returns: crps_empirical