spaCy/spacy/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
..
converters
__init__.pxd
__init__.py
align.pyx
alignment.py
alignment_array.pxd
alignment_array.pyx
augment.py
batchers.py
callbacks.py
corpus.py
example.pxd
example.pyx
gold_io.pyx
initialize.py
iob_utils.py
loggers.py
loop.py
pretrain.py