dill
and pydantic.BaseModel
declared in __main__
deserialize error
#9299
Unanswered
gabrielmbmb
asked this question in
Question
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I've encountered an issue while trying to deserialize a pickled
pydantic.BaseModel
(declared in__main__
) that was serialized usingdill
as described here: uqfoundation/dill#650 (comment)I think it's an issue on
dill
side because it works perfectly fine usingpickle
orcloudpickle
, but just wanted to double check with you just in case in missing some internal detail aboutpydantic
that could be affecting. It seems that themodel_fields
attribute ofpydantic.BaseModel
loses its type after being serialized, thus causing the error when trying to reload it.Any help is appreciated! I was not sure if it was correct to open this discussion as is not a just
pydantic
issue, so feel free to close it if not relevant.Thank you!
Beta Was this translation helpful? Give feedback.
All reactions