Skip to content

Commit 30cd4d1

Browse files
committed
Merge branch 'main' into fix-llm-feedback
2 parents 4bc59f8 + c91dd58 commit 30cd4d1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

examples/circle_packing/evaluator.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ def validate_packing(centers, radii):
4545
print("NaN values detected in circle radii")
4646
return False
4747

48+
# Check if radii are nonnegative and not nan
49+
for i in range(n):
50+
if(radii[i] < 0):
51+
print(f"Circle {i} has negative radius {radii[i]}")
52+
return False
53+
elif(np.isnan(radii[i])):
54+
print(f"Circle {i} has nan radius")
55+
return False
56+
4857
# Check if circles are inside the unit square
4958
for i in range(n):
5059
x, y = centers[i]

openevolve/llm/openai.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def __init__(
3838
self.client = openai.OpenAI(
3939
api_key=self.api_key,
4040
base_url=self.api_base,
41+
timeout=self.timeout,
4142
)
4243

4344
# Only log unique models to reduce duplication

0 commit comments

Comments
 (0)