Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
akiFQC committed Aug 8, 2024
1 parent 4261cf5 commit 39f98a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/jmteb/embedders/data_parallel_sbert_embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@


class DPSentenceTransformer(SentenceTransformer):
"""SentenceBERT with pytorch torch.nn.DataParallel"""

def __init__(self, sbert_model: SentenceTransformer):
super(DPSentenceTransformer, self).__init__()
Expand Down Expand Up @@ -209,6 +210,7 @@ def _encode_with_auto_batch_size(batch_size, self, text, prefix):
batch_size=batch_size,
normalize_embeddings=self.normalize_embeddings,
)

self.batch_size = batch_size
return out

Expand Down

0 comments on commit 39f98a3

Please sign in to comment.