MCPcopy Create free account
hub / github.com/Open-Bee/DataStudio / clear

Method clear

datastudio/utils/checkpoint.py:168–178  ·  view source on GitHub ↗

Clear checkpoint(s). Args: file_path: Specific file to clear, or None to clear all.

(self, file_path: Optional[str] = None)

Source from the content-addressed store, hash-verified

166 return self.checkpoints.get(file_path)
167
168 def clear(self, file_path: Optional[str] = None) -> None:
169 """Clear checkpoint(s).
170
171 Args:
172 file_path: Specific file to clear, or None to clear all.
173 """
174 if file_path:
175 self.checkpoints.pop(file_path, None)
176 else:
177 self.checkpoints = {}
178 self._save()

Callers 10

merge_dict_b2aMethod · 0.80
load_from_fileMethod · 0.80
close_allMethod · 0.80
close_all_instancesMethod · 0.80
__init__Method · 0.80
_pre_encode_imagesMethod · 0.80
test_clear_allMethod · 0.80

Calls 1

_saveMethod · 0.95

Tested by 3

test_clear_allMethod · 0.64