Basic RL model training examples with Stable Baselines3 RL algorithm library uses pytorch.
Tested on Ubuntu 22.04 with Python 3.12.1.
Since the implementations are vectorised, a CUDA capable GPU is required. Clone the repository into your workspace. Then create dirs to save trained models and log files.
cd RL_training_sb3
mkdir -p Training/Saved_Models
mkdir -p Training/Logs
A conda environment is recommended for installing the requirements. Import the conda environment from a .yml file (platform specific: linux-64) and create your_env.
conda env create -n your_env --file rl_env.yml
conda activate your_env
With the environment is set correctly you should be able to run the scripts.
Train and test the cartpole model:
python3 cartpole.py
Visualize training logs with tensorboard(on browser)
tensorboard --logdir={log_path}