ml_switcheroo.cli.matrix¶
Compatibility Matrix rendering logic.
This module generates the visual comparison table between supported frameworks. It retrieves operations from the SemanticsManager and intersects them with the dynamically discovered frameworks from the registry.
- Sorting Order:
Columns are sorted based on ui_priority defined in Framework Adapters. Typically: PyTorch (0) -> JAX (10) -> NumPy (20) -> TensorFlow (30) -> …
Classes¶
Logic for generating the Framework Compatibility Matrix. |
Module Contents¶
- class ml_switcheroo.cli.matrix.CompatibilityMatrix(semantics: ml_switcheroo.semantics.manager.SemanticsManager)¶
Logic for generating the Framework Compatibility Matrix.
It dynamically queries the Knowledge Base and Framework Registry to create a grid of [Operations x Frameworks].
- semantics¶
- console¶
- get_json() List[Dict[str, str]]¶
Returns the compatibility matrix as properly structured data.
Useful for downstream tools, web frontends, or CI parsers.
- Returns:
Rows of the matrix. Structure:
[ { "operation": "Conv2d", "tier": "Neural", "torch": "✅", "jax": "🧩" } ]
- Return type:
List[Dict]
- render() None¶
Generates and prints the compatibility table to the standard output. Uses
rich.Tablefor formatting.