docstr: Gets called at the beginning of ``fit()``, on multiple processes
  if ``distributed_count > 0`` and backend is ddp.
  
  Default implementation compiles the jit modules, initializes
  optimizers, and loads the latest checkpoint to resume training.
docstr_tok: ["Gets","called","at","the","beginning","of","``","fit","(",")","``",",","on","multiple","processes","if","``","distributed_count",">","0","``","and","backend","is","ddp",".","Default","implementation","compiles","the","jit","modules",",","initializes","optimizers",",","and","loads","the","latest","checkpoint","to","resume","training","."]
code: def on_fit_start(self):
      """Gets called at the beginning of ``fit()``, on multiple processes
      if ``distributed_count > 0`` and backend is ddp.
  
      Default implementation compiles the jit modules, initializes
      optimizers, and loads the latest checkpoint to resume training.
      """
      # Run this *after* starting all processes since jit modules cannot be
      # pickled.
      self._compile()
  
      # Wrap modules with parallel backend after jit
      self._wrap_distributed()
  
      # Initialize optimizers after parameters are configured
      self.init_optimizers()
  
      # Load latest checkpoint to resume training if interrupted
      self._recover_checkpoint()
  
imports: from speechbrain.dataio.dataset import FilteredSortedDynamicItemDataset, DynamicItemDataset
  from speechbrain.dataio.sampler import BalancingDataSampler
  from speechbrain.utils.data_utils import undo_padding
  import datasets
  import logging
  import os
  import random
  import speechbrain
  import sys
  from enum import Enum
  from collections import namedtuple
  from hyperpyyaml import load_hyperpyyaml
  from functools import partial
  from speechbrain.utils.distributed import run_on_main
  from speechbrain.utils.pretrained import save_for_pretrained
  from speechbrain.lobes.models.g2p.dataio import enable_eos_bos, grapheme_pipeline, phoneme_pipeline, tokenizer_encode_pipeline, add_bos_eos, get_sequence_key, phonemes_to_label
  from speechbrain.dataio.wer import print_alignments
  from speechbrain.wordemb.util import expand_to_chars
  from io import StringIO
  from speechbrain.utils import hpopt
  import numpy
label_desc: Use image node_id 2 for calling the G2PBrain obj's underlying member method code with example usage: obj.on_fit_start() without return types