Task¶
gepa.optimize_anything.Task(name: str, seed_candidate: str | dict[str, str] | None = None, objective: str = '', background: str = '', train_set: list[Any] | None = None, val_set: list[Any] | None = None, test_set: list[Any] | None = None)
dataclass
¶
A task definition for the optimize_anything API.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Unique identifier (e.g. |
seed_candidate |
str | dict[str, str] | None
|
Seed to evolve from — a single text string, or a
|
objective |
str
|
Short goal statement (e.g. "Maximize sum of circle radii"). Surfaced verbatim by every engine as the optimization goal. |
background |
str
|
Long-form context — problem statement, evaluation rules, domain notes. Surfaced verbatim by every engine. |
train_set |
list[Any] | None
|
Optional training examples (used for optimization). Items are opaque — any object the evaluator understands. |
val_set |
list[Any] | None
|
Optional validation examples (used for candidate selection). |
test_set |
list[Any] | None
|
Optional held-out test examples. Held outside the eval server and scored (seed + optimized) outside the budget only when present; skipped entirely when omitted. |