in mapillary_sls/datasets/msls.py [0:0]
def new_epoch(self):
# find how many subset we need to do 1 epoch
self.nCacheSubset = math.ceil(len(self.qIdx) / self.cached_queries)
# get all indices
arr = np.arange(len(self.qIdx))
# apply positive sampling of indices
arr = random.choices(arr, self.weights, k=len(arr))
# calculate the subcache indices
self.subcache_indices = np.array_split(arr, self.nCacheSubset)
# reset subset counter
self.current_subset = 0