-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
No valid 'lang' when creating blank model with vocab from file #4054
Comments
I think the problem might be related to this: Lines 175 to 176 in 23ec07d
When you call I do agree that this is slightly confusing, and I'm not immediately sure what the solution should be. In general, for a use case like this, the recommended best practice would probably be to remove all the pipeline components you don't want, which will give you the desired result: a base model with the vocab. |
Ok, that makes sense. Thanks for the detailed explanation :-) I was testing this in the context of serializing the Because you have the option of loading the KB back in with the See here: https:/svlandeg/spaCy/blob/feature/el-docs/examples/training/train_entity_linker.py This works, but the IO doesn't because of the reasons described above. But if you think that use-case is not relevant, we can just assume we always have access to the original |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
How to reproduce the behaviour
Previously, I saved
en_core_web_lg
to file, creating avocab
subdirectory, and itsmeta.json
which reads (among other things)Now, I'm attempting to use the
vocab
subdir as source for a blank model:Which fails, giving the error
ValueError: [E054] No valid 'lang' setting found in model meta.json.
And indeed, the
meta.json
of the newnlp
object readsIs this expected behaviour? When I run this in a unit test and replace the second line with
it does work correctly.
Your Environment
The text was updated successfully, but these errors were encountered: