mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-31 10:29:46 +03:00
Update error code
This commit is contained in:
parent
6d6a3f128f
commit
5c4d5dd318
|
@ -542,10 +542,6 @@ class Errors(metaclass=ErrorsWithCodes):
|
||||||
E203 = ("If the {name} embedding layer is not updated "
|
E203 = ("If the {name} embedding layer is not updated "
|
||||||
"during training, make sure to include it in 'annotating components'")
|
"during training, make sure to include it in 'annotating components'")
|
||||||
|
|
||||||
# New errors added in v4.x
|
|
||||||
E300 = ("nlp.pipe(text_tuples, as_tuples=True) has been replaced with:\n"
|
|
||||||
"nlp.pipe_as_tuples(text_tuples)")
|
|
||||||
|
|
||||||
# New errors added in v3.x
|
# New errors added in v3.x
|
||||||
E851 = ("The 'textcat' component labels should only have values of 0 or 1, "
|
E851 = ("The 'textcat' component labels should only have values of 0 or 1, "
|
||||||
"but found value of '{val}'.")
|
"but found value of '{val}'.")
|
||||||
|
@ -965,6 +961,8 @@ class Errors(metaclass=ErrorsWithCodes):
|
||||||
E4003 = ("Training examples for distillation must have the exact same tokens in the "
|
E4003 = ("Training examples for distillation must have the exact same tokens in the "
|
||||||
"reference and predicted docs.")
|
"reference and predicted docs.")
|
||||||
E4004 = ("Backprop is not supported when is_train is not set.")
|
E4004 = ("Backprop is not supported when is_train is not set.")
|
||||||
|
E4005 = ("nlp.pipe(text_tuples, as_tuples=True) has been replaced with:\n"
|
||||||
|
"nlp.pipe_as_tuples(text_tuples)")
|
||||||
|
|
||||||
|
|
||||||
# fmt: on
|
# fmt: on
|
||||||
|
|
|
@ -1577,7 +1577,7 @@ class Language:
|
||||||
DOCS: https://spacy.io/api/language#pipe
|
DOCS: https://spacy.io/api/language#pipe
|
||||||
"""
|
"""
|
||||||
if as_tuples is not None:
|
if as_tuples is not None:
|
||||||
raise ValueError(Errors.E300)
|
raise ValueError(Errors.E4005)
|
||||||
|
|
||||||
# Set argument defaults
|
# Set argument defaults
|
||||||
if n_process == -1:
|
if n_process == -1:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user