Installation

Use the package manager pip to install leap-ie.

pip install leap-ie

If running in a Jupyter Notebook, shell commands can be run in a cell if prepended by a ! character:

!pip install leap-ie

During installation leap-ie does not modify any dependencies related to PyTorch or Tensorflow in order to preserve your development environment. However, leap-ie requires that the following version requirements are met:

LibraryVersion

torch

>=1.13.0

torchvision

>=0.14.0

If you do not have the required libraries installed, you can quickly install them by specifying them as extras:

pip install 'leap-ie[with-torch]'

GPU Acceleration

GPU support for each library can be quite complex, especially with Tensorflow, and require aligning driver support with your library version, operating system, python version, system architecture etc.

For this reason, when installing leap-ie with optional extras, we do not automatically install libraries with GPU support out of the box. This is left for the user to set up for their own development environment.

For more information on how to set up GPU acceleration for your chosen library, see the associated docs:

PyTorch setup instructions

Mac Support

When running on a Mac, depending on the system architecture and operating system version, not all operations are supported by PyTorch on the mps backend. If this is the case, running leap-ie will fail with the error:

NotImplementedError: The operator 'aten::grid_sampler_2d_backward' is not currently implemented for the MPS device.

In order to fix this, incompatible operations can be run on the CPU as a fallback. To enable this mode set the environment variable PYTORCH_ENABLE_MPS_FALLBACK=1 before running leap-ie.

Last updated