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

Issue with Pydantic Imports #16

Open
rishabhpoikayil opened this issue Dec 28, 2024 · 0 comments
Open

Issue with Pydantic Imports #16

rishabhpoikayil opened this issue Dec 28, 2024 · 0 comments

Comments

@rishabhpoikayil
Copy link

I was following the instructions on the README.md page to construct the graph with just the Mimic-IV dataset. At present, I'm only using the data from the hosp directory.

Constructing the graph using the dataset leads to one specific issue with the Pydantic library. Apparently, the source code uses Pydantic v1 for the graph construction, which is older than the present version. This mismatch seems to result in the following error:

TypeError: BaseModel.validate() takes 2 positional arguments but 3 were given

The expected fix is to install a lower version instead, which I did. Then, I ran into the following error.

RuntimeError: no validator found for <class 'unstructured.documents.elements.Element'>, see arbitrary_types_allowed in Config

image

The actual error is from Line 69 in the above file, which doesn't make sense to me as this line of code should take care of the error. Searching the error online indicates the same thing. I'm not sure if the change in Pydantic versions may be causing this to happen, where certain libraries need the later version of Pydantic but the actual implementation uses the earlier version:

image

Which version of Pydantic would you suggest using in order to resolve this issue and construct the graph successfully? Or is there another fix that I may be missing? Thank you in advance for your assistance.

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

No branches or pull requests

1 participant