Skip to content

Commit 6dcda0e

Browse files
Merge branch 'main' into improve-score-option-selection
2 parents fe63427 + 287a801 commit 6dcda0e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/unitxt/llm_as_judge.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class LLMJudge(BulkInstanceMetric):
5757
# option_selection_strategy: OptionSelectionStrategyEnum = (
5858
# OptionSelectionStrategyEnum.PARSE_OUTPUT_TEXT
5959
# )
60-
evaluator_name: EvaluatorNameEnum = None
60+
evaluator_name: Optional[Union[str,EvaluatorNameEnum]] = None
6161
check_positional_bias: bool = True
6262
context_fields: Union[str, List[str], Dict[str, str]] = ["context"]
6363
generate_summaries: bool = True
@@ -78,8 +78,6 @@ def prepare(self):
7878

7979
if self.evaluator_name is None:
8080
self.evaluator_name = self.inference_engine.get_engine_id()
81-
elif not isinstance(self.evaluator_name, EvaluatorNameEnum):
82-
self.evaluator_name = EvaluatorNameEnum[self.evaluator_name]
8381

8482
def before_process_multi_stream(self):
8583
super().before_process_multi_stream()

0 commit comments

Comments
 (0)