Shortcuts

Installation

You can install the package either from PyPI or from source. Choose the latter if you want to access the files included the experiments folder or if you want to contribute to the project.

From PyPI

Check that you have PyTorch (cpu or gpu) installed on your system. Then, install the package via pip:

pip install torch-uncertainty

To update the package, run:

pip install -U torch-uncertainty

From source

To install the project from source, you can use pip directly.

Again, with PyTorch already installed, clone the repository with:

git clone https://github.com/ENSTA-U2IS-AI/torch-uncertainty.git
cd torch-uncertainty

Create a new conda environment and activate it:

conda create -n uncertainty python=3.10
conda activate uncertainty

Install the package using pip in editable mode:

pip install -e .

If PyTorch is not installed, the latest version will be installed automatically.

Options

You can install the package with the following options:

  • dev: includes all the dependencies for the development of the package

    including ruff and the pre-commits hooks.

  • docs: includes all the dependencies for the documentation of the package

    based on sphinx

  • image: includes all the dependencies for the image processing module

    including opencv and scikit-image

  • tabular: includes pandas

  • all: includes all the aforementioned dependencies

For example, to install the package with the dependencies for the development and the documentation, run the following command. It is a mandatory step if you want to contribute to the project.

pip install -e .[dev,docs]

To install the package with all the dependencies, run:

pip install -e .[all]