spaCy/spacy/tests/parser
Daniël de Kok e27c60a702
Reimplement distillation with oracle cut size (#12214)
* Improve the correctness of _parse_patch

* If there are no more actions, do not attempt to make further
  transitions, even if not all states are final.
* Assert that the number of actions for a step is the same as
  the number of states.

* Reimplement distillation with oracle cut size

The code for distillation with an oracle cut size was not reimplemented
after the parser refactor. We did not notice, because we did not have
tests for this functionality. This change brings back the functionality
and adds this to the parser tests.

* Rename states2actions to _states_to_actions for consistency

* Test distillation max cuts in NER

* Mark parser/NER tests as slow

* Typo

* Fix invariant in _states_diff_to_actions

* Rename _init_batch -> _init_batch_from_teacher

* Ninja edit the ninja edit

* Check that we raise an exception when we pass the incorrect number or actions

* Remove unnecessary get

Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>

* Write out condition more explicitly

---------

Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>
2023-02-21 15:47:18 +01:00
..
__init__.py Revert #4334 2019-09-29 17:32:12 +02:00
_search.pyx Fix v4 branch to build against Thinc v9 (#11921) 2022-12-17 14:32:19 +01:00
test_add_label.py Support negative examples in partial NER annotations (#8106) 2021-06-17 17:33:00 +10:00
test_arc_eager_oracle.py Migrate regression tests into the main test suite (#9655) 2021-12-04 20:34:48 +01:00
test_model.py Reimplement distillation with oracle cut size (#12214) 2023-02-21 15:47:18 +01:00
test_ner.py Reimplement distillation with oracle cut size (#12214) 2023-02-21 15:47:18 +01:00
test_neural_parser.py Update config resolution to use new Thinc 2020-09-27 22:21:31 +02:00
test_nn_beam.py Tidy up and auto-format 2021-01-05 13:41:53 +11:00
test_nonproj.py Auto-format code with black (#10945) 2022-06-10 13:21:33 +02:00
test_parse_navigate.py Raise error if deps not provided with heads (#8335) 2021-06-15 13:23:32 +02:00
test_parse.py Reimplement distillation with oracle cut size (#12214) 2023-02-21 15:47:18 +01:00
test_preset_sbd.py Support negative examples in partial NER annotations (#8106) 2021-06-17 17:33:00 +10:00
test_search.py Fix v4 branch to build against Thinc v9 (#11921) 2022-12-17 14:32:19 +01:00
test_space_attachment.py Tidy up tests and docs 2020-09-21 20:43:54 +02:00
test_state.py Tidy up and auto-format 2021-01-05 13:41:53 +11:00