[rllib] Fix broken check in eval mode for IMPALA #7217

This commit is contained in:
Eric Liang
2020-02-19 11:54:30 -08:00
committed by GitHub
parent e8941b1b79
commit 399424c418
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -258,7 +258,7 @@ def add_behaviour_logits(policy):
def validate_config(policy, obs_space, action_space, config):
if config["vtrace"]:
if config["vtrace"] and not config["in_evaluation"]:
assert config["batch_mode"] == "truncate_episodes", \
"Must use `truncate_episodes` batch mode with V-trace."
+3
View File
@@ -179,6 +179,8 @@ COMMON_CONFIG = {
# Number of episodes to run per evaluation period. If using multiple
# evaluation workers, we will run at least this many episodes total.
"evaluation_num_episodes": 10,
# Internal flag that is set to True for evaluation workers.
"in_evaluation": False,
# Typical usage is to pass extra args to evaluation env creator
# and to disable exploration by computing deterministic actions
"evaluation_config": {
@@ -576,6 +578,7 @@ class Trainer(Trainable):
extra_config.update({
"batch_mode": "complete_episodes",
"batch_steps": 1,
"in_evaluation": True,
})
logger.debug(
"using evaluation_config: {}".format(extra_config))