langtest.transform.base.ITests#
- class ITests#
Bases:
ABC
An abstract base class for defining different types of tests.
- __init__()#
Methods
__init__
()Returns a list of available test scenarios for the test class.
run
(sample_list, model, **kwargs)Runs the specified tests on the given data and returns a list of results.
Runs the test and returns the results.
Attributes
alias_name
- abstract static available_tests()#
Returns a list of available test scenarios for the test class.
- Returns:
A list of available test scenarios for the test class.
- Return type:
List[str]
- classmethod run(sample_list: Dict[str, List[Sample]], model: ModelAPI, **kwargs) List[Sample] #
Runs the specified tests on the given data and returns a list of results.
- Parameters:
sample_list (Dict[str, List[Sample]]) – A dictionary mapping test scenario names to a list of Sample objects.
model (ModelAPI) – A ModelAPI object representing the model to be tested.
- Returns:
A list of Sample objects with the test results.
- Return type:
List[Sample]
- abstract transform()#
Runs the test and returns the results.
- Returns:
A list of results from running the test.
- Return type:
List[Results]