Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when serializing ElasticSearchEmbeddingRetriever from ElasticSearchDocumentStore with authentication #694

Closed
IronD7 opened this issue Apr 24, 2024 · 2 comments · Fixed by deepset-ai/haystack#7853

Comments

@IronD7
Copy link

IronD7 commented Apr 24, 2024

Dear developers,

I'm using an ElasticSearchDocumentStore with authentication like so:

document_store = ElasticsearchDocumentStore(hosts = "https://localhost:9200",
                                            index = INDEX,
                                           basic_auth=("elastic", ELASTIC_PASSWORD),
                                           ssl_assert_fingerprint=CERT_FINGERPRINT,)

and have an ElasticsearchEmbeddingRetriever in my pipeline.

After serializing my Pipeline (relevant part of .yaml file below) and trying to deploy it in hayhooks, I get an Error message about that Python tuple:

yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/tuple'
in "", line 53, column 23:
basic_auth: !!python/tuple

Is there any way to prevent this (other than using elastic without authentication)?

retriever:
init_parameters:
document_store:
init_parameters:
basic_auth: !!python/tuple
- elastic
- <ELASTIC_PW>
hosts: https://localhost:9200
type: haystack_integrations.document_stores.elasticsearch.document_store.ElasticsearchDocumentStore
filters: {}
num_candidates: null
top_k: 10
type: haystack_integrations.components.retrievers.elasticsearch.embedding_retriever.ElasticsearchEmbeddingRetriever

@anakin87 anakin87 transferred this issue from deepset-ai/haystack-integrations Apr 26, 2024
@anakin87 anakin87 added integration:elasticsearch bug Something isn't working labels Apr 26, 2024
@anakin87
Copy link
Member

I noticed the same bug in the Opensearch integration.

@shadeMe
Copy link
Contributor

shadeMe commented Jun 13, 2024

Thanks for the report. The linked PR should fix this issue once it gets released in a new Haystack build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants