You've already forked DataMate
feature: add data-evaluation
* feature: add evaluation task management function * feature: add evaluation task detail page * fix: delete duplicate definition for table t_model_config * refactor: rename package synthesis to ratio * refactor: add eval file table and refactor related code * fix: calling large models in parallel during evaluation
This commit is contained in:
17
runtime/datamate-python/app/core/exception.py
Normal file
17
runtime/datamate-python/app/core/exception.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from enum import Enum
|
||||
|
||||
class BusinessErrorCode:
|
||||
def __init__(self, message: str, error_code: str):
|
||||
self.message = message
|
||||
self.error_code = error_code
|
||||
|
||||
|
||||
class BusinessException(RuntimeError):
|
||||
def __init__(self, business_error_code: BusinessErrorCode):
|
||||
self.message = business_error_code.message
|
||||
self.error_code = business_error_code.error_code
|
||||
super().__init__(self.message)
|
||||
|
||||
|
||||
class BusinessErrorCodeEnum(Enum):
|
||||
TASK_TYPE_ERROR = BusinessErrorCode("任务类型错误", "evaluation.0001")
|
||||
Reference in New Issue
Block a user