From 3ddc564568271c88ca1b5e0e34ef902dba2ab3aa Mon Sep 17 00:00:00 2001 From: Benedikt Fuchs Date: Mon, 31 Jul 2023 19:11:16 +0200 Subject: [PATCH] fix rust & mypy errors --- flair/models/multitask_model.py | 2 +- flair/trainers/trainer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flair/models/multitask_model.py b/flair/models/multitask_model.py index 98cda7b4a..d7fb262da 100644 --- a/flair/models/multitask_model.py +++ b/flair/models/multitask_model.py @@ -116,7 +116,7 @@ def split_batch_to_task_ids(sentences: Union[List[Sentence], Sentence], all_task batch_to_task_mapping[multitask_id.value] = [sentence_id] return batch_to_task_mapping - def evaluate( + def evaluate( # type: ignore[override] self, data_points, gold_label_type: str, diff --git a/flair/trainers/trainer.py b/flair/trainers/trainer.py index 8fe18bf3e..43e99d6ca 100644 --- a/flair/trainers/trainer.py +++ b/flair/trainers/trainer.py @@ -461,7 +461,7 @@ def train_custom( if inspect.isclass(sampler): sampler = sampler() # set dataset to sample from - sampler.set_dataset(train_data) + sampler.set_dataset(train_data) # type: ignore[union-attr] shuffle = False # this field stores the names of all dynamic embeddings in the model (determined after first forward pass)