code: def main():
      # Update values
      # MODEL UPDATES
      cfg.name = "Mini QuartzNet"
      cfg.model.labels = LABELS
  
      # train ds
      cfg.model.train_ds.manifest_filepath = "<path to train dataset>"
      cfg.model.train_ds.labels = LABELS
      cfg.model.train_ds.sample_rate = cfg.model.sample_rate
  
      # validation ds
      cfg.model.validation_ds.manifest_filepath = (
          "<path to test dataset>"
      )
      cfg.model.validation_ds.labels = LABELS
      cfg.model.validation_ds.sample_rate = cfg.model.sample_rate
  
      # del `test_ds` does not work!
      # Refer - https://stackoverflow.com/questions/58119758/how-to-remove-dataclass-attributes
      # Hydra/OmegaConf dont allow custom .asdict() methods either
      # For now, explicitly set parameters
      cfg.model.test_ds.sample_rate = cfg.model.sample_rate
      cfg.model.test_ds.labels = cfg.model.labels
  
      # preprocessor
      cfg.model.preprocessor.sample_rate = cfg.model.sample_rate
  
      # spec aug
      cfg.model.spec_augment.rect_masks = 5
      cfg.model.spec_augment.rect_freq = 50
      cfg.model.spec_augment.rect_time = 120
  
      # encoder
      cfg.model.encoder.feat_in = cfg.model.preprocessor.features
      cfg.model.encoder.activation = "relu"
      cfg.model.encoder.jasper = qn_15x5
  
      # decoder
      cfg.model.decoder.feat_in = qn_15x5[-1].filters
      cfg.model.decoder.num_classes = len(LABELS)
      cfg.model.decoder.vocabulary = LABELS
  
      # optim
      cfg.model.optim.name = "novograd"
      cfg.model.optim.lr = 0.01
  
      # `betas` dont exist inside the base config,
      # so they cannot be added as such!
      # Same for `weight_decay`.
      cfg.model.optim.betas = [0.8, 0.5]
      cfg.model.optim.weight_decay = 0.001
  
      # sched
      # As parameters such as warmup_steps and warmup_ratio
      # dont exist inside the shell config, these values are not added!
      cfg.model.optim.sched.name = "CosineAnnealing"
      cfg.model.optim.sched.warmup_steps = None
      cfg.model.optim.sched.warmup_ratio = 0.01
  
      # Trainer config
      cfg.trainer.devices = 1
      cfg.trainer.max_epochs = 5
  
      # Exp Manager config
      cfg.exp_manager.name = cfg.name
  
      # Note usage of asdict
      trainer = pl.Trainer(**asdict(cfg.trainer))
      exp_manager(trainer, asdict(cfg.exp_manager))
      asr_model = EncDecCTCModel(cfg=cfg.model, trainer=trainer)
  
      trainer.fit(asr_model)
  
imports: from dataclasses import asdict
  import pytorch_lightning
  import nemo.collections.asr
  from nemo.collections.asr.models import EncDecCTCModel, configs
  from nemo.utils.exp_manager import exp_manager
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types