class_docstr: Solver for compression task.
  
  The compression task combines a set of perceptual and objective losses
  to train an EncodecModel (composed of an encoder-decoder and a quantizer)
  to perform high fidelity audio reconstruction.
class_docstr_tok: ["Solver","for","compression","task",".","The","compression","task","combines","a","set","of","perceptual","and","objective","losses","to","train","an","EncodecModel","(","composed","of","an","encoder-decoder","and","a","quantizer",")","to","perform","high","fidelity","audio","reconstruction","."]
docstr: Instantiate a wrapped CompressionModel from a given checkpoint path or dora sig.
  
  Args:
      cfg (omegaconf.DictConfig): Configuration to read from for wrapped mode.
      checkpoint_path (Path or str): Path to checkpoint or dora sig from where the checkpoint is resolved.
      use_ema (bool): Use EMA variant of the model instead of the actual model.
      device (torch.device or str): Device on which the model is loaded.
docstr_tok: ["Instantiate","a","wrapped","CompressionModel","from","a","given","checkpoint","path","or","dora","sig",".","Args",":","cfg","(","omegaconf.DictConfig",")",":","Configuration","to","read","from","for","wrapped","mode",".","checkpoint_path","(","Path","or","str",")",":","Path","to","checkpoint","or","dora","sig","from","where","the","checkpoint","is","resolved",".","use_ema","(","bool",")",":","Use","EMA","variant","of","the","model","instead","of","the","actual","model",".","device","(","torch.device","or","str",")",":","Device","on","which","the","model","is","loaded","."]
code: def wrapped_model_from_checkpoint(
      cfg: omegaconf.DictConfig,
      checkpoint_path: tp.Union[Path, str],
      device: tp.Union[torch.device, str] = "cpu",
  ) -> models.CompressionModel:
      """Instantiate a wrapped CompressionModel from a given checkpoint path or dora sig.
  
      Args:
          cfg (omegaconf.DictConfig): Configuration to read from for wrapped mode.
          checkpoint_path (Path or str): Path to checkpoint or dora sig from where the checkpoint is resolved.
          use_ema (bool): Use EMA variant of the model instead of the actual model.
          device (torch.device or str): Device on which the model is loaded.
      """
      compression_model = CompressionSolver.model_from_checkpoint(
          checkpoint_path, device
      )
      compression_model = models.builders.get_wrapped_compression_model(
          compression_model, cfg
      )
      return compression_model
  
imports: import logging
  import multiprocessing
  from pathlib import Path
  import typing
  import flashy
  import omegaconf
  import torch
  from torch import nn
  from .None import base, builders
  from ..None import models, quantization
  from ..utils import checkpoint
  from ..utils.samples.manager import SampleManager
  from ..utils.utils import get_pool_executor
label_desc: Use image node_id 12 for calling the CompressionSolver obj's underlying member method code with example usage: obj.wrapped_model_from_checkpoint(cfg, checkpoint_path, device) and returns: compression_model