Whole file
gepa-ai/gepa
The author described this change as “Add tests and fix issue”. It counts as a record because the check below fails on the code as it stood at 86ab82104 and passes on 55cac0c44, with nothing else changed between the two runs.
Projectgepa-ai/gepa
Fix saved2025-08-13
Sharing licenceMIT · LICENSE
Change size+4 −4
What the code was meant to do, written into the code itself as a save note
Add tests and fix issue
The change
| 1 | 1 | from typing import Any, TypedDict | |
| 2 | 2 | ||
| 3 | - | import litellm | |
| 4 | - | ||
| 5 | - | from gepa import EvaluationBatch, GEPAAdapter | |
| 3 | + | from gepa.core.adapter import EvaluationBatch, GEPAAdapter | |
| 6 | 4 | ||
| 7 | 5 | ||
| 8 | 6 | # DataInst, Trajectory, RolloutOutput | |
| ⋯ | |||
| 24 | 22 | model: str, | |
| 25 | 23 | failure_score: float = 0.0, | |
| 26 | 24 | ): | |
| 25 | + | import litellm | |
| 27 | 26 | self.model = model | |
| 28 | 27 | self.failure_score = failure_score | |
| 28 | + | self.litellm = litellm | |
| 29 | 29 | ||
| 30 | 30 | def evaluate( | |
| 31 | 31 | self, | |
| ⋯ | |||
| 52 | 52 | litellm_requests.append(messages) | |
| 53 | 53 | ||
| 54 | 54 | try: | |
| 55 | - | responses = litellm.batch_completion(model=self.model, messages=litellm_requests) | |
| 55 | + | responses = self.litellm.batch_completion(model=self.model, messages=litellm_requests) | |
| 56 | 56 | except Exception as e: | |
| 57 | 57 | raise e | |
| 58 | 58 | ||
The check that tells the two apart
fail→pass·tests/test_import.py::test_package_import
Check file tests/test_import.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it86ab821046632df3e8600f5e15279ad20da59cf8
Broken version dated2025-08-13
Modulegepa.adapters.default_adapter
Units changedDefaultAdapter
Fingerprint07800ed0dfa23347
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in gepa-ai/gepa
- 2026-08-11_from_legacy_config
- 2025-10-23EpochShuffledBatchSampler
- 2025-10-15Fix bug with merge overalp logic and add test case to cover correctness
- 2025-09-24fix: gepa state initialization from run_dir