tessl install tessl/pypi-chex@0.1.0Comprehensive utilities library for JAX testing, debugging, and instrumentation
Agent Success
Agent success rate when using this tile
73%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.92x
Baseline
Agent success rate without this tile
38%
A validation utility for comparing nested model configurations and providing detailed diagnostic feedback. The tool should help developers identify mismatches in complex hierarchical data structures with precise location information.
{'a': 1, 'b': 2} and {'a': 1, 'b': 2}), validation passes without errors @test{'a': 1, 'b': 2} and {'a': 1, 'b': 3}), an error is raised that includes the path to the mismatch (specifically 'b') @test{'model': {'layers': 3, 'units': 64}} and {'model': {'layers': 3, 'units': 64}}), validation passes without errors @test{'model': {'config': {'optimizer': {'lr': 0.01}}}} differs from {'model': {'config': {'optimizer': {'lr': 0.001}}}}), an error is raised showing the complete path to the mismatch (specifically 'model.config.optimizer.lr' or similar representation) @test{'weights': [1.0, 2.0, 3.0]} and {'weights': [1.0, 2.0, 3.0]}), validation passes @test{'weights': [1.0, 2.0, 3.0]} and {'weights': [1.0, 5.0, 3.0]}), an error is raised showing the path including the list index (specifically identifying index 1 within 'weights') @test{'data': [1, 2], 'meta': (3, 4)} and {'data': [1, 2], 'meta': (3, 4)}), validation passes @test{'items': [{'coords': (1, 2)}, {'coords': (3, 4)}]} differs from {'items': [{'coords': (1, 2)}, {'coords': (3, 5)}]}), an error is raised with a path showing the complete location (e.g., 'items[1].coords[1]' or equivalent representation) @test{'value': 42} and {'value': 42.0}), an error is raised indicating both the type mismatch and its location @test@generates
def validate_structure_match(expected, actual):
"""
Compares two nested data structures for equality.
Validates that two potentially nested structures (dictionaries, lists, tuples)
have matching values and types throughout. Raises an informative error with
the path to any mismatch.
Args:
expected: The reference structure to compare against
actual: The structure to validate
Raises:
AssertionError: If structures don't match, with a message indicating
the path to the mismatch
"""
passProvides JAX testing utilities with tree comparison and path-based error reporting.
@satisfied-by