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.

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

11 from typing import Any, TypedDict
22
3-import litellm
4-
5-from gepa import EvaluationBatch, GEPAAdapter
3+from gepa.core.adapter import EvaluationBatch, GEPAAdapter
64
75
86 # DataInst, Trajectory, RolloutOutput
2422 model: str,
2523 failure_score: float = 0.0,
2624 ):
25+ import litellm
2726 self.model = model
2827 self.failure_score = failure_score
28+ self.litellm = litellm
2929
3030 def evaluate(
3131 self,
5252 litellm_requests.append(messages)
5353
5454 try:
55- responses = litellm.batch_completion(model=self.model, messages=litellm_requests)
55+ responses = self.litellm.batch_completion(model=self.model, messages=litellm_requests)
5656 except Exception as e:
5757 raise e
5858

The check that tells the two apart

failpass·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