MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / clear

Method clear

DeepSpeedExample/megatron/data/realm_index.py:41–46  ·  view source on GitHub ↗

Clear the embedding data structures to save memory. The metadata ends up getting used, and is also much smaller in dimensionality so it isn't really worth clearing.

(self)

Source from the content-addressed store, hash-verified

39 }
40
41 def clear(self):
42 """Clear the embedding data structures to save memory.
43 The metadata ends up getting used, and is also much smaller in dimensionality
44 so it isn't really worth clearing.
45 """
46 self.embed_data = dict()
47
48 def load_from_file(self):
49 """Populate members from instance saved to file"""

Callers 3

build_and_save_indexMethod · 0.45
prefetchMethod · 0.45
add_block_embed_dataMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected