Skip to content

georgysavva/a2c-optuna

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advantage Actor-Critic with Optuna

This project utilizes Optuna to train an A2C policy to solve the HalfCheetah MuJoCo Gym environment.

Local Setup

  1. Create the conda environment
conda env create -f environment.yml --name a2c-optuna
  1. Activate the conda environment:
conda activate a2c-optuna
  1. Install python dependencies
pip install -r requirements.txt
  1. Install the root package
pip install -e .
  1. Login to wandb
wandb login
  1. Spin up a MySQL instance. Optuna requires it to manage studies and trials. The simplest way to do it is through a free, managed cloud service like Aiven

Train the Policy

  1. Create an Optuna study
python a2c_optuna/scripts/create_study.py --study_storage {mysql_connection_url} --env_name HalfCheetah-v4 --study {study_name}
  1. Launch Optuna-managed training
python a2c_optuna/scripts/run.py --wandb_project {wandb_project} --study_name HalfCheetah-v4-{study_name} --study_storage {mysql_connection_url}

Troubleshooting

If you encounter errors related to GLFW, try setting this:

export MUJOCO_GL=egl

About

Advantage Actor-Critic with Optuna

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages