class_docstr: Prune model to an exact pruning level for one time.
class_docstr_tok: ["Prune","model","to","an","exact","pruning","level","for","one","time","."]
docstr: Parameters
  ----------
  model : torch.nn.Module
      Model to be pruned
  config_list : list
      List on pruning configs
  pruning_algorithm: str
      algorithms being used to prune model
  optimizer: torch.optim.Optimizer
      Optimizer used to train model
  algo_kwargs: dict
      Additional parameters passed to pruning algorithm masker class
code: def __init__(
      self,
      model,
      config_list,
      pruning_algorithm="level",
      optimizer=None,
      **algo_kwargs,
  ):
      """
      Parameters
      ----------
      model : torch.nn.Module
          Model to be pruned
      config_list : list
          List on pruning configs
      pruning_algorithm: str
          algorithms being used to prune model
      optimizer: torch.optim.Optimizer
          Optimizer used to train model
      algo_kwargs: dict
          Additional parameters passed to pruning algorithm masker class
      """
  
      super().__init__(model, config_list, optimizer)
      self.set_wrappers_attribute("if_calculated", False)
      self.masker = MASKER_DICT[pruning_algorithm](
          model, self, **algo_kwargs
      )
  
imports: import logging
  from schema import And, Optional, SchemaError
  from .._graph_utils import TorchModuleGraph
  from ..utils.shape_dependency import ChannelDependency, GroupDependency
  from .constants import MASKER_DICT
  from ..utils.config_validation import CompressorSchema
  from ..compressor import Pruner
label_desc: Use image node_id 1 to create a new OneshotPruner object from inherited base classes: Pruner with example: obj = OneshotPruner(model, config_list, pruning_algorithm, optimizer)