Skip to content

Fix spacy init issue - #37

Merged
adrianeboyd merged 3 commits into
kab/pydantic-v2from
kab/fix-spacy-init
Aug 4, 2023
Merged

adrianeboyd merged 3 commits into
kab/pydantic-v2from
kab/fix-spacy-init

Conversation

@kabirkhan

Copy link
Copy Markdown

Promise validation was broken because the new implementation of copy_model_field didn't actually change the type. So when setting a promise field, we still had the original schema type (in the case of spacy init config this caused an issue with the tokenizer promise.

The schema in spacy has this as a callable but we want to validate as Any cause it's a promise.

This code isn't super clean but fixes the main issue

@adrianeboyd
adrianeboyd merged commit 4f7d5b3 into kab/pydantic-v2 Aug 4, 2023
@svlandeg
svlandeg deleted the kab/fix-spacy-init branch May 31, 2024 15:47
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

Successfully merging this pull request may close these issues.

2 participants