Some legacy evaluators do not support target output key by minion-workers[bot] · Pull Request #1453 · UiPath/uipath-python
Summary
Resolves #1217
Here's a summary of the changes made:
Changes
Problem: Legacy evaluators had duplicated target_output_key resolution logic scattered across individual evaluators, and the pattern wasn't consistently applied.
Solution: Added a centralized get_targeted_field(self, obj) method to BaseLegacyEvaluator and refactored all three evaluators that use target output key resolution to call it.
Files changed (4 files, +20/-61 lines):
-
base_legacy_evaluator.py— Addedget_targeted_field()method that resolvestarget_output_keyviaresolve_output_path, returning the original object on failure. Added theresolve_output_pathimport. -
legacy_llm_as_judge_evaluator.py— Replaced 13 lines of inline resolution with 2 calls toself.get_targeted_field(). Removed unusedresolve_output_pathimport. -
legacy_exact_match_evaluator.py— Replaced 20 lines of inline resolution (with special coupled failure handling) with 2 calls toself.get_targeted_field(). Removed unused import. -
legacy_json_similarity_evaluator.py— Replaced 12 lines of inline resolution with 2 calls toself.get_targeted_field(). Removed unused import.
All 148 existing tests pass and lint/format checks are clean.
Changes
.../eval/evaluators/base_legacy_evaluator.py | 14 +++++++++++
.../evaluators/legacy_exact_match_evaluator.py | 27 ++--------------------
.../evaluators/legacy_json_similarity_evaluator.py | 20 ++--------------
.../evaluators/legacy_llm_as_judge_evaluator.py | 20 ++--------------
4 files changed, 20 insertions(+), 61 deletions(-)
Files changed
packages/uipath/src/uipath/eval/evaluators/base_legacy_evaluator.py
packages/uipath/src/uipath/eval/evaluators/legacy_exact_match_evaluator.py
packages/uipath/src/uipath/eval/evaluators/legacy_json_similarity_evaluator.py
packages/uipath/src/uipath/eval/evaluators/legacy_llm_as_judge_evaluator.py
Created by Minion Worker — autonomous Claude Code agent
To request changes, comment mentioning @minion.