Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions smdebug/core/singleton_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
hook = smd.hook()
"""

# Standard Library
import atexit

# First Party
from smdebug.core.logger import get_logger

Expand Down Expand Up @@ -69,6 +72,8 @@ def set_hook(custom_hook: "BaseHook") -> None:
global _ts_hook
_ts_hook = custom_hook

atexit.register(del_hook)


def del_hook() -> None:
""" Set the hook singleton to None. """
Expand Down