Spaces:
Build error
Build error
Download src/utils/data_quality.py from atr0p05/RobotPai: direct link, hf CLI and curl.
- Browser
- Download file 738 Bytes
-
https://huggingface.co/spaces/atr0p05/RobotPai/resolve/main/src/utils/data_quality.py
- Command line
-
hf download hf://spaces/atr0p05/RobotPai/src/utils/data_quality.py
-
curl -L -o data_quality.py https://huggingface.co/spaces/atr0p05/RobotPai/resolve/main/src/utils/data_quality.py
738 Bytes
| from enum import Enum, auto | |
| from dataclasses import dataclass | |
| from typing import Any, Optional | |
| class DataQualityLevel(Enum): | |
| LOW = auto() | |
| MEDIUM = auto() | |
| HIGH = auto() | |
| THOROUGH = auto() | |
| class ValidationResult: | |
| is_valid: bool = True | |
| quality_level: DataQualityLevel = DataQualityLevel.HIGH | |
| message: Optional[str] = None | |
| details: Any = None | |
| class ValidatedQuery: | |
| query: str = "" | |
| is_valid: bool = True | |
| quality_level: DataQualityLevel = DataQualityLevel.HIGH | |
| class DataQualityValidator: | |
| def __init__(self, *args, **kwargs): | |
| pass | |
| def validate(self, data: Any) -> ValidationResult: | |
| # Stub: always returns valid/high | |
| return ValidationResult() |