Skip to content

Commit

Permalink
Fix device arg for sentence transformers (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
tholor authored May 28, 2020
1 parent df554fc commit 46a065e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haystack/retriever/elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(
# pretrained embedding models coming from: https://github.com/UKPLab/sentence-transformers#pretrained-models
# e.g. 'roberta-base-nli-stsb-mean-tokens'
if gpu:
device = "gpu"
device = "cuda"
else:
device = "cpu"
self.embedding_model = SentenceTransformer(embedding_model, device=device)
Expand Down

0 comments on commit 46a065e

Please sign in to comment.