class_docstr: Search implementation of :class:`~nni.nas.strategy.RandomOneShot`.
  
  Do not need extra preprocessing of dataloader.
  
  See Also
  --------
  nni.nas.strategy.RandomOneShot
  nni.nas.pytorch.oneshot.base_lightning.BaseOneShotLightningModule
code: def __init__(
      self,
      training_module: pl.LightningModule,
      filter: Callable[[Sample], bool] | None = None,
  ):  # pylint: disable=redefined-builtin
      super().__init__(training_module)
      self.filter = filter
  
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 1 to create a new RandomSamplingLightningModule object from inherited base classes: BaseOneShotLightningModule with example: obj = RandomSamplingLightningModule(training_module, filter)