Coverage for src / autoencodix / base / _base_evaluator.py: 78%

9 statements  

« prev     ^ index     » next       coverage.py v7.14.0, created at 2026-05-21 10:09 +0200

1import abc 

2 

3from autoencodix.utils._result import Result 

4 

5 

6class BaseEvaluator(abc.ABC): 

7 @abc.abstractmethod 

8 def evaluate(self, *args): 

9 """ 

10 Evaluate the Autoencodix pipeline on defined machine learning tasks. 

11 

12 Subclasses must implement this method to perform evaluation using the provided arguments. 

13 

14 Args: 

15 *args: Variable length argument list for evaluation parameters. 

16 

17 Returns: 

18 Result: The evaluation result. 

19 """ 

20 pass 

21 

22 @staticmethod 

23 def _expand_reference_methods(reference_methods: list, result: Result) -> list: 

24 """ 

25 Expands the list of reference methods if needed for evaluation. 

26 

27 Args: 

28 reference_methods (list): The list of reference methods to potentially expand. 

29 result (Result): The evaluation result object. 

30 

31 Returns: 

32 list: The (possibly expanded) list of reference methods. 

33 """ 

34 return reference_methods