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

[Apibench] AST Eval Error on Huggingface and Tensorflowhub #729

Open
HHHHHejia opened this issue Oct 31, 2024 · 0 comments
Open

[Apibench] AST Eval Error on Huggingface and Tensorflowhub #729

HHHHHejia opened this issue Oct 31, 2024 · 0 comments
Labels
apibench-data APIBench data

Comments

@HHHHHejia
Copy link

HHHHHejia commented Oct 31, 2024

Describe the issue
AST eval fail on Huggingface and Tensorflowhub (list index error occur) but success on Torchhub. To reproduce, just git clone the original repo, cd gorilla/eval/eval-scripts/ and run the following as the author's instruction. I use all the original code, data and instruction in the original repo. Specificlly:

Fail: python ast_eval_th.py --api_dataset ../../data/api/huggingface_api.jsonl --apibench ../../data/apibench/huggingface_eval.json --llm_responses ../eval-data/responses/huggingface/response_huggingface_Gorilla_FT_0_shot.jsonl

Fail: python ast_eval_th.py --api_dataset ../../data/api/tensorflowhub_api.jsonl --apibench ../../data/apibench/tensorflow_eval.json --llm_responses ../eval-data/responses/tensorflowhub/response_tensorflowhub_Gorilla_FT_0_shot.jsonl

Success: python ast_eval_th.py --api_dataset ../../data/api/torchhub_api.jsonl --apibench ../../data/apibench/torchhub_eval.json --llm_responses ../eval-data/responses/torchhub/response_torchhub_Gorilla_FT_0_shot.jsonl

Error code:


I use all the original data and code and instructions in the repo. Please help me.

(camel) (base) hejia@euclid:~/gorilla/eval/eval-scripts$ python ast_eval_th.py --api_dataset ../../data/api/huggingface_api.jsonl --apibench ../../data/apibench/huggingface_eval.json --llm_responses ../eval-data/responses/huggingface/response_huggingface_Gorilla_FT_0_shot.jsonl
Traceback (most recent call last):
  File "/home/hejia/gorilla/eval/eval-scripts/ast_eval_th.py", line 204, in <module>
    main(args)
  File "/home/hejia/gorilla/eval/eval-scripts/ast_eval_th.py", line 183, in main
    correct, hallucination = result.result()
  File "/home/hejia/.conda/envs/camel/lib/python3.10/concurrent/futures/_base.py", line 451, in result
    return self.__get_result()
  File "/home/hejia/.conda/envs/camel/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/home/hejia/.conda/envs/camel/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/hejia/gorilla/eval/eval-scripts/ast_eval_th.py", line 149, in process_response
    database_index = ast_check(ast_subtree_list, ast_database)
  File "/home/hejia/gorilla/eval/eval-scripts/ast_eval_th.py", line 76, in ast_check
    args_list = get_args(base_tree)
  File "/home/hejia/gorilla/eval/eval-scripts/ast_eval_th.py", line 61, in get_args
    args_list.append(child.children[2].text)
IndexError: list index out of range

Env:

tree_sitter==0.20.4
tenacity==8.2.2
pydantic==1.10.7
rank-bm25==0.2.2

Please help me. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apibench-data APIBench data
Projects
None yet
Development

No branches or pull requests

1 participant