Skip to content
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

RuntimeError: All individuals are invalid #12

Closed
TuuSiwei opened this issue Jul 22, 2024 · 1 comment
Closed

RuntimeError: All individuals are invalid #12

TuuSiwei opened this issue Jul 22, 2024 · 1 comment

Comments

@TuuSiwei
Copy link

[2024-07-22 19:57:06,333][root][INFO] - Workspace: D:\deeplearning\LLM-as-HH\outputs\main\2024-07-22_19-57-06
[2024-07-22 19:57:06,333][root][INFO] - Project Root: D:\deeplearning\LLM-as-HH
[2024-07-22 19:57:06,333][root][INFO] - Using LLM: llama3-70b
[2024-07-22 19:57:06,333][root][INFO] - Using Algorithm: reevo
[2024-07-22 19:57:07,393][root][INFO] - Problem: tsp_aco
[2024-07-22 19:57:07,393][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-07-22 19:57:07,393][root][INFO] - Function name: heuristics
[2024-07-22 19:57:07,394][root][INFO] - Evaluating seed function...
[2024-07-22 19:57:07,395][root][INFO] - Seed function code:
import numpy as np
def heuristics_v2(distance_matrix: np.ndarray) -> np.ndarray:
return 1 / distance_matrix
[2024-07-22 19:57:07,395][root][INFO] - Iteration 0: Running Code 0
[2024-07-22 19:57:09,359][root][INFO] - Iteration 0: Code Run 0 successful!
[2024-07-22 19:57:16,735][root][INFO] - Iteration 0, response_id 0: Objective value: 6.469335357675092
[2024-07-22 19:57:16,735][root][INFO] - Iteration 0: Elitist: 6.469335357675092
[2024-07-22 19:57:16,735][root][INFO] - Iteration 0 finished...
[2024-07-22 19:57:16,735][root][INFO] - Best obj: 6.469335357675092, Best Code Path: problem_iter0_code0.py
[2024-07-22 19:57:16,735][root][INFO] - Function Evals: 1
[2024-07-22 19:57:16,735][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 ... .

How to solve the problem?

@henry-yeh
Copy link
Member

Thank you for your interest.

RuntimeError: All individuals are invalid. Please check the stdout files in D:\deeplearning\LLM-as-HH\outputs\main\2024-07-22_19-57-06.

Please check out the stdout files accordingly to see why all generated individuals are invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants