Skip to contents

install_gluonts(): Installs GluonTS Probabilisitic Deep Learning Time Series Forecasting Software using reticulate::py_install().

  • A Python Environment will be created named r-gluonts.

  • When loaded with library(modeltime.gluonts), the modeltime.gluonts R package will connect to the r-gluonts Python environment by default. See "Details" for connecting to custom python environments.

  • If fresh_install, will remove any prior installations of the "r-gluonts" python environment

  • If include_pytorch, will install additional dependencies needed for the optional pytorch backend that is available in some algorithms.

uninstall_gluonts(): Will remove the "r-gluonts" python environment and python packages

Usage

install_gluonts(fresh_install = FALSE, include_pytorch = FALSE)

uninstall_gluonts()

Arguments

fresh_install

If TRUE, will remove prior installations of the r-glounts conda environment to setup for a fresh installation. This can be useful if errors appear during upgrades. Default: FALSE.

include_pytorch

If TRUE, will install torch. Needed for Torch implementation of deep_ar(). Default: FALSE.

Details

Options for Connecting to Python

  • Recommended Use Pre-Configured Python Environment: Use install_gluonts() to install GluonTS Python Libraries into a conda environment named 'r-gluonts'.

  • Advanced Use a Custom Python Environment: Before running library(modeltime.gluonts), use Sys.setenv(GLUONTS_PYTHON = 'path/to/python') to set the path of your python executable in an environment that has 'gluonts', 'mxnet', 'numpy', 'pandas', and 'pathlib' available as dependencies.

Package Manager Support (Python Environment)

  • Conda Environments: Currently, install_gluonts() supports Conda and Miniconda Environments.

  • Virtual Environments: are not currently supported with the default installation method, install_gluonts(). However, you can connect to virtual environment that you have created using Sys.setenv(GLUONTS_PYTHON = 'path/to/python') prior to running library(modeltime.ensemble).

Examples

if (FALSE) {
install_gluonts()
}