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)