eureka-research / Eureka

Official Repository for "Eureka: Human-Level Reward Design via Coding Large Language Models" (ICLR 2024)
https://eureka-research.github.io/
MIT License
2.8k stars 254 forks source link

Error executing job with overrides: ['env=humanoid', 'sample=16', 'iteration=5', 'model=gpt-3.5-turbo-16k-0613'] #43

Closed Kamikazeknoedel closed 4 months ago

Kamikazeknoedel commented 4 months ago

Hi, I'm getting this error when I try to do Getting Started. Any tips on how to solve this?

(eureka) kamikazeknoedel@TechnoMage:~/Dokumente/Eureka/isaacgym/python/Eureka/eureka$ python eureka.py env=humanoid sample=16 iteration=5 model=gpt-3.5-turbo-16k-0613
2024-05-09 14:15:10,130][root][INFO] - Workspace: /home/kamikazeknoedel/Dokumente/Eureka/isaacgym/python/Eureka/eureka/outputs/eureka/2024-05-09_14-15-10
[2024-05-09 14:15:10,130][root][INFO] - Project Root: /home/kamikazeknoedel/Dokumente/Eureka/isaacgym/python/Eureka/eureka
[2024-05-09 14:15:10,130][root][INFO] - Using LLM: gpt-3.5-turbo-16k-0613
[2024-05-09 14:15:10,130][root][INFO] - Task: Humanoid
[2024-05-09 14:15:10,130][root][INFO] - Task description: to make the humanoid run as fast as possible
[2024-05-09 14:15:10,147][root][INFO] - Iteration 0: Generating 16 samples with gpt-3.5-turbo-16k-0613
[2024-05-09 14:15:16,864][httpx][INFO] - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
[2024-05-09 14:15:17,131][root][INFO] - Iteration 0: Prompt Tokens: 1085, Completion Tokens: 3129, Total Tokens: 4214
Error executing job with overrides: ['env=humanoid', 'sample=16', 'iteration=5', 'model=gpt-3.5-turbo-16k-0613']
Traceback (most recent call last):
  File "eureka.py", line 122, in main
    response_cur = responses[response_id]["message"]["content"]
TypeError: 'Choice' object is not subscriptable

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Yioy commented 4 months ago

Hi,

I had the same problem before. I replaced : response_cur = responses[response_id]["message"]["content"] by response_cur = responses[response_id].message.content

wredsen commented 4 months ago

Hi,

I had the same problem before. I replaced : response_cur = responses[response_id]["message"]["content"] by response_cur = responses[response_id].message.content

Thanks, this fixed the same error for me after normal installation.