SentenceTransformer hangs
See original GitHub issuePackages:
!pip install -q git+https://github.com/UKPLab/sentence-transformers.git
!pip install -q git+https://github.com/embeddings-benchmark/mteb.git
!pip install -q git+https://github.com/NouamaneTazi/beir.git@fix_drpes_ids
!pip install -q evaluate
Doing
import time
from mteb import MTEB
from sentence_transformers import SentenceTransformer
class SentenceTransformerX(SentenceTransformer):
pass
model_name = "sentence-transformers/average_word_embeddings_komninos"
model = SentenceTransformerX(model_name)
evaluation = MTEB(tasks=["SciFact"])
a = time.time()
results = evaluation.run(model, output_folder=f"results/{model_name}", overwrite_results=True)
b = time.time()
hangs at
p = ctx.Process(
target=SentenceTransformer._encode_multi_process_worker,
args=(process_id, device_name, self.model, input_queue, output_queue),
daemon=True,
)
I think you’re the expert here - any ideas? @NouamaneTazi
This only affects the latest BEIR, i.e. I think it has something to do with DPRES. Using the below is fine
!pip install -q git+https://github.com/UKPLab/sentence-transformers.git
!pip install -q git+https://github.com/embeddings-benchmark/mteb.git
!pip install beir==1.0.0
Issue Analytics
- State:
- Created a year ago
- Comments:11 (10 by maintainers)
Top Results From Across the Web
Sentence Transformers: encode() hangs forever in uwsgi ...
Hi @nreimers While building a search engine using the Sentence Transformers library, I'm using pretrained models.
Read more >SentenceTransformer — Sentence-Transformers documentation
If it is not a path, it first tries to download a pre-trained SentenceTransformer model. If that fails, tries to construct a model...
Read more >Bert sentence-transformers stops/quits during fine tuning
My solution was to set batch and worker to one and its very slow train_dataloader = DataLoader(train_dataset, shuffle=False, batch_size=1, ...
Read more >SentenceTransformer - float object is not subscriptable
I was trying to apply the SentenceTransformer (v2.2.0) on a list of custom documents to create embeddings for each of them, however i...
Read more >English-Vietnamese Cross-lingual Semantic Textual Similarity ...
... Cross-lingual Semantic Textual Similarity using Sentence Transformer model ... Khang Huu Nguyen ; Dat Cong Dinh ; Hang Thi-Thuy Le ; Dien...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah this PR would fix it: https://github.com/embeddings-benchmark/mteb/pull/86 by not using the parallel processor added to BEIR in 1.0.1. The only disadvantage is it will remove the possibility to run on multiple GPUs (It will just use 1 GPU).
Hmm it’s not really solved, is it? I’m not sure whether it’s a MTEB / BeIR / SentenceTransformers or Python limitation?