unitxt.error_utils module

class unitxt.error_utils.Documentation[source]

Bases: object

exception unitxt.error_utils.UnitxtError(message: str, additional_info_id: str | None = None)[source]

Bases: Exception

Exception raised for Unitxt errors.

Parameters:
  • message (str) – explanation of the error

  • additional_info_id (Optional[str]) – relative path to additional documentation on web If set, should be one of the DOCUMENATION_* constants in the error_utils.py file.

class unitxt.error_utils.UnitxtWarning(message: str, additional_info_id: str | None = None)[source]

Bases: object

Object to format warning message to log.

Parameters:
  • message (str) – explanation of the warning

  • additional_info_id (Optional[str]) – relative path to additional documentation on web If set, should be one of the DOCUMENATION_* constants in the error_utils.py file.

unitxt.error_utils.additional_info(path: str) str[source]