MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _maybe_remove_file

Method _maybe_remove_file

tensorflow/python/keras/callbacks.py:1036–1044  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1034 return os.path.join(self._temp_file_dir, 'temp' + extension)
1035
1036 def _maybe_remove_file(self):
1037 # Remove the checkpoint directory in multi-worker training where this worker
1038 # should not checkpoint. It is a dummy directory previously saved for sync
1039 # distributed training.
1040
1041 if (self.model._in_multi_worker_mode() and # pylint: disable=protected-access
1042 not multi_worker_util.should_save_checkpoint()):
1043 file_io.delete_recursively(self._temp_file_dir)
1044 del self._temp_file_dir
1045
1046 def _get_most_recently_modified_file_matching_pattern(self, pattern):
1047 """Returns the most recently modified filepath matching pattern.

Callers 1

_save_modelMethod · 0.95

Calls 1

_in_multi_worker_modeMethod · 0.45

Tested by

no test coverage detected