Fix black and mypy issues

This commit is contained in:
thomashacker 2023-03-31 12:00:14 +02:00
parent b6ad7e6d9b
commit 34d3720fc0
3 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@ from typing import Union, Iterable, Sequence, TypeVar, List, Callable, Iterator
from typing import Optional, Any from typing import Optional, Any
from functools import partial from functools import partial
import itertools import itertools
from thinc.schedules import Schedule from thinc.schedules import Schedule #type:ignore[attr-defined]
from ..util import registry, minibatch from ..util import registry, minibatch

View File

@ -241,7 +241,7 @@ def train_while_improving(
score, other_scores = evaluate() score, other_scores = evaluate()
else: else:
score, other_scores = evaluate() score, other_scores = evaluate()
optimizer.last_score = score optimizer.last_score = score #type:ignore[attr-defined]
results.append((score, step)) results.append((score, step))
is_best_checkpoint = score == max(results)[0] is_best_checkpoint = score == max(results)[0]
else: else: