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.73k stars 244 forks source link

IndexError: list index out of range #28

Open 11whitewater opened 7 months ago

11whitewater commented 7 months ago

hello , thank you very much for your work. When I run "python eureka.py env=humanoid sample=16 iteration=5 model=gpt-3.5-turbo-16k-0613", it occurs "IndexError: list index out of range". What should I do to run it correctly? image

11whitewater commented 7 months ago

hello , thank you very much for your work. When I run "python eureka.py env=humanoid sample=16 iteration=5 model=gpt-3.5-turbo-16k-0613", it occurs "IndexError: list index out of range". What should I do to run it correctly? image

code_runs = [] rl_runs = [] for response_id in range(min(cfg.sample, len(responses))): # 确保不超出 responses 列表的长度 if "message" in responses[response_id] and "content" in responses[response_id]["message"]: response_cur = responses[response_id]["message"]["content"] logging.info(f"Iteration {iter}: Processing Code Run {response_id}")

其他处理代码...

else:
    logging.warning(f"Missing or incomplete response at index {response_id}. Skipping.")