Files
NexQuant/rdagent/core/exception.py
T

66 lines
1.4 KiB
Python
Raw Normal View History

class WorkflowError(Exception):
"""
Exception indicating an error that the current loop cannot handle, preventing further progress.
"""
class FormatError(WorkflowError):
"""
After multiple attempts, we are unable to obtain the answer in the correct format to proceed.
"""
class CoderError(WorkflowError):
2024-05-21 22:48:41 +08:00
"""
Exceptions raised when Implementing and running code.
2024-07-05 17:42:00 +08:00
- start: FactorTask => FactorGenerator
2024-05-21 22:48:41 +08:00
- end: Get dataframe after execution
The more detailed evaluation in dataframe values are managed by the evaluator.
"""
# NOTE: it corresponds to the error of **component**
2024-05-21 22:48:41 +08:00
2024-07-18 22:36:04 +08:00
class CodeFormatError(CoderError):
2024-05-21 22:48:41 +08:00
"""
The generated code is not found due format error.
"""
2024-07-18 22:36:04 +08:00
class CustomRuntimeError(CoderError):
2024-05-21 22:48:41 +08:00
"""
The generated code fail to execute the script.
"""
2024-07-18 22:36:04 +08:00
class NoOutputError(CoderError):
2024-05-21 22:48:41 +08:00
"""
The code fail to generate output file.
"""
2024-07-17 15:00:13 +08:00
class RunnerError(Exception):
2024-07-17 15:00:13 +08:00
"""
Exceptions raised when running the code output.
"""
# NOTE: it corresponds to the error of whole **project**
2024-07-17 15:00:13 +08:00
2025-02-25 12:06:07 +08:00
FactorEmptyError = CoderError # Exceptions raised when no factor is generated correctly
2024-07-17 15:00:13 +08:00
2025-02-25 12:06:07 +08:00
ModelEmptyError = CoderError # Exceptions raised when no model is generated correctly
2024-11-04 14:57:10 +08:00
class KaggleError(Exception):
"""
Exceptions raised when calling Kaggle API
"""
2025-05-29 17:23:06 +08:00
class PolicyError(Exception):
"""
Exceptions raised due to content management policy
"""