code: def train(args):
      set_seed(args.seed)
      train_df = pd.read_csv(os.path.join(args.data_path, "train.csv"))
      test_df = pd.read_csv(os.path.join(args.data_path, "test.csv"))
      # For the purpose of generating submission file
      submission_df = pd.read_csv(
          os.path.join(args.data_path, "sample_submission.csv")
      )
      train_df = preprocess(
          train_df, with_tax_values=args.with_tax_values, has_label=True
      )
      test_df = preprocess(
          test_df, with_tax_values=args.with_tax_values, has_label=False
      )
      label_column = "Sold Price"
      eval_metric = "r2"
  
      automm_hyperparameters = get_automm_hyperparameters(
          args.automm_mode, args.text_backbone, args.cat_as_text
      )
  
      tabular_hyperparameters = {
          "GBM": [
              {},
              {"extra_trees": True, "ag_args": {"name_suffix": "XT"}},
          ],
          "CAT": {},
          "AG_AUTOMM": automm_hyperparameters,
      }
      if args.mode == "single":
          predictor = MultiModalPredictor(
              eval_metric=eval_metric,
              label=label_column,
              path=args.exp_path,
          )
          predictor.fit(
              train_df,
              hyperparameters=automm_hyperparameters,
              seed=args.seed,
          )
      elif (
          args.mode == "weighted"
          or args.mode == "stack5"
          or args.mode == "single_bag5"
          or args.mode == "single_bag4"
      ):
          predictor = TabularPredictor(
              eval_metric=eval_metric,
              label=label_column,
              path=args.exp_path,
          )
  
          if args.mode == "single_bag5":
              tabular_hyperparameters = {
                  "AG_AUTOMM": automm_hyperparameters,
              }
              num_bag_folds, num_stack_levels = 5, 0
          elif args.mode == "weighted":
              num_bag_folds, num_stack_levels = None, None
          elif args.mode == "stack5":
              num_bag_folds, num_stack_levels = 5, 1
          else:
              raise NotImplementedError
          predictor.fit(
              train_df,
              hyperparameters=tabular_hyperparameters,
              num_bag_folds=num_bag_folds,
              num_stack_levels=num_stack_levels,
          )
          leaderboard = predictor.leaderboard()
          leaderboard.to_csv(
              os.path.join(args.exp_path, "leaderboard.csv")
          )
      else:
          raise NotImplementedError
      predictions = np.exp(predictor.predict(test_df))
      submission_df["Sold Price"] = predictions
      submission_df.to_csv(
          os.path.join(args.exp_path, "submission.csv"), index=None
      )
  
file_path: autogluon/examples/automm/kaggle_california_house_price/example_kaggle_house.py
imports: import pandas
  import numpy
  import argparse
  import os
  import random
  from autogluon.tabular import TabularPredictor
  from autogluon.multimodal import MultiModalPredictor
  import torch
label_desc: Use image node_id 5 for calling a global function with example usage: train(args) without return types