You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Added the `_remove_all_forward_hooks` function for easy cleanup and removal of hooks without requiring their handles.
* Changed `ModuleOutputHook`'s forward hook function name from `forward_hook` to `module_outputs_forward_hook` to allow for easy removal of only hooks using that hook function.
* `ModuleOutputHook`'s initialization function now runs the `_remove_all_forward_hooks` function on targets, and only removes the hooks created by `ModuleOutputHook` to avoid breaking PyTorch.
* Added the `_count_forward_hooks` function for easy testing of hook creation & removal functionality.
* Added tests for verifying that the 'ghost hook' bug has been fixed, and that the new function is working correctly.
* Added tests for `ModuleOutputsHook`. Previously we had no tests for this module.
0 commit comments