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
test_augmenters.py
test_logger.py
test_new_example.py
test_pretraining.py Tagger: use unnormalized probabilities for inference (#10197) 2022-03-15 14:15:31 +01:00
test_readers.py
test_rehearse.py
test_training.py Add training.before_update callback (#11739) 2022-11-23 17:54:58 +01:00