Error: Could not find function in registry 'misc' after packaging a successfully trained model with code #10286
-
Hello! I have been happily training a spancat component with a custom suggester, but after packaging up a model-best I am unable to load the model with spacy. My code setup closely mimics this snippet. Output from
My config:
And the full stacktrace:
Finally, the code for the suggester itself, which is in a spancat_suggester.py file passed to --code during training and packaging.
This is the first time I've packaged a model rather than used the output directory, so not sure if the directory structure for the package looks right:
Thanks in advance for any guidance you can provide! Appreciate the efforts of the whole team. Adam |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The code is only loaded automatically from the installed package, not from the directory. You need to install the model package from |
Beta Was this translation helpful? Give feedback.
The code is only loaded automatically from the installed package, not from the directory. You need to install the model package from
dist/
(either.tar.gz
or.whl
depending on the--build
options) and then load it using the package name, just likeen_core_web_sm
.