Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions vectordb_bench/backend/data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,13 @@ def read(self, dataset: str, files: list[str], local_ds_root: pathlib.Path):
remote_file = pathlib.PurePosixPath("benchmark", dataset, file)
local_file = local_ds_root.joinpath(file)

if (not local_file.exists()) or (not self.validate_file(remote_file, local_file)):
log.info(f"local file: {local_file} not match with remote: {remote_file}; add to downloading list")
# if (not local_file.exists()) or (not self.validate_file(remote_file, local_file)):
# log.info(f"local file: {local_file} not match with remote: {remote_file}; add to downloading list")
if not local_file.exists():
log.info(f"local file: {local_file} not exist; add to downloading list")
downloads.append((remote_file, local_file))
else:
log.info(f"local file: {local_file} already exists, skip download")

if len(downloads) == 0:
return
Expand Down Expand Up @@ -130,9 +134,13 @@ def read(self, dataset: str, files: list[str], local_ds_root: pathlib.Path):
remote_file = pathlib.PurePosixPath(self.remote_root, dataset, file)
local_file = local_ds_root.joinpath(file)

if (not local_file.exists()) or (not self.validate_file(remote_file, local_file)):
log.info(f"local file: {local_file} not match with remote: {remote_file}; add to downloading list")
# if (not local_file.exists()) or (not self.validate_file(remote_file, local_file)):
# log.info(f"local file: {local_file} not match with remote: {remote_file}; add to downloading list")
if not local_file.exists():
log.info(f"local file: {local_file} not exist; add to downloading list")
downloads.append(remote_file)
else:
log.info(f"local file: {local_file} already exists, skip download")

if len(downloads) == 0:
return
Expand Down
Loading