def get_cache_path_load(self, args, path, epoch):
    cache_dir = (args.data.output.path.parent / 'caches')
    cache_dir.mkdir(parents=True, exist_ok=True)
    keys = list(cache_dir.glob('contrastive_model_cache_epoch_{}_*.json'.format(epoch)))
    if (len(keys) == 0):
        return None
    keys = {p.stem: set(load_json(p)) for p in keys}
    path = set([Path(p).stem for p in path])
    intersections = [(k, len((v & path))) for (k, v) in keys.items() if (len((path - v)) == 0)]
    if (len(intersections) == 0):
        return None
    key = max(intersections, key=(lambda x: x[1]))[0]
    path = (cache_dir / key)
    path = (path.parent / (path.stem + '.pkl'))
    return path
def get_cache_path_load(self, args, path, epoch):
    cache_dir = (args.data.output.path.parent / 'caches')
    cache_dir.mkdir(parents=True, exist_ok=True)
    keys = list(cache_dir.glob('contrastive_model_cache_epoch_{}_*.json'.format(epoch)))
    if (len(keys) == 0):
        return None
    keys = {p.stem: set(load_json(p)) for p in keys}
    path = set([Path(p).stem for p in path])
    intersections = [(k, len((v & path))) for (k, v) in keys.items() if (len((path - v)) == 0)]
    if (len(intersections) == 0):
        return None
    key = max(intersections, key=(lambda x: x[1]))[0]
    path = (cache_dir / key)
    path = (path.parent / (path.stem + '.pkl'))
    return path