Spaces:
Sleeping
Sleeping
Fix: Always pass reflection_lm_callable to GEPA - was broken when LLEGO disabled
Browse filesThe bug: When use_llego_operators=False, reflection_lm was set to None,
which meant GEPA could not generate any new candidate prompts.
Fix: Always pass the reflection_lm_callable to GEPA regardless of LLEGO mode.
This allows GEPA reflection to work even without LLEGO genetic operators.
src/gepa_optimizer/core/optimizer.py
CHANGED
|
@@ -896,10 +896,10 @@ Output the improved prompt directly and only the prompt."""
|
|
| 896 |
|
| 897 |
# Prepare optimization parameters with ONLY valid GEPA parameters
|
| 898 |
# Note: 'adapter' variable is set above (either LLEGO-enhanced or standard)
|
| 899 |
-
# 🔥
|
| 900 |
-
|
| 901 |
-
|
| 902 |
-
|
| 903 |
|
| 904 |
# Debug logging removed - not needed in production
|
| 905 |
|
|
|
|
| 896 |
|
| 897 |
# Prepare optimization parameters with ONLY valid GEPA parameters
|
| 898 |
# Note: 'adapter' variable is set above (either LLEGO-enhanced or standard)
|
| 899 |
+
# 🔥 FIX: ALWAYS pass reflection_lm_callable to GEPA (required for generating new candidates!)
|
| 900 |
+
# Previously this was only passed when use_llego_operators=True, which broke standard reflection
|
| 901 |
+
reflection_lm_passed = reflection_lm_callable # Always pass reflection callable
|
| 902 |
+
self.logger.info(f"✅ reflection_lm_callable passed to GEPA (LLEGO={self.config.use_llego_operators})")
|
| 903 |
|
| 904 |
# Debug logging removed - not needed in production
|
| 905 |
|