spaCy/spacy/ml
Daniël de Kok 1f05f56433
Add the spacy.models_with_nvtx_range.v1 callback (#9124)
* Add the spacy.models_with_nvtx_range.v1 callback

This callback recursively adds NVTX ranges to the Models in each pipe in
a pipeline.

* Fix create_models_with_nvtx_range type signature

* NVTX range: wrap models of all trainable pipes jointly

This avoids that (sub-)models that are shared between pipes get wrapped
twice.

* NVTX range callback: make color configurable

Add forward_color and backprop_color options to set the color for the
NVTX range.

* Move create_models_with_nvtx_range to spacy.ml

* Update create_models_with_nvtx_range for thinc changes

with_nvtx_range now updates an existing node, rather than returning a
wrapper node. So, we can simply walk over the nodes and update them.

* NVTX: use after_pipeline_creation in example
2021-10-20 11:59:48 +02:00
..
models 🏷 Add Mypy check to CI and ignore all existing Mypy errors (#9167) 2021-10-14 15:21:40 +02:00
__init__.py Add the spacy.models_with_nvtx_range.v1 callback (#9124) 2021-10-20 11:59:48 +02:00
_character_embed.py 🏷 Add Mypy check to CI and ignore all existing Mypy errors (#9167) 2021-10-14 15:21:40 +02:00
_precomputable_affine.py TransitionBasedParser.v1 to legacy (#8586) 2021-07-06 15:26:45 +02:00
callbacks.py Add the spacy.models_with_nvtx_range.v1 callback (#9124) 2021-10-20 11:59:48 +02:00
extract_ngrams.py 🏷 Add Mypy check to CI and ignore all existing Mypy errors (#9167) 2021-10-14 15:21:40 +02:00
extract_spans.py 🏷 Add Mypy check to CI and ignore all existing Mypy errors (#9167) 2021-10-14 15:21:40 +02:00
featureextractor.py Fix import 2020-10-02 01:12:34 +02:00
parser_model.pxd The Parser is now a Pipe (2) (#5844) 2020-07-30 23:30:54 +02:00
parser_model.pyx The Parser is now a Pipe (2) (#5844) 2020-07-30 23:30:54 +02:00
staticvectors.py Fix assertion error in staticvectors (#9481) 2021-10-18 09:10:45 +02:00
tb_framework.py TransitionBasedParser.v1 to legacy (#8586) 2021-07-06 15:26:45 +02:00