code: def run_train(args):
      seed_everything(1337)
      checkpoint_dir = args.exp_dir / f"checkpoints_{args.model_name}"
      checkpoint = ModelCheckpoint(
          checkpoint_dir,
          monitor="val_loss",
          mode="min",
          save_top_k=5,
          save_weights_only=False,
          verbose=True,
      )
      train_checkpoint = ModelCheckpoint(
          checkpoint_dir,
          monitor="train_loss",
          mode="min",
          save_top_k=5,
          save_weights_only=False,
          verbose=True,
      )
      callbacks = [
          checkpoint,
          train_checkpoint,
      ]
      trainer = Trainer(
          default_root_dir=args.exp_dir,
          max_steps=args.max_updates,
          num_nodes=args.num_nodes,
          devices=args.gpus,
          accelerator="gpu",
          strategy="ddp_find_unused_parameters_true",
          use_distributed_sampler=False,
          callbacks=callbacks,
          reload_dataloaders_every_n_epochs=1,
          val_check_interval=500,
          check_val_every_n_epoch=None,
      )
  
      model = HuBERTFineTuneModule(
          model_name=args.model_name,
          encoder_projection_dropout=args.encoder_projection_dropout,
          encoder_attention_dropout=args.encoder_attention_dropout,
          encoder_ff_interm_dropout=args.encoder_ff_interm_dropout,
          encoder_dropout=args.encoder_dropout,
          encoder_layer_drop=args.encoder_layer_drop,
          mask_prob=args.mask_prob,
          mask_channel_prob=args.mask_channel_prob,
          mask_channel_length=args.mask_channel_length,
          num_classes=args.num_classes,
          aux_num_out=args.aux_num_out,
          checkpoint=args.checkpoint,
          dataset_path=args.dataset_path,
          seconds_per_batch=args.seconds_per_batch,
          subset=args.subset,
          learning_rate=args.learning_rate,
          betas=args.betas,
          adam_eps=args.adam_eps,
          weight_decay=args.weight_decay,
          freeze_encoder_updates=args.freeze_encoder_updates,
          warmup_updates=args.warmup_updates,
          hold_updates=args.hold_updates,
          decay_updates=args.decay_updates,
      )
      trainer.fit(model, ckpt_path=args.resume_checkpoint)
  
file_path: audio/examples/hubert/finetune.py
imports: import logging
  import pathlib
  from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser, RawDescriptionHelpFormatter
  from typing import Tuple
  from lightning.pytorch import seed_everything, Trainer
  from lightning.pytorch.callbacks import ModelCheckpoint
  from lightning_modules import HuBERTFineTuneModule
label_desc: Use image node_id 1 for calling a global function with example usage: run_train(args) without return types