Environment Logging

After I train a custom environment I want to log the actions, rewards and a few additional parameters to see how the rewards are distributed in the environment.

Which of the following methods would be the best for logging?

  1. Log to csv from inside the environment

  2. Create a log environment wrapper derived from my custom environment

  3. Add logging to the render function of the environment

  4. Other method ?

The offline API output does not help very much because I need to add some additional parameters to log.

  • Medium: It contributes to significant difficulty to complete my task, but I can work around it.

@evo11x , you can log further parameters through the Offline API by adding the parameters to the environment info returned by the step() function or the policy info returned by compute_actions() function.

Later on you can use the JsonReader to read the JSON data.

1 Like

@Lars_Simon_Zehnder Thanks! It is easy to log with the env info parameter

1 Like