code: def eval_mae(pred, truth):
      """
      Evaluate mean absolute error, using sample median as point estimate.
  
      :param torch.Tensor pred: Forecasted samples.
      :param torch.Tensor truth: Ground truth.
      :rtype: float
      """
      pred = pred.median(0).values
      return (pred - truth).abs().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 1 for calling a global function with example usage: eval_mae(pred, truth) and returns: unknown