Installation

Note

AutoGluon requires Python version 3.6, 3.7, or 3.8 (3.8 support is experimental). Linux and Mac are the only operating systems fully supported for now (Windows version will be available soon). For troubleshooting the installation process, you can check the Installation FAQ.

Select your preferences below and run the corresponding install commands:

OS: Linux Mac

Linux.
Mac OSX.

Version: PIP Source

PIP Release.
Install AutoGluon from source.

Backend: CPU GPU

Build-in backend for CPU.
Required to run on Nvidia GPUs.

Command:

python3 -m pip install -U pip
python3 -m pip install -U setuptools wheel
python3 -m pip install -U "mxnet<2.0.0"
python3 -m pip install autogluon
python3 -m pip install -U pip
python3 -m pip install -U setuptools wheel

# Here we assume CUDA 10.1 is installed.  You should change the number
# according to your own CUDA version (e.g. mxnet_cu100 for CUDA 10.0).
python3 -m pip install -U "mxnet_cu101<2.0.0"
python3 -m pip install autogluon
python3 -m pip install -U pip
python3 -m pip install -U setuptools wheel
python3 -m pip install -U "mxnet<2.0.0"
git clone https://github.com/awslabs/autogluon
cd autogluon && ./full_install.sh
python3 -m pip install -U pip
python3 -m pip install -U setuptools wheel

# Here we assume CUDA 10.1 is installed.  You should change the number
# according to your own CUDA version (e.g. mxnet_cu102 for CUDA 10.2).
python3 -m pip install -U "mxnet_cu101<2.0.0"
git clone https://github.com/awslabs/autogluon
cd autogluon && ./full_install.sh

Note

If you don’t have them, please first install: XCode, Homebrew, LibOMP. Once you have Homebrew, LibOMP can be installed via:

brew install libomp
python3 -m pip install -U pip
python3 -m pip install -U setuptools wheel
python3 -m pip install -U "mxnet<2.0.0"
python3 -m pip install autogluon

Note

GPU usage is not yet supported on Mac OSX, please use Linux to utilize GPUs in AutoGluon.

Note

If you don’t have them, please first install: XCode, Homebrew, LibOMP. Once you have Homebrew, LibOMP can be installed via:

brew install libomp
python3 -m pip install -U pip
python3 -m pip install -U setuptools wheel
python3 -m pip install -U "mxnet<2.0.0"
git clone https://github.com/awslabs/autogluon
cd autogluon && ./full_install.sh

Note

GPU usage is not yet supported on Mac OSX , please use Linux to utilize GPUs in AutoGluon.

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

  • autogluon.tabular - only 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. These are included in all.

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

    • Experimental 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, or pip install “scikit-learn-intelex<2021.3” after a standard installation of AutoGluon.

  • autogluon.vision - only functionality for computer vision (ImagePredictor, ObjectDetector)

  • autogluon.text - only functionality for natural language processing (TextPredictor)

  • 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).

  • autogluon.extra - miscellaneous extra functionality such as Efficient Neural Architecture Search

  • autogluon.mxnet - miscellaneous extra MXNet functionality.

To install a submodule from source, follow the instructions for installing the entire package from source but replace the line cd autogluon && ./full_install.sh with cd autogluon && python3 -m pip install -e {SUBMODULE_NAME}/{OPTIONAL_DEPENDENCIES}

  • For example, to install autogluon.tabular[lightgbm,catboost] from source, the command would be: cd autogluon && python3 -m pip install -e tabular/[lightgbm,catboost]

Installation FAQ

  • Which version of MXNet does AutoGluon support?

    Currently, AutoGluon supports MXNet>=1.7.0. In order to ensure that you are installing mxnet larger than 1.7.0, you can use

    # For CPU
    python3 -m pip install "mxnet<2.0.0, >=1.7.0"
    
    # For GPU users, CUDA 101
    python3 -m pip install "mxnet_cu101<2.0.0, >=1.7.0"
    
  • I cannot install the package and it reports the error “XXX is not a supported wheel on this platform”.

    One possibility is that you are using an older version of pip. Try to upgrade your pip to a version later than “19.0.0”, e.g., use the following command:

    python3 -m pip install --upgrade pip --user
    python3 -m pip install --upgrade setuptools --user
    
  • I see the error “ERROR: No matching distribution found for mxnet<2.0.0,>=1.7.0b20200713”.

    It might be due to the out-dated pip version. Try to upgrade the pip via:

    python3 -m pip install --upgrade pip --user
    python3 -m pip install --upgrade setuptools --user
    
  • How can I install the customized mxnet (incubating) on SageMaker Notebook?

    You should choose the conda_python3 kernel and then install the MXNet via

    # For CPU users
    python3 -m pip install "mxnet<2.0.0"
    
    # For GPU users, CUDA 101
    python3 -m pip install "mxnet_cu101<2.0.0"
    
  • While running AutoGluon, I get error message “Check failed: e == cudaSuccess: CUDA: initialization error”.

    You may have the wrong version of MXNet installed for your CUDA version. Match the CUDA version carefully when following the installation instructions (nvcc –version).

Next steps