Multimodal Data Tables: Tabular, Text, and Image

Open In Colab Open In SageMaker Studio Lab

Tip: Prior to reading this tutorial, it is recommended to have a basic understanding of the TabularPredictor API covered in Predicting Columns in a Table - Quick Start.

In this tutorial, we will train a multi-modal ensemble using data that contains image, text, and tabular features.

Note: A GPU is required for this tutorial in order to train the image and text models. Additionally, GPU installations are required for Torch with appropriate CUDA versions.

The PetFinder Dataset

We will be using the PetFinder dataset. The PetFinder dataset provides information about shelter animals that appear on their adoption profile with the goal to predict the adoption rate of the animal. The end goal is for rescue shelters to use the predicted adoption rate to identify animals whose profiles could be improved so that they can find a home.

Each animal’s adoption profile contains a variety of information, such as pictures of the animal, a text description of the animal, and various tabular features such as age, breed, name, color, and more.

To get started, we first need to download the dataset. Datasets that contain images require more than a CSV file, so the dataset is packaged in a zip file in S3. We will first download it and unzip the contents:

download_dir = './ag_petfinder_tutorial'
zip_file = 'https://automl-mm-bench.s3.amazonaws.com/petfinder_kaggle.zip'
from autogluon.core.utils.loaders import load_zip
load_zip.unzip(zip_file, unzip_dir=download_dir)
Downloading ./ag_petfinder_tutorial/file.zip from https://automl-mm-bench.s3.amazonaws.com/petfinder_kaggle.zip...
  0%|          | 0.00/2.00G [00:00<?, ?iB/s]
  0%|          | 8.38M/2.00G [00:00<00:42, 46.8MiB/s]
  1%|          | 15.0M/2.00G [00:00<00:44, 44.6MiB/s]
  1%|          | 19.5M/2.00G [00:00<00:58, 34.0MiB/s]
  1%|▏         | 25.2M/2.00G [00:00<00:52, 37.3MiB/s]
  2%|▏         | 33.5M/2.00G [00:00<00:49, 39.4MiB/s]
  2%|▏         | 41.9M/2.00G [00:00<00:39, 49.6MiB/s]
  2%|▏         | 49.0M/2.00G [00:01<00:42, 45.8MiB/s]
  3%|▎         | 53.9M/2.00G [00:01<00:50, 38.2MiB/s]
  3%|▎         | 58.7M/2.00G [00:01<00:54, 35.2MiB/s]
  3%|▎         | 67.1M/2.00G [00:01<00:47, 40.3MiB/s]
  4%|▍         | 75.5M/2.00G [00:01<00:41, 45.9MiB/s]
  4%|▍         | 82.1M/2.00G [00:01<00:44, 43.1MiB/s]
  4%|▍         | 86.6M/2.00G [00:02<00:49, 38.4MiB/s]
  5%|▍         | 92.3M/2.00G [00:02<00:53, 35.6MiB/s]
  5%|▌         | 101M/2.00G [00:02<00:48, 39.3MiB/s]
  5%|▌         | 108M/2.00G [00:02<00:41, 45.6MiB/s]
  6%|▌         | 113M/2.00G [00:02<00:47, 40.1MiB/s]
  6%|▌         | 118M/2.00G [00:02<00:43, 43.3MiB/s]
  6%|▋         | 126M/2.00G [00:03<00:39, 47.0MiB/s]
  7%|▋         | 134M/2.00G [00:03<00:39, 47.6MiB/s]
  7%|▋         | 143M/2.00G [00:03<00:36, 50.2MiB/s]
  7%|▋         | 150M/2.00G [00:03<00:45, 40.3MiB/s]
  8%|▊         | 154M/2.00G [00:03<00:46, 39.8MiB/s]
  8%|▊         | 159M/2.00G [00:03<00:50, 36.3MiB/s]
  8%|▊         | 166M/2.00G [00:03<00:43, 41.6MiB/s]
  9%|▊         | 171M/2.00G [00:04<00:50, 36.1MiB/s]
  9%|▊         | 175M/2.00G [00:04<00:49, 37.0MiB/s]
  9%|▉         | 179M/2.00G [00:04<00:49, 37.1MiB/s]
  9%|▉         | 185M/2.00G [00:04<00:45, 39.4MiB/s]
 10%|▉         | 193M/2.00G [00:04<00:36, 49.0MiB/s]
 10%|█         | 200M/2.00G [00:04<00:40, 44.8MiB/s]
 10%|█         | 205M/2.00G [00:04<00:44, 40.2MiB/s]
 10%|█         | 209M/2.00G [00:05<00:53, 33.6MiB/s]
 11%|█         | 213M/2.00G [00:05<00:54, 32.5MiB/s]
 11%|█         | 218M/2.00G [00:05<01:00, 29.5MiB/s]
 11%|█▏        | 225M/2.00G [00:05<00:49, 35.9MiB/s]
 11%|█▏        | 229M/2.00G [00:05<00:54, 32.2MiB/s]
 12%|█▏        | 235M/2.00G [00:05<00:48, 36.5MiB/s]
 12%|█▏        | 243M/2.00G [00:06<00:44, 39.7MiB/s]
 13%|█▎        | 252M/2.00G [00:06<00:41, 42.0MiB/s]
 13%|█▎        | 259M/2.00G [00:06<00:36, 47.6MiB/s]
 13%|█▎        | 264M/2.00G [00:06<00:37, 46.4MiB/s]
 13%|█▎        | 269M/2.00G [00:06<00:37, 46.3MiB/s]
 14%|█▍        | 275M/2.00G [00:06<00:43, 39.3MiB/s]
 14%|█▍        | 279M/2.00G [00:06<00:47, 36.3MiB/s]
 14%|█▍        | 283M/2.00G [00:07<00:55, 31.0MiB/s]
 14%|█▍        | 287M/2.00G [00:07<00:57, 30.0MiB/s]
 15%|█▍        | 294M/2.00G [00:07<00:45, 37.8MiB/s]
 15%|█▌        | 300M/2.00G [00:07<00:48, 35.1MiB/s]
 15%|█▌        | 304M/2.00G [00:07<00:51, 33.0MiB/s]
 16%|█▌        | 310M/2.00G [00:07<00:44, 37.6MiB/s]
 16%|█▌        | 319M/2.00G [00:08<00:41, 40.7MiB/s]
 16%|█▋        | 327M/2.00G [00:08<00:36, 45.4MiB/s]
 17%|█▋        | 335M/2.00G [00:08<00:31, 53.2MiB/s]
 17%|█▋        | 341M/2.00G [00:08<00:37, 44.4MiB/s]
 17%|█▋        | 346M/2.00G [00:08<00:43, 37.9MiB/s]
 18%|█▊        | 352M/2.00G [00:08<00:43, 37.4MiB/s]
 18%|█▊        | 359M/2.00G [00:09<00:48, 33.8MiB/s]
 18%|█▊        | 363M/2.00G [00:09<00:47, 34.3MiB/s]
 18%|█▊        | 367M/2.00G [00:09<00:45, 35.9MiB/s]
 19%|█▊        | 371M/2.00G [00:09<00:48, 33.6MiB/s]
 19%|█▉        | 376M/2.00G [00:09<00:43, 37.1MiB/s]
 19%|█▉        | 380M/2.00G [00:09<00:47, 33.9MiB/s]
 20%|█▉        | 390M/2.00G [00:09<00:32, 49.1MiB/s]
 20%|█▉        | 395M/2.00G [00:09<00:32, 48.8MiB/s]
 20%|██        | 403M/2.00G [00:10<00:37, 42.7MiB/s]
 21%|██        | 409M/2.00G [00:10<00:38, 40.7MiB/s]
 21%|██        | 414M/2.00G [00:10<00:44, 35.2MiB/s]
 21%|██        | 419M/2.00G [00:10<00:42, 37.0MiB/s]
 21%|██▏       | 428M/2.00G [00:10<00:38, 40.8MiB/s]
 22%|██▏       | 436M/2.00G [00:10<00:32, 48.0MiB/s]
 22%|██▏       | 443M/2.00G [00:11<00:29, 52.4MiB/s]
 22%|██▏       | 449M/2.00G [00:11<00:36, 42.6MiB/s]
 23%|██▎       | 454M/2.00G [00:11<00:43, 35.1MiB/s]
 23%|██▎       | 461M/2.00G [00:11<00:37, 41.2MiB/s]
 23%|██▎       | 466M/2.00G [00:11<00:38, 40.0MiB/s]
 24%|██▎       | 470M/2.00G [00:11<00:39, 38.9MiB/s]
 24%|██▍       | 478M/2.00G [00:12<00:38, 39.5MiB/s]
 24%|██▍       | 487M/2.00G [00:12<00:31, 47.6MiB/s]
 25%|██▍       | 495M/2.00G [00:12<00:30, 49.8MiB/s]
 25%|██▌       | 503M/2.00G [00:12<00:27, 54.0MiB/s]
 26%|██▌       | 510M/2.00G [00:12<00:26, 56.3MiB/s]
 26%|██▌       | 516M/2.00G [00:12<00:29, 51.0MiB/s]
 26%|██▌       | 521M/2.00G [00:12<00:30, 48.9MiB/s]
 26%|██▋       | 527M/2.00G [00:12<00:28, 50.7MiB/s]
 27%|██▋       | 532M/2.00G [00:13<00:33, 43.5MiB/s]
 27%|██▋       | 537M/2.00G [00:13<00:42, 34.1MiB/s]
 27%|██▋       | 544M/2.00G [00:13<00:36, 40.2MiB/s]
 27%|██▋       | 548M/2.00G [00:13<00:38, 37.4MiB/s]
 28%|██▊       | 554M/2.00G [00:13<00:38, 37.9MiB/s]
 28%|██▊       | 561M/2.00G [00:13<00:33, 42.2MiB/s]
 28%|██▊       | 565M/2.00G [00:13<00:34, 41.0MiB/s]
 29%|██▊       | 569M/2.00G [00:14<00:43, 32.5MiB/s]
 29%|██▊       | 573M/2.00G [00:14<00:49, 28.7MiB/s]
 29%|██▉       | 577M/2.00G [00:14<00:51, 27.6MiB/s]
 29%|██▉       | 580M/2.00G [00:14<00:51, 27.6MiB/s]
 29%|██▉       | 586M/2.00G [00:14<00:42, 33.4MiB/s]
 30%|██▉       | 591M/2.00G [00:14<00:38, 36.8MiB/s]
 30%|██▉       | 596M/2.00G [00:14<00:39, 35.2MiB/s]
 30%|███       | 602M/2.00G [00:15<00:33, 41.5MiB/s]
 30%|███       | 607M/2.00G [00:15<00:33, 41.8MiB/s]
 31%|███       | 612M/2.00G [00:15<00:34, 39.9MiB/s]
 31%|███       | 619M/2.00G [00:15<00:34, 39.4MiB/s]
 31%|███       | 623M/2.00G [00:15<00:36, 38.0MiB/s]
 32%|███▏      | 630M/2.00G [00:15<00:30, 44.6MiB/s]
 32%|███▏      | 638M/2.00G [00:15<00:29, 46.7MiB/s]
 32%|███▏      | 646M/2.00G [00:15<00:25, 52.4MiB/s]
 33%|███▎      | 654M/2.00G [00:16<00:25, 52.7MiB/s]
 33%|███▎      | 663M/2.00G [00:16<00:26, 50.3MiB/s]
 34%|███▎      | 671M/2.00G [00:16<00:24, 53.3MiB/s]
 34%|███▍      | 678M/2.00G [00:16<00:29, 45.2MiB/s]
 34%|███▍      | 682M/2.00G [00:16<00:30, 42.5MiB/s]
 34%|███▍      | 687M/2.00G [00:16<00:31, 41.5MiB/s]
 35%|███▍      | 691M/2.00G [00:17<00:35, 37.2MiB/s]
 35%|███▍      | 695M/2.00G [00:17<00:36, 36.0MiB/s]
 35%|███▍      | 698M/2.00G [00:17<00:39, 33.0MiB/s]
 35%|███▌      | 703M/2.00G [00:17<00:37, 34.5MiB/s]
 35%|███▌      | 706M/2.00G [00:17<00:39, 32.3MiB/s]
 36%|███▌      | 713M/2.00G [00:17<00:32, 39.0MiB/s]
 36%|███▌      | 721M/2.00G [00:17<00:25, 49.9MiB/s]
 36%|███▋      | 728M/2.00G [00:17<00:25, 50.5MiB/s]
 37%|███▋      | 733M/2.00G [00:18<00:29, 42.5MiB/s]
 37%|███▋      | 738M/2.00G [00:18<00:32, 38.7MiB/s]
 37%|███▋      | 745M/2.00G [00:18<00:28, 43.8MiB/s]
 38%|███▊      | 749M/2.00G [00:18<00:35, 34.8MiB/s]
 38%|███▊      | 755M/2.00G [00:18<00:40, 30.6MiB/s]
 38%|███▊      | 763M/2.00G [00:18<00:33, 36.5MiB/s]
 39%|███▊      | 770M/2.00G [00:19<00:31, 38.5MiB/s]
 39%|███▉      | 774M/2.00G [00:19<00:32, 37.6MiB/s]
 39%|███▉      | 779M/2.00G [00:19<00:31, 38.8MiB/s]
 39%|███▉      | 783M/2.00G [00:19<00:35, 33.9MiB/s]
 40%|███▉      | 789M/2.00G [00:19<00:39, 30.8MiB/s]
 40%|███▉      | 796M/2.00G [00:19<00:39, 30.6MiB/s]
 40%|████      | 799M/2.00G [00:20<00:39, 30.2MiB/s]
 40%|████      | 805M/2.00G [00:20<00:32, 37.2MiB/s]
 41%|████      | 814M/2.00G [00:20<00:26, 44.4MiB/s]
 41%|████      | 821M/2.00G [00:20<00:32, 36.3MiB/s]
 41%|████▏     | 825M/2.00G [00:20<00:35, 32.9MiB/s]
 42%|████▏     | 830M/2.00G [00:20<00:32, 35.3MiB/s]
 42%|████▏     | 837M/2.00G [00:21<00:31, 36.7MiB/s]
 42%|████▏     | 841M/2.00G [00:21<00:34, 33.8MiB/s]
 42%|████▏     | 847M/2.00G [00:21<00:35, 32.1MiB/s]
 43%|████▎     | 856M/2.00G [00:21<00:27, 41.0MiB/s]
 43%|████▎     | 862M/2.00G [00:21<00:43, 26.3MiB/s]
 43%|████▎     | 866M/2.00G [00:22<00:44, 25.4MiB/s]
 44%|████▎     | 872M/2.00G [00:22<00:38, 29.3MiB/s]
 44%|████▍     | 879M/2.00G [00:22<00:39, 28.5MiB/s]
 44%|████▍     | 882M/2.00G [00:22<00:44, 25.2MiB/s]
 44%|████▍     | 887M/2.00G [00:22<00:37, 29.2MiB/s]
 45%|████▍     | 891M/2.00G [00:22<00:36, 29.9MiB/s]
 45%|████▍     | 896M/2.00G [00:23<00:34, 31.7MiB/s]
 45%|████▌     | 899M/2.00G [00:23<00:37, 29.0MiB/s]
 46%|████▌     | 909M/2.00G [00:23<00:25, 43.4MiB/s]
 46%|████▌     | 914M/2.00G [00:23<00:24, 44.2MiB/s]
 46%|████▌     | 923M/2.00G [00:23<00:20, 51.6MiB/s]
 47%|████▋     | 929M/2.00G [00:23<00:21, 49.9MiB/s]
 47%|████▋     | 935M/2.00G [00:23<00:21, 48.6MiB/s]
 47%|████▋     | 940M/2.00G [00:24<00:23, 44.2MiB/s]
 47%|████▋     | 946M/2.00G [00:24<00:26, 38.9MiB/s]
 48%|████▊     | 950M/2.00G [00:24<00:29, 35.0MiB/s]
 48%|████▊     | 956M/2.00G [00:24<00:27, 37.6MiB/s]
 48%|████▊     | 965M/2.00G [00:24<00:23, 43.5MiB/s]
 49%|████▉     | 973M/2.00G [00:24<00:22, 45.4MiB/s]
 49%|████▉     | 981M/2.00G [00:24<00:20, 48.8MiB/s]
 50%|████▉     | 988M/2.00G [00:25<00:27, 36.3MiB/s]
 50%|████▉     | 992M/2.00G [00:25<00:29, 34.3MiB/s]
 50%|█████     | 998M/2.00G [00:25<00:27, 36.3MiB/s]
 50%|█████     | 1.01G/2.00G [00:25<00:24, 40.4MiB/s]
 51%|█████     | 1.01G/2.00G [00:25<00:24, 40.0MiB/s]
 51%|█████     | 1.02G/2.00G [00:26<00:27, 34.9MiB/s]
 51%|█████     | 1.02G/2.00G [00:26<00:27, 35.9MiB/s]
 51%|█████▏    | 1.03G/2.00G [00:26<00:29, 33.1MiB/s]
 52%|█████▏    | 1.03G/2.00G [00:26<00:35, 27.0MiB/s]
 52%|█████▏    | 1.03G/2.00G [00:26<00:43, 22.1MiB/s]
 52%|█████▏    | 1.04G/2.00G [00:26<00:35, 26.6MiB/s]
 52%|█████▏    | 1.04G/2.00G [00:27<00:36, 26.1MiB/s]
 53%|█████▎    | 1.05G/2.00G [00:27<00:30, 31.2MiB/s]
 53%|█████▎    | 1.05G/2.00G [00:27<00:32, 29.5MiB/s]
 53%|█████▎    | 1.05G/2.00G [00:27<00:35, 26.8MiB/s]
 53%|█████▎    | 1.06G/2.00G [00:27<00:38, 24.4MiB/s]
 53%|█████▎    | 1.06G/2.00G [00:27<00:33, 28.0MiB/s]
 53%|█████▎    | 1.07G/2.00G [00:27<00:36, 25.2MiB/s]
 54%|█████▍    | 1.07G/2.00G [00:28<00:27, 33.7MiB/s]
 54%|█████▍    | 1.08G/2.00G [00:28<00:29, 30.9MiB/s]
 54%|█████▍    | 1.08G/2.00G [00:28<00:23, 38.2MiB/s]
 55%|█████▍    | 1.09G/2.00G [00:28<00:22, 41.0MiB/s]
 55%|█████▌    | 1.10G/2.00G [00:28<00:21, 42.3MiB/s]
 55%|█████▌    | 1.11G/2.00G [00:28<00:18, 48.1MiB/s]
 56%|█████▌    | 1.11G/2.00G [00:28<00:20, 42.4MiB/s]
 56%|█████▌    | 1.12G/2.00G [00:29<00:20, 42.3MiB/s]
 56%|█████▌    | 1.12G/2.00G [00:29<00:23, 36.9MiB/s]
 56%|█████▋    | 1.12G/2.00G [00:29<00:23, 37.4MiB/s]
 57%|█████▋    | 1.13G/2.00G [00:29<00:15, 53.9MiB/s]
 57%|█████▋    | 1.14G/2.00G [00:29<00:15, 54.0MiB/s]
 57%|█████▋    | 1.15G/2.00G [00:29<00:16, 50.2MiB/s]
 58%|█████▊    | 1.15G/2.00G [00:30<00:28, 29.6MiB/s]
 58%|█████▊    | 1.16G/2.00G [00:30<00:23, 35.1MiB/s]
 58%|█████▊    | 1.17G/2.00G [00:30<00:18, 44.6MiB/s]
 59%|█████▉    | 1.17G/2.00G [00:30<00:18, 45.4MiB/s]
 59%|█████▉    | 1.18G/2.00G [00:30<00:20, 40.0MiB/s]
 59%|█████▉    | 1.18G/2.00G [00:30<00:20, 39.5MiB/s]
 60%|█████▉    | 1.19G/2.00G [00:30<00:17, 46.8MiB/s]
 60%|██████    | 1.20G/2.00G [00:30<00:15, 50.6MiB/s]
 60%|██████    | 1.21G/2.00G [00:31<00:14, 55.3MiB/s]
 61%|██████    | 1.21G/2.00G [00:31<00:15, 50.3MiB/s]
 61%|██████    | 1.22G/2.00G [00:31<00:16, 46.9MiB/s]
 61%|██████▏   | 1.22G/2.00G [00:31<00:15, 49.4MiB/s]
 62%|██████▏   | 1.23G/2.00G [00:31<00:14, 51.5MiB/s]
 62%|██████▏   | 1.24G/2.00G [00:31<00:17, 44.3MiB/s]
 62%|██████▏   | 1.24G/2.00G [00:31<00:19, 39.5MiB/s]
 63%|██████▎   | 1.25G/2.00G [00:32<00:18, 39.8MiB/s]
 63%|██████▎   | 1.26G/2.00G [00:32<00:19, 37.2MiB/s]
 63%|██████▎   | 1.26G/2.00G [00:32<00:22, 33.3MiB/s]
 63%|██████▎   | 1.26G/2.00G [00:32<00:26, 27.2MiB/s]
 64%|██████▎   | 1.27G/2.00G [00:32<00:23, 31.4MiB/s]
 64%|██████▍   | 1.27G/2.00G [00:33<00:27, 25.9MiB/s]
 64%|██████▍   | 1.28G/2.00G [00:33<00:27, 25.9MiB/s]
 64%|██████▍   | 1.28G/2.00G [00:33<00:23, 29.8MiB/s]
 64%|██████▍   | 1.28G/2.00G [00:33<00:23, 30.1MiB/s]
 65%|██████▍   | 1.29G/2.00G [00:33<00:21, 32.1MiB/s]
 65%|██████▌   | 1.30G/2.00G [00:33<00:18, 38.6MiB/s]
 66%|██████▌   | 1.31G/2.00G [00:33<00:16, 42.2MiB/s]
 66%|██████▌   | 1.32G/2.00G [00:34<00:14, 48.4MiB/s]
 66%|██████▋   | 1.33G/2.00G [00:34<00:13, 48.8MiB/s]
 67%|██████▋   | 1.33G/2.00G [00:34<00:12, 52.6MiB/s]
 67%|██████▋   | 1.34G/2.00G [00:34<00:13, 49.4MiB/s]
 68%|██████▊   | 1.35G/2.00G [00:34<00:13, 47.3MiB/s]
 68%|██████▊   | 1.36G/2.00G [00:34<00:13, 46.0MiB/s]
 69%|██████▊   | 1.37G/2.00G [00:35<00:12, 48.7MiB/s]
 69%|██████▉   | 1.38G/2.00G [00:35<00:11, 55.1MiB/s]
 69%|██████▉   | 1.38G/2.00G [00:35<00:10, 58.3MiB/s]
 70%|██████▉   | 1.39G/2.00G [00:35<00:11, 53.7MiB/s]
 70%|██████▉   | 1.39G/2.00G [00:35<00:12, 49.1MiB/s]
 70%|███████   | 1.40G/2.00G [00:35<00:12, 47.6MiB/s]
 71%|███████   | 1.41G/2.00G [00:35<00:13, 42.8MiB/s]
 71%|███████   | 1.41G/2.00G [00:36<00:18, 30.8MiB/s]
 71%|███████   | 1.42G/2.00G [00:36<00:29, 19.8MiB/s]
 71%|███████   | 1.42G/2.00G [00:36<00:26, 21.7MiB/s]
 71%|███████▏  | 1.42G/2.00G [00:36<00:21, 26.8MiB/s]
 72%|███████▏  | 1.43G/2.00G [00:36<00:21, 26.7MiB/s]
 72%|███████▏  | 1.43G/2.00G [00:37<00:16, 33.4MiB/s]
 72%|███████▏  | 1.44G/2.00G [00:37<00:14, 38.5MiB/s]
 72%|███████▏  | 1.45G/2.00G [00:37<00:16, 32.3MiB/s]
 73%|███████▎  | 1.45G/2.00G [00:37<00:14, 36.4MiB/s]
 73%|███████▎  | 1.46G/2.00G [00:37<00:13, 39.4MiB/s]
 73%|███████▎  | 1.46G/2.00G [00:37<00:13, 38.6MiB/s]
 74%|███████▎  | 1.47G/2.00G [00:37<00:11, 45.0MiB/s]
 74%|███████▍  | 1.48G/2.00G [00:38<00:10, 48.8MiB/s]
 74%|███████▍  | 1.48G/2.00G [00:38<00:08, 57.4MiB/s]
 75%|███████▍  | 1.49G/2.00G [00:38<00:09, 52.6MiB/s]
 75%|███████▌  | 1.50G/2.00G [00:38<00:08, 58.3MiB/s]
 76%|███████▌  | 1.51G/2.00G [00:38<00:09, 53.9MiB/s]
 76%|███████▌  | 1.51G/2.00G [00:38<00:11, 41.9MiB/s]
 76%|███████▌  | 1.52G/2.00G [00:38<00:10, 43.5MiB/s]
 76%|███████▋  | 1.53G/2.00G [00:38<00:09, 50.2MiB/s]
 77%|███████▋  | 1.53G/2.00G [00:39<00:09, 47.5MiB/s]
 77%|███████▋  | 1.54G/2.00G [00:39<00:10, 42.3MiB/s]
 77%|███████▋  | 1.54G/2.00G [00:39<00:11, 39.4MiB/s]
 77%|███████▋  | 1.55G/2.00G [00:39<00:11, 38.7MiB/s]
 78%|███████▊  | 1.55G/2.00G [00:39<00:10, 42.9MiB/s]
 78%|███████▊  | 1.56G/2.00G [00:39<00:10, 42.3MiB/s]
 79%|███████▊  | 1.57G/2.00G [00:40<00:09, 42.9MiB/s]
 79%|███████▉  | 1.58G/2.00G [00:40<00:09, 43.7MiB/s]
 79%|███████▉  | 1.59G/2.00G [00:40<00:08, 48.1MiB/s]
 80%|███████▉  | 1.59G/2.00G [00:40<00:07, 53.9MiB/s]
 80%|████████  | 1.60G/2.00G [00:40<00:08, 45.1MiB/s]
 80%|████████  | 1.60G/2.00G [00:41<00:12, 31.2MiB/s]
 81%|████████  | 1.61G/2.00G [00:41<00:10, 36.9MiB/s]
 81%|████████  | 1.62G/2.00G [00:41<00:09, 40.3MiB/s]
 82%|████████▏ | 1.63G/2.00G [00:41<00:07, 47.1MiB/s]
 82%|████████▏ | 1.63G/2.00G [00:41<00:09, 40.0MiB/s]
 82%|████████▏ | 1.64G/2.00G [00:41<00:09, 38.9MiB/s]
 82%|████████▏ | 1.64G/2.00G [00:41<00:09, 36.1MiB/s]
 83%|████████▎ | 1.65G/2.00G [00:42<00:08, 41.4MiB/s]
 83%|████████▎ | 1.66G/2.00G [00:42<00:08, 41.2MiB/s]
 83%|████████▎ | 1.66G/2.00G [00:42<00:10, 33.4MiB/s]
 84%|████████▎ | 1.67G/2.00G [00:42<00:08, 39.2MiB/s]
 84%|████████▍ | 1.68G/2.00G [00:42<00:08, 39.7MiB/s]
 84%|████████▍ | 1.69G/2.00G [00:42<00:07, 43.2MiB/s]
 85%|████████▍ | 1.69G/2.00G [00:43<00:07, 43.0MiB/s]
 85%|████████▍ | 1.70G/2.00G [00:43<00:08, 34.3MiB/s]
 85%|████████▌ | 1.70G/2.00G [00:43<00:07, 41.8MiB/s]
 86%|████████▌ | 1.71G/2.00G [00:43<00:06, 45.5MiB/s]
 86%|████████▌ | 1.71G/2.00G [00:43<00:06, 43.3MiB/s]
 86%|████████▌ | 1.72G/2.00G [00:43<00:07, 37.4MiB/s]
 87%|████████▋ | 1.73G/2.00G [00:43<00:06, 41.7MiB/s]
 87%|████████▋ | 1.73G/2.00G [00:44<00:05, 43.7MiB/s]
 87%|████████▋ | 1.74G/2.00G [00:44<00:06, 38.9MiB/s]
 87%|████████▋ | 1.74G/2.00G [00:44<00:06, 37.8MiB/s]
 88%|████████▊ | 1.75G/2.00G [00:44<00:05, 43.8MiB/s]
 88%|████████▊ | 1.76G/2.00G [00:44<00:04, 47.9MiB/s]
 89%|████████▊ | 1.77G/2.00G [00:44<00:04, 49.9MiB/s]
 89%|████████▉ | 1.78G/2.00G [00:44<00:03, 57.1MiB/s]
 89%|████████▉ | 1.78G/2.00G [00:45<00:03, 53.1MiB/s]
 90%|████████▉ | 1.79G/2.00G [00:45<00:04, 45.0MiB/s]
 90%|█████████ | 1.80G/2.00G [00:45<00:03, 51.3MiB/s]
 90%|█████████ | 1.80G/2.00G [00:45<00:04, 45.4MiB/s]
 91%|█████████ | 1.81G/2.00G [00:45<00:03, 53.0MiB/s]
 91%|█████████ | 1.82G/2.00G [00:45<00:03, 47.6MiB/s]
 91%|█████████▏| 1.83G/2.00G [00:45<00:03, 54.5MiB/s]
 92%|█████████▏| 1.83G/2.00G [00:46<00:04, 35.5MiB/s]
 92%|█████████▏| 1.84G/2.00G [00:46<00:04, 35.6MiB/s]
 92%|█████████▏| 1.84G/2.00G [00:46<00:04, 32.9MiB/s]
 92%|█████████▏| 1.85G/2.00G [00:46<00:04, 37.4MiB/s]
 93%|█████████▎| 1.85G/2.00G [00:46<00:03, 35.7MiB/s]
 93%|█████████▎| 1.86G/2.00G [00:47<00:02, 44.7MiB/s]
 94%|█████████▎| 1.87G/2.00G [00:47<00:03, 42.1MiB/s]
 94%|█████████▍| 1.87G/2.00G [00:47<00:03, 33.5MiB/s]
 94%|█████████▍| 1.88G/2.00G [00:47<00:02, 38.9MiB/s]
 94%|█████████▍| 1.89G/2.00G [00:47<00:02, 42.6MiB/s]
 95%|█████████▍| 1.89G/2.00G [00:47<00:02, 42.9MiB/s]
 95%|█████████▌| 1.90G/2.00G [00:47<00:02, 44.7MiB/s]
 95%|█████████▌| 1.90G/2.00G [00:48<00:01, 47.6MiB/s]
 96%|█████████▌| 1.91G/2.00G [00:48<00:01, 51.2MiB/s]
 96%|█████████▌| 1.92G/2.00G [00:48<00:01, 44.5MiB/s]
 96%|█████████▋| 1.92G/2.00G [00:48<00:01, 45.0MiB/s]
 96%|█████████▋| 1.93G/2.00G [00:48<00:01, 39.0MiB/s]
 97%|█████████▋| 1.93G/2.00G [00:48<00:01, 35.2MiB/s]
 97%|█████████▋| 1.94G/2.00G [00:48<00:01, 35.4MiB/s]
 97%|█████████▋| 1.94G/2.00G [00:49<00:01, 33.6MiB/s]
 98%|█████████▊| 1.95G/2.00G [00:49<00:01, 37.6MiB/s]
 98%|█████████▊| 1.95G/2.00G [00:49<00:00, 42.4MiB/s]
 98%|█████████▊| 1.96G/2.00G [00:49<00:00, 38.4MiB/s]
 98%|█████████▊| 1.96G/2.00G [00:49<00:00, 39.4MiB/s]
 99%|█████████▉| 1.97G/2.00G [00:49<00:00, 49.7MiB/s]
 99%|█████████▉| 1.98G/2.00G [00:49<00:00, 44.6MiB/s]
 99%|█████████▉| 1.98G/2.00G [00:49<00:00, 40.8MiB/s]
