class_docstr: The node classification trainer.
  
  Used to automatically train the node classification problem.
  
  Parameters
  ----------
  model:
      Models can be ``str``, ``autogl.module.model.BaseAutoModel``, 
      ``autogl.module.model.encoders.BaseEncoderMaintainer`` or a tuple of (encoder, decoder) 
      if need to specify both encoder and decoder. Encoder can be ``str`` or
      ``autogl.module.model.encoders.BaseEncoderMaintainer``, and decoder can be ``str``
      or ``autogl.module.model.decoders.BaseDecoderMaintainer``.
      If only encoder is specified, decoder will be default to "logsoftmax"
  
  num_features: int (Optional)
      The number of features in dataset. default None
  
  num_classes: int (Optional)
      The number of classes. default None
  
  optimizer: ``Optimizer`` of ``str``
      The (name of) optimizer used to train and predict. default torch.optim.Adam
  
  lr: ``float``
      The learning rate of node classification task. default 1e-4
  
  max_epoch: ``int``
      The max number of epochs in training. default 100
  
  early_stopping_round: ``int``
      The round of early stop. default 100
  
  weight_decay: ``float``
      weight decay ratio, default 1e-4
  
  device: ``torch.device`` or ``str``
      The device where model will be running on.
  
  init: ``bool``
      If True(False), the model will (not) be initialized.
  
  feval: (Sequence of) ``Evaluation`` or ``str``
      The evaluation functions, default ``[LogLoss]``
  
  loss: ``str``
      The loss used. Default ``nll_loss``.
  
  lr_scheduler_type: ``str`` (Optional)
      The lr scheduler type used. Default None.
class_docstr_tok: ["The","node","classification","trainer",".","Used","to","automatically","train","the","node","classification","problem",".","Parameters","--","--","--","--","--","model",":","Models","can","be","``","str","``",",","``","autogl.module.model.BaseAutoModel","``",",","``","autogl.module.model.encoders.BaseEncoderMaintainer","``","or","a","tuple","of","(","encoder",",","decoder",")","if","need","to","specify","both","encoder","and","decoder",".","Encoder","can","be","``","str","``","or","``","autogl.module.model.encoders.BaseEncoderMaintainer","``",",","and","decoder","can","be","``","str","``","or","``","autogl.module.model.decoders.BaseDecoderMaintainer","``",".","If","only","encoder","is","specified",",","decoder","will","be","default","to","``","logsoftmax","''","num_features",":","int","(","Optional",")","The","number","of","features","in","dataset",".","default","None","num_classes",":","int","(","Optional",")","The","number","of","classes",".","default","None","optimizer",":","``","Optimizer","``","of","``","str","``","The","(","name","of",")","optimizer","used","to","train","and","predict",".","default","torch.optim.Adam","lr",":","``","float","``","The","learning","rate","of","node","classification","task",".","default","1e-4","max_epoch",":","``","int","``","The","max","number","of","epochs","in","training",".","default","100","early_stopping_round",":","``","int","``","The","round","of","early","stop",".","default","100","weight_decay",":","``","float","``","weight","decay","ratio",",","default","1e-4","device",":","``","torch.device","``","or","``","str","``","The","device","where","model","will","be","running","on",".","init",":","``","bool","``","If","True","(","False",")",",","the","model","will","(","not",")","be","initialized",".","feval",":","(","Sequence","of",")","``","Evaluation","``","or","``","str","``","The","evaluation","functions",",","default","``","[","LogLoss","]","``","loss",":","``","str","``","The","loss","used",".","Default","``","nll_loss","``",".","lr_scheduler_type",":","``","str","``","(","Optional",")","The","lr","scheduler","type","used",".","Default","None","."]
docstr: Evaluate on the given dataset.
  
  Parameters
  ----------
  dataset: The node classification dataset used to be evaluated.
  
  mask: ``train``, ``val``, or ``test``.
      The dataset mask.
  
  feval: ``str``.
      The evaluation method used in this function.
  
  Returns
  -------
  res: The evaluation result on the given dataset.
docstr_tok: ["Evaluate","on","the","given","dataset",".","Parameters","--","--","--","--","--","dataset",":","The","node","classification","dataset","used","to","be","evaluated",".","mask",":","``","train","``",",","``","val","``",",","or","``","test","``",".","The","dataset","mask",".","feval",":","``","str","``",".","The","evaluation","method","used","in","this","function",".","Returns","--","--","--","-","res",":","The","evaluation","result","on","the","given","dataset","."]
code: def evaluate(self, dataset, mask=None, feval=None):
      """
      Evaluate on the given dataset.
  
      Parameters
      ----------
      dataset: The node classification dataset used to be evaluated.
  
      mask: ``train``, ``val``, or ``test``.
          The dataset mask.
  
      feval: ``str``.
          The evaluation method used in this function.
  
      Returns
      -------
      res: The evaluation result on the given dataset.
  
      """
      data = dataset[0]
      data = data.to(self.device)
  
      if isinstance(mask, str):
          if self.pyg_dgl == "pyg":
              mask = getattr(data, f"{mask}_mask")
          elif self.pyg_dgl == "dgl":
              mask = data.ndata[f"{mask}_mask"]
  
      if self.pyg_dgl == "pyg":
          label = data.y
      elif self.pyg_dgl == "dgl":
          label = data.ndata["label"]
  
      if feval is None:
          feval = self.feval
      else:
          feval = get_feval(feval)
  
      y_pred_prob = self.predict_proba(dataset, mask)
  
      y_true = label[mask] if mask is not None else label
  
      if not isinstance(feval, list):
          feval = [feval]
          return_signle = True
      else:
          return_signle = False
  
      res = []
      for f in feval:
          try:
              res.append(f.evaluate(y_pred_prob, y_true))
          except:
              res.append(
                  f.evaluate(
                      y_pred_prob.cpu().numpy(), y_true.cpu().numpy()
                  )
              )
      if return_signle:
          return res[0]
      return res
  
imports: from .None import register_trainer
  from .base import BaseNodeClassificationTrainer, EarlyStopping
  import torch
  from torch.optim.lr_scheduler import StepLR, MultiStepLR, ExponentialLR, ReduceLROnPlateau
  import torch.nn.functional
  from ..model import BaseEncoderMaintainer, BaseDecoderMaintainer, BaseAutoModel
  from .evaluation import Evaluation, get_feval, Logloss
  from typing import Callable, Iterable, Optional, Tuple, Type, Union
  from copy import deepcopy
  from ...utils import get_logger
  from ...backend import DependentBackend
label_desc: Use image node_id 12 for calling the NodeClassificationFullTrainer obj's underlying member method code with example usage: obj.evaluate(dataset, mask, feval) and returns: res, res