Training RL agents using a remote simulator service
In this recipe, we will look at how we can utilize a remote simulator service to train our agent. We will be reusing the SAC agent implementation from one of the previous chapters and will focus on how we can train the SAC, or any of your RL agents for that matter, using an RL simulator that is running elsewhere (on the cloud, for example) as a service. We will leverage the tradegym
server we built in the previous recipe to provide us with the RL simulator service for this recipe.
Let’s get started!
Getting ready
To complete this recipe, and to ensure that you have the latest version, you will first need to activate the tf2rl-cookbook
Python/conda virtual environment. Make sure to update the environment to match the latest conda environment specification file (tfrl-cookbook.yml
) in the cookbook’s code repository. If the following import
statements run without issues, you are ready to get started:
import datetime...