Spaces:
Sleeping
Sleeping
File size: 838 Bytes
8aeb2b8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | from __future__ import annotations
from typing import List
from tasks.base_task import BaseTask
class MediumTask(BaseTask):
task_id = "medium_silent_cache"
difficulty = "medium"
config_path = "configs/medium_dag.yaml"
step_limit = 10
def get_system_prompt(self) -> str:
return (
"You are diagnosing a silent-cache scenario. "
"No explicit errors appear; use span details to detect timeout fallback patterns."
)
def grade(
self,
declared_service: str | None,
declared_fault: str | None,
steps_used: int,
rewards: List[float],
) -> float:
correct = declared_service == "Redis_Cache" and declared_fault == "Timeout"
return self._score_correct(correct=correct, steps_used=steps_used, step_limit=self.step_limit)
|