错误¶
本节包含 distilabel
自定义错误。与 异常 不同,distilabel
中的错误用于处理无法预测且无法以受控方式处理的意外情况。
DistilabelError
¶
所有 Distilabel 特定错误共享的通用功能的 mixin 类。
属性
名称 | 类型 | 描述 |
---|---|---|
message |
描述错误的消息。 |
|
page |
来自 PydanticErrorCodes 枚举的可选错误代码。 |
示例
raise DistilabelUserError("This is an error message.")
This is an error message.
raise DistilabelUserError("This is an error message.", page="sections/getting_started/faq/")
This is an error message.
For further information visit 'https://distilabel.argilla.com.cn/latest/sections/getting_started/faq/'
src/distilabel/errors.py
中的源代码
DistilabelUserError
¶
DistilabelTypeError
¶
DistilabelNotImplementedError
¶
基类: DistilabelError
, NotImplementedError
我们可以重定向到文档中给定页面的 NotImplementedError。