Installing AutoGluon

Note

We recommend most users to install with uv or pip. The uv install of AutoGluon is the version we actively benchmark and test on. The Conda install may have subtle differences in installed dependencies that could impact performance and stability, and we recommend trying uv or pip if you run into issues with Conda.

pip install -U pip
pip install -U setuptools wheel
pip install autogluon --extra-index-url https://download.pytorch.org/whl/cpu
pip install -U pip
pip install -U setuptools wheel
pip install autogluon
# Install UV package installer (faster than pip)
pip install -U uv

# Install AutoGluon
python -m uv pip install autogluon --extra-index-url https://download.pytorch.org/whl/cpu
# Install UV package installer (faster than pip)
pip install -U uv

# Install AutoGluon with GPU support
python -m uv pip install autogluon
conda create -n ag python=3.10
conda activate ag
conda install -c conda-forge mamba
mamba install -c conda-forge autogluon
mamba install -c conda-forge "ray-tune >=2.10.0,<2.49" "ray-default >=2.10.0,<2.49"  # install ray for faster training
conda create -n ag python=3.11
conda activate ag
conda install -c conda-forge mamba
mamba install -c conda-forge autogluon "pytorch=*=cuda*"
mamba install -c conda-forge "ray-tune >=2.10.0,<2.49" "ray-default >=2.10.0,<2.49"  # install ray for faster training
pip install -U uv
git clone https://github.com/autogluon/autogluon
cd autogluon && uv sync --all-extras --index https://download.pytorch.org/whl/cpu
pip install -U uv
git clone https://github.com/autogluon/autogluon
cd autogluon && uv sync --all-extras

LightGBM support on MacOS (LibOMP)

AutoGluon dependency LightGBM uses libomp for multi-threading. Install it via Homebrew:

brew install libomp
pip install -U pip
pip install -U setuptools wheel

pip install autogluon --extra-index-url https://download.pytorch.org/whl/cpu

Warning

GPU usage is not yet supported on macOS, please use Linux or Windows to utilize GPUs in AutoGluon.

LightGBM support on MacOS (LibOMP)

AutoGluon dependency LightGBM uses libomp for multi-threading. Install it via Homebrew:

brew install libomp
# Install UV package installer (faster than pip)
pip install -U uv

# Install AutoGluon
python -m uv pip install autogluon --extra-index-url https://download.pytorch.org/whl/cpu

Warning

GPU usage is not yet supported on macOS, please use Linux or Windows to utilize GPUs in AutoGluon.

conda create -n ag python=3.11
conda activate ag
conda install -c conda-forge mamba
mamba install -c conda-forge autogluon 

Warning

GPU usage is not yet supported on macOS, please use Linux or Windows to utilize GPUs in AutoGluon.

LightGBM support on MacOS (LibOMP)

AutoGluon dependency LightGBM uses libomp for multi-threading. Install it via Homebrew:

brew install libomp
pip install -U uv
git clone https://github.com/autogluon/autogluon
cd autogluon && uv sync --all-extras

Warning

GPU usage is not yet supported on macOS, please use Linux or Windows to utilize GPUs in AutoGluon.

Note

If you run into difficulties installing AutoGluon on Windows, please provide details in this GitHub Issue.

To install AutoGluon on Windows, it is recommended to use Anaconda:

  1. Install Anaconda

    • If Anaconda is already installed but is an old version, follow this guide to update

  2. Open Anaconda Prompt (anaconda3)

  3. Inside Anaconda Prompt, do the following:

conda create -n myenv python=3.11 -y
conda activate myenv
  1. Continue with the remaining installation steps using the conda environment created above

pip install -U pip
pip install -U setuptools wheel
pip install autogluon --extra-index-url https://download.pytorch.org/whl/cpu

Note

If you run into difficulties installing AutoGluon on Windows, please provide details in this GitHub Issue.

