From 10a505fa65e1668bb0f63e69e99886f5bf4f65ab Mon Sep 17 00:00:00 2001 From: "Joel Z. Leibo" Date: Wed, 6 Dec 2023 01:41:43 -0800 Subject: [PATCH] do not print names of components that return an empty string as their state to avoid leaking the names of the metrics to the agent. PiperOrigin-RevId: 588337340 Change-Id: I731a0d5e943b9428009dd15734783d87bb2decc3 --- concordia/agents/basic_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/concordia/agents/basic_agent.py b/concordia/agents/basic_agent.py index ad63845e..67530c6e 100644 --- a/concordia/agents/basic_agent.py +++ b/concordia/agents/basic_agent.py @@ -175,7 +175,7 @@ def state(self): with self._state_lock: return '\n'.join( f"{self._agent_name}'s " + (comp.name() + ':\n' + comp.state()) - for comp in self._components.values() + for comp in self._components.values() if comp.state() ) def _maybe_update(self):