haystack-core-integrations
haystack-core-integrations copied to clipboard
Error when serializing ElasticSearchEmbeddingRetriever from ElasticSearchDocumentStore with authentication
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
I noticed the same bug in the Opensearch integration.
Thanks for the report. The linked PR should fix this issue once it gets released in a new Haystack build.