OpenCodeInterpreter / OpenCodeInterpreter

OpenCodeInterpreter is a suite of open-source code generation systems aimed at bridging the gap between large language models and sophisticated proprietary systems like the GPT-4 Code Interpreter. It significantly enhances code generation capabilities by integrating execution and iterative refinement functionalities.
https://opencodeinterpreter.github.io/
Apache License 2.0
1.48k stars 198 forks source link

tree_sitter_languages.core.get_parser error #23

Open chenmengdx opened 1 week ago

chenmengdx commented 1 week ago

Hi, I'm trying to run the multi-turn evaluation for gpt-3.5. I have re-implemented the chat_with_gpt.py. However, when I ran:

bash evaluation/evaluate/scripts/05_execution_feedback_multiround_gpt.sh

I got following errors:

(demo) [memechen@OpenCodeInterpreter]$ cat /mnt/shared-physical-ad1/memechen/evaluation/OpenCodeInterpreter/evaluation/evaluate/execution_feedback_output/gpt3.5/gen_humaneval_base_solution_multiround.log 2024-06-15 17:50:31,749 - INFO - model:gpt3.5 2024-06-15 17:50:49,497 - INFO - Read 164 examples for evaluation over. Downloading dataset from https://github.com/evalplus/humanevalplus_release/releases/download/v0.1.10/HumanEvalPlus.jsonl.gz Computing expected output... Expected outputs computed in 14.78s Generating: 0%| | 0/164 [00:00<?, ?it/s]2024-06-15 17:50:50,398 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK" Generating: 0%| | 0/164 [00:00<?, ?it/s] Traceback (most recent call last): File "/mnt/shared-physical-ad1/memechen/evaluation/OpenCodeInterpreter/evaluation/evaluate/multi_turn/gpt_gen_plus_solution_multiround.py", line 228, in gen_solution(args) File "/mnt/shared-physical-ad1/memechen/evaluation/OpenCodeInterpreter/evaluation/evaluate/multi_turn/gpt_gen_plus_solution_multiround.py", line 179, in gen_solution code,judge,modify = generate_multi_round(problem,expected_output,example, lang, model_name,args) File "/mnt/shared-physical-ad1/memechen/evaluation/OpenCodeInterpreter/evaluation/evaluate/multi_turn/gpt_gen_plus_solution_multiround.py", line 67, in generate_multi_round sanitized_solution = sanitize_solution(deepcopy(solution),flags.eofs) File "/mnt/shared-physical-ad1/memechen/evaluation/OpenCodeInterpreter/evaluation/evaluate/utils.py", line 124, in sanitize_solution new_code = sanitize( File "/mnt/shared-physical-ad1/memechen/evaluation/OpenCodeInterpreter/evaluation/evalplus/evalplus/sanitize.py", line 114, in sanitize parser = get_parser("python") File "tree_sitter_languages/core.pyx", line 19, in tree_sitter_languages.core.get_parser File "tree_sitter_languages/core.pyx", line 14, in tree_sitter_languages.core.get_language TypeError: init() takes exactly 1 argument (2 given)

Can anyone tell me how to solve it?

Thanks.

chenmengdx commented 1 week ago

Fixed by degrading pip install tree-sitter==0.21.3