mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 04:39:03 +08:00
[rllib] Sync filters at end of iteration not start; hierarchical docs (#3769)
This commit is contained in:
@@ -271,6 +271,8 @@ class Agent(Trainable):
|
||||
ev.set_global_vars.remote(self.global_vars)
|
||||
logger.debug("updated global vars: {}".format(self.global_vars))
|
||||
|
||||
result = Trainable.train(self)
|
||||
|
||||
if (self.config.get("observation_filter", "NoFilter") != "NoFilter"
|
||||
and hasattr(self, "local_evaluator")):
|
||||
FilterManager.synchronize(
|
||||
@@ -280,12 +282,12 @@ class Agent(Trainable):
|
||||
logger.debug("synchronized filters: {}".format(
|
||||
self.local_evaluator.filters))
|
||||
|
||||
result = Trainable.train(self)
|
||||
if self.config["callbacks"].get("on_train_result"):
|
||||
self.config["callbacks"]["on_train_result"]({
|
||||
"agent": self,
|
||||
"result": result,
|
||||
})
|
||||
|
||||
return result
|
||||
|
||||
@override(Trainable)
|
||||
|
||||
Reference in New Issue
Block a user