From 5a1a40a51525a69a73100eaa1498608814f96dca Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 18 Jul 2022 15:03:52 -0400 Subject: [PATCH] BB: Add set_maximum_depth() --- envs/monkey_zoo/blackbox/test_configurations/utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/envs/monkey_zoo/blackbox/test_configurations/utils.py b/envs/monkey_zoo/blackbox/test_configurations/utils.py index b84b51e0f..8934c8931 100644 --- a/envs/monkey_zoo/blackbox/test_configurations/utils.py +++ b/envs/monkey_zoo/blackbox/test_configurations/utils.py @@ -55,6 +55,15 @@ def add_credential_collectors( return replace(agent_configuration, credential_collectors=tuple(credential_collectors)) +def set_maximum_depth( + agent_configuration: AgentConfiguration, maximum_depth: int +) -> AgentConfiguration: + propagation_configuration = replace( + agent_configuration.propagation, maximum_depth=maximum_depth + ) + return replace_propagation_configuration(agent_configuration, propagation_configuration) + + def replace_exploitation_configuration( agent_configuration: AgentConfiguration, exploitation_configuration: ExploitationConfiguration ) -> AgentConfiguration: