spaCy/spacy/syntax
Matthew Honnibal 9ec9f89b99 💫 Raise better error when using uninitialized pipeline component (#3074)
After creating a component, the `.model` attribute is left with the value `True`, to indicate it should be created later during `from_disk()`, `from_bytes()` or `begin_training()`. This had led to confusing errors if you try to use the component without initializing the model.

To fix this, we add a method `require_model()` to the `Pipe` base class. The `require_model()` method needs to be called at the start of the `.predict()` and `.update()` methods of the components. It raises a `ValueError` if the model is not initialized. An error message has been added to `spacy.errors`.
2018-12-20 15:54:53 +01:00
..
__init__.pxd * Work on greedy parser 2014-12-16 22:46:55 +11:00
__init__.py * Work on greedy parser 2014-12-16 22:46:55 +11:00
_beam_utils.pxd Refactor parser (#2308) 2018-05-15 22:17:29 +02:00
_beam_utils.pyx Refactor parser (#2308) 2018-05-15 22:17:29 +02:00
_parser_model.pxd Fix parser for GPU 2018-05-19 17:24:34 +00:00
_parser_model.pyx Make ParserModel.resize_output idempotent 2018-12-19 02:10:36 +01:00
_state.pxd Try to fix root-outside-sentence bug 2018-05-02 14:39:48 +00:00
_state.pyx Tidy up syntax 2017-10-27 19:45:57 +02:00
arc_eager.pxd WIP on stringstore change. 27 failures 2017-05-28 14:06:40 +02:00
arc_eager.pyx Revert "Improve dynamic oracle when values are missing in parse" 2018-05-16 00:31:52 +02:00
ner.pxd WIP on stringstore change. 27 failures 2017-05-28 14:06:40 +02:00
ner.pyx Merge branch 'develop' of https://github.com/explosion/spaCy into develop 2018-12-10 09:44:07 +01:00
nn_parser.pxd 💫 Better support for semi-supervised learning (#3035) 2018-12-10 16:25:33 +01:00
nn_parser.pyx 💫 Raise better error when using uninitialized pipeline component (#3074) 2018-12-20 15:54:53 +01:00
nonproj.pxd integrated pseudo-projective parsing into parser 2016-03-01 10:09:08 +01:00
nonproj.pyx Merge master into develop. Big merge, many conflicts -- need to review 2018-04-29 14:49:26 +02:00
stateclass.pxd Fix memory leak in beam parser 2017-11-14 02:11:40 +01:00
stateclass.pyx Fix memory leak in beam parser 2017-11-14 02:11:40 +01:00
transition_system.pxd Revert "Merge branch 'develop' of https://github.com/explosion/spaCy into develop" 2018-03-27 19:23:02 +02:00
transition_system.pyx 💫 Replace ujson, msgpack and dill/pickle/cloudpickle with srsly (#3003) 2018-12-03 01:28:22 +01:00