diff --git a/src/adapters/heads/dependency_parsing.py b/src/adapters/heads/dependency_parsing.py index a7acbf0cac..2b91d5290e 100644 --- a/src/adapters/heads/dependency_parsing.py +++ b/src/adapters/heads/dependency_parsing.py @@ -2,6 +2,7 @@ Code taken and modified from: https://github.com/Adapter-Hub/hgiyt. Credits: "How Good is Your Tokenizer? On the Monolingual Performance of Multilingual Language Models" (Rust et al., 2021) https://arxiv.org/abs/2012.15613 """ +from dataclasses import dataclass from typing import Optional, Tuple import torch @@ -13,6 +14,7 @@ from .base import PredictionHead +@dataclass class DependencyParsingOutput(ModelOutput): loss: Optional[torch.FloatTensor] = None rel_preds: torch.FloatTensor = None