Spaces:
Configuration error
Configuration error
Download Guardrails/validation.py from Jayandhan/Analyst_agent_v2: direct link, hf CLI and curl.
- Browser
- Download file 794 Bytes
-
https://huggingface.co/spaces/Jayandhan/Analyst_agent_v2/resolve/main/Guardrails/validation.py
- Command line
-
hf download hf://spaces/Jayandhan/Analyst_agent_v2/Guardrails/validation.py
-
curl -L -o validation.py https://huggingface.co/spaces/Jayandhan/Analyst_agent_v2/resolve/main/Guardrails/validation.py
794 Bytes
| # In Guardrails/validation.py (create a new file) | |
| from pydantic import BaseModel, Field | |
| from typing import List | |
| class ValidationCheck(BaseModel): | |
| column: str = Field(description="The column that was checked.") | |
| action: str = Field(description="The cleaning action that was validated.") | |
| passed: bool = Field(description="True if the validation check passed, False otherwise.") | |
| details: str = Field(description="A description of the check performed and the outcome (e.g., 'Checked dtype, found int64 as expected').") | |
| class ValidationReport(BaseModel): | |
| overall_summary: str = Field(description="A high-level summary of the entire validation process.") | |
| checks: List[ValidationCheck] = Field(description="A list of all individual validation checks performed.") |