class_docstr: The heterogeneous node classification trainer.
  
  Parameters
  ----------
  model: ``autogl.module.model.BaseAutoModel``
      Currently Heterogeneous trainer doesn't support decoupled model setting.
  
  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","heterogeneous","node","classification","trainer",".","Parameters","--","--","--","--","--","model",":","``","autogl.module.model.BaseAutoModel","``","Currently","Heterogeneous","trainer","does","n't","support","decoupled","model","setting",".","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","."]
code: def __init__(
      self,
      model: Union[BaseAutoModel, str] = None,
      dataset=None,
      num_features=None,
      num_classes=None,
      optimizer=torch.optim.AdamW,
      lr=1e-4,
      max_epoch=100,
      early_stopping_round=100,
      weight_decay=1e-4,
      device="auto",
      init=False,
      feval=[Logloss],
      loss="nll_loss",
      lr_scheduler_type=None,
      *args,
      **kwargs,
  ):
      super().__init__(
          model,
          dataset,
          num_features,
          num_classes,
          device=device,
          feval=feval,
          loss=loss,
      )
  
      self.opt_received = optimizer
      if isinstance(optimizer, str):
          if optimizer.lower() == "adam":
              self.optimizer = torch.optim.Adam
          elif optimizer.lower() == "sgd":
              self.optimizer = torch.optim.SGD
          else:
              raise ValueError(
                  "Currently not support optimizer {}".format(optimizer)
              )
      elif isinstance(optimizer, type) and issubclass(
          optimizer, torch.optim.Optimizer
      ):
          self.optimizer = optimizer
      else:
          raise ValueError(
              "Currently not support optimizer {}".format(optimizer)
          )
  
      self.lr_scheduler_type = lr_scheduler_type
  
      self.lr = lr
      self.max_epoch = max_epoch
      self.early_stopping_round = early_stopping_round
      self.args = args
      self.kwargs = kwargs
      self.weight_decay = weight_decay
  
      self.early_stopping = EarlyStopping(
          patience=early_stopping_round, verbose=False
      )
  
      self.valid_result = None
      self.valid_result_prob = None
      self.valid_score = None
  
      self.pyg_dgl = DependentBackend.get_backend_name()
  
      self.hyper_parameter_space = [
          {
              "parameterName": "max_epoch",
              "type": "INTEGER",
              "maxValue": 500,
              "minValue": 10,
              "scalingType": "LINEAR",
          },
          {
              "parameterName": "early_stopping_round",
              "type": "INTEGER",
              "maxValue": 30,
              "minValue": 10,
              "scalingType": "LINEAR",
          },
          {
              "parameterName": "lr",
              "type": "DOUBLE",
              "maxValue": 1e-1,
              "minValue": 1e-4,
              "scalingType": "LOG",
          },
          {
              "parameterName": "weight_decay",
              "type": "DOUBLE",
              "maxValue": 1e-2,
              "minValue": 1e-4,
              "scalingType": "LOG",
          },
      ]
  
      self.hyper_parameters = {
          "max_epoch": self.max_epoch,
          "early_stopping_round": self.early_stopping_round,
          "lr": self.lr,
          "weight_decay": self.weight_decay,
      }
  
      if init is True:
          self.initialize()
  
imports: from .None import register_trainer
  from .base import BaseNodeClassificationHetTrainer, EarlyStopping
  import torch
  from torch.optim.lr_scheduler import StepLR, MultiStepLR, ExponentialLR, ReduceLROnPlateau
  import torch.nn.functional
  from ..model import BaseAutoModel
  from .evaluation import get_feval, Logloss
  from typing import Union
  from copy import deepcopy
  from sklearn.metrics import f1_score
  from ...utils import get_logger
  from ...backend import DependentBackend
label_desc: Use image node_id 1 to create a new NodeClassificationHetTrainer object from inherited base classes: BaseNodeClassificationHetTrainer with example: obj = NodeClassificationHetTrainer(model, dataset, num_features, num_classes, optimizer, lr, max_epoch, early_stopping_round, weight_decay, device, init, feval, loss, lr_scheduler_type)