From 581356061430f91a98c32d17783f435c57b602be Mon Sep 17 00:00:00 2001 From: Mikhail Sveshnikov Date: Wed, 11 Sep 2024 23:20:57 +0400 Subject: [PATCH] add base api model (#1298) --- src/evidently/ui/api/models.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/evidently/ui/api/models.py b/src/evidently/ui/api/models.py index a6308652f2..ddc28e6f1d 100644 --- a/src/evidently/ui/api/models.py +++ b/src/evidently/ui/api/models.py @@ -8,6 +8,7 @@ from typing import TypeVar from evidently._pydantic_compat import BaseModel +from evidently._pydantic_compat import Extra from evidently.base_metric import Metric from evidently.model.dashboard import DashboardInfo from evidently.model.widget import BaseWidgetInfo @@ -29,6 +30,12 @@ from evidently.ui.type_aliases import UserID +class EvidentlyAPIModel(BaseModel): + # todo: migrate all models to this base + class Config: + extra = Extra.forbid + + class MetricModel(BaseModel): id: str