-
Notifications
You must be signed in to change notification settings - Fork 26
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
超时报错问题 #15
Comments
您好,尝试一下更小的种群数量: 查看下 |
你好。我按照您给的指令输入进去跑了一下 , 还是报错。 错误 和 stdout 给您附上: (reevo-main) lab@lab-desktop:/ssd1/SNU/reevo-main$ python main.py problem=tsp_aco init_pop_size=2 pop_size=2 User Prompt: def heuristics_v1(distance_matrix: np.ndarray) -> np.ndarray: Refer to the format of a trivial design above. Be very creative and give
User Prompt: You are provided with two code versions below, where the second version performs better than the first one. [Worse code]
[Better code] You respond with some hints for designing better heuristics, based on the two code versions and using less than 20 words. User Prompt: [Worse code]
[Better code] [Reflection] [Improved code] User Prompt:
Below are some newly gained insights. Write constructive hints for designing better heuristics, based on prior reflections and new insights and using less than 50 words. User Prompt: [Prior reflection]
[Code]
[Improved code] stdout: |
此次运行没有问题,此处报错是因为我们将population size设置为2进行测试,出现了错误的heuristic后(这是因为LLM生成的问题),selection会失败。将population size调大即可避免这次报错。 由于减小population size即可顺利运行,您之前的问题是因为硬件性能。可以采取较小的init_population_size,或修改代码单进程评估population。 |
会影响的 |
您好 init_population_size 设置太小 例如init_population_size=5 会影响性能吗, 还有就是 论文里面用的是chatgpt, 而如果我用 GLM-4-Flash 会影响性能吗 |
采用不同参数会影响结果复现,对于新的应用影响不会太大 |
你好 请问这个tsp_aco 20 , 50 100个点 , 数据集是在哪里找的, 如果是自己手动创建, 该如何创建? |
您好我有以下两个问题想问一下您 1.请问这两个路径下的( problems/tsp_aco/test.ipynb 和 problems/tsp_gls/test.ipynb)的代码def heuristics_reevo(distance_matrix: np.ndarray) 为什么不一样 第1个问题的具体代码内容如下
在problems/tsp_gls/test.ipynb 路径下的代码为以下: def heuristics_reevo(distance_matrix: np.ndarray) -> np.ndarray:
def vanilla_ktsp(distance_matrix: np.ndarray) -> np.ndarray: 2-1.problems/tsp_gls/test.ipynb 里面的代码optimality gap 我跑出来了负数 是可以看作是0吗 请问 我在problems/tsp_gls/test.ipynb代码文件里面跑出来的结果是否是是您Table1 里面KGLS + ReEvo(ours) 方法的结果 evaluate(heuristics_reevo) erage for 20: 3.746594 (3.836285) evaluate(vanilla_ktsp) [] Average for 20: 3.746594 (3.836285) [] Average for 50: 5.635709 (5.684580) [] Average for 100: 7.739454 (7.778580) [] Average for 200: 10.725571 (10.711946) |
|
您好 有以下两个问题想问您
我的代码的性能: evaluate(heuristics_v2) [] Average for 20: 3.836448 (3.836285) [] Average for 50: 5.685814 (5.684580) [] Average for 100: 7.779085 (7.778580) [] Average for 200: 10.746896 (10.711946) evaluate(vanilla_ktsp) [] Average for 50: 5.685538 (5.684580) [] Average for 100: 7.778761 (7.778580) [] Average for 200: 10.742373 (10.711946) 官方代码的性能 evaluate(heuristics_reevo) [] Average for 50: 5.684580 (5.684580) [] Average for 100: 7.778580 (7.778580) [] Average for 200: 10.735125 (10.711946) evaluate(vanilla_ktsp) [] Average for 20: 3.836448 (3.836285) [] Average for 50: 5.685538 (5.684580) [] Average for 100: 7.778761 (7.778580) [] Average for 200: 10.742373 (10.711946) |
|
你好 我调用了 zhipu ai 的免费 api. GLM-4-Flash
然后出现了以下超时报错, config 文件里面的 timeout 默认设定是 20 , 最开始报超市错误 我把timeout超参数设置成了600 但是依然报错, 请是否能帮助我解决一下这个问题。
(reevo-main) lab@lab-desktop:/ssd1/reevo-main$ python main.py problem=tsp_aco
[2024-10-30 16:03:32,051][root][INFO] - Workspace: /ssd1/SNU/reevo-main/outputs/tsp_aco-aco/2024-10-30_16-03-32
[2024-10-30 16:03:32,051][root][INFO] - Project Root: /ssd1/SNU/reevo-main
[2024-10-30 16:03:32,051][root][INFO] - Using LLM: GLM-4-Flash
[2024-10-30 16:03:32,051][root][INFO] - Using Algorithm: reevo
[2024-10-30 16:03:32,417][root][INFO] - Problem: tsp_aco
[2024-10-30 16:03:32,423][root][INFO] - Problem description: Solving Traveling Salesman Problem (TSP) via stochastic solution sampling following "heuristics". TSP requires finding the shortest path that visits all given nodes and returns to the starting node.
[2024-10-30 16:03:32,423][root][INFO] - Function name: heuristics
[2024-10-30 16:03:32,423][root][INFO] - Evaluating seed function...
[2024-10-30 16:03:32,423][root][INFO] - Seed function code:
import numpy as np
def heuristics_v2(distance_matrix: np.ndarray) -> np.ndarray:
return 1 / distance_matrix
[2024-10-30 16:03:32,423][root][INFO] - Iteration 0: Running Code 0
[2024-10-30 16:03:33,686][root][INFO] - Iteration 0: Code Run 0 successful!
[2024-10-30 16:03:40,360][root][INFO] - Iteration 0, response_id 0: Objective value: 6.627531378063073
[2024-10-30 16:03:40,361][root][INFO] - Iteration 0: Elitist: 6.627531378063073
[2024-10-30 16:03:40,361][root][INFO] - Iteration 0 finished...
[2024-10-30 16:03:40,361][root][INFO] - Best obj: 6.627531378063073, Best Code Path: problem_iter0_code0.py
[2024-10-30 16:03:40,361][root][INFO] - Function Evals: 1
[2024-10-30 16:03:40,361][root][INFO] - Initial Population Prompt:
System Prompt:
You are an expert in the domain of optimization heuristics. Your task is to design heuristics that can effectively solve optimization problems.
Your response outputs Python code and nothing else. Format your code as a Python code string: "
python ...
".User Prompt:
Write a heuristics function for Solving Traveling Salesman Problem (TSP) via stochastic solution sampling following "heuristics". TSP requires finding the shortest path that visits all given nodes and returns to the starting node.
The
heuristics
function takes as input a distance matrix, and returns prior indicators of how promising it is to include each edge in a solution. The return is of the same shape as the input.def heuristics_v1(distance_matrix: np.ndarray) -> np.ndarray:
return 1 / distance_matrix
Refer to the format of a trivial design above. Be very creative and give
heuristics_v2
. Output code only and enclose your code with Python code block:python ...
.[2024-10-30 16:03:44,381][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:45,224][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:45,934][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:46,429][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:46,429][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:47,178][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:47,497][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:47,661][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:48,004][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:48,377][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:48,716][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:48,722][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:48,839][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:48,905][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:49,606][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:49,713][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:50,018][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:50,624][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:50,754][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:51,039][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:51,856][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:51,937][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:52,138][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:52,769][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:53,799][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:54,413][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:55,441][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:56,717][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:56,749][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:59,717][httpx][INFO] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK"
[2024-10-30 16:03:59,727][root][INFO] - Iteration 1: Running Code 0
[2024-10-30 16:04:00,899][root][INFO] - Iteration 1: Code Run 0 successful!
[2024-10-30 16:04:00,899][root][INFO] - Iteration 1: Running Code 1
[2024-10-30 16:04:02,187][root][INFO] - Iteration 1: Code Run 1 successful!
[2024-10-30 16:04:02,187][root][INFO] - Iteration 1: Running Code 2
[2024-10-30 16:04:03,689][root][INFO] - Iteration 1: Code Run 2 successful!
[2024-10-30 16:04:03,689][root][INFO] - Iteration 1: Running Code 3
[2024-10-30 16:04:05,235][root][INFO] - Iteration 1: Code Run 3 successful!
[2024-10-30 16:04:05,235][root][INFO] - Iteration 1: Running Code 4
[2024-10-30 16:04:06,788][root][INFO] - Iteration 1: Code Run 4 successful!
[2024-10-30 16:04:06,788][root][INFO] - Iteration 1: Running Code 5
[2024-10-30 16:04:08,445][root][INFO] - Iteration 1: Code Run 5 successful!
[2024-10-30 16:04:08,445][root][INFO] - Iteration 1: Running Code 6
[2024-10-30 16:04:10,121][root][INFO] - Iteration 1: Code Run 6 successful!
[2024-10-30 16:04:10,121][root][INFO] - Iteration 1: Running Code 7
[2024-10-30 16:04:12,435][root][INFO] - Iteration 1: Code Run 7 successful!
[2024-10-30 16:04:12,435][root][INFO] - Iteration 1: Running Code 8
[2024-10-30 16:04:14,561][root][INFO] - Iteration 1: Code Run 8 successful!
[2024-10-30 16:04:14,562][root][INFO] - Iteration 1: Running Code 9
[2024-10-30 16:04:16,723][root][INFO] - Iteration 1: Code Run 9 successful!
[2024-10-30 16:04:16,724][root][INFO] - Iteration 1: Running Code 10
[2024-10-30 16:04:19,927][root][INFO] - Iteration 1: Code Run 10 execution error!
[2024-10-30 16:04:19,927][root][INFO] - Iteration 1: Running Code 11
[2024-10-30 16:04:22,127][root][INFO] - Iteration 1: Code Run 11 successful!
[2024-10-30 16:04:22,127][root][INFO] - Iteration 1: Running Code 12
[2024-10-30 16:04:25,174][root][INFO] - Iteration 1: Code Run 12 successful!
[2024-10-30 16:04:25,181][root][INFO] - Iteration 1: Running Code 13
[2024-10-30 16:04:27,708][root][INFO] - Iteration 1: Code Run 13 successful!
[2024-10-30 16:04:27,708][root][INFO] - Iteration 1: Running Code 14
[2024-10-30 16:04:29,989][root][INFO] - Iteration 1: Code Run 14 successful!
[2024-10-30 16:04:29,990][root][INFO] - Iteration 1: Running Code 15
[2024-10-30 16:04:32,990][root][INFO] - Iteration 1: Code Run 15 successful!
[2024-10-30 16:04:32,990][root][INFO] - Iteration 1: Running Code 16
[2024-10-30 16:04:35,998][root][INFO] - Iteration 1: Code Run 16 successful!
[2024-10-30 16:04:35,999][root][INFO] - Iteration 1: Running Code 17
[2024-10-30 16:04:40,786][root][INFO] - Iteration 1: Code Run 17 successful!
[2024-10-30 16:04:40,787][root][INFO] - Iteration 1: Running Code 18
[2024-10-30 16:04:49,578][root][INFO] - Iteration 1: Code Run 18 successful!
[2024-10-30 16:04:49,578][root][INFO] - Iteration 1: Running Code 19
[2024-10-30 16:04:55,430][root][INFO] - Iteration 1: Code Run 19 successful!
[2024-10-30 16:04:55,431][root][INFO] - Iteration 1: Running Code 20
[2024-10-30 16:05:05,903][root][INFO] - Iteration 1: Code Run 20 successful!
[2024-10-30 16:05:05,903][root][INFO] - Iteration 1: Running Code 21
[2024-10-30 16:05:10,701][root][INFO] - Iteration 1: Code Run 21 execution error!
[2024-10-30 16:05:10,701][root][INFO] - Iteration 1: Running Code 22
[2024-10-30 16:05:15,312][root][INFO] - Iteration 1: Code Run 22 successful!
[2024-10-30 16:05:15,312][root][INFO] - Iteration 1: Running Code 23
[2024-10-30 16:05:19,379][root][INFO] - Iteration 1: Code Run 23 successful!
[2024-10-30 16:05:19,379][root][INFO] - Iteration 1: Running Code 24
[2024-10-30 16:05:23,234][root][INFO] - Iteration 1: Code Run 24 successful!
[2024-10-30 16:05:23,235][root][INFO] - Iteration 1: Running Code 25
[2024-10-30 16:05:27,360][root][INFO] - Iteration 1: Code Run 25 successful!
[2024-10-30 16:05:27,361][root][INFO] - Iteration 1: Running Code 26
[2024-10-30 16:05:30,673][root][INFO] - Iteration 1: Code Run 26 execution error!
[2024-10-30 16:05:30,676][root][INFO] - Iteration 1: Running Code 27
[2024-10-30 16:05:32,799][root][INFO] - Iteration 1: Code Run 27 successful!
[2024-10-30 16:05:32,799][root][INFO] - Iteration 1: Running Code 28
[2024-10-30 16:05:35,549][root][INFO] - Iteration 1: Code Run 28 execution error!
[2024-10-30 16:05:35,549][root][INFO] - Iteration 1: Running Code 29
[2024-10-30 16:05:39,294][root][INFO] - Iteration 1: Code Run 29 successful!
[2024-10-30 16:15:39,294][root][INFO] - Error for response_id 0: Command '['python', '-u', '/ssd1/SNU/reevo-main/problems/tsp_aco/eval.py', '50', '/ssd1/reevo-main', 'train']' timed out after 599.9999819584191 seconds
^C^CTraceback (most recent call last):
File "/home/lab/anaconda3/envs/reevo-main/lib/python3.11/subprocess.py", line 1264, in wait
return self._wait(timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lab/anaconda3/envs/reevo-main/lib/python3.11/subprocess.py", line 2047, in _wait
time.sleep(delay)
KeyboardInterrupt
The text was updated successfully, but these errors were encountered: