Skip to content

Commit

Permalink
Remove Literal type hint (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanaysoni committed Jun 17, 2020
1 parent af5fc79 commit 8bcc4b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion haystack/api/controller/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
retriever = EmbeddingRetriever(
document_store=document_store,
embedding_model=EMBEDDING_MODEL_PATH,
model_format=EMBEDDING_MODEL_FORMAT, # type: ignore
model_format=EMBEDDING_MODEL_FORMAT,
gpu=USE_GPU
) # type: BaseRetriever
else:
Expand Down
5 changes: 2 additions & 3 deletions haystack/retriever/elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from typing import List, Union

from farm.infer import Inferencer
from typing_extensions import Literal

from haystack.database.base import Document
from haystack.database.elasticsearch import ElasticsearchDocumentStore
Expand Down Expand Up @@ -108,8 +107,8 @@ def __init__(
document_store: ElasticsearchDocumentStore,
embedding_model: str,
gpu: bool = True,
model_format: Literal["farm", "transformers", "sentence_transformers"] = "farm",
pooling_strategy: Literal["cls_token", "reduce_mean", "reduce_max", "per_token", "s3e"] = "reduce_mean",
model_format: str = "farm",
pooling_strategy: str = "reduce_mean",
emb_extraction_layer: int = -1,
):
"""
Expand Down

0 comments on commit 8bcc4b2

Please sign in to comment.