ding.utils.loader.exception¶
ding.utils.loader.exception
¶
Full Source Code
../ding/utils/loader/exception.py
1from abc import ABCMeta, abstractmethod 2from typing import List, Union, Tuple 3 4INDEX_TYPING = Union[int, str] 5ERROR_ITEM_TYPING = Tuple[INDEX_TYPING, Exception] 6ERROR_ITEMS = List[ERROR_ITEM_TYPING] 7 8 9class CompositeStructureError(ValueError, metaclass=ABCMeta): 10 """ 11 Overview: 12 Composite structure error. 13 Interfaces: 14 ``__init__``, ``errors`` 15 Properties: 16 ``errors`` 17 """ 18 19 @property 20 @abstractmethod 21 def errors(self) -> ERROR_ITEMS: 22 """ 23 Overview: 24 Get the errors. 25 """ 26 27 raise NotImplementedError