From 62ccd5c4dfbcfbf8248b00696eebc97427444e8a Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Fri, 2 Oct 2020 16:37:21 +0200 Subject: [PATCH] Relax model meta performance schema (#6185) Allow more embedded per_x in `ModelMetaSchema` --- spacy/schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/schemas.py b/spacy/schemas.py index 1125fa7da..591b7e134 100644 --- a/spacy/schemas.py +++ b/spacy/schemas.py @@ -282,7 +282,7 @@ class ModelMetaSchema(BaseModel): sources: Optional[Union[List[StrictStr], List[Dict[str, str]]]] = Field(None, title="Training data sources") vectors: Dict[str, Any] = Field({}, title="Included word vectors") labels: Dict[str, List[str]] = Field({}, title="Component labels, keyed by component name") - performance: Dict[str, Union[float, Dict[str, float]]] = Field({}, title="Accuracy and speed numbers") + performance: Dict[str, Union[float, Dict[str, Union[float, dict]]]] = Field({}, title="Accuracy and speed numbers") spacy_git_version: StrictStr = Field("", title="Commit of spaCy version used") # fmt: on