Suhasdev commited on
Commit
6c19fd6
·
1 Parent(s): 3ba279d

Fix: Always pass reflection_lm_callable to GEPA - was broken when LLEGO disabled

Browse files

The 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
- # 🔥 REMOVED: Excessive diagnostic warnings - moved to DEBUG level
900
- reflection_lm_passed = reflection_lm_callable if self.config.use_llego_operators else None
901
- if reflection_lm_passed:
902
- self.logger.debug(f"reflection_lm_callable passed to GEPA (may be ignored in adapter mode)")
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