class_docstr: Sampling-based super-net training but using an RL agent to control the sampling.
  
  The default implementation for :class:`~nni.nas.strategy.ENAS`.
  
  See Also
  --------
  nni.nas.strategy.ENAS
  RandomSamplingLightningModule
docstr: Resample the architecture with ENAS controller.
docstr_tok: ["Resample","the","architecture","with","ENAS","controller","."]
code: def resample(self) -> Sample:
      """Resample the architecture with ENAS controller."""
      # policy could be either eval or train, depending on where you call it.
      with torch.no_grad():
          sample = self.generator.next_sample()
      for module in self.supernet_modules():
          module.resample(memo=sample)
      return sample
  
imports: from __future__ import annotations
  import warnings
  import logging
  from typing import Any, Callable, TYPE_CHECKING
  import pytorch_lightning
  import torch
  from nni.mutable import Sample
  from nni.nas.nn.pytorch import ModelSpace
  from .base_lightning import BaseOneShotLightningModule
  from .profiler import ProfilerPenalty, ExpectationProfilerPenalty, SampleProfilerPenalty
label_desc: Use image node_id 6 for calling the EnasLightningModule obj's underlying member method code with example usage: obj.resample() and returns: sample