class_docstr: An estimator which trans from scratch
  
  Parameters
  ----------
  loss_f : str
      The name of loss funciton in PyTorch
  evaluation : list of Evaluation
      The evaluation metrics in module/train/evaluation
class_docstr_tok: ["An","estimator","which","trans","from","scratch","Parameters","--","--","--","--","--","loss_f",":","str","The","name","of","loss","funciton","in","PyTorch","evaluation",":","list","of","Evaluation","The","evaluation","metrics","in","module\/train\/evaluation"]
code: def infer(self, model: BaseSpace, dataset, mask="train"):
      boxmodel = model.wrap()
      self.trainer = NodeClassificationFullTrainer(
          model=boxmodel,
          optimizer=torch.optim.Adam,
          lr=0.005,
          max_epoch=300,
          early_stopping_round=30,
          weight_decay=5e-4,
          device="auto",
          init=False,
          feval=self.evaluation,
          loss=self.loss_f,
          lr_scheduler_type=None,
      )
      try:
          self.trainer.train(dataset)
          with torch.no_grad():
              return self.estimator.infer(boxmodel.model, dataset, mask)
      except RuntimeError as e:
          if "cuda" in str(e) or "CUDA" in str(e):
              INF = 100
              fin = [
                  -INF if eva.is_higher_better else INF
                  for eva in self.evaluation
              ]
              return fin, 0
          else:
              raise e
  
file_path: AutoGL/autogl/module/nas/estimator/train_scratch.py
imports: from .None import register_nas_estimator
  from ..space import BaseSpace
  from .base import BaseEstimator
  from .one_shot import OneShotEstimator, OneShotEstimator_HardwareAware
  import torch
  from autogl.module.train import NodeClassificationFullTrainer, Acc
label_desc: Use image node_id 2 for calling the TrainEstimator obj's underlying member method code with example usage: obj.infer(model, dataset, mask) and returns: self, fin,  int