Getting Started
Installation
Prerequisites
Currently, we recommend Python>=3.8
, and user can create an virtual environment by
with pip recommended
RLLTE has been published as a Python package in PyPi and can be installed with pip
, ideally by using a virtual environment. Open up a terminal and install RLLTE with:
pip install rllte-core # basic installation
pip install rllte-core[envs] # for pre-defined environments
with git
Open up a terminal and clone the repository from GitHub witg git
:
PyTorch Installation
RLLTE currently supports two kinds of computing devices for acceleration, namely NVIDIA GPU and HUAWEI NPU. Thus users need to install different versions PyTorch for adapting to different devices.
with NVIDIA GPU
Open up a terminal and install PyTorch with:
More information can be found in Get Started.with HUAWEI NPU
Tip
Ascend NPU only supports aarch64!
- Install the dependencies for PyTorch:
-
Download the
.whl
package of PyTorch from Kunpeng file sharing center and install it: -
Install
torch_npu
: -
Install
apex
[Optional]:Training with mixed precision can improve the model performance. You can introduce the Apex mixed precision module or use the AMP module integrated in AscendPyTorch 1.8.1 or later based on the scenario. The Apex module provides four function modes to suit different training with mixed precision scenarios. AMP is only similar to one function of the Apex module, but can be directly used without being introduced. For details about how to use the AMP and Apex modules, see "Mixed Precision Description" in the PyTorch Network Model Porting and Training Guide.wget https://gitee.com/ascend/apex/releases/download/v5.0.rc1-pytorch1.11.0/apex-0.1_ascend-cp39-cp39m-linux_aarch64.whl pip3 install apex-0.1_ascend-cp39-cp39m-linux_aarch64.whl