Modifying spancat scorer threshold in config after training has finished. #10755
-
My spacy version is 3.2.2.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes, it's fine to change the threshold after training. It doesn't affect the loss calculations and is only used to filter predictions. |
Beta Was this translation helpful? Give feedback.
-
There's a technical detail related to where the threshold is stored that may be confusing. For historical reasons (as a carry-over from v2), a few settings end up duplicated between the top-level If you're going to change this I'd recommend changing both so it's less confusing overall, but the value that is used at runtime is the one in |
Beta Was this translation helpful? Give feedback.
There's a technical detail related to where the threshold is stored that may be confusing. For historical reasons (as a carry-over from v2), a few settings end up duplicated between the top-level
config.cfg
and spancat's internal.cfg
, and at runtime only the internalspancat
value is used.If you're going to change this I'd recommend changing both so it's less confusing overall, but the value that is used at runtime is the one in
spancat/cfg
/nlp.get_pipe("spancat").cfg["threshold"]
.