100%|█████████▉| 1.99G/2.00G [00:50<00:00, 40.0MiB/s]
100%|██████████| 2.00G/2.00G [00:50<00:00, 39.8MiB/s]

Now that the data is download and unzipped, let’s take a look at the contents:

import os
os.listdir(download_dir)
['file.zip', 'petfinder_processed']

‘file.zip’ is the original zip file we downloaded, and ‘petfinder_processed’ is a directory containing the dataset files.

dataset_path = download_dir + '/petfinder_processed'
os.listdir(dataset_path)
['train.csv', 'train_images', 'test.csv', 'test_images', 'dev.csv']

Here we can see the train, test, and dev CSV files, as well as two directories: ‘test_images’ and ‘train_images’ which contain the image JPG files.

Note: We will be using the dev data as testing data as dev contains the ground truth labels for showing scores via predictor.leaderboard.

Let’s take a peek at the first 10 files inside of the ‘train_images’ directory:

os.listdir(dataset_path + '/train_images')[:10]
['d765ae877-1.jpg',
 '756025f7c-2.jpg',
 'e1a2d9477-4.jpg',
 '6d18707ee-2.jpg',
 '96607bca0-5.jpg',
 'fde58f7fa-10.jpg',
 'be7b65c23-3.jpg',
 'dd36ab692-3.jpg',
 '2d8db1c19-2.jpg',
 '53037f091-2.jpg']

