MCPcopy Create free account
hub / github.com/apple/ml-pointersect / get_invalid_idxs

Method get_invalid_idxs

cdslib/core/data/index_reader.py:108–115  ·  view source on GitHub ↗

Return indexes of which the files do not exist.

(self)

Source from the content-addressed store, hash-verified

106 return self.uids[i]
107
108 def get_invalid_idxs(self):
109 """Return indexes of which the files do not exist."""
110 # check if file exists
111 invalid_indexes = []
112 for i in range(len(self.filenames)):
113 if not os.path.exists(self.filenames[i]):
114 invalid_indexes.append((i))
115 return invalid_indexes
116
117 def _read_index_file(self, index_filename: str, with_uid: bool, root_dir: str):
118 """Read the index file and returns the uids and filenames."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected