Skip to content
Closed
Show file tree
Hide file tree
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
6 changes: 2 additions & 4 deletions benchs/bench_fw/benchmark_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import os
import pickle
from dataclasses import dataclass
from typing import Any, List, Optional
from typing import Any, Dict, List, Optional
from zipfile import ZipFile

import faiss # @manual=//faiss/python:pyfaiss_gpu
Expand Down Expand Up @@ -46,13 +46,11 @@ def merge_rcq_itq(
@dataclass
class BenchmarkIO:
path: str
cached_ds: Dict[Any, Any] = {}

def clone(self):
return BenchmarkIO(path=self.path)

def __post_init__(self):
self.cached_ds = {}

# TODO(kuarora): rename it as get_local_file
def get_local_filename(self, filename):
if len(filename) > 184:
Expand Down
2 changes: 2 additions & 0 deletions benchs/bench_fw/descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ class DatasetDescriptor:
# number of vectors to load from the dataset
num_vectors: Optional[int] = None

embedding_column: Optional[str] = None

def __hash__(self):
return hash(self.get_filename())

Expand Down