Fix test and schemas

This commit is contained in:
Ines Montani 2020-05-21 19:01:02 +02:00
parent d34fc0915e
commit 631e20d0c6
2 changed files with 2 additions and 5 deletions

View File

@ -62,6 +62,7 @@ class TokenPatternNumber(BaseModel):
IN: Optional[List[StrictInt]] = None IN: Optional[List[StrictInt]] = None
NOT_IN: Optional[List[StrictInt]] = None NOT_IN: Optional[List[StrictInt]] = None
EQ: Union[StrictInt, StrictFloat] = Field(None, alias="==") EQ: Union[StrictInt, StrictFloat] = Field(None, alias="==")
NEQ: Union[StrictInt, StrictFloat] = Field(None, alias="!=")
GEQ: Union[StrictInt, StrictFloat] = Field(None, alias=">=") GEQ: Union[StrictInt, StrictFloat] = Field(None, alias=">=")
LEQ: Union[StrictInt, StrictFloat] = Field(None, alias="<=") LEQ: Union[StrictInt, StrictFloat] = Field(None, alias="<=")
GT: Union[StrictInt, StrictFloat] = Field(None, alias=">") GT: Union[StrictInt, StrictFloat] = Field(None, alias=">")

View File

@ -198,11 +198,7 @@ def test_train_empty():
batches = util.minibatch(train_data) batches = util.minibatch(train_data)
for batch in batches: for batch in batches:
texts, annotations = zip(*batch) texts, annotations = zip(*batch)
nlp.update( nlp.update(train_data, losses=losses)
texts, # batch of texts
annotations, # batch of annotations
losses=losses,
)
def test_overwrite_token(): def test_overwrite_token():