Skip to content

Latest commit

 

History

History
102 lines (70 loc) · 4.27 KB

INSTALL.md

File metadata and controls

102 lines (70 loc) · 4.27 KB

Installation Guide

Below, we detail how to install Darts using either conda or pip.

From PyPI

Install Darts with all models except the ones from optional dependencies (Prophet, LightGBM, CatBoost, see more on that here): pip install darts.

If this fails on your platform, please follow the official installation guide for PyTorch, then try installing Darts again.

As some dependencies are relatively big or involve non-Python dependencies, we also maintain the u8darts package, which provides the following alternate lighter install options:

  • Install Darts with all available models: pip install "u8darts[all]"
  • Install core only (without neural networks, Prophet, LightGBM and Catboost): pip install u8darts
  • Install core + Prophet + LightGBM + CatBoost: pip install "u8darts[notorch]"
  • Install core + neural networks (PyTorch): pip install "u8darts[torch]" (equivalent to pip install darts)

From conda-forge

Create a conda environment (e.g., for Python 3.10): (after installing conda):

conda create --name <env-name> python=3.10

Activate the environment

conda activate <env-name>

As some models have relatively heavy dependencies, we provide four conda-forge packages:

  • Install Darts with all available models: conda install -c conda-forge -c pytorch u8darts-all
  • Install core only (without neural networks, Prophet, LightGBM and Catboost): conda install -c conda-forge u8darts
  • Install core + Prophet + LightGBM + CatBoost: conda install -c conda-forge u8darts-notorch
  • Install core + neural networks (PyTorch): conda install -c conda-forge -c pytorch u8darts-torch

Other Information

Enabling Optional Dependencies

As of version 0.25.0, the default darts package does not install Prophet, CatBoost, and LightGBM dependencies anymore, because their build processes were too often causing issues. We continue supporting the model wrappers Prophet, CatBoostModel, and LightGBMModel in Darts though. If you want to use any of them, you will need to manually install the corresponding packages (or install a Darts flavor as described above).

Prophet

Install the prophet package (version 1.1.1 or more recent) using the Prophet install guide

CatBoostModel

Install the catboost package (version 1.0.6 or more recent) using the CatBoost install guide

LightGBMModel

Install the lightgbm package (version 3.2.0 or more recent) using the LightGBM install guide

Enabling GPU support

Darts relies on PyTorch for the neural network models. For GPU support, please follow the instructions to install CUDA in the PyTorch installation guide.

From Docker:

We also provide a Docker image with everything set up for you. For this setup to work you need to have a Docker service installed. You can get it at Docker website.

Pull the latest Darts image.

docker pull unit8/darts:latest

To run it in interactive mode:

docker run -it -p 8888:8888 unit8/darts:latest bash

After that, you can also launch a Jupyter lab / notebook session:

jupyter lab --ip 0.0.0.0 --no-browser --allow-root

Then copy and paste the URL provided by the docker container into your browser to access Jupyter notebook.

Tests

The gradle setup works best when used in a python environment, but the only requirement is to have pip installed for Python 3+

To run all tests at once just run

./gradlew test_all

alternatively you can run

./gradlew unitTest_all # to run only unittests
./gradlew coverageTest # to run coverage
./gradlew lint         # to run linter

To run the tests for specific flavours of the library, replace _all with _core, _prophet, _pmdarima or _torch.

Documentation

To build documentation locally just run

./gradlew buildDocs

After that docs will be available in ./docs/build/html directory. You can just open ./docs/build/html/index.html using your favourite browser.