mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-22 10:02:01 +03:00
black formatting round 2
This commit is contained in:
parent
34d3720fc0
commit
2b19b35030
|
@ -2,7 +2,7 @@ from typing import Union, Iterable, Sequence, TypeVar, List, Callable, Iterator
|
|||
from typing import Optional, Any
|
||||
from functools import partial
|
||||
import itertools
|
||||
from thinc.schedules import Schedule #type:ignore[attr-defined]
|
||||
from thinc.schedules import Schedule # type:ignore[attr-defined]
|
||||
|
||||
from ..util import registry, minibatch
|
||||
|
||||
|
@ -221,7 +221,7 @@ def _batch_by_length(
|
|||
if not batch:
|
||||
batch.append(i)
|
||||
elif length * (len(batch) + 1) <= max_words:
|
||||
batch.append(i)
|
||||
batch.append(i)
|
||||
else:
|
||||
batches.append(batch)
|
||||
batch = [i]
|
||||
|
|
|
@ -241,7 +241,7 @@ def train_while_improving(
|
|||
score, other_scores = evaluate()
|
||||
else:
|
||||
score, other_scores = evaluate()
|
||||
optimizer.last_score = score #type:ignore[attr-defined]
|
||||
optimizer.last_score = score # type:ignore[attr-defined]
|
||||
results.append((score, step))
|
||||
is_best_checkpoint = score == max(results)[0]
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user