hbllmutils.testing

Testing utilities for binary language model checks.

This package module exposes the core testing interfaces and convenience functions used to run pass/fail tests against language models. It provides base classes for implementing custom tests, result containers for single and multiple runs, and simple “alive” checks for basic responsiveness.

The module contains the following main components:

  • BinaryTest - Base class for defining binary pass/fail tests

  • BinaryTestResult - Result container for a single test run

  • MultiBinaryTestResult - Aggregated results and statistics

  • hello() - Basic greeting test for model responsiveness

  • ping() - Ping-pong response test for model responsiveness

Note

The detailed implementations of the tests and result classes are provided by the submodules hbllmutils.testing.alive and hbllmutils.testing.base.

Example:

>>> from hbllmutils.testing import hello, ping, BinaryTestResult
>>> result = hello(my_model)
>>> result.passed
True
>>> results = ping(my_model, n=3)
>>> results.passed_count >= 0
True