Skip to content

Commit

Permalink
do not print names of components that return an empty string as their…
Browse files Browse the repository at this point in the history
… state to avoid leaking the names of the metrics to the agent.

PiperOrigin-RevId: 588337340
Change-Id: I731a0d5e943b9428009dd15734783d87bb2decc3
  • Loading branch information
jzleibo authored and copybara-github committed Dec 6, 2023
1 parent 1577c65 commit 10a505f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion concordia/agents/basic_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 10a505f

Please sign in to comment.