MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / __exit__

Method __exit__

tensorpack/tfutils/collection.py:121–129  ·  view source on GitHub ↗
(self, exc_type, exc_val, exc_tb)

Source from the content-addressed store, hash-verified

119 self._freeze_backup = backup_collection(self._freeze_keys)
120
121 def __exit__(self, exc_type, exc_val, exc_tb):
122 if exc_type is not None:
123 return False
124 new_coll = backup_collection()
125
126 if self._check_diff:
127 self._print_diff(new_coll)
128 self._restore_freeze(new_coll)
129 return False
130
131 def _print_diff(self, new):
132 newly_created = []

Callers

nothing calls this directly

Calls 3

_print_diffMethod · 0.95
_restore_freezeMethod · 0.95
backup_collectionFunction · 0.85

Tested by

no test coverage detected