mirror of
https://github.com/explosion/spaCy.git
synced 2025-10-24 12:41:23 +03:00
This patch addresses #1660, which was caused by keying all pre-trained vectors with the same ID when telling Thinc how to refer to them. This meant that if multiple models were loaded that had pre-trained vectors, errors or incorrect behaviour resulted. The vectors class now includes a .name attribute, which defaults to: {nlp.meta['lang']_nlp.meta['name']}.vectors The vectors name is set in the cfg of the pipeline components under the key pretrained_vectors. This replaces the previous cfg key pretrained_dims. In order to make existing models compatible with this change, we check for the pretrained_dims key when loading models in from_disk and from_bytes, and add the cfg key pretrained_vectors if we find it. |
||
|---|---|---|
| .. | ||
| __init__.pxd | ||
| __init__.py | ||
| _beam_utils.pyx | ||
| _state.pxd | ||
| _state.pyx | ||
| arc_eager.pxd | ||
| arc_eager.pyx | ||
| ner.pxd | ||
| ner.pyx | ||
| nn_parser.pxd | ||
| nn_parser.pyx | ||
| nonproj.pxd | ||
| nonproj.pyx | ||
| stateclass.pxd | ||
| stateclass.pyx | ||
| transition_system.pxd | ||
| transition_system.pyx | ||