Skip to content

Commit

Permalink
Added type hints and hedging lang in to_dict
Browse files Browse the repository at this point in the history
  • Loading branch information
Mymoza committed Nov 17, 2023
1 parent 1722013 commit a327025
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions arthur_bench/scoring/hedging_language.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class HedgingLanguage(Scorer):
model output.
"""

def __init__(self, model_type=DEFAULT_MODEL, hedging_language=DEFAULT_HEDGE):
def __init__(
self, model_type: str = DEFAULT_MODEL, hedging_language: str = DEFAULT_HEDGE
):
"""
Hedging Language score implementation.
Expand All @@ -40,7 +42,10 @@ def requires_reference() -> bool:
return False

def to_dict(self, warn=False):
return {"model_type": self.scorer.model_type}
return {
"model_type": self.scorer.model_type,
"hedging_language": self.hedging_language,
}

def run_batch(
self,
Expand Down

0 comments on commit a327025

Please sign in to comment.