Spaces:
Configuration error
Configuration error
Download app/core/exceptions.py from orderlymirror/loos: direct link, hf CLI and curl.
- Browser
- Download file 789 Bytes
-
https://huggingface.co/spaces/orderlymirror/loos/resolve/main/app/core/exceptions.py
- Command line
-
hf download hf://spaces/orderlymirror/loos/app/core/exceptions.py
-
curl -L -o exceptions.py https://huggingface.co/spaces/orderlymirror/loos/resolve/main/app/core/exceptions.py
789 Bytes
| """Custom exception classes for the AI Services V2 layer.""" | |
| class DatasetError(Exception): | |
| """Raised when dataset operations fail (missing file, schema mismatch).""" | |
| class TrainingError(Exception): | |
| """Raised when a model training pipeline fails. | |
| Attributes: | |
| model_name: The name of the model whose training failed. | |
| message: Human-readable description of the failure. | |
| """ | |
| def __init__(self, message: str, model_name: str) -> None: | |
| self.model_name = model_name | |
| super().__init__(f"[{model_name}] {message}") | |
| class ModelNotLoadedError(Exception): | |
| """Raised when inference is attempted on an unloaded model.""" | |
| class EntityNotFoundError(Exception): | |
| """Raised when a referenced entity (student, LO, class) doesn't exist.""" | |