To install AutoGluon on Windows, it is recommended to use Anaconda:

  1. Install Anaconda

    • If Anaconda is already installed but is an old version, follow this guide to update

  2. Open Anaconda Prompt (anaconda3)

  3. Inside Anaconda Prompt, do the following:

conda create -n myenv python=3.11 cudatoolkit=11.3 -y
conda activate myenv
  1. Install the proper GPU PyTorch version by following the PyTorch Install Documentation (Recommended). Alternatively, use the following command:

pip install torchvision==0.19.1 --force-reinstall --extra-index-url https://download.pytorch.org/whl/cu121
  1. Sanity check that your installation is valid and can detect your GPU via testing in Python:

import torch
print(torch.cuda.is_available())  # Should be True
print(torch.cuda.device_count())  # Should be > 0
  1. Continue with the remaining installation steps using the conda environment created above

pip install -U pip
pip install -U setuptools wheel
pip install autogluon

Note

If you run into difficulties installing AutoGluon on Windows, please provide details in this GitHub Issue.

To install AutoGluon on Windows, it is recommended to use Anaconda:

  1. Install Anaconda

    • If Anaconda is already installed but is an old version, follow this guide to update

  2. Open Anaconda Prompt (anaconda3)

  3. Inside Anaconda Prompt, do the following:

conda create -n myenv python=3.11 -y
conda activate myenv
  1. Continue with the remaining installation steps using the conda environment created above

# Install UV package installer (faster than pip)
pip install -U uv

# Install AutoGluon
python -m uv pip install autogluon --extra-index-url https://download.pytorch.org/whl/cpu

Note

If you run into difficulties installing AutoGluon on Windows, please provide details in this GitHub Issue.

To install AutoGluon on Windows, it is recommended to use Anaconda:

  1. Install Anaconda

    • If Anaconda is already installed but is an old version, follow this guide to update

  2. Open Anaconda Prompt (anaconda3)

  3. Inside Anaconda Prompt, do the following:

conda create -n myenv python=3.11 cudatoolkit=11.3 -y
conda activate myenv
  1. Install the proper GPU PyTorch version by following the PyTorch Install Documentation (Recommended). Alternatively, use the following command:

pip install torchvision==0.19.1 --force-reinstall --extra-index-url https://download.pytorch.org/whl/cu121
  1. Sanity check that your installation is valid and can detect your GPU via testing in Python:

import torch
print(torch.cuda.is_available())  # Should be True
print(torch.cuda.device_count())  # Should be > 0
  1. Continue with the remaining installation steps using the conda environment created above

# Install UV package installer (faster than pip)
pip install -U uv

# Install AutoGluon with GPU support
python -m uv pip install autogluon
conda create -n ag python=3.10
conda activate ag
conda install -c conda-forge mamba
mamba install -c conda-forge autogluon
mamba install -c conda-forge "ray-tune >=2.10.0,<2.49" "ray-default >=2.10.0,<2.49"  # install ray for faster training
conda create -n ag python=3.11
conda activate ag
conda install -c conda-forge mamba
mamba install -c conda-forge -c pytorch -c nvidia autogluon "pytorch=*=*cuda*"
mamba install -c conda-forge "ray-tune >=2.10.0,<2.49" "ray-default >=2.10.0,<2.49"  # install ray for faster training

Note

If you run into difficulties installing AutoGluon on Windows, please provide details in this GitHub Issue.

To install AutoGluon on Windows, it is recommended to use Anaconda:

  1. Install Anaconda

    • If Anaconda is already installed but is an old version, follow this guide to update

  2. Open Anaconda Prompt (anaconda3)

  3. Inside Anaconda Prompt, do the following:

conda create -n myenv python=3.11 -y
conda activate myenv
  1. Continue with the remaining installation steps using the conda environment created above

pip install -U uv
git clone https://github.com/autogluon/autogluon
cd autogluon && uv sync --all-extras --index https://download.pytorch.org/whl/cpu

Note

If you run into difficulties installing AutoGluon on Windows, please provide details in this GitHub Issue.