As expected, these are the images we will be training with alongside the other features.

Next, we will load the train and dev CSV files:

import pandas as pd

train_data = pd.read_csv(f'{dataset_path}/train.csv', index_col=0)
test_data = pd.read_csv(f'{dataset_path}/dev.csv', index_col=0)
train_data.head(3)
Type Name Age Breed1 Breed2 Gender Color1 Color2 Color3 MaturitySize ... Quantity Fee State RescuerID VideoAmt Description PetID PhotoAmt AdoptionSpeed Images
10721 1 Elbi 2 307 307 2 5 0 0 3 ... 1 0 41336 e9a86209c54f589ba72c345364cf01aa 0 I'm looking for people to adopt my dog e4b90955c 4.0 4 train_images/e4b90955c-1.jpg;train_images/e4b9...
13114 2 Darling 4 266 0 1 1 0 0 2 ... 1 0 41401 01f954cdf61526daf3fbeb8a074be742 0 Darling was born at the back lane of Jalan Alo... a0c1384d1 5.0 3 train_images/a0c1384d1-1.jpg;train_images/a0c1...
13194 1 Wolf 3 307 0 1 1 2 0 2 ... 1 0 41332 6e19409f2847326ce3b6d0cec7e42f81 0 I found Wolf about a month ago stuck in a drai... cf357f057 7.0 4 train_images/cf357f057-1.jpg;train_images/cf35...

