Skip to content

Commit

Permalink
fix: remove type hints from private module
Browse files Browse the repository at this point in the history
  • Loading branch information
MattGPT-ai committed Jan 21, 2025
1 parent c05614c commit bc7fa10
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions flair/training_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

from numpy import ndarray
from scipy.stats import pearsonr, spearmanr
from scipy.stats._stats_py import PearsonRResult, SignificanceResult
from sklearn.metrics import mean_absolute_error, mean_squared_error
from torch.optim import Optimizer
from torch.utils.data import Dataset
Expand Down Expand Up @@ -61,10 +60,10 @@ def mean_squared_error(self) -> Union[float, ndarray]:
def mean_absolute_error(self):
return mean_absolute_error(self.true, self.pred)

def pearsonr(self) -> PearsonRResult:
def pearsonr(self):
return pearsonr(self.true, self.pred)[0]

def spearmanr(self) -> SignificanceResult:
def spearmanr(self):
return spearmanr(self.true, self.pred)[0]

def to_tsv(self) -> str:
Expand Down

0 comments on commit bc7fa10

Please sign in to comment.