To install AutoGluon on Windows, it is recommended to use Anaconda:

  1. Install Anaconda

    • If Anaconda is already installed but is an old version, follow this guide to update

  2. Open Anaconda Prompt (anaconda3)

  3. Inside Anaconda Prompt, do the following:

conda create -n myenv python=3.11 cudatoolkit=11.3 -y
conda activate myenv
  1. Install the proper GPU PyTorch version by following the PyTorch Install Documentation (Recommended). Alternatively, use the following command:

pip install torchvision==0.19.1 --force-reinstall --extra-index-url https://download.pytorch.org/whl/cu121
  1. Sanity check that your installation is valid and can detect your GPU via testing in Python:

import torch
print(torch.cuda.is_available())  # Should be True
print(torch.cuda.device_count())  # Should be > 0
  1. Continue with the remaining installation steps using the conda environment created above

pip install -U uv
git clone https://github.com/autogluon/autogluon
cd autogluon && uv sync --all-extras
Install specific AutoGluon modules and dependencies

AutoGluon is modularized into sub-modules specialized for tabular, multimodal, or time series data. You can reduce the number of dependencies required by solely installing a specific sub-module via: pip install <submodule>, where <submodule> may be one of the following options:

  • autogluon.tabular - functionality for tabular data (TabularPredictor)

    • The default installation of autogluon.tabular standalone is a skeleton installation.

    • Install via pip install autogluon.tabular[all] to get the same installation of tabular as via pip install autogluon

    • Available optional dependencies: lightgbm,catboost,xgboost,fastai,tabm,mitra,ray. These are included in all.

    • Optional dependencies not included in all: tabicl,tabpfn,tabdpt,tabpfnmix,realmlp,nori,interpret,imodels,skex,skl2onnx.

    • To run autogluon.tabular with only the optional LightGBM and CatBoost models for example, you can do: pip install autogluon.tabular[lightgbm,catboost]

    • Install via pip install autogluon.tabular[tabarena] to get all plus every model the extreme preset uses: tabdpt,tabicl,tabpfn,realmlp,nori.

    • Optional dependency: tabicl. This will enable the TabICL model, used in the extreme preset (key=TABICL).

    • Optional dependency: tabpfn. This will enable the TabPFN models: RealTabPFN-v2 (key=REALTABPFN-V2), used in the extreme preset, along with RealTabPFN-v2.5 (key=REALTABPFN-V2.5), TabPFN-2.6 (key=TABPFN-2.6) and TabPFN-3 (key=TABPFN-3). The TABPFNV2 key was renamed to REALTABPFN-V2 in v1.5.0. RealTabPFN-v2 is free for commercial use; commercial use of RealTabPFN-v2.5, TabPFN-2.6 and TabPFN-3 requires a license from Prior Labs (license FAQ).

    • Optional dependency: tabdpt. This will enable the TabDPT model, used in the extreme preset (key=TABDPT), along with TabDPT-Turbo (key=TABDPT-TURBO).

    • Optional dependency: tabm. This will enable the TabM model, used in the extreme preset (key=TABM). Included in all.

    • Optional dependency: mitra. This will enable the Mitra model, used in the extreme preset (key=MITRA). Included in all.

    • Optional dependency: tabpfnmix. This will enable the TabPFNMix model (key=TABPFNMIX). Refer to mitra, which is an improved version of tabpfnmix.

    • Optional dependency: realmlp. This will enable the RealMLP model (key=REALMLP).

    • Optional dependency: nori. This will enable the Nori model, used in the extreme preset (key=NORI). Regression only.

    • Optional dependency: skex. This will speedup KNN models by 25x in training and inference on CPU. Use pip install autogluon.tabular[all,skex] to enable. Note: Not compatible with ARM processors.

    • Optional dependency: interpret. This will install the interpret package and allow you to fit EBM models (key=EBM).

    • Experimental optional dependency: imodels. This will install the imodels package and allow you to fit interpretable models in TabularPredictor.

    • Optional dependency: skl2onnx. This will enable ONNX model compilation via predictor.compile() on supported models.

  • autogluon.multimodal - functionality for image, text, and multimodal problems. Focus on deep learning models.

    • To try object detection functionality using MultiModalPredictor, please install additional dependencies via mim install "mmcv==2.1.0", pip install "mmdet==3.2.0" and pip install pycocotools. Note that Windows users should also install pycocotools by: pip install pycocotools-windows, but it only supports python 3.6/3.7/3.8.

  • autogluon.timeseries - only functionality for time series data (TimeSeriesPredictor).

  • autogluon.common - helper functionality. Not useful standalone.

  • autogluon.core - only core functionality (Searcher/Scheduler) useful for hyperparameter tuning of arbitrary code/models.

  • autogluon.features - only functionality for feature generation / feature preprocessing pipelines (primarily related to Tabular data).

