aitune.torch.jit.html_generator
aitune.torch.jit.html_generator
HTML generation module for InspectModule visualization.
Module Contents
Classes
API
HTML generator for InspectModule hierarchy visualization.
Calculate module statistics including total count and parameters.
Parameters:
The InspectModule class to calculate stats for.
Returns: tuple[int, str]
Tuple of (total_module_count, total_parameters_string).
Calculate self time for a module.
Self time is the total execution time minus the sum of all children’s execution times.
Parameters:
The module to calculate self time for.
Returns: float
Self time in seconds.
Generate HTML for the module tree structure.
Parameters:
The InspectModule class to generate HTML for.
Returns: str
HTML string representing the module hierarchy.
Get CSS styles for the HTML page.
Returns: str
CSS styles as a string.
Get JavaScript for interactive functionality.
Returns: str
JavaScript code as a string.
Generator that traverses all modules in the hierarchy.
Parameters:
The InspectModule class to traverse.
Generate comprehensive HTML content for module hierarchy visualization.
Parameters:
The InspectModule class to generate HTML for.
The name of the model to display in the subtitle.
Returns: str
Complete HTML document as a string with CSS and JavaScript.