onnx_diagnostic.torch_export_patches.onnx_export_errors¶
- onnx_diagnostic.torch_export_patches.onnx_export_errors.get_function(name: str) Tuple[type, Callable][source][source]¶
- Returns the module and the function based on its name. 
- onnx_diagnostic.torch_export_patches.onnx_export_errors.get_patches(mod, verbose: int = 0) Tuple[str, List[Any]][source][source]¶
- Returns the list of patches to make for a specific module. 
- 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 to- unpatch_module_or_classes()to revert the changes.- Parameters:
- mod – module of list of clsses to patch 
- verbose – verbosity 
 
- Returns:
- patch info