Spaces:
Sleeping
Sleeping
File size: 846 Bytes
45c94ac f4dcf31 45c94ac | 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 30 31 32 | """
Data models for the CI/CD Doctor RL environment.
"""
from pydantic import BaseModel, Field
from typing import Dict, Any, List
class PipelineAction(BaseModel):
command: str # raw string the agent types, e.g. "cat requirements.txt"2
class PipelineObservation(BaseModel):
stdout: str
exit_code: int
pipeline_status: str # "not_run" | "running" | "passed" | "failed"
steps_remaining: int
done: bool = False
reward: float = 0.0
class PipelineState(BaseModel):
episode_id: str
task: str # "easy" | "medium" | "hard"
filesystem: Dict[str, str]
pipeline_status: str
step_count: int
done: bool
total_reward: float
answer_key: Dict[str, Any] # never sent to agent, used by grader
milestones: List[str] = Field(default_factory=list) # grader-only, tracks unlocked reward tiers
|