class_docstr: Dataset for validation or testing
  
  Parameters
  ----------
  dataset : KGDataset
      Original dataset.
  args :
      Global configs.
class_docstr_tok: ["Dataset","for","validation","or","testing","Parameters","--","--","--","--","--","dataset",":","KGDataset","Original","dataset",".","args",":","Global","configs","."]
code: def __init__(self, dataset, args):
      self.name = args.dataset
      src = [dataset.train[0]]
      etype_id = [dataset.train[1]]
      dst = [dataset.train[2]]
      self.num_train = len(dataset.train[0])
      if dataset.valid is not None:
          src.append(dataset.valid[0])
          etype_id.append(dataset.valid[1])
          dst.append(dataset.valid[2])
          self.num_valid = len(dataset.valid[0])
      elif self.name in ["wikikg90m"]:
          self.valid_dict = dataset.valid_dict
          self.num_valid = len(self.valid_dict["h,r->t"]["hr"])
          # self.num_valid = len(self.valid_dict['t,r->h']['tr'])+len(self.valid_dict['h,r->t']['hr'])
      else:
          self.num_valid = 0
      if dataset.test is not None:
          src.append(dataset.test[0])
          etype_id.append(dataset.test[1])
          dst.append(dataset.test[2])
          self.num_test = len(dataset.test[0])
      elif self.name in ["wikikg90m"]:
          self.test_dict = dataset.test_dict
          self.num_test = len(self.test_dict["h,r->t"]["hr"])
          # self.num_test = len(self.test_dict['t,r->h']['tr'])+len(self.test_dict['h,r->t']['hr'])
      else:
          self.num_test = 0
      # assert len(src) > 1, "we need to have at least validation set or test set."
      src = np.concatenate(src)
      etype_id = np.concatenate(etype_id)
      dst = np.concatenate(dst)
  
imports: import math
  import numpy
  import scipy
  import dgl.backend
  import dgl
  import os
  import sys
  import pickle
  import time
  from dgl.base import NID, EID
  import pdb
label_desc: Use image node_id 1 to create a new EvalDataset object from inherited base classes: object with example: obj = EvalDataset(dataset, args)