Spaces:
Running
Running
File size: 1,169 Bytes
1779f34 | 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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | from __future__ import annotations
from typing import Any, Dict, List, Optional
from pydantic import BaseModel, Field
class DatasetSnapshot(BaseModel):
row_count: int
column_count: int
missing_cells: int
duplicate_rows: int
invalid_type_cells: int
schema_consistency: float = Field(ge=0.0, le=1.0)
class QualityGateResult(BaseModel):
name: str
passed: bool
message: str
class Observation(BaseModel):
task_id: str
stage: str
summary: str
available_tools: List[str]
snapshot: DatasetSnapshot
recent_events: List[str] = Field(default_factory=list)
quality_gates: List[QualityGateResult] = Field(default_factory=list)
done: bool = False
class FSDSAction(BaseModel):
tool_name: str
tool_args: Dict[str, Any] = Field(default_factory=dict)
class StepRequest(BaseModel):
action: FSDSAction
class ResetResponse(BaseModel):
observation: Observation
info: Dict[str, Any] = Field(default_factory=dict)
class StepResponse(BaseModel):
observation: Observation
reward: float
done: bool
truncated: bool = False
info: Dict[str, Any] = Field(default_factory=dict)
|