Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
chetantoshniwal
2026-04-13 15:20:58 -07:00
committed by GitHub
Unverified
parent d907590494
commit bab4c9ad76
3 changed files with 4 additions and 2 deletions
@@ -1732,6 +1732,8 @@ async def evaluate_workflow(
if workflow_result is None and queries is None:
raise ValueError("Provide either 'workflow_result' or 'queries'.")
if expected_output is not None and queries is None:
raise ValueError("Provide 'queries' when using 'expected_output'; 'expected_output' is not supported with 'workflow_result' only.")
if expected_output is not None and queries is not None and len(expected_output) != len(queries):
raise ValueError(f"Got {len(queries)} queries but {len(expected_output)} expected_output values.")
@@ -692,7 +692,7 @@ class FoundryEvals:
]
if item.context:
d["context"] = item.context
if item.expected_output:
if item.expected_output is not None:
d["ground_truth"] = item.expected_output
dicts.append(d)