class_docstr: Wrap `model` in `DistributedDataParallel` and `dls` in `DistributedDL`
class_docstr_tok: ["Wrap","`","model","`","in","`","DistributedDataParallel","`","and","`","dls","`","in","`","DistributedDL","`"]
code: def before_fit(self):
      self.learn.model = self.accelerator.prepare(
          nn.SyncBatchNorm.convert_sync_batchnorm(self.model)
          if self.sync_bn
          else self.model
      )
      self.old_dls = list(self.dls)
      self.learn.dls.loaders = [self._wrap_dl(dl) for dl in self.dls]
      if rank_distrib():
          self.learn.logger = noop
  
imports: from __future__ import annotations
  from .basics import *
  from .callback.progress import ProgressCallback
  from torch.nn.parallel import DistributedDataParallel, DataParallel
  from .data.load import _FakeLoader, _loaders
  from .optimizer import OptimWrapper
label_desc: Use image node_id 2 for calling the DistributedTrainer obj's underlying member method code with example usage: obj.before_fit() without return types