Download src/reference_db/quality/gate.py from offCanada/reference-db-system: direct link, hf CLI and curl.
- Browser
- Download file 417 Bytes
-
https://huggingface.co/offCanada/reference-db-system/resolve/main/src/reference_db/quality/gate.py
- Command line
-
hf download hf://offCanada/reference-db-system/src/reference_db/quality/gate.py
-
curl -L -o gate.py https://huggingface.co/offCanada/reference-db-system/resolve/main/src/reference_db/quality/gate.py
417 Bytes
| from dataclasses import dataclass | |
| from typing import Literal | |
| QualityStatus = Literal[ | |
| "PASS", | |
| "WARNING", | |
| "AMBIGUOUS", | |
| "FAIL", | |
| ] | |
| class QualityResult: | |
| status: QualityStatus | |
| message: str = "" | |
| def is_allowed_to_continue(result: QualityResult) -> bool: | |
| """ | |
| Return whether the pipeline can continue to the next phase. | |
| """ | |
| return result.status in {"PASS", "WARNING"} | |