ml_switcheroo.testing.harness_generator ======================================= .. py:module:: ml_switcheroo.testing.harness_generator .. autoapi-nested-parse:: Integration Test Harness Generator. This module creates self-contained Python scripts for verifying transpilation accuracy. It dynamically extracts source code from the live system to ensure that generated harnesses support ALL registered frameworks (Torch, JAX, Keras, etc.) without hardcoding switch statements. Capabilities: 1. **Dynamic Shim Generation**: Reads `convert()` methods from all registered Framework Adapters and synthesizes a standalone `get_adapter` function. 2. **Fuzzer Inlining**: Extracts the `InputFuzzer` class source code. 3. **Isolation**: Generated scripts run without `ml_switcheroo` installed. Classes ------- .. autoapisummary:: ml_switcheroo.testing.harness_generator.HarnessGenerator Module Contents --------------- .. py:class:: HarnessGenerator Generates standalone verification scripts. .. attribute:: extractor Tool to read source from live objects. :type: CodeExtractor .. py:attribute:: extractor .. py:method:: generate(source_file: pathlib.Path, target_file: pathlib.Path, output_harness: pathlib.Path, source_fw: str = 'torch', target_fw: str = 'jax', semantics: Optional[Dict[str, Any]] = None) -> None Writes the standalone verification script to disk.