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

Errors caused by indexing.yml file #13

Closed
Emil-io opened this issue Apr 29, 2024 · 3 comments
Closed

Errors caused by indexing.yml file #13

Emil-io opened this issue Apr 29, 2024 · 3 comments
Assignees
Labels

Comments

@Emil-io
Copy link

Emil-io commented Apr 29, 2024

I created a hayhooks, haystack and opensearch setup (see this github repo).

Both the query and the indexing yaml are created by dumping a working pipeline config in python.

The problem seems to be caused by the indexing.yml - Once i leave this file out, the query pipeline works without a problem.

Could you help me find the issues here? Error message I am getting when accessing the localhost under "https://0.0.0.0:1416/docs":

2024-04-29 13:38:03 json_schema = generate_for_schema_type(schema_or_field)
2024-04-29 13:38:03 File "/opt/venv/lib/python3.10/site-packages/pydantic/json_schema.py", line 765, in is_instance_schema
2024-04-29 13:38:03 return self.handle_invalid_for_json_schema(schema, f'core_schema.IsInstanceSchema ({schema["cls"]})')
2024-04-29 13:38:03 File "/opt/venv/lib/python3.10/site-packages/pydantic/json_schema.py", line 2093, in handle_invalid_for_json_schema
2024-04-29 13:38:03 raise PydanticInvalidForJsonSchema(f'Cannot generate a JsonSchema for {error_info}')
2024-04-29 13:38:03 pydantic.errors.PydanticInvalidForJsonSchema: Cannot generate a JsonSchema for core_schema.IsInstanceSchema (<class 'pandas.core.frame.DataFrame'>)
2024-04-29 13:38:03
2024-04-29 13:38:03 For further information visit https://errors.pydantic.dev/2.6/u/invalid-for-json-schema

@lohit8846
Copy link

I've also seen the same issue with other types of data. Basically the pipeline execution still works, but cannot generate the docs due to this json schema generation failing

pydantic.errors.PydanticInvalidForJsonSchema: Cannot generate a JsonSchema for core_schema.IsInstanceSchema (<class 'haystack.dataclasses.sparse_embedding.SparseEmbedding'>)

@lohit8846
Copy link

I believe this pull request tries to address a similar problem. #7

@masci masci added the P1 label May 3, 2024
@masci masci assigned anakin87 and silvanocerza and unassigned anakin87 May 3, 2024
@silvanocerza
Copy link
Contributor

This is fixed with #7 and version 0.0.13.

Remember to use latest Haystack version so it works properly, I had to fix a small thing there too.

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

No branches or pull requests

5 participants