code: def run_train(args):
      pl.seed_everything(1)
      logger = TensorBoardLogger(args.exp_dir)
      callbacks = [
          ModelCheckpoint(
              args.checkpoint_path,
              monitor="val/loss",
              save_top_k=5,
              mode="min",
              save_last=True,
          ),
      ]
  
      trainer = pl.trainer.trainer.Trainer(
          max_epochs=args.epochs,
          callbacks=callbacks,
          accelerator="gpu",
          devices=args.gpus,
          accumulate_grad_batches=1,
          logger=logger,
          gradient_clip_val=5,
          check_val_every_n_epoch=1,
          num_sanity_val_steps=0,
          log_every_n_steps=1,
      )
      model = DNNBeamformer()
      model_module = DNNBeamformerLightningModule(model)
      data_module = L3DAS22DataModule(
          dataset_path=args.dataset_path, batch_size=args.batch_size
      )
  
      trainer.fit(model_module, datamodule=data_module)
  
file_path: audio/examples/dnn_beamformer/train.py
imports: import pathlib
  from argparse import ArgumentParser
  import lightning.pytorch
  from datamodule import L3DAS22DataModule
  from lightning.pytorch.callbacks import ModelCheckpoint
  from lightning.pytorch.loggers import TensorBoardLogger
  from model import DNNBeamformer, DNNBeamformerLightningModule
label_desc: Use image node_id 1 for calling a global function with example usage: run_train(args) without return types