diff --git a/smdebug/core/hook.py b/smdebug/core/hook.py index 216dcbd42..7e70404da 100644 --- a/smdebug/core/hook.py +++ b/smdebug/core/hook.py @@ -240,6 +240,10 @@ def __init__( self.training_run = 0 self._initialize_to_last_saved_state() + # This will avoid pickling of BaseHook object + def __getstate__(self): + return {} + def _initialize_to_last_saved_state(self): self.state_store = StateStore() last_state = self.state_store.get_last_saved_state()