Data model for a single benchmark task
| 7 | from src.dynamic import dynamic_manager |
| 8 | |
| 9 | class Task(BaseModel): |
| 10 | """Data model for a single benchmark task""" |
| 11 | model_config = ConfigDict(arbitrary_types_allowed=True, extra="allow") |
| 12 | |
| 13 | # Input |
| 14 | task_id: str = Field(description="Unique identifier for the task") |
| 15 | input: str = Field(description="The input prompt/question for the task") |
| 16 | system_prompt: Optional[str] = Field(default=None, description="The system prompt for the task") |
| 17 | ground_truth: Optional[Any] = Field(default=None, description="The expected correct answer") |
| 18 | |
| 19 | # Output |
| 20 | reasoning: Optional[str] = Field(default=None, description="The reasoning process") |
| 21 | result: Optional[Any] = Field(default=None, description="The final answer") |
| 22 | time: Optional[float] = Field(default=0.0, description="The time taken to complete the task in seconds") |
| 23 | score: Optional[float] = Field(default=0.0, description="The score of the task") |
| 24 | |
| 25 | extra: Optional[Dict[str, Any]] = Field(default=None, description="Additional task-specific metadata") |
| 26 | |
| 27 | class Result(BaseModel): |
| 28 | """Data model for the evaluation result of a single task""" |
no outgoing calls
no test coverage detected