ml_switcheroo.generated_tests.generator¶
Generator backend for creating physical Python test files.
It orchestrates the generation of PyTest-compatible files that verify operations across multiple frameworks by using the semantic definitions.
Classes¶
Generates PyTest files for ML operators across frameworks (Torch, JAX, etc.). |
Module Contents¶
- class ml_switcheroo.generated_tests.generator.TestCaseGenerator(semantics_mgr: Any = None)¶
Generates PyTest files for ML operators across frameworks (Torch, JAX, etc.).
Handles argument constraints, type checking, gradient verification, and runtime environment setup via helper modules.
- __test__ = False¶
- semantics_mgr = None¶
- generate(semantics: Dict[str, Any], out_file: pathlib.Path) None¶
Generate a test file based on the provided semantics.
- Parameters:
semantics – Dictionary mapping operator names to their definitions.
out_file – Path to write the generated Python file.