code: def evaluate(lib: str, model: str, dataset: str, group: str):
      y_test, horizon, freq, seasonality = get_data(
          "data/", dataset, group, False
      )
      y_test = y_test["y"].values.reshape(-1, horizon)
  
      forecast = pd.read_csv(
          f"data/{lib}-forecasts-{dataset}-{group}.csv"
      )
      y_hat = forecast[model].values.reshape(-1, horizon)
  
      evals = {}
      for metric in (mape, smape):
          metric_name = metric.__name__
          loss = metric(y_test, y_hat)
          evals[metric_name] = loss
  
      evals = (
          pd.DataFrame(evals, index=[f"{dataset}_{group}"])
          .rename_axis("dataset")
          .reset_index()
      )
      times = pd.read_csv(f"data/{lib}-time-{dataset}-{group}.csv")
      times["model"] = model
      evals = pd.concat([evals, times], axis=1)
  
      return evals
  
file_path: statsforecast/experiments/m3/src/evaluation.py
imports: from itertools import product
  import fire
  import numpy
  import pandas
  from datasetsforecast.losses import mape, smape
  from src.data import get_data
label_desc: Use image node_id 1 for calling a global function with example usage: evaluate(lib, model, dataset, group) and returns: evals