spaCy/spacy/ml/models
Paul O'Leary McCann 16894e665d
Refactor Coval Scoring code (#10875)
* Move coref scoring code to scorer.py

Includes some renames to make names less generic.

* Refactor coval code to remove ternary expressions

* Black formatting

* Add header

* Make scorers into registered scorers

* Small test fixes

* Skip coref tests when torch not present

Coref can't be loaded without Torch, so nothing works.

* Fix remaining type issues

Some of this just involves ignoring types in thorny areas. Two main
issues:

1. Some things have weird types due to indirection/ argskwargs
2. xp2torch return type seems to have changed at some point

* Update spacy/scorer.py

Co-authored-by: kadarakos <kadar.akos@gmail.com>

* Small changes from review

* Be specific about the ValueError

* Type fix

Co-authored-by: kadarakos <kadar.akos@gmail.com>
2022-06-22 16:05:52 +09:00
..
__init__.py Use thinc.util.has_torch 2022-05-24 16:02:39 +09:00
coref_util.py Refactor Coval Scoring code (#10875) 2022-06-22 16:05:52 +09:00
coref.py Refactor Coval Scoring code (#10875) 2022-06-22 16:05:52 +09:00
entity_linker.py Fix issues for Mypy 0.950 and Pydantic 1.9.0 (#10786) 2022-05-25 09:33:54 +02:00
multi_task.py Auto-format code with black (#10209) 2022-02-06 16:30:30 +01:00
parser.py Fix issues for Mypy 0.950 and Pydantic 1.9.0 (#10786) 2022-05-25 09:33:54 +02:00
span_predictor.py Refactor Coval Scoring code (#10875) 2022-06-22 16:05:52 +09:00
spancat.py Update spacy/ml/models/spancat.py 2022-05-25 13:05:41 +02:00
tagger.py Tagger: use unnormalized probabilities for inference (#10197) 2022-03-15 14:15:31 +01:00
textcat.py Fix issues for Mypy 0.950 and Pydantic 1.9.0 (#10786) 2022-05-25 09:33:54 +02:00
tok2vec.py Fix issues for Mypy 0.950 and Pydantic 1.9.0 (#10786) 2022-05-25 09:33:54 +02:00