docstr: y_true: numpy.ndarray or torch.Tensor of shape (num_graphs,)
  y_pred: numpy.ndarray or torch.Tensor of shape (num_graphs,)
  y_true and y_pred need to be of the same type (either numpy.ndarray or torch.Tensor)
docstr_tok: ["y_true",":","numpy.ndarray","or","torch.Tensor","of","shape","(","num_graphs",",",")","y_pred",":","numpy.ndarray","or","torch.Tensor","of","shape","(","num_graphs",",",")","y_true","and","y_pred","need","to","be","of","the","same","type","(","either","numpy.ndarray","or","torch.Tensor",")"]
code: def eval(self, input_dict):
      """
      y_true: numpy.ndarray or torch.Tensor of shape (num_graphs,)
      y_pred: numpy.ndarray or torch.Tensor of shape (num_graphs,)
      y_true and y_pred need to be of the same type (either numpy.ndarray or torch.Tensor)
      """
      assert "y_pred" in input_dict
      assert "y_true" in input_dict
  
      y_pred, y_true = input_dict["y_pred"], input_dict["y_true"]
  
      assert (
          isinstance(y_true, np.ndarray)
          and isinstance(y_pred, np.ndarray)
      ) or (
          isinstance(y_true, torch.Tensor)
          and isinstance(y_pred, torch.Tensor)
      )
      assert y_true.shape == y_pred.shape
      assert len(y_true.shape) == 1
  
      if isinstance(y_true, torch.Tensor):
          return {
              "mae": torch.mean(torch.abs(y_pred - y_true)).cpu().item()
          }
      else:
          return {"mae": float(np.mean(np.absolute(y_pred - y_true)))}
  
imports: from typing import Optional, Union, Dict
  import os
  import os.path
  import shutil
  from ogb.utils import smiles2graph
  from ogb.utils.url import decide_download, download_url, extract_zip
  import pandas
  import numpy
  from tqdm.auto import tqdm
  import torch
label_desc: Use image node_id 2 for calling the PCQM4MEvaluator obj's underlying member method code with example usage: obj.eval(input_dict) and returns: dict, dict