class_docstr: The graph classification trainer.
  
  Used to automatically train the graph 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
  
  num_graph_features: int (Optional)
      The number of graph level features. default 0.
  
  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","graph","classification","trainer",".","Used","to","automatically","train","the","graph","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","num_graph_features",":","int","(","Optional",")","The","number","of","graph","level","features",".","default","0.","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: The new 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.GraphClassificationTrainer``
      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",":","The","new","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.GraphClassificationTrainer","``","A","new","instance","of","trainer","."]
code: def duplicate_from_hyper_parameter(
      self, hp, encoder="same", decoder="same", 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: The new 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.GraphClassificationTrainer``
          A new instance of trainer.
  
      """
      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 if encoder != "same" else self.encoder
      decoder = decoder if decoder != "same" else self.decoder
      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,
          num_graph_features=self.num_graph_features,
          optimizer=self.opt_received,
          lr=hp["lr"],
          max_epoch=hp["max_epoch"],
          batch_size=hp["batch_size"],
          early_stopping_round=hp["early_stopping_round"],
          weight_decay=hp["weight_decay"],
          device=self.device,
          feval=self.feval,
          loss=self.loss,
          lr_scheduler_type=self.lr_scheduler_type,
          init=True,
          *self.args,
          **self.kwargs,
      )
  
      return ret
  
imports: from .None import register_trainer
  from .base import BaseGraphClassificationTrainer, EarlyStopping
  import torch
  from torch.optim.lr_scheduler import StepLR, MultiStepLR, ExponentialLR, ReduceLROnPlateau
  import torch.nn.functional
  from ..model import BaseAutoModel, BaseDecoderMaintainer, BaseEncoderMaintainer
  from .evaluation import get_feval, Logloss
  from typing import Tuple, Type, Union
  from ...datasets import utils
  from copy import deepcopy
  import torch.multiprocessing
  from ...utils import get_logger
  from ...backend import DependentBackend
label_desc: Use image node_id 15 for calling the GraphClassificationFullTrainer obj's underlying member method code with example usage: obj.duplicate_from_hyper_parameter(hp, encoder, decoder, restricted) and returns: ret