Skip to content

Is there a way to switch an agent to testmode ? #585

Answered by findmyway
3rdCore asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately, no. And this is by design. Because in RL, the testmode! is kind of vague. For example, in some cases, we may still want to explore the action space with a small epsilon value, not simply set it to zero.

Assuming you've read the tutorial, you'll see an Agent is a wrapper of an AbstractPolicy and it is in the training mode naturally. So to test the Agent, I usually extract the inner policy and use it to interact with an environment (of course I still need to do some extra work here, like modify the exploration rate and set the model to testmode!).

For example:

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@3rdCore
Comment options

Answer selected by 3rdCore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants