MCPcopy Create free account
hub / github.com/amazon-science/patchcore-inspection / load

Method load

src/patchcore/common.py:91–92  ·  view source on GitHub ↗
(self, filename: str)

Source from the content-addressed store, hash-verified

89 faiss.write_index(self._index_to_cpu(self.search_index), filename)
90
91 def load(self, filename: str) -> None:
92 self.search_index = self._index_to_gpu(faiss.read_index(filename))
93
94 def reset_index(self):
95 if self.search_index:

Callers 4

test_read_write_indexFunction · 0.95
_loadMethod · 0.45
loadMethod · 0.45
get_patchcoreFunction · 0.45

Calls 1

_index_to_gpuMethod · 0.95

Tested by 1

test_read_write_indexFunction · 0.76