3 rows × 25 columns

Looking at the first 3 examples, we can tell that there is a variety of tabular features, a text description (‘Description’), and an image path (‘Images’).

For the PetFinder dataset, we will try to predict the speed of adoption for the animal (‘AdoptionSpeed’), grouped into 5 categories. This means that we are dealing with a multi-class classification problem.

label = 'AdoptionSpeed'
image_col = 'Images'

Preparing the image column

Let’s take a look at what a value in the image column looks like:

train_data[image_col].iloc[0]
'train_images/e4b90955c-1.jpg;train_images/e4b90955c-2.jpg;train_images/e4b90955c-3.jpg;train_images/e4b90955c-4.jpg'

Currently, AutoGluon only supports one image per row. Since the PetFinder dataset contains one or more images per row, we first need to preprocess the image column to only contain the first image of each row.

train_data[image_col] = train_data[image_col].apply(lambda ele: ele.split(';')[0])
test_data[image_col] = test_data[image_col].apply(lambda ele: ele.split(';')[0])

train_data[image_col].iloc[0]
'train_images/e4b90955c-1.jpg'

AutoGluon loads images based on the file path provided by the image column.

Here we update the path to point to the correct location on disk:

def path_expander(path, base_folder):
    path_l = path.split(';')
    return ';'.join([os.path.abspath(os.path.join(base_folder, path)) for path in path_l])

