异常 hscredit.exceptions
所有自定义异常均继承自 HSCreditError,便于统一捕获。
hscredit 统一异常体系.
提供项目级的异常类型,兼容原生异常语义,方便调用方统一捕获。
- exception hscredit.exceptions.ValidationError[源代码]
基类:
ValueError,HSCreditError参数或数据校验失败。
- exception hscredit.exceptions.InputTypeError[源代码]
基类:
TypeError,HSCreditError输入类型不符合要求。
- exception hscredit.exceptions.FeatureNotFoundError[源代码]
基类:
KeyError,HSCreditError特征或字段不存在。
- exception hscredit.exceptions.StateError[源代码]
基类:
RuntimeError,HSCreditError对象状态不符合预期。
- exception hscredit.exceptions.ParallelExecutionError[源代码]
基类:
StateError并行任务执行失败。
- exception hscredit.exceptions.NotFittedError[源代码]
基类:
ValueError,StateError对象尚未完成拟合。
- exception hscredit.exceptions.DependencyError[源代码]
基类:
ImportError,HSCreditError缺少可选依赖。
- hscredit.exceptions.raise_not_fitted(component_name, action='请先调用fit方法')[源代码]
抛出统一的未拟合异常。
- 参数:
component_name (str)
action (str)
- 返回类型:
None