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

Weaviate: timeout_config is not serialized properly #523

Closed
anakin87 opened this issue Mar 3, 2024 · 1 comment
Closed

Weaviate: timeout_config is not serialized properly #523

anakin87 opened this issue Mar 3, 2024 · 1 comment
Assignees
Labels
bug Something isn't working integration:weaviate

Comments

@anakin87
Copy link
Member

anakin87 commented Mar 3, 2024

Describe the bug
timeout_config is a tuple and it is not serialized properly using Pipeline.dumps.
This causes the subsequent deserialization from YAML to fail.

To Reproduce

from haystack_integrations.document_stores.weaviate.document_store \
    import WeaviateDocumentStore
from haystack import Pipeline
from haystack.components.writers import DocumentWriter


document_store = WeaviateDocumentStore(url="http://localhost:8080")

pipe = Pipeline()
pipe.add_component("writer", DocumentWriter(document_store))

serialized_pipe = pipe.dumps()
print(serialized_pipe)

deserialized_pipe = Pipeline.loads(serialized_pipe)

Error:

  File "/home/anakin87/.virtualenvs/llms4devs/lib/python3.10/site-packages/yaml/constructor.py", line 427, in construct_undefined
    raise ConstructorError(None, None,
yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/tuple'
  in "<unicode string>", line 35, column 27:
              timeout_config: !!python/tuple

YAML

components:
  writer:
    init_parameters:
      document_store:
        init_parameters:
          additional_config: null
          ...
          timeout_config: !!python/tuple
          - 10
          - 60
          ...
        type: haystack_integrations.document_stores.weaviate.document_store.WeaviateDocumentStore
      policy: NONE
    type: haystack.components.writers.document_writer.DocumentWriter
...

Describe your environment (please complete the following information):

  • Haystack version: 2.0-beta8
  • Integration version: Weaviate == 1.0.2
@anakin87 anakin87 added bug Something isn't working integration:weaviate labels Mar 3, 2024
@silvanocerza silvanocerza self-assigned this Mar 18, 2024
@silvanocerza
Copy link
Contributor

Can't reproduce anymore, this has probably been fixed with #463.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working integration:weaviate
Projects
None yet
Development

No branches or pull requests

2 participants