Skip to content

Commit 0d1c478

Browse files
authored
Merge branch 'main' into main
2 parents 32c1ad4 + 7b230df commit 0d1c478

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

berkeley-function-call-leaderboard/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ Some companies have proposed some optimization strategies in their models' handl
208208

209209
## Changelog
210210

211+
* [July 16, 2024] [#525](https://github.com/ShishirPatil/gorilla/pull/525), [#536](https://github.com/ShishirPatil/gorilla/pull/536): Add new model `ibm-granite/granite-20b-functioncalling` to the leaderboard.
211212
* [July 10, 2024] [#522](https://github.com/ShishirPatil/gorilla/pull/522): Bug fix in the evaluation dataset for Executable Parallel Multiple category. This includes updates to both prompts and function docs. 2 entries are affected.
212213
* [July 8, 2024] [#516](https://github.com/ShishirPatil/gorilla/pull/516): Fix double-casting issue in `model_handler` for Java and JavaScript test categories.
213214
* [July 7, 2024] [#504](https://github.com/ShishirPatil/gorilla/pull/504), [#505](https://github.com/ShishirPatil/gorilla/pull/505), [#506](https://github.com/ShishirPatil/gorilla/pull/506), [#508](https://github.com/ShishirPatil/gorilla/pull/508), [#510](https://github.com/ShishirPatil/gorilla/pull/510), [#512](https://github.com/ShishirPatil/gorilla/pull/512), [#517](https://github.com/ShishirPatil/gorilla/pull/517): Make BFCL user-friendly and easy to extend.

berkeley-function-call-leaderboard/model_handler/granite_handler.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ def _format_prompt(prompt, function, test_category):
4949
return prompt
5050

5151
def inference(
52-
self, question_file, test_category, num_gpus, format_prompt_func=_format_prompt
52+
self, test_question, test_category, num_gpus, format_prompt_func=_format_prompt
5353
):
5454
return super().inference(
55-
question_file, test_category, num_gpus, format_prompt_func
55+
test_question, test_category, num_gpus, format_prompt_func
5656
)
5757

5858
def decode_ast(self, result, language="Python"):
@@ -76,9 +76,6 @@ def decode_ast(self, result, language="Python"):
7676
decoded_outputs.append("No function is called")
7777
continue
7878

79-
if language != "Python":
80-
args = {k: str(v) for k, v in args.items()}
81-
8279
decoded_outputs.append({fnname: args})
8380

8481
return decoded_outputs

raft/format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class OpenAiCompletionDatasetFormatter(DatasetFormatter):
104104
https://platform.openai.com/docs/guides/fine-tuning/preparing-your-dataset
105105
"""
106106
def format(self, ds: Dataset, params: Dict[str, str]) -> Dataset:
107-
newds = ds.rename_columns({'question': 'prompt', 'cot_answer': 'completion'})
107+
newds = ds.rename_columns({'instruction': 'prompt', 'cot_answer': 'completion'})
108108
return _remove_all_columns_but(newds, ['prompt', 'completion'])
109109

110110
class OpenAiChatDatasetFormatter(OpenAiCompletionDatasetFormatter):

0 commit comments

Comments
 (0)