train_data[image_col] = train_data[image_col].apply(lambda ele: path_expander(ele, base_folder=dataset_path))
test_data[image_col] = test_data[image_col].apply(lambda ele: path_expander(ele, base_folder=dataset_path))

train_data[image_col].iloc[0]
'/home/ci/autogluon/docs/tutorials/tabular/ag_petfinder_tutorial/petfinder_processed/train_images/e4b90955c-1.jpg'
train_data.head(3)
Type Name Age Breed1 Breed2 Gender Color1 Color2 Color3 MaturitySize ... Quantity Fee State RescuerID VideoAmt Description PetID PhotoAmt AdoptionSpeed Images
10721 1 Elbi 2 307 307 2 5 0 0 3 ... 1 0 41336 e9a86209c54f589ba72c345364cf01aa 0 I'm looking for people to adopt my dog e4b90955c 4.0 4 /home/ci/autogluon/docs/tutorials/tabular/ag_p...
13114 2 Darling 4 266 0 1 1 0 0 2 ... 1 0 41401 01f954cdf61526daf3fbeb8a074be742 0 Darling was born at the back lane of Jalan Alo... a0c1384d1 5.0 3 /home/ci/autogluon/docs/tutorials/tabular/ag_p...
13194 1 Wolf 3 307 0 1 1 2 0 2 ... 1 0 41332 6e19409f2847326ce3b6d0cec7e42f81 0 I found Wolf about a month ago stuck in a drai... cf357f057 7.0 4 /home/ci/autogluon/docs/tutorials/tabular/ag_p...

3 rows × 25 columns

Analyzing an example row

Now that we have preprocessed the image column, let’s take a look at an example row of data and display the text description and the picture.

example_row = train_data.iloc[1]

example_row
Type                                                             2
Name                                                       Darling
Age                                                              4
Breed1                                                         266
Breed2                                                           0
Gender                                                           1
Color1                                                           1
Color2                                                           0
Color3                                                           0
MaturitySize                                                     2
FurLength                                                        1
Vaccinated                                                       2
Dewormed                                                         2
Sterilized                                                       2
Health                                                           1
Quantity                                                         1
Fee                                                              0
State                                                        41401
RescuerID                         01f954cdf61526daf3fbeb8a074be742
VideoAmt                                                         0
Description      Darling was born at the back lane of Jalan Alo...
PetID                                                    a0c1384d1
PhotoAmt                                                       5.0
AdoptionSpeed                                                    3
Images           /home/ci/autogluon/docs/tutorials/tabular/ag_p...
Name: 13114, dtype: object
example_row['Description']
'Darling was born at the back lane of Jalan Alor and was foster by a feeder. All his siblings had died of accident. His mother and grandmother had just been spayed. Darling make a great condo/apartment cat. He love to play a lot. He would make a great companion for someone looking for a cat to love.'
example_image = example_row['Images']

from IPython.display import Image, display
pil_img = Image(filename=example_image)
display(pil_img)
../../_images/0f51cf2080119477e6ffba340375c2d0decdd4f1361f8aafc490d55c0ff27824.jpg

The PetFinder dataset is fairly large. For the purposes of the tutorial, we will sample 500 rows for training.

Training on large multi-modal datasets can be very computationally intensive, especially if using the best_quality preset in AutoGluon. When prototyping, it is recommended to sample your data to get an idea of which models are worth training, then gradually train with larger amounts of data and longer time limits as you would with any other machine learning algorithm.

train_data = train_data.sample(500, random_state=0)

Constructing the FeatureMetadata

Next, let’s see what AutoGluon infers the feature types to be by constructing a FeatureMetadata object from the training data:

from autogluon.tabular import FeatureMetadata
feature_metadata = FeatureMetadata.from_df(train_data)

print(feature_metadata)
('float', [])        :  1 | ['PhotoAmt']
('int', [])          : 19 | ['Type', 'Age', 'Breed1', 'Breed2', 'Gender', ...]
('object', [])       :  4 | ['Name', 'RescuerID', 'PetID', 'Images']
('object', ['text']) :  1 | ['Description']

Notice that FeatureMetadata automatically identified the column ‘Description’ as text, so we don’t need to manually specify that it is text.

In order to leverage images, we need to tell AutoGluon which column contains the image path. We can do this by specifying a FeatureMetadata object and adding the ‘image_path’ special type to the image column. We later pass this custom FeatureMetadata to TabularPredictor.fit.

feature_metadata = feature_metadata.add_special_types({image_col: ['image_path']})

print(feature_metadata)
('float', [])              :  1 | ['PhotoAmt']
('int', [])                : 19 | ['Type', 'Age', 'Breed1', 'Breed2', 'Gender', ...]
('object', [])             :  3 | ['Name', 'RescuerID', 'PetID']
('object', ['image_path']) :  1 | ['Images']
('object', ['text'])       :  1 | ['Description']

Specifying the hyperparameters

Next, we need to specify the models we want to train with. This is done via the hyperparameters argument to TabularPredictor.fit.

AutoGluon has a predefined config that works well for multimodal datasets called ‘multimodal’. We can access it via:

from autogluon.tabular.configs.hyperparameter_configs import get_hyperparameter_config
hyperparameters = get_hyperparameter_config('multimodal')

