Add exception logging

This commit is contained in:
Andras Schmelczer 2022-05-26 21:00:14 +02:00
commit cdc43f75ac

View file

@ -0,0 +1,12 @@
from typing import Any, Optional, Union
from pydantic import BaseModel
class ClassificationOutput(BaseModel):
label: Union[str, int]
confidence: float
explanation: Optional[Any]
def __hash__(self) -> int:
return hash((type(self),) + tuple(self.__dict__.values()))