ml_switcheroo.utils.doc_gen =========================== .. py:module:: ml_switcheroo.utils.doc_gen .. autoapi-nested-parse:: Migration Guide Generator. This module provides the logic to generate human-readable Markdown documentation comparing two frameworks (Source vs Target). It iterates through the Semantic Knowledge Base, calculating differences in API names and argument conventions (e.g., `dim` vs `axis`), and producing a structured migration guide. Classes ------- .. autoapisummary:: ml_switcheroo.utils.doc_gen.MigrationGuideGenerator Module Contents --------------- .. py:class:: MigrationGuideGenerator(semantics: ml_switcheroo.semantics.manager.SemanticsManager) Generates a Markdown Migration Guide by diffing semantic specifications. .. attribute:: semantics The loaded knowledge base containing operations, variants, and argument maps. :type: SemanticsManager .. py:attribute:: semantics .. py:method:: generate(source_fw: str, target_fw: str) -> str Produces the Markdown content for the migration guide. It groups operations by their Semantic Tier (Math, Neural, Extras), sorts them alphabetically, and generates a comparison table for each tier. :param source_fw: The framework converting FROM (e.g., 'torch'). :param target_fw: The framework converting TO (e.g., 'jax'). :returns: A string containing the rendered Markdown.