hyperparameters
{'NN_TORCH': {},
 'GBM': [{},
  {'extra_trees': True, 'ag_args': {'name_suffix': 'XT'}},
  {'learning_rate': 0.03,
   'num_leaves': 128,
   'feature_fraction': 0.9,
   'min_data_in_leaf': 3,
   'ag_args': {'name_suffix': 'Large',
    'priority': 0,
    'hyperparameter_tune_kwargs': None}}],
 'CAT': {},
 'XGB': {},
 'AG_AUTOMM': {}}

This hyperparameter config will train a variety of Tabular models as well as finetune an Electra BERT text model, and a ResNet image model.

Fitting with TabularPredictor

Now we will train a TabularPredictor on the dataset, using the feature metadata and hyperparameters we defined prior. This TabularPredictor will leverage tabular, text, and image features all at once.

from autogluon.tabular import TabularPredictor
predictor = TabularPredictor(label=label).fit(
    train_data=train_data,
    hyperparameters=hyperparameters,
    feature_metadata=feature_metadata,
    time_limit=900,
)
No path specified. Models will be saved in: "AutogluonModels/ag-20250528_005247"
Verbosity: 2 (Standard Logging)
=================== System Info ===================
AutoGluon Version:  1.3.2b20250527
Python Version:     3.11.10
Operating System:   Linux
Platform Machine:   x86_64
Platform Version:   #1 SMP Wed Mar 12 14:53:59 UTC 2025
CPU Count:          8
Memory Avail:       28.59 GB / 30.95 GB (92.4%)
Disk Space Avail:   205.71 GB / 255.99 GB (80.4%)
===================================================
No presets specified! To achieve strong results with AutoGluon, it is recommended to use the available presets. Defaulting to `'medium'`...
	Recommended Presets (For more details refer to https://auto.gluon.ai/stable/tutorials/tabular/tabular-essentials.html#presets):
	presets='experimental' : New in v1.2: Pre-trained foundation model + parallel fits. The absolute best accuracy without consideration for inference speed. Does not support GPU.
	presets='best'         : Maximize accuracy. Recommended for most users. Use in competitions and benchmarks.
	presets='high'         : Strong accuracy with fast inference speed.
	presets='good'         : Good accuracy with very fast inference speed.
	presets='medium'       : Fast training time, ideal for initial prototyping.
Beginning AutoGluon training ... Time limit = 900s
AutoGluon will save models to "/home/ci/autogluon/docs/tutorials/tabular/AutogluonModels/ag-20250528_005247"
Train Data Rows:    500
Train Data Columns: 24
Label Column:       AdoptionSpeed
AutoGluon infers your prediction problem is: 'multiclass' (because dtype of label-column == int, but few unique label-values observed).
	5 unique label values:  [np.int64(2), np.int64(3), np.int64(4), np.int64(0), np.int64(1)]
	If 'multiclass' is not the correct problem_type, please manually specify the problem_type parameter during Predictor init (You may specify problem_type as one of: ['binary', 'multiclass', 'regression', 'quantile'])
Problem Type:       multiclass
Preprocessing data ...
Train Data Class Count: 5
Using Feature Generators to preprocess the data ...
Fitting AutoMLPipelineFeatureGenerator...
	Available Memory:                    29277.22 MB
	Train Data (Original)  Memory Usage: 0.45 MB (0.0% of available memory)
	Stage 1 Generators:
		Fitting AsTypeFeatureGenerator...
			Note: Converting 1 features to boolean dtype as they only contain 2 unique values.
	Stage 2 Generators:
		Fitting FillNaFeatureGenerator...
	Stage 3 Generators:
		Fitting IdentityFeatureGenerator...
		Fitting IdentityFeatureGenerator...
			Fitting RenameFeatureGenerator...
		Fitting CategoryFeatureGenerator...
			Fitting CategoryMemoryMinimizeFeatureGenerator...
		Fitting TextSpecialFeatureGenerator...
			Fitting BinnedFeatureGenerator...
			Fitting DropDuplicatesFeatureGenerator...
		Fitting TextNgramFeatureGenerator...
			Fitting CountVectorizer for text features: ['Description']
			CountVectorizer fit with vocabulary size = 170
		Fitting IdentityFeatureGenerator...
		Fitting IsNanFeatureGenerator...
	Stage 4 Generators:
		Fitting DropUniqueFeatureGenerator...
	Stage 5 Generators:
		Fitting DropDuplicatesFeatureGenerator...
	Unused Original Features (Count: 1): ['PetID']
		These features were not used to generate any of the output features. Add a feature generator compatible with these features to utilize them.
		Features can also be unused if they carry very little information, such as being categorical but having almost entirely unique values or being duplicates of other features.
		These features do not need to be present at inference time.
		('object', []) : 1 | ['PetID']
	Types of features in original data (raw dtype, special dtypes):
		('float', [])              :  1 | ['PhotoAmt']
		('int', [])                : 18 | ['Type', 'Age', 'Breed1', 'Breed2', 'Gender', ...]
		('object', [])             :  2 | ['Name', 'RescuerID']
		('object', ['image_path']) :  1 | ['Images']
		('object', ['text'])       :  1 | ['Description']
	Types of features in processed data (raw dtype, special dtypes):
		('category', [])                    :   2 | ['Name', 'RescuerID']
		('category', ['text_as_category'])  :   1 | ['Description']
		('float', [])                       :   1 | ['PhotoAmt']
		('int', [])                         :  17 | ['Age', 'Breed1', 'Breed2', 'Gender', 'Color1', ...]
		('int', ['binned', 'text_special']) :  24 | ['Description.char_count', 'Description.word_count', 'Description.capital_ratio', 'Description.lower_ratio', 'Description.digit_ratio', ...]
		('int', ['bool'])                   :   1 | ['Type']
		('int', ['text_ngram'])             : 171 | ['__nlp__.about', '__nlp__.active', '__nlp__.active and', '__nlp__.adopt', '__nlp__.adopted', ...]
		('object', ['image_path'])          :   1 | ['Images']
		('object', ['text'])                :   1 | ['Description_raw_text']
	1.6s = Fit runtime
	23 features in original data used to generate 219 features in processed data.
	Train Data (Processed) Memory Usage: 0.52 MB (0.0% of available memory)
Data preprocessing and feature engineering runtime = 1.68s ...
AutoGluon will gauge predictive performance using evaluation metric: 'accuracy'
	To change this, specify the eval_metric parameter of Predictor()
Automatically generating train/validation split with holdout_frac=0.2, Train Rows: 400, Val Rows: 100
User-specified model hyperparameters to be fit:
{
	'NN_TORCH': [{}],
	'GBM': [{}, {'extra_trees': True, 'ag_args': {'name_suffix': 'XT'}}, {'learning_rate': 0.03, 'num_leaves': 128, 'feature_fraction': 0.9, 'min_data_in_leaf': 3, 'ag_args': {'name_suffix': 'Large', 'priority': 0, 'hyperparameter_tune_kwargs': None}}],
	'CAT': [{}],
	'XGB': [{}],
	'AG_AUTOMM': [{}],
}
Fitting 7 L1 models, fit_strategy="sequential" ...
Fitting model: LightGBM ... Training model for up to 898.32s of the 898.32s of remaining time.
	0.35	 = Validation score   (accuracy)
	0.74s	 = Training   runtime
	0.0s	 = Validation runtime
Fitting model: LightGBMXT ... Training model for up to 897.57s of the 897.57s of remaining time.
	0.34	 = Validation score   (accuracy)
	0.61s	 = Training   runtime
	0.0s	 = Validation runtime
Fitting model: CatBoost ... Training model for up to 896.94s of the 896.94s of remaining time.
	0.31	 = Validation score   (accuracy)
	2.27s	 = Training   runtime
	0.01s	 = Validation runtime
Fitting model: XGBoost ... Training model for up to 894.65s of the 894.65s of remaining time.
	0.34	 = Validation score   (accuracy)
	1.16s	 = Training   runtime
	0.01s	 = Validation runtime
Fitting model: NeuralNetTorch ... Training model for up to 893.47s of the 893.47s of remaining time.
	0.34	 = Validation score   (accuracy)
	4.29s	 = Training   runtime
	0.02s	 = Validation runtime
Fitting model: LightGBMLarge ... Training model for up to 889.16s of the 889.16s of remaining time.
	0.36	 = Validation score   (accuracy)
	2.31s	 = Training   runtime
	0.0s	 = Validation runtime
Fitting model: MultiModalPredictor ... Training model for up to 886.84s of the 886.84s of remaining time.
INFO: Seed set to 0
INFO: Using 16bit Automatic Mixed Precision (AMP)
INFO: GPU available: True (cuda), used: True
INFO: TPU available: False, using: 0 TPU cores
INFO: HPU available: False, using: 0 HPUs
INFO: LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]
INFO: 
  | Name              | Type                | Params | Mode 
