We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4bc59f8 + c91dd58 commit 30cd4d1Copy full SHA for 30cd4d1
2 files changed
examples/circle_packing/evaluator.py
@@ -45,6 +45,15 @@ def validate_packing(centers, radii):
45
print("NaN values detected in circle radii")
46
return False
47
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
56
+
57
# Check if circles are inside the unit square
58
for i in range(n):
59
x, y = centers[i]
openevolve/llm/openai.py
@@ -38,6 +38,7 @@ def __init__(
38
self.client = openai.OpenAI(
39
api_key=self.api_key,
40
base_url=self.api_base,
41
+ timeout=self.timeout,
42
)
43
44
# Only log unique models to reduce duplication
0 commit comments