Closed Jason-27 closed 1 year ago
this seems more of an OpenAI issue instead of this repo's issue? maybe try run again some other time and see if it works? also, try gpt-3.5-turbo and see if it works?
I used gpt-3.5-tuibo for the last question.It doesn't work .And I also had this problem when I ran other game24's code
i want to know if i want to use llama2 instead of gpt how can i change the code
you can try, I haven't tried llama2 yet. but perf might not be as good as gpt-4.
if OpenAI error persists, maybe contact OpenAI support? or you can update here some newest error messages and see if people faced anything similar...
closing for now, feel free to open a new one
My model is gpt-3.5-turbo,i find this error when i run game24/bfs .Following is my real input and output: D:\Python310>python D:\ProgramFiles\JetBrains\tree-of-thought-llm\run.py --task game24 --task_start_index 900 --task_end_index 1000 --method_generate propose --method_evaluate value --method_select greedy --n_evaluate_sample 3 --n_select_sample 5 Namespace(backend='gpt-3.5-turbo', temperature=0.7, task='game24', task_start_index=900, task_end_index=1000, naive_run=False, prompt_sample=None, method_generate='propose', method_evaluate='value', method_select='greedy', n_generate_sample=1, n_evaluate_sample=3, n_select_sample=5) functools.partial(<function gpt at 0x000001F4FF198C10>, model='gpt-3.5-turbo', temperature=0.7) -- new_ys --: ('5 6 = 30 (left: 4 30 10)\n', '10 - 4 = 6 (left: 6 5 10)\n', '10 - 5 = 5 (left: 4 6 5)\n', '6 / 5 = 1.2 (left: 4 1.2 10)\n', '6 + 10 = 16 (left: 4 5 16)\n', '6 - 4 = 2 (left: 2 5 10)\n', '6 - 5 = 1 (left: 4 1 10)\n', '10 / 5 = 2 (left: 4 2 10)\n', '6 / 4 = 1.5 (left: 1.5 5 10)\n', '4 + 5 = 9 (left: 6 9 10)\n', '5 + 6 = 11 (left: 4 11 10)\n', '10 / 4 = 2.5 (left: 2.5 5 10)\n', '4 5 = 20 (left: 6 20 10)\n', '6 + 10 = 16 (left: 4 5 16)\n', '10 - 4 = 6 (left: 6 5 10)\n', '10 - 5 = 5 (left: 4 6 5)\n', '6 - 4 = 2 (left: 2 5 10)\n', '6 - 5 = 1 (left: 4 1 10)\n') -- sol values --: (3.0, 3.0, 3.0, 3.0, 2.001, 2.001, 2.001, 2.001, 2.001, 2.0, 1.002, 1.002, 0.003, 0, 0, 0, 0, 0) -- choices --: ['5 * 6 = 30 (left: 4 30 10)\n', '10 - 4 = 6 (left: 6 5 10)\n', '10 - 5 = 5 (left: 4 6 5)\n', '6 / 5 = 1.2 (left: 4 1.2 10)\n', '6 + 10 = 16 (left: 4 5 16)\n']
-- new_ys --: ('5 6 = 30 (left: 4 30 10)\n30 - 10 = 20 (left: 4 20)\n', '6 / 5 = 1.2 (left: 4 1.2 10)\n10 / 4 = 2.5 (left: 2.5 4)\n', '6 / 5 = 1.2 (left: 4 1.2 10)\n10 - 4 = 6 (left: 1.2 6)\n', '6 / 5 = 1.2 (left: 4 1.2 10)\n4 - 1.2 = 2.8 (left: 2.8 10)\n', '5 6 = 30 (left: 4 30 10)\n4 + 30 = 34 (left: 10 34)\n', '5 6 = 30 (left: 4 30 10)\n4 30 = 120 (left: 10 120)\n', '5 6 = 30 (left: 4 30 10)\n10 / 4 = 2.5 (left: 2.5 30)\n', '10 - 4 = 6 (left: 6 5 10)\n10 - 6 = 4 (left: 4 5)\n', '10 - 4 = 6 (left: 6 5 10)\n10 / 5 = 2 (left: 2 6)\n', ' 10 - 5 = 5 (left: 4 6 5)\n6 - 5 = 1 (left: 1 6)\n', '10 - 5 = 5 (left: 4 6 5)\n5 + 4 = 9 (left: 6 9)\n', '10 - 5 = 5 (left: 4 6 5)\n4 / 5 = 0.8 (left: 0.8 5)\n', '6 / 5 = 1.2 (left: 4 1.2 10)\n4 + 1.2 = 5.2 (left: 5.2 10)\n', '6 / 5 = 1.2 (left: 4 1.2 10)\n4 / 1.2 = 3.33 (left: 3.33 10)\n', '6 / 5 = 1.2 (left: 4 1.2 10)\n4 1.2 = 4.8 (left: 4.8 10)\n', '6 / 5 = 1.2 (left: 4 1.2 10)\n10 - 1.2 = 8.8 (left: 4 8.8)\n', '6 + 10 = 16 (left: 4 5 16)\n16 - 4 = 12 (left: 5 12)\n', '6 + 10 = 16 (left: 4 5 16)\n16 / 4 = 4 (left: 5 4)\n', '6 + 10 = 16 (left : 4 5 16)\n16 / 5 = 3 (left: 4 3)\n', '5 6 = 30 (left: 4 30 10)\n30 / 4 = 7.5 (left: 10 7.5)\n', '10 - 4 = 6 (left: 6 5 10)\n6 + 5 = 11 (left: 10 11)\n', '10 - 4 = 6 (left: 6 5 10)\n 5 + 10 = 15 (left: 6 15)\n', '10 - 5 = 5 (left: 4 6 5)\n4 + 6 = 10 (left: 5 10)\n', '10 - 5 = 5 (left: 4 6 5)\n6 - 4 = 2 (left: 2 5)\n', '10 - 5 = 5 (left: 4 6 5)\n4 - 5 = -1 (left: -1 5)\n', '6 / 5 = 1.2 (left: 4 1.2 10)\n10 + 4 = 14 (left: 1.2 14)\n', '10 - 5 = 5 (left: 4 6 5)\n4 6 = 24 (left: 5 24)\n', '10 - 5 = 5 (left: 4 6 5)\n6 / 4 = 1.5 (left: 1.5 5)\n', '1 0 - 5 = 5 (left: 4 6 5)\n5 6 = 30 (left: 4 30)\n', '10 - 5 = 5 (left: 4 6 5)\n6 / 5 = 1.2 (left: 1.2 5)\n', '10 - 5 = 5 (left: 4 6 5)\n5 + 6 = 11 (left: 4 11)\n', '6 + 10 = 16 (left: 4 5 16)\n16 - 5 = 11 (left: 4 11)\n', '5 6 = 30 (left: 4 30 10)\n30 - 4 = 26 (left: 10 26)\n', '5 6 = 30 (left: 4 30 10)\n10 + 4 = 14 (left: 14 30)\n', '5 6 = 30 (left: 4 30 10) \n4 10 = 40 (left: 40 30)\n', '10 - 5 = 5 (left: 4 6 5)\n5 4 = 20 (left: 6 20)\n', '6 + 10 = 16 (left: 4 5 16)\n4 + 5 = 9 (left: 9 16)\n', '6 + 10 = 16 (left: 4 5 16)\n5 + 4 = 9 (l eft: 9 16)\n', '6 + 10 = 16 (left: 4 5 16)\n4 5 = 20 (left: 20 16)\n', '6 + 10 = 16 (left: 4 5 16)\n5 4 = 20 (left: 20 16)\n', '10 - 4 = 6 (left: 6 5 10)\n6 5 = 30 (left: 10 30)\n') -- sol values --: (40.001, 22.0, 21.001, 21.001, 20.002, 20.001, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 2.001, 2.001, 2.001, 2.001, 2.001, 2.0, 2.0, 1.002, 1.002, 1.002, 1.002, 1.001, 1.001, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.002) -- choices --: ['5 6 = 30 (left: 4 30 10)\n30 - 10 = 20 (left: 4 20)\n', '6 / 5 = 1.2 (left: 4 1.2 10)\n10 / 4 = 2.5 (left: 2.5 4)\n', '6 / 5 = 1.2 (left: 4 1.2 10)\n10 - 4 = 6 (left: 1.2 6)\n', '6 / 5 = 1.2 (left: 4 1.2 10)\n4 - 1.2 = 2.8 (left: 2.8 10)\n', '5 * 6 = 30 (left: 4 30 10)\n4 + 30 = 34 (left: 10 34)\n']
Traceback (most recent call last): File "D:\ProgramFiles\JetBrains\tree-of-thought-llm\run.py", line 90, in
run(args)
File "D:\ProgramFiles\JetBrains\tree-of-thought-llm\run.py", line 44, in run
ys, info = solve(args, task, i)
File "D:\Python310\lib\site-packages\tot\methods\bfs.py", line 68, in solve
values = get_values(task, x, new_ys, args.n_evaluate_sample)
File "D:\Python310\lib\site-packages\tot\methods\bfs.py", line 23, in get_values
value = get_value(task, x, y, n_evaluate_sample, cache_value=cache_value)
File "D:\Python310\lib\site-packages\tot\methods\bfs.py", line 10, in get_value
value_outputs = gpt(value_prompt, n=n_evaluate_sample, stop=None)
File "D:\Python310\lib\site-packages\tot\models.py", line 28, in gpt
return chatgpt(messages, model=model, temperature=temperature, max_tokens=max_tokens, n=n, stop=stop)
File "D:\Python310\lib\site-packages\tot\models.py", line 36, in chatgpt
res = completions_with_backoff(model=model, messages=messages, temperature=temperature, max_tokens=max_tokens, n=cnt, stop=stop)
File "D:\Python310\lib\site-packages\backoff_sync.py", line 105, in retry
ret = target(args, kwargs)
File "D:\Python310\lib\site-packages\tot\models.py", line 24, in completions_with_backoff
return openai.ChatCompletion.create(kwargs)
File "D:\Python310\lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create
return super().create(args, **kwargs)
File "D:\Python310\lib\site-packages\openai\api_resources\abstract\engine_apiresource.py", line 153, in create
response, , api_key = requestor.request(
File "D:\Python310\lib\site-packages\openai\api_requestor.py", line 230, in request
resp, got_stream = self._interpret_response(result, stream)
File "D:\Python310\lib\site-packages\openai\api_requestor.py", line 624, in _interpret_response
self._interpret_response_line(
File "D:\Python310\lib\site-packages\openai\api_requestor.py", line 667, in _interpret_response_line
raise error.ServiceUnavailableError(
openai.error.ServiceUnavailableError: The server is overloaded or not ready yet.
Is this the model's reason? Should i use gpt-3.5-turbo-16 or gpt-4 to solve this error?