Skip to content

Commit 20cad36

Browse files
committed
Pylinting + updating doc string and typing
1 parent 49b80a7 commit 20cad36

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

causal_testing/surrogate/causal_surrogate_assisted.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def shutdown(self, **kwargs):
5858
"""Function to safely exit and shutdown the Simulator"""
5959

6060
@abstractmethod
61-
def run_with_config(self, configuration: Any) -> SimulationResult:
61+
def run_with_config(self, configuration: dict) -> SimulationResult:
6262
"""Run the simulator with the given configuration and return the results in the structure of a
6363
SimulationResult
6464
:param configuration: The configuration required to initialise the Simulation
@@ -84,8 +84,9 @@ def execute(
8484
max_executions: int = 200,
8585
custom_data_aggregator: Callable[[dict, dict], dict] = None,
8686
):
87-
"""For this specific test case, collect the data, run the simulator, check for faults and return the result
88-
and collected data
87+
"""For this specific test case, a search algorithm is used to find the most contradictory point in the input
88+
space which is, therefore, most likely to indicate incorrect behaviour. This cadidate test case is run against
89+
the simulator, checked for faults and the result returned with collected data
8990
:param data_collector: An ObservationalDataCollector which gathers data relevant to the specified scenario
9091
:param max_executions: Maximum number of executions
9192
:param custom_data_aggregator:

causal_testing/surrogate/surrogate_search_algorithms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def generate_fitness_functions(
3434
contradiction_function = self.contradiction_functions[surrogate.expected_relationship]
3535

3636
# The returned fitness function after including required variables into the function's scope
37-
def fitness_function(ga, solution, idx):
37+
def fitness_function(ga, solution, idx): # pylint: disable=unused-argument
3838
surrogate.control_value = solution[0] - self.delta
3939
surrogate.treatment_value = solution[0] + self.delta
4040

0 commit comments

Comments
 (0)