Add ground_truth API and refactor
This commit is contained in:
parent
c5cafbee47
commit
421f9bb726
1 changed files with 409 additions and 211 deletions
|
|
@ -1,11 +1,8 @@
|
|||
from typing import Any, Optional, Union
|
||||
|
||||
from pydantic import BaseModel
|
||||
from ..helper import HashableBaseModel
|
||||
|
||||
|
||||
class RegressionOutput(BaseModel):
|
||||
class RegressionOutput(HashableBaseModel):
|
||||
value: Union[int, float]
|
||||
explanation: Optional[Any]
|
||||
|
||||
def __hash__(self) -> int:
|
||||
return hash((type(self),) + tuple(self.__dict__.values()))
|
||||
|
|
|
|||
Loading…
Reference in a new issue