class_docstr: DARTS trainer.
  
  Parameters
  ----------
  num_epochs : int
      Number of epochs planned for training.
  workers : int
      Workers for data loading.
  gradient_clip : float
      Gradient clipping. Set to 0 to disable. Default: 5.
  model_lr : float
      Learning rate to optimize the model.
  model_wd : float
      Weight decay to optimize the model.
  arch_lr : float
      Learning rate to optimize the architecture.
  arch_wd : float
      Weight decay to optimize the architecture.
  device : str or torch.device
      The device of the whole process
code: def _train_one_epoch(
      self,
      epoch,
      model: BaseSpace,
      dataset,
      estimator,
      model_optim: torch.optim.Optimizer,
      arch_optim: torch.optim.Optimizer,
  ):
      model.train()
  
      # phase 1. architecture step
      arch_optim.zero_grad()
      # only no unroll here
      _, loss = self._infer(model, dataset, estimator, "val")
      loss.backward()
      arch_optim.step()
  
      # phase 2: child network step
      model_optim.zero_grad()
      metric, loss = self._infer(model, dataset, estimator, "train")
      loss.backward()
      # gradient clipping
      if self.gradient_clip > 0:
          nn.utils.clip_grad_norm_(
              model.parameters(), self.gradient_clip
          )
      model_optim.step()
  
imports: import logging
  import torch
  import torch.optim
  import torch.nn
  import torch.nn.functional
  from .None import register_nas_algo
  from .base import BaseNAS
  from ..estimator.base import BaseEstimator
  from ..space import BaseSpace
  from ..utils import replace_layer_choice, replace_input_choice
label_desc: Use image node_id 3 for calling the Darts obj's underlying member method code with example usage: obj._train_one_epoch(epoch, model, dataset, estimator, model_optim, arch_optim) without return types