onnx_diagnostic.torch_export_patches.onnx_export_errors¶
- onnx_diagnostic.torch_export_patches.onnx_export_errors.patch_module_or_classes(mod, verbose: int = 0) Dict[type, Dict[type, Callable]] [source][source]¶
Applies all patches defined in classes prefixed by
patched_
cls._PATCHED_CLASS_
defines the class to patch,cls._PATCHES_
defines the method to patch. The returns information needs to be sent tounpatch_module_or_classes()
to revert the changes.- Parameters:
mod – module of list of clsses to patch
verbose – verbosity
- Returns:
patch info