Skip to content

Commit

Permalink
Merge pull request #1690 from LucasTrg/patch-1
Browse files Browse the repository at this point in the history
Fixes argument order for custom code evaluator
  • Loading branch information
mmabrouk authored May 21, 2024
2 parents 162d4e3 + e0d3c4b commit 207aaf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agenta-backend/agenta_backend/services/security/sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def execute_code_safely(

# Call the evaluation function, extract the result if it exists
# and is a float between 0 and 1
result = environment["evaluate"](app_params, inputs, correct_answer, output)
result = environment["evaluate"](app_params, inputs, output, correct_answer)
if isinstance(result, float) and 0 <= result <= 1:
return result
return None

0 comments on commit 207aaf9

Please sign in to comment.