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: The function of duplicating a new instance from the given hyperparameter.
  
  Parameters
  ----------
  hp: ``dict``.
      The hyperparameter used in the new instance. Should contain 3 keys "trainer", "encoder"
      "decoder", with corresponding hyperparameters as values.
  
  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``.
  
  restricted: ``bool``.
      If False(True), the hyperparameter should (not) be updated from origin hyperparameter.
  
  Returns
  -------
  self: ``autogl.train.NodeClassificationTrainer``
      A new instance of trainer.
docstr_tok: ["The","function","of","duplicating","a","new","instance","from","the","given","hyperparameter",".","Parameters","--","--","--","--","--","hp",":","``","dict","``",".","The","hyperparameter","used","in","the","new","instance",".","Should","contain","3","keys","``","trainer","''",",","``","encoder","''","``","decoder","''",",","with","corresponding","hyperparameters","as","values",".","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","``",".","restricted",":","``","bool","``",".","If","False","(","True",")",",","the","hyperparameter","should","(","not",")","be","updated","from","origin","hyperparameter",".","Returns","--","--","--","-","self",":","``","autogl.train.NodeClassificationTrainer","``","A","new","instance","of","trainer","."]
code: def duplicate_from_hyper_parameter(
      self, hp: dict, model=None, restricted=True
  ):
      """
      The function of duplicating a new instance from the given hyperparameter.
  
      Parameters
      ----------
      hp: ``dict``.
          The hyperparameter used in the new instance. Should contain 3 keys "trainer", "encoder"
          "decoder", with corresponding hyperparameters as values.
  
      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``.
  
      restricted: ``bool``.
          If False(True), the hyperparameter should (not) be updated from origin hyperparameter.
  
      Returns
      -------
      self: ``autogl.train.NodeClassificationTrainer``
          A new instance of trainer.
  
      """
      if isinstance(model, Tuple):
          encoder, decoder = model
      elif isinstance(model, BaseAutoModel):
          encoder, decoder = model, None
      elif isinstance(model, BaseEncoderMaintainer):
          encoder, decoder = model, self.decoder
      elif model is None:
          encoder, decoder = self.encoder, self.decoder
      else:
          raise TypeError("Cannot parse model with type", type(model))
  
      hp_trainer = hp.get("trainer", {})
      hp_encoder = hp.get("encoder", {})
      hp_decoder = hp.get("decoder", {})
      if not restricted:
          origin_hp = deepcopy(self.hyper_parameters)
          origin_hp.update(hp_trainer)
          hp = origin_hp
      else:
          hp = hp_trainer
      encoder = encoder.from_hyper_parameter(hp_encoder)
      if isinstance(encoder, BaseEncoderMaintainer) and isinstance(
          decoder, BaseDecoderMaintainer
      ):
          decoder = decoder.from_hyper_parameter_and_encoder(
              hp_decoder, encoder
          )
  
      ret = self.__class__(
          model=(encoder, decoder),
          num_features=self.num_features,
          num_classes=self.num_classes,
          optimizer=self.opt_received,
          lr=hp["lr"],
          max_epoch=hp["max_epoch"],
          early_stopping_round=hp["early_stopping_round"],
          device=self.device,
          weight_decay=hp["weight_decay"],
          feval=self.feval,
          loss=self.loss,
          lr_scheduler_type=self.lr_scheduler_type,
          init=True,
          **self.kwargs,
      )
  
      return ret
  
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 13 for calling the NodeClassificationFullTrainer obj's underlying member method code with example usage: obj.duplicate_from_hyper_parameter(hp, model, restricted) and returns: ret