spaCy/spacy/tests/training
Madeesh Kannan 5ea14af32b
Add `training.before_update` callback (#11739)
* Add `training.before_update` callback

This callback can be used to implement training paradigms like gradual (un)freezing of components (e.g: the Transformer) after a certain number of training steps to mitigate catastrophic forgetting during fine-tuning.

* Fix type annotation, default config value

* Generalize arguments passed to the callback

* Update schema

* Pass `epoch` to callback, rename `current_step` to `step`

* Add test

* Simplify test

* Replace config string with `spacy.blank`

* Apply suggestions from code review

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>

* Cleanup imports

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
2022-11-23 17:54:58 +01:00
..
__init__.py move tests to correct subdir 2020-09-15 21:40:38 +02:00
test_augmenters.py Preserve missing entity annotation in augmenters (#11540) 2022-09-27 10:16:51 +02:00
test_logger.py Add ConsoleLogger.v2 (#11214) 2022-08-29 10:23:05 +02:00
test_new_example.py adding spans to doc_annotation in Example.to_dict (#11261) 2022-08-05 12:26:38 +02:00
test_pretraining.py Tagger: use unnormalized probabilities for inference (#10197) 2022-03-15 14:15:31 +01:00
test_readers.py Revert "disable failing test because Stanford servers are down (#11015)" (#11054) 2022-06-30 11:24:54 +02:00
test_rehearse.py bugfix parser labels (#10797) 2022-05-13 11:41:32 +02:00
test_training.py Add `training.before_update` callback (#11739) 2022-11-23 17:54:58 +01:00