docstr: save test submission file at dir_path
docstr_tok: ["save","test","submission","file","at","dir_path"]
code: def save_test_submission(
      self, input_dict: Dict, dir_path: str, mode: str
  ):
      """
      save test submission file at dir_path
      """
      assert "y_pred" in input_dict
      assert mode in ["test-dev", "test-challenge"]
  
      y_pred = input_dict["y_pred"]
  
      if mode == "test-dev":
          filename = osp.join(dir_path, "y_pred_pcqm4m-v2_test-dev")
          assert y_pred.shape == (147037,)
      elif mode == "test-challenge":
          filename = osp.join(
              dir_path, "y_pred_pcqm4m-v2_test-challenge"
          )
          assert y_pred.shape == (147432,)
  
      assert isinstance(filename, str)
      assert isinstance(y_pred, np.ndarray) or isinstance(
          y_pred, torch.Tensor
      )
  
      if not osp.exists(dir_path):
          os.makedirs(dir_path)
  
      if isinstance(y_pred, torch.Tensor):
          y_pred = y_pred.numpy()
      y_pred = y_pred.astype(np.float32)
      np.savez_compressed(filename, y_pred=y_pred)
  
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 3 for calling the PCQM4Mv2Evaluator obj's underlying member method code with example usage: obj.save_test_submission(input_dict, dir_path, mode) without return types