mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-14 05:37:03 +03:00
b052b1b47f
* Fix batching regression Some time ago, the spaCy v4 branch switched to the new Thinc v9 schedule. However, this introduced an error in how batching is handed. In the PR, the batchers were changed to keep track of their step, so that the step can be passed to the schedule. However, the issue is that the training loop repeatedly calls the batching functions (rather than using an infinite generator/iterator). So, the step and therefore the schedule would be reset each epoch. Before the schedule switch we didn't have this issue, because the old schedules were stateful. This PR fixes this issue by reverting the batching functions to use a (stateful) generator. Their registry functions do accept a `Schedule` and we convert `Schedule`s to generators. * Update batcher docs * Docstring fixes * Make minibatch take iterables again as well * Bump thinc requirement to 9.0.0.dev2 * Use type declaration * Convert another comment into a proper type declaration |
||
---|---|---|
.. | ||
__init__.py | ||
test_augmenters.py | ||
test_logger.py | ||
test_new_example.py | ||
test_pretraining.py | ||
test_readers.py | ||
test_rehearse.py | ||
test_training.py |