Skip to content

Commit

Permalink
add dataclass decorator to DependencyParsingOutput
Browse files Browse the repository at this point in the history
  • Loading branch information
lenglaender committed Nov 7, 2023
1 parent cc75e00 commit c6dc931
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/adapters/heads/dependency_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -13,6 +14,7 @@
from .base import PredictionHead


@dataclass
class DependencyParsingOutput(ModelOutput):
loss: Optional[torch.FloatTensor] = None
rel_preds: torch.FloatTensor = None
Expand Down

0 comments on commit c6dc931

Please sign in to comment.