To install a submodule from source, follow the instructions for installing the entire package from source but replace the final uv sync --all-extras line with uv sync --package autogluon.{SUBMODULE_NAME} --extra {OPTIONAL_DEPENDENCY} ... (sibling autogluon.* packages resolve automatically from the workspace). See Installing from source for details.

  • For example, to install autogluon.tabular[lightgbm,catboost] from source, the command would be: cd autogluon && uv sync --package autogluon.tabular --extra lightgbm --extra catboost

To install all AutoGluon optional dependencies:

pip install autogluon && pip install autogluon.tabular[all,tests]

AutoGluon in Amazon SageMaker Studio

Amazon SageMaker Distribution is the docker environment for data science used as the default image of JupyterLab notebook instances and Code Editor in Amazon SageMaker Studio. The AutoGluon library comes pre-installed in all releases of Amazon SageMaker Distribution. SageMaker Studio users can access AutoGluon’s automation capabilities without needing to install anything additional.

To find the AutoGluon and PyTorch versions available in a SageMaker Distribution image, refer to the RELEASE.md file for your image version in the SageMaker Distribution GitHub repository.

Install from source for a specific pull-request

To build AutoGluon from source for the purposes of testing a pull-request, you can clone and install the exact branch by following these instructions. This process is useful if you are a code reviewer or want to test if a PR fixes a bug you have reported.

In this example, we are using this PR. It is from the user innixma and the PR branch is called accel_preprocess_bool. This information is provided in the PR page directly under the title of the PR (where it says into autogluon:master from Innixma:accel_preprocess_bool).

# Edit these two variables to change which PR / branch is being installed
GITHUB_USER=innixma
BRANCH=accel_preprocess_bool

pip install -U pip
git clone --depth 1 --single-branch --branch ${BRANCH} --recurse-submodules https://github.com/${GITHUB_USER}/autogluon.git
./autogluon/full_install.sh

Note that the above example is only valid while the branch still exists. A user could delete the branch after the PR is merged, so this advice is primarily focused on unmerged PRs.

Install nightly builds

Nightly builds have the latest unreleased features but have not been as rigorously tested as stable releases. Prefer the stable install instructions above unless you specifically need an unreleased fix.

pip install -U uv
python -m uv pip install --pre autogluon
M1 and M2 Apple Silicon

Apple Silicon is now supported via the conda installation instructions outlined above. conda-forge will install the GPU version if a user’s machine supports it.

Kaggle

AutoGluon is actively used by the Kaggle community. You can find thousands of Kaggle notebooks using AutoGluon here.

For Kaggle competitions that allow internet access in notebooks, you can install AutoGluon via the following line at the start of the notebook:

!pip install -U autogluon > /dev/null

For competitions without internet access, you can obtain AutoGluon by using one of the Kaggle community’s packaged AutoGluon artifacts in the form of a Kaggle dataset.

If you encounter issues after installing AutoGluon, try restarting the notebook runtime to ensure a clean memory state.

Trouble Shooting

If you encounter installation issues not covered here, please create a GitHub issue.