Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BFCL] Bug Fix parse_nested_value function for model_handler utils #660

Merged

Conversation

VishnuSuresh27
Copy link
Contributor

@VishnuSuresh27 VishnuSuresh27 commented Sep 24, 2024

In the parse_nested_value function, added a check to determine whether we are dealing with another function call or if its a regular dictionary. Previous version of the code incorrectly assumed that this was always a function call and did not consider the case where the function argument is a dictionary.

Fix #652

Copy link
Collaborator

@HuanzhiMao HuanzhiMao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed on the following test:

x = "[foo(a=1, b={'a': 1, 'b': 'hello'}), bar(c=3, d={'a': 1, 'b': foo(c=1, d=2)}), baz(e=f(x=1, y=2))]"

print(default_decode_execute_prompting(x))

# Expect ["foo(a=1, b={'a': 1, 'b': 'hello'})", 'bar(c=3, d={'a': 1, 'b': foo(c=1, d=2)})', 'baz(e=f(x=1, y=2))']
# But got ["foo(a=1, b={a=1, b='hello'})", 'bar(c=3, d={a=1, b=foo(c=1, d=2)})', 'baz(e=f(x=1, y=2))']

@VishnuSuresh27
Copy link
Contributor Author

@HuanzhiMao Thank you for catching. Should be fixed in the latest commit.

Copy link
Collaborator

@HuanzhiMao HuanzhiMao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @VishnuSuresh27

@ShishirPatil ShishirPatil merged commit ba19031 into ShishirPatil:main Sep 25, 2024
dyang415 pushed a commit to empower-ai/gorilla that referenced this pull request Sep 30, 2024
…hishirPatil#660)

In the parse_nested_value function, added a check to determine whether
we are dealing with another function call or if its a regular
dictionary. Previous version of the code incorrectly assumed that this
was always a function call and did not consider the case where the
function argument is a dictionary.

Fix ShishirPatil#652

---------

Co-authored-by: Huanzhi (Hans) Mao <[email protected]>
ShishirPatil pushed a commit that referenced this pull request Oct 21, 2024
This PR updates the leaderboard to reflect the change in score due to
the following PR merge:

1. #660 
2. #661
3. #683
4. #679
5. #708 
6. #709
7. #701
8. #657 
9. #658 
10. #640 
11. #653
12. #642 
13. #696 
14. #667

Close #662.

Note: Some models (like `firefunction`, `functionary`,
`microsoft/phi`)are not included in this leaderboard update because we
don't have all the entries generated. We will add them back once we get
the full result generated.
VishnuSuresh27 added a commit to VishnuSuresh27/gorilla that referenced this pull request Nov 11, 2024
…hishirPatil#660)

In the parse_nested_value function, added a check to determine whether
we are dealing with another function call or if its a regular
dictionary. Previous version of the code incorrectly assumed that this
was always a function call and did not consider the case where the
function argument is a dictionary.

Fix ShishirPatil#652

---------

Co-authored-by: Huanzhi (Hans) Mao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BFCL] Bugs in decode executable predictions
3 participants