Closed mrminy closed 3 years ago
Apparently not getting the same error when using the Runner.run()
interface. Must be something I'm missing in my own training script.
Fine by me to close this issue if you don't want to investigate further..
Hi @mrminy, I think the reason may be that your environment does not actually terminate after 999 steps -- note that implementing max_episode_timesteps()
does not take care of the environment obeying to this limit. The general idea is: if your environment has a "natural" max number of timesteps, then implement Environment.max_episode_timesteps()
(since then the environment really terminates by that point); if this "natural" limit does not exist, don't implement the environment function and instead specify the limit via Environment.create(environment=..., max_episode_timesteps=999)
. In that case, Tensorforce wraps the environment and takes care of termination accordingly. Let me know if that helps.
Hi, developers.
I've got a custom environment set up with Tensorforce. After N episodes of training i get this error posted at the bottom of the issue. From what I've tried, I think it must be related to the
max_episode_timesteps
configuration.I've tried different setups for both the agent configuration and the environment configuration. Both leading to the same error.
Tensorforce = 0.6.2 Python = 3.7 Tensorflow = 2.3.1
Code for creating agent:
Sample code from my environment wrapper:
Stack trace:
Any clues?