------------------------------------------------------------------
0 | model             | MultimodalFusionMLP | 207 M  | train
1 | validation_metric | MulticlassAccuracy  | 0      | train
2 | loss_func         | CrossEntropyLoss    | 0      | train
------------------------------------------------------------------
207 M     Trainable params
0         Non-trainable params
207 M     Total params
828.189   Total estimated model params size (MB)
1168      Modules in train mode
0         Modules in eval mode
INFO: Epoch 0, global step 1: 'val_accuracy' reached 0.26000 (best 0.26000), saving model to '/home/ci/autogluon/docs/tutorials/tabular/AutogluonModels/ag-20250528_005247/models/MultiModalPredictor/automm_model/epoch=0-step=1.ckpt' as top 3
INFO: Epoch 0, global step 4: 'val_accuracy' reached 0.29000 (best 0.29000), saving model to '/home/ci/autogluon/docs/tutorials/tabular/AutogluonModels/ag-20250528_005247/models/MultiModalPredictor/automm_model/epoch=0-step=4.ckpt' as top 3
INFO: Epoch 1, global step 5: 'val_accuracy' reached 0.29000 (best 0.29000), saving model to '/home/ci/autogluon/docs/tutorials/tabular/AutogluonModels/ag-20250528_005247/models/MultiModalPredictor/automm_model/epoch=1-step=5.ckpt' as top 3
INFO: Epoch 1, global step 8: 'val_accuracy' reached 0.31000 (best 0.31000), saving model to '/home/ci/autogluon/docs/tutorials/tabular/AutogluonModels/ag-20250528_005247/models/MultiModalPredictor/automm_model/epoch=1-step=8.ckpt' as top 3
INFO: Epoch 2, global step 9: 'val_accuracy' reached 0.31000 (best 0.31000), saving model to '/home/ci/autogluon/docs/tutorials/tabular/AutogluonModels/ag-20250528_005247/models/MultiModalPredictor/automm_model/epoch=2-step=9.ckpt' as top 3
INFO: Epoch 2, global step 12: 'val_accuracy' was not in top 3
INFO: Epoch 3, global step 13: 'val_accuracy' reached 0.31000 (best 0.31000), saving model to '/home/ci/autogluon/docs/tutorials/tabular/AutogluonModels/ag-20250528_005247/models/MultiModalPredictor/automm_model/epoch=3-step=13.ckpt' as top 3
INFO: Epoch 3, global step 16: 'val_accuracy' was not in top 3
INFO: Epoch 4, global step 17: 'val_accuracy' was not in top 3
INFO: Epoch 4, global step 20: 'val_accuracy' was not in top 3
INFO: Epoch 5, global step 21: 'val_accuracy' was not in top 3
INFO: Epoch 5, global step 24: 'val_accuracy' was not in top 3
INFO: Epoch 6, global step 25: 'val_accuracy' was not in top 3
INFO: Epoch 6, global step 28: 'val_accuracy' was not in top 3
INFO: Using default `ModelCheckpoint`. Consider installing `litmodels` package to enable `LitModelCheckpoint` for automatic upload to the Lightning model registry.
INFO: Using default `ModelCheckpoint`. Consider installing `litmodels` package to enable `LitModelCheckpoint` for automatic upload to the Lightning model registry.
INFO: Using default `ModelCheckpoint`. Consider installing `litmodels` package to enable `LitModelCheckpoint` for automatic upload to the Lightning model registry.
INFO: Using default `ModelCheckpoint`. Consider installing `litmodels` package to enable `LitModelCheckpoint` for automatic upload to the Lightning model registry.
	0.31	 = Validation score   (accuracy)
	332.14s	 = Training   runtime
	3.01s	 = Validation runtime
Fitting model: WeightedEnsemble_L2 ... Training model for up to 360.00s of the 548.71s of remaining time.
	Ensemble Weights: {'LightGBMLarge': 0.615, 'XGBoost': 0.308, 'MultiModalPredictor': 0.077}
	0.38	 = Validation score   (accuracy)
	0.06s	 = Training   runtime
	0.0s	 = Validation runtime
AutoGluon training complete, total runtime = 351.37s ... Best model: WeightedEnsemble_L2 | Estimated inference throughput: 33.1 rows/s (100 batch size)
TabularPredictor saved. To load, use: predictor = TabularPredictor.load("/home/ci/autogluon/docs/tutorials/tabular/AutogluonModels/ag-20250528_005247")

After the predictor is fit, we can take a look at the leaderboard and see the performance of the various models:

leaderboard = predictor.leaderboard(test_data)
Load pretrained checkpoint: /home/ci/autogluon/docs/tutorials/tabular/AutogluonModels/ag-20250528_005247/models/MultiModalPredictor/automm_model/model.ckpt
INFO: Using default `ModelCheckpoint`. Consider installing `litmodels` package to enable `LitModelCheckpoint` for automatic upload to the Lightning model registry.

That’s all it takes to train with image, text, and tabular data (at the same time) using AutoGluon!

For more tutorials, refer to Predicting Columns in a Table - Quick Start and Predicting Columns in a Table - In Depth.