mirror of
https://github.com/wassname/ray.git
synced 2026-08-07 11:27:43 +08:00
[rllib] set daemon status for PolicyServerInput thread (#7862)
This commit is contained in:
Vendored
+1
@@ -90,6 +90,7 @@ class PolicyServerInput(ThreadingMixIn, HTTPServer, InputReader):
|
||||
logger.info("Starting connector server at {}:{}".format(address, port))
|
||||
logger.info("")
|
||||
thread = threading.Thread(name="server", target=self.serve_forever)
|
||||
thread.daemon = True
|
||||
thread.start()
|
||||
|
||||
@override(InputReader)
|
||||
|
||||
@@ -162,8 +162,6 @@ class MultiAgentSampleBatchBuilder:
|
||||
|
||||
# Append into policy batches and reset
|
||||
for agent_id, post_batch in sorted(post_batches.items()):
|
||||
self.policy_builders[self.agent_to_policy[agent_id]].add_batch(
|
||||
post_batch)
|
||||
if self.postp_callback:
|
||||
self.postp_callback({
|
||||
"episode": episode,
|
||||
@@ -172,6 +170,8 @@ class MultiAgentSampleBatchBuilder:
|
||||
"post_batch": post_batch,
|
||||
"all_pre_batches": pre_batches,
|
||||
})
|
||||
self.policy_builders[self.agent_to_policy[agent_id]].add_batch(
|
||||
post_batch)
|
||||
|
||||
self.agent_builders.clear()
|
||||
self.agent_to_policy.clear()
|
||||
|
||||
Reference in New Issue
Block a user