torchref.utils.debug_utils module
Debug utilities for multicopy_refinement modules.
Provides debugging and introspection functionality for all module classes.
- class torchref.utils.debug_utils.DebugMixin[source]
Bases:
objectMixin class that adds debugging capabilities to modules.
When an error occurs, call print_debug_summary() to get a comprehensive overview of the module’s state including:
All attributes and their types
Tensor shapes, dtypes, and devices
DataFrame/array shapes
Other object information
- print_debug_summary(title=None, file=<_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>)[source]
Print a comprehensive debug summary of this module’s state.
- Parameters:
title (str, optional) – Title for the summary.
file (file-like, default sys.stderr) – File to write output to.