Skip to content

Commit

Permalink
set default batch size to 1000 everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
woodthom2 committed Dec 16, 2024
1 parent 9a75aa6 commit cb351c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/harmony/matching/default_matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
model = SentenceTransformer(sentence_transformer_path)


def convert_texts_to_vector(texts: List, batch_size=50, max_batches=2000) -> ndarray:
def convert_texts_to_vector(texts: List, batch_size=1000, max_batches=2000) -> ndarray:
if batch_size == 0:
embeddings = model.encode(sentences=texts, convert_to_numpy=True)

Expand Down Expand Up @@ -74,7 +74,7 @@ def match_instruments(
mhc_questions: List = [],
mhc_all_metadatas: List = [],
mhc_embeddings: np.ndarray = np.zeros((0, 0)),
texts_cached_vectors: dict[str, List[float]] = {}, batch_size: int = 50, max_batches: int = 2000,
texts_cached_vectors: dict[str, List[float]] = {}, batch_size: int = 1000, max_batches: int = 2000,

) -> tuple:
return match_instruments_with_function(
Expand Down

0 comments on commit cb351c9

Please sign in to comment.