mlrun 1.4.0rc25__py3-none-any.whl → 1.5.0rc2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mlrun might be problematic. Click here for more details.
- mlrun/__init__.py +2 -35
- mlrun/__main__.py +3 -41
- mlrun/api/api/api.py +6 -0
- mlrun/api/api/endpoints/feature_store.py +0 -4
- mlrun/api/api/endpoints/files.py +14 -2
- mlrun/api/api/endpoints/frontend_spec.py +2 -1
- mlrun/api/api/endpoints/functions.py +95 -59
- mlrun/api/api/endpoints/grafana_proxy.py +9 -9
- mlrun/api/api/endpoints/logs.py +17 -3
- mlrun/api/api/endpoints/model_endpoints.py +3 -2
- mlrun/api/api/endpoints/pipelines.py +1 -5
- mlrun/api/api/endpoints/projects.py +88 -0
- mlrun/api/api/endpoints/runs.py +48 -6
- mlrun/api/api/endpoints/submit.py +2 -1
- mlrun/api/api/endpoints/workflows.py +355 -0
- mlrun/api/api/utils.py +3 -4
- mlrun/api/crud/__init__.py +1 -0
- mlrun/api/crud/client_spec.py +6 -2
- mlrun/api/crud/feature_store.py +5 -0
- mlrun/api/crud/model_monitoring/__init__.py +1 -0
- mlrun/api/crud/model_monitoring/deployment.py +497 -0
- mlrun/api/crud/model_monitoring/grafana.py +96 -42
- mlrun/api/crud/model_monitoring/helpers.py +159 -0
- mlrun/api/crud/model_monitoring/model_endpoints.py +202 -476
- mlrun/api/crud/notifications.py +9 -4
- mlrun/api/crud/pipelines.py +6 -11
- mlrun/api/crud/projects.py +2 -2
- mlrun/api/crud/runtime_resources.py +4 -3
- mlrun/api/crud/runtimes/nuclio/helpers.py +5 -1
- mlrun/api/crud/secrets.py +21 -0
- mlrun/api/crud/workflows.py +352 -0
- mlrun/api/db/base.py +16 -1
- mlrun/api/db/init_db.py +2 -4
- mlrun/api/db/session.py +1 -1
- mlrun/api/db/sqldb/db.py +129 -31
- mlrun/api/db/sqldb/models/models_mysql.py +15 -1
- mlrun/api/db/sqldb/models/models_sqlite.py +16 -2
- mlrun/api/launcher.py +38 -6
- mlrun/api/main.py +3 -2
- mlrun/api/rundb/__init__.py +13 -0
- mlrun/{db → api/rundb}/sqldb.py +36 -84
- mlrun/api/runtime_handlers/__init__.py +56 -0
- mlrun/api/runtime_handlers/base.py +1247 -0
- mlrun/api/runtime_handlers/daskjob.py +209 -0
- mlrun/api/runtime_handlers/kubejob.py +37 -0
- mlrun/api/runtime_handlers/mpijob.py +147 -0
- mlrun/api/runtime_handlers/remotesparkjob.py +29 -0
- mlrun/api/runtime_handlers/sparkjob.py +148 -0
- mlrun/api/schemas/__init__.py +17 -6
- mlrun/api/utils/builder.py +1 -4
- mlrun/api/utils/clients/chief.py +14 -0
- mlrun/api/utils/clients/iguazio.py +33 -33
- mlrun/api/utils/clients/nuclio.py +2 -2
- mlrun/api/utils/periodic.py +9 -2
- mlrun/api/utils/projects/follower.py +14 -7
- mlrun/api/utils/projects/leader.py +2 -1
- mlrun/api/utils/projects/remotes/nop_follower.py +2 -2
- mlrun/api/utils/projects/remotes/nop_leader.py +2 -2
- mlrun/api/utils/runtimes/__init__.py +14 -0
- mlrun/api/utils/runtimes/nuclio.py +43 -0
- mlrun/api/utils/scheduler.py +98 -15
- mlrun/api/utils/singletons/db.py +5 -1
- mlrun/api/utils/singletons/project_member.py +4 -1
- mlrun/api/utils/singletons/scheduler.py +1 -1
- mlrun/artifacts/base.py +6 -6
- mlrun/artifacts/dataset.py +4 -4
- mlrun/artifacts/manager.py +2 -3
- mlrun/artifacts/model.py +2 -2
- mlrun/artifacts/plots.py +8 -8
- mlrun/common/db/__init__.py +14 -0
- mlrun/common/helpers.py +37 -0
- mlrun/{mlutils → common/model_monitoring}/__init__.py +3 -2
- mlrun/common/model_monitoring/helpers.py +69 -0
- mlrun/common/schemas/__init__.py +13 -1
- mlrun/common/schemas/auth.py +4 -1
- mlrun/common/schemas/client_spec.py +1 -1
- mlrun/common/schemas/function.py +17 -0
- mlrun/common/schemas/model_monitoring/__init__.py +48 -0
- mlrun/common/{model_monitoring.py → schemas/model_monitoring/constants.py} +11 -23
- mlrun/common/schemas/model_monitoring/grafana.py +55 -0
- mlrun/common/schemas/{model_endpoints.py → model_monitoring/model_endpoints.py} +32 -65
- mlrun/common/schemas/notification.py +1 -0
- mlrun/common/schemas/object.py +4 -0
- mlrun/common/schemas/project.py +1 -0
- mlrun/common/schemas/regex.py +1 -1
- mlrun/common/schemas/runs.py +1 -8
- mlrun/common/schemas/schedule.py +1 -8
- mlrun/common/schemas/workflow.py +54 -0
- mlrun/config.py +45 -42
- mlrun/datastore/__init__.py +21 -0
- mlrun/datastore/base.py +1 -1
- mlrun/datastore/datastore.py +9 -0
- mlrun/datastore/dbfs_store.py +168 -0
- mlrun/datastore/helpers.py +18 -0
- mlrun/datastore/sources.py +1 -0
- mlrun/datastore/store_resources.py +2 -5
- mlrun/datastore/v3io.py +1 -2
- mlrun/db/__init__.py +4 -68
- mlrun/db/base.py +12 -0
- mlrun/db/factory.py +65 -0
- mlrun/db/httpdb.py +175 -20
- mlrun/db/nopdb.py +4 -2
- mlrun/execution.py +4 -2
- mlrun/feature_store/__init__.py +1 -0
- mlrun/feature_store/api.py +1 -2
- mlrun/feature_store/common.py +2 -1
- mlrun/feature_store/feature_set.py +1 -11
- mlrun/feature_store/feature_vector.py +340 -2
- mlrun/feature_store/ingestion.py +5 -10
- mlrun/feature_store/retrieval/base.py +118 -104
- mlrun/feature_store/retrieval/dask_merger.py +17 -10
- mlrun/feature_store/retrieval/job.py +4 -1
- mlrun/feature_store/retrieval/local_merger.py +18 -18
- mlrun/feature_store/retrieval/spark_merger.py +21 -14
- mlrun/feature_store/retrieval/storey_merger.py +22 -16
- mlrun/kfpops.py +3 -9
- mlrun/launcher/base.py +57 -53
- mlrun/launcher/client.py +5 -4
- mlrun/launcher/factory.py +24 -13
- mlrun/launcher/local.py +6 -6
- mlrun/launcher/remote.py +4 -4
- mlrun/lists.py +0 -11
- mlrun/model.py +11 -17
- mlrun/model_monitoring/__init__.py +2 -22
- mlrun/model_monitoring/features_drift_table.py +1 -1
- mlrun/model_monitoring/helpers.py +22 -210
- mlrun/model_monitoring/model_endpoint.py +1 -1
- mlrun/model_monitoring/model_monitoring_batch.py +127 -50
- mlrun/model_monitoring/prometheus.py +219 -0
- mlrun/model_monitoring/stores/__init__.py +16 -11
- mlrun/model_monitoring/stores/kv_model_endpoint_store.py +95 -23
- mlrun/model_monitoring/stores/models/mysql.py +47 -29
- mlrun/model_monitoring/stores/models/sqlite.py +47 -29
- mlrun/model_monitoring/stores/sql_model_endpoint_store.py +31 -19
- mlrun/model_monitoring/{stream_processing_fs.py → stream_processing.py} +206 -64
- mlrun/model_monitoring/tracking_policy.py +104 -0
- mlrun/package/packager.py +6 -8
- mlrun/package/packagers/default_packager.py +121 -10
- mlrun/package/packagers/numpy_packagers.py +1 -1
- mlrun/platforms/__init__.py +0 -2
- mlrun/platforms/iguazio.py +0 -56
- mlrun/projects/pipelines.py +53 -159
- mlrun/projects/project.py +10 -37
- mlrun/render.py +1 -1
- mlrun/run.py +8 -124
- mlrun/runtimes/__init__.py +6 -42
- mlrun/runtimes/base.py +29 -1249
- mlrun/runtimes/daskjob.py +2 -198
- mlrun/runtimes/funcdoc.py +0 -9
- mlrun/runtimes/function.py +25 -29
- mlrun/runtimes/kubejob.py +5 -29
- mlrun/runtimes/local.py +1 -1
- mlrun/runtimes/mpijob/__init__.py +2 -2
- mlrun/runtimes/mpijob/abstract.py +10 -1
- mlrun/runtimes/mpijob/v1.py +0 -76
- mlrun/runtimes/mpijob/v1alpha1.py +1 -74
- mlrun/runtimes/nuclio.py +3 -2
- mlrun/runtimes/pod.py +28 -18
- mlrun/runtimes/remotesparkjob.py +1 -15
- mlrun/runtimes/serving.py +14 -6
- mlrun/runtimes/sparkjob/__init__.py +0 -1
- mlrun/runtimes/sparkjob/abstract.py +4 -131
- mlrun/runtimes/utils.py +0 -26
- mlrun/serving/routers.py +7 -7
- mlrun/serving/server.py +11 -8
- mlrun/serving/states.py +7 -1
- mlrun/serving/v2_serving.py +6 -6
- mlrun/utils/helpers.py +23 -42
- mlrun/utils/notifications/notification/__init__.py +4 -0
- mlrun/utils/notifications/notification/webhook.py +61 -0
- mlrun/utils/notifications/notification_pusher.py +5 -25
- mlrun/utils/regex.py +7 -2
- mlrun/utils/version/version.json +2 -2
- {mlrun-1.4.0rc25.dist-info → mlrun-1.5.0rc2.dist-info}/METADATA +26 -25
- {mlrun-1.4.0rc25.dist-info → mlrun-1.5.0rc2.dist-info}/RECORD +180 -158
- {mlrun-1.4.0rc25.dist-info → mlrun-1.5.0rc2.dist-info}/WHEEL +1 -1
- mlrun/mlutils/data.py +0 -160
- mlrun/mlutils/models.py +0 -78
- mlrun/mlutils/plots.py +0 -902
- mlrun/utils/model_monitoring.py +0 -249
- /mlrun/{api/db/sqldb/session.py → common/db/sql_session.py} +0 -0
- {mlrun-1.4.0rc25.dist-info → mlrun-1.5.0rc2.dist-info}/LICENSE +0 -0
- {mlrun-1.4.0rc25.dist-info → mlrun-1.5.0rc2.dist-info}/entry_points.txt +0 -0
- {mlrun-1.4.0rc25.dist-info → mlrun-1.5.0rc2.dist-info}/top_level.txt +0 -0
|
@@ -16,83 +16,101 @@
|
|
|
16
16
|
|
|
17
17
|
from sqlalchemy import TIMESTAMP, Boolean, Column, Integer, String, Text
|
|
18
18
|
|
|
19
|
-
import mlrun.common.model_monitoring
|
|
19
|
+
import mlrun.common.schemas.model_monitoring
|
|
20
20
|
from mlrun.utils.db import BaseModel
|
|
21
21
|
|
|
22
22
|
from .base import Base
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
class ModelEndpointsTable(Base, BaseModel):
|
|
26
|
-
__tablename__ =
|
|
26
|
+
__tablename__ = mlrun.common.schemas.model_monitoring.EventFieldType.MODEL_ENDPOINTS
|
|
27
27
|
|
|
28
28
|
uid = Column(
|
|
29
|
-
|
|
29
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.UID,
|
|
30
30
|
String(40),
|
|
31
31
|
primary_key=True,
|
|
32
32
|
)
|
|
33
|
-
state = Column(
|
|
34
|
-
|
|
33
|
+
state = Column(
|
|
34
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.STATE, String(10)
|
|
35
|
+
)
|
|
36
|
+
project = Column(
|
|
37
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.PROJECT, String(40)
|
|
38
|
+
)
|
|
35
39
|
function_uri = Column(
|
|
36
|
-
|
|
40
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.FUNCTION_URI,
|
|
37
41
|
String(255),
|
|
38
42
|
)
|
|
39
|
-
model = Column(
|
|
43
|
+
model = Column(
|
|
44
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.MODEL, String(255)
|
|
45
|
+
)
|
|
40
46
|
model_class = Column(
|
|
41
|
-
|
|
47
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.MODEL_CLASS,
|
|
42
48
|
String(255),
|
|
43
49
|
)
|
|
44
|
-
labels = Column(
|
|
45
|
-
model_uri = Column(
|
|
46
|
-
|
|
50
|
+
labels = Column(mlrun.common.schemas.model_monitoring.EventFieldType.LABELS, Text)
|
|
51
|
+
model_uri = Column(
|
|
52
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.MODEL_URI, String(255)
|
|
53
|
+
)
|
|
54
|
+
stream_path = Column(
|
|
55
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.STREAM_PATH, Text
|
|
56
|
+
)
|
|
47
57
|
algorithm = Column(
|
|
48
|
-
|
|
58
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.ALGORITHM,
|
|
49
59
|
String(255),
|
|
50
60
|
)
|
|
51
|
-
active = Column(
|
|
61
|
+
active = Column(
|
|
62
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.ACTIVE, Boolean
|
|
63
|
+
)
|
|
52
64
|
monitoring_mode = Column(
|
|
53
|
-
|
|
65
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.MONITORING_MODE,
|
|
54
66
|
String(10),
|
|
55
67
|
)
|
|
56
68
|
feature_stats = Column(
|
|
57
|
-
|
|
69
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.FEATURE_STATS, Text
|
|
58
70
|
)
|
|
59
71
|
current_stats = Column(
|
|
60
|
-
|
|
72
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.CURRENT_STATS, Text
|
|
61
73
|
)
|
|
62
74
|
feature_names = Column(
|
|
63
|
-
|
|
75
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.FEATURE_NAMES, Text
|
|
76
|
+
)
|
|
77
|
+
children = Column(
|
|
78
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.CHILDREN, Text
|
|
79
|
+
)
|
|
80
|
+
label_names = Column(
|
|
81
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.LABEL_NAMES, Text
|
|
64
82
|
)
|
|
65
|
-
children = Column(model_monitoring_constants.EventFieldType.CHILDREN, Text)
|
|
66
|
-
label_names = Column(model_monitoring_constants.EventFieldType.LABEL_NAMES, Text)
|
|
67
83
|
endpoint_type = Column(
|
|
68
|
-
|
|
84
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.ENDPOINT_TYPE,
|
|
69
85
|
String(10),
|
|
70
86
|
)
|
|
71
87
|
children_uids = Column(
|
|
72
|
-
|
|
88
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.CHILDREN_UIDS, Text
|
|
73
89
|
)
|
|
74
90
|
drift_measures = Column(
|
|
75
|
-
|
|
91
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.DRIFT_MEASURES, Text
|
|
76
92
|
)
|
|
77
93
|
drift_status = Column(
|
|
78
|
-
|
|
94
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.DRIFT_STATUS,
|
|
79
95
|
String(40),
|
|
80
96
|
)
|
|
81
97
|
monitor_configuration = Column(
|
|
82
|
-
|
|
98
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.MONITOR_CONFIGURATION,
|
|
83
99
|
Text,
|
|
84
100
|
)
|
|
85
101
|
monitoring_feature_set_uri = Column(
|
|
86
|
-
|
|
102
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.FEATURE_SET_URI,
|
|
87
103
|
String(255),
|
|
88
104
|
)
|
|
89
105
|
first_request = Column(
|
|
90
|
-
|
|
106
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.FIRST_REQUEST,
|
|
91
107
|
TIMESTAMP,
|
|
92
108
|
)
|
|
93
109
|
last_request = Column(
|
|
94
|
-
|
|
110
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.LAST_REQUEST,
|
|
95
111
|
TIMESTAMP,
|
|
96
112
|
)
|
|
97
|
-
error_count = Column(
|
|
98
|
-
|
|
113
|
+
error_count = Column(
|
|
114
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.ERROR_COUNT, Integer
|
|
115
|
+
)
|
|
116
|
+
metrics = Column(mlrun.common.schemas.model_monitoring.EventFieldType.METRICS, Text)
|
|
@@ -20,12 +20,10 @@ from datetime import datetime, timezone
|
|
|
20
20
|
import pandas as pd
|
|
21
21
|
import sqlalchemy as db
|
|
22
22
|
|
|
23
|
-
import mlrun
|
|
24
|
-
import mlrun.common.model_monitoring
|
|
25
|
-
import mlrun.model_monitoring.
|
|
26
|
-
|
|
27
|
-
import mlrun.utils.v3io_clients
|
|
28
|
-
from mlrun.api.db.sqldb.session import create_session, get_engine
|
|
23
|
+
import mlrun.common.model_monitoring.helpers
|
|
24
|
+
import mlrun.common.schemas.model_monitoring
|
|
25
|
+
import mlrun.model_monitoring.helpers
|
|
26
|
+
from mlrun.common.db.sql_session import create_session, get_engine
|
|
29
27
|
from mlrun.utils import logger
|
|
30
28
|
|
|
31
29
|
from .model_endpoint_store import ModelEndpointStore
|
|
@@ -47,22 +45,28 @@ class SQLModelEndpointStore(ModelEndpointStore):
|
|
|
47
45
|
self,
|
|
48
46
|
project: str,
|
|
49
47
|
sql_connection_string: str = None,
|
|
48
|
+
secret_provider: typing.Callable = None,
|
|
50
49
|
):
|
|
51
50
|
"""
|
|
52
51
|
Initialize SQL store target object.
|
|
53
52
|
|
|
54
53
|
:param project: The name of the project.
|
|
55
54
|
:param sql_connection_string: Valid connection string or a path to SQL database with model endpoints table.
|
|
55
|
+
:param secret_provider: An optional secret provider to get the connection string secret.
|
|
56
56
|
"""
|
|
57
57
|
|
|
58
58
|
super().__init__(project=project)
|
|
59
59
|
|
|
60
60
|
self.sql_connection_string = (
|
|
61
61
|
sql_connection_string
|
|
62
|
-
or mlrun.
|
|
62
|
+
or mlrun.model_monitoring.helpers.get_connection_string(
|
|
63
|
+
secret_provider=secret_provider
|
|
64
|
+
)
|
|
63
65
|
)
|
|
64
66
|
|
|
65
|
-
self.table_name =
|
|
67
|
+
self.table_name = (
|
|
68
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.MODEL_ENDPOINTS
|
|
69
|
+
)
|
|
66
70
|
|
|
67
71
|
self._engine = get_engine(dsn=self.sql_connection_string)
|
|
68
72
|
self.ModelEndpointsTable = get_ModelEndpointsTable(
|
|
@@ -84,10 +88,10 @@ class SQLModelEndpointStore(ModelEndpointStore):
|
|
|
84
88
|
with self._engine.connect() as connection:
|
|
85
89
|
# Adjust timestamps fields
|
|
86
90
|
endpoint[
|
|
87
|
-
|
|
91
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.FIRST_REQUEST
|
|
88
92
|
] = datetime.now(timezone.utc)
|
|
89
93
|
endpoint[
|
|
90
|
-
|
|
94
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.LAST_REQUEST
|
|
91
95
|
] = datetime.now(timezone.utc)
|
|
92
96
|
|
|
93
97
|
# Convert the result into a pandas Dataframe and write it into the database
|
|
@@ -112,7 +116,9 @@ class SQLModelEndpointStore(ModelEndpointStore):
|
|
|
112
116
|
# Update the model endpoint record using sqlalchemy ORM
|
|
113
117
|
with create_session(dsn=self.sql_connection_string) as session:
|
|
114
118
|
# Remove endpoint id (foreign key) from the update query
|
|
115
|
-
attributes.pop(
|
|
119
|
+
attributes.pop(
|
|
120
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.ENDPOINT_ID, None
|
|
121
|
+
)
|
|
116
122
|
|
|
117
123
|
# Generate and commit the update session query
|
|
118
124
|
session.query(self.ModelEndpointsTable).filter(
|
|
@@ -201,32 +207,36 @@ class SQLModelEndpointStore(ModelEndpointStore):
|
|
|
201
207
|
query = self._filter_values(
|
|
202
208
|
query=query,
|
|
203
209
|
model_endpoints_table=self.model_endpoints_table,
|
|
204
|
-
key_filter=
|
|
210
|
+
key_filter=mlrun.common.schemas.model_monitoring.EventFieldType.MODEL,
|
|
205
211
|
filtered_values=[model],
|
|
206
212
|
)
|
|
207
213
|
if function:
|
|
208
214
|
query = self._filter_values(
|
|
209
215
|
query=query,
|
|
210
216
|
model_endpoints_table=self.model_endpoints_table,
|
|
211
|
-
key_filter=
|
|
217
|
+
key_filter=mlrun.common.schemas.model_monitoring.EventFieldType.FUNCTION,
|
|
212
218
|
filtered_values=[function],
|
|
213
219
|
)
|
|
214
220
|
if uids:
|
|
215
221
|
query = self._filter_values(
|
|
216
222
|
query=query,
|
|
217
223
|
model_endpoints_table=self.model_endpoints_table,
|
|
218
|
-
key_filter=
|
|
224
|
+
key_filter=mlrun.common.schemas.model_monitoring.EventFieldType.UID,
|
|
219
225
|
filtered_values=uids,
|
|
220
226
|
combined=False,
|
|
221
227
|
)
|
|
222
228
|
if top_level:
|
|
223
|
-
node_ep = str(
|
|
224
|
-
|
|
229
|
+
node_ep = str(
|
|
230
|
+
mlrun.common.schemas.model_monitoring.EndpointType.NODE_EP.value
|
|
231
|
+
)
|
|
232
|
+
router_ep = str(
|
|
233
|
+
mlrun.common.schemas.model_monitoring.EndpointType.ROUTER.value
|
|
234
|
+
)
|
|
225
235
|
endpoint_types = [node_ep, router_ep]
|
|
226
236
|
query = self._filter_values(
|
|
227
237
|
query=query,
|
|
228
238
|
model_endpoints_table=self.model_endpoints_table,
|
|
229
|
-
key_filter=
|
|
239
|
+
key_filter=mlrun.common.schemas.model_monitoring.EventFieldType.ENDPOINT_TYPE,
|
|
230
240
|
filtered_values=endpoint_types,
|
|
231
241
|
combined=False,
|
|
232
242
|
)
|
|
@@ -303,7 +313,9 @@ class SQLModelEndpointStore(ModelEndpointStore):
|
|
|
303
313
|
|
|
304
314
|
# Convert endpoint labels into dictionary
|
|
305
315
|
endpoint_labels = json.loads(
|
|
306
|
-
endpoint_dict.get(
|
|
316
|
+
endpoint_dict.get(
|
|
317
|
+
mlrun.common.schemas.model_monitoring.EventFieldType.LABELS
|
|
318
|
+
)
|
|
307
319
|
)
|
|
308
320
|
|
|
309
321
|
for label in labels:
|
|
@@ -331,7 +343,7 @@ class SQLModelEndpointStore(ModelEndpointStore):
|
|
|
331
343
|
for endpoint_dict in endpoints:
|
|
332
344
|
# Delete model endpoint record from SQL table
|
|
333
345
|
self.delete_model_endpoint(
|
|
334
|
-
endpoint_dict[
|
|
346
|
+
endpoint_dict[mlrun.common.schemas.model_monitoring.EventFieldType.UID],
|
|
335
347
|
)
|
|
336
348
|
|
|
337
349
|
def get_endpoint_real_time_metrics(
|