Skip to content

Commit

Permalink
better handle float value comparison (ShishirPatil#407)
Browse files Browse the repository at this point in the history
Refer discussion below.

Co-authored-by: Xiaowei Li <[email protected]>
  • Loading branch information
vandyxiaowei and Xiaowei Li authored Jun 7, 2024
1 parent 33cabef commit 4cf2e8d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions berkeley-function-call-leaderboard/eval_checker/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@ def simple_function_checker(
if expected_type_description == "tuple":
value = list(value)

if expected_type_description == "float":
value = float(value)

# Type checking
# In fact, we only check for Python here.
# Type check for other languages are handled by the type converter, and so their value (after conversion) is always correct.
Expand Down

0 comments on commit 4cf2e8d

Please sign in to comment.