mlrun 1.8.0rc36__py3-none-any.whl → 1.8.0rc37__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/api/schemas/__init__.py +0 -3
- mlrun/common/schemas/__init__.py +1 -1
- mlrun/common/schemas/model_monitoring/__init__.py +0 -5
- mlrun/common/schemas/model_monitoring/constants.py +0 -22
- mlrun/common/schemas/model_monitoring/model_endpoints.py +0 -6
- mlrun/model_monitoring/db/tsdb/tdengine/tdengine_connector.py +54 -0
- mlrun/utils/version/version.json +2 -2
- {mlrun-1.8.0rc36.dist-info → mlrun-1.8.0rc37.dist-info}/METADATA +1 -1
- {mlrun-1.8.0rc36.dist-info → mlrun-1.8.0rc37.dist-info}/RECORD +13 -13
- {mlrun-1.8.0rc36.dist-info → mlrun-1.8.0rc37.dist-info}/LICENSE +0 -0
- {mlrun-1.8.0rc36.dist-info → mlrun-1.8.0rc37.dist-info}/WHEEL +0 -0
- {mlrun-1.8.0rc36.dist-info → mlrun-1.8.0rc37.dist-info}/entry_points.txt +0 -0
- {mlrun-1.8.0rc36.dist-info → mlrun-1.8.0rc37.dist-info}/top_level.txt +0 -0
mlrun/api/schemas/__init__.py
CHANGED
|
@@ -208,9 +208,6 @@ ModelEndpointList = DeprecationHelper(mlrun.common.schemas.ModelEndpointList)
|
|
|
208
208
|
ModelEndpointMetadata = DeprecationHelper(mlrun.common.schemas.ModelEndpointMetadata)
|
|
209
209
|
ModelEndpointSpec = DeprecationHelper(mlrun.common.schemas.ModelEndpointSpec)
|
|
210
210
|
ModelEndpointStatus = DeprecationHelper(mlrun.common.schemas.ModelEndpointStatus)
|
|
211
|
-
ModelMonitoringStoreKinds = DeprecationHelper(
|
|
212
|
-
mlrun.common.schemas.ModelMonitoringStoreKinds
|
|
213
|
-
)
|
|
214
211
|
NotificationSeverity = DeprecationHelper(mlrun.common.schemas.NotificationSeverity)
|
|
215
212
|
NotificationStatus = DeprecationHelper(mlrun.common.schemas.NotificationStatus)
|
|
216
213
|
ObjectKind = DeprecationHelper(mlrun.common.schemas.ObjectKind)
|
mlrun/common/schemas/__init__.py
CHANGED
|
@@ -139,6 +139,7 @@ from .model_monitoring import (
|
|
|
139
139
|
Features,
|
|
140
140
|
FeatureSetFeatures,
|
|
141
141
|
FeatureValues,
|
|
142
|
+
FileTargetKind,
|
|
142
143
|
GrafanaColumn,
|
|
143
144
|
GrafanaNumberColumn,
|
|
144
145
|
GrafanaStringColumn,
|
|
@@ -151,7 +152,6 @@ from .model_monitoring import (
|
|
|
151
152
|
ModelEndpointSpec,
|
|
152
153
|
ModelEndpointStatus,
|
|
153
154
|
ModelMonitoringMode,
|
|
154
|
-
ModelMonitoringStoreKinds,
|
|
155
155
|
MonitoringFunctionNames,
|
|
156
156
|
TSDBTarget,
|
|
157
157
|
V3IOTSDBTables,
|
|
@@ -14,9 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from .constants import (
|
|
16
16
|
INTERSECT_DICT_KEYS,
|
|
17
|
-
V3IO_MODEL_MONITORING_DB,
|
|
18
17
|
ApplicationEvent,
|
|
19
|
-
ControllerPolicy,
|
|
20
18
|
DriftStatus,
|
|
21
19
|
EndpointType,
|
|
22
20
|
EndpointUID,
|
|
@@ -30,10 +28,7 @@ from .constants import (
|
|
|
30
28
|
ModelEndpointCreationStrategy,
|
|
31
29
|
ModelEndpointMonitoringMetricType,
|
|
32
30
|
ModelEndpointSchema,
|
|
33
|
-
ModelEndpointTarget,
|
|
34
|
-
ModelEndpointTargetSchemas,
|
|
35
31
|
ModelMonitoringMode,
|
|
36
|
-
ModelMonitoringStoreKinds,
|
|
37
32
|
MonitoringFunctionNames,
|
|
38
33
|
PredictionsQueryConstants,
|
|
39
34
|
ProjectSecretKeys,
|
|
@@ -240,11 +240,6 @@ class EventKeyMetrics:
|
|
|
240
240
|
REAL_TIME = "real_time"
|
|
241
241
|
|
|
242
242
|
|
|
243
|
-
class ModelEndpointTarget(MonitoringStrEnum):
|
|
244
|
-
V3IO_NOSQL = "v3io-nosql"
|
|
245
|
-
SQL = "sql"
|
|
246
|
-
|
|
247
|
-
|
|
248
243
|
class TSDBTarget(MonitoringStrEnum):
|
|
249
244
|
V3IO_TSDB = "v3io-tsdb"
|
|
250
245
|
TDEngine = "tdengine"
|
|
@@ -269,17 +264,6 @@ class GetEventsFormat(MonitoringStrEnum):
|
|
|
269
264
|
INTERSECTION = "intersection"
|
|
270
265
|
|
|
271
266
|
|
|
272
|
-
class ModelEndpointTargetSchemas(MonitoringStrEnum):
|
|
273
|
-
V3IO = "v3io"
|
|
274
|
-
MYSQL = "mysql"
|
|
275
|
-
SQLITE = "sqlite"
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
class ModelMonitoringStoreKinds:
|
|
279
|
-
ENDPOINTS = "endpoints"
|
|
280
|
-
EVENTS = "events"
|
|
281
|
-
|
|
282
|
-
|
|
283
267
|
class FileTargetKind:
|
|
284
268
|
ENDPOINTS = "endpoints"
|
|
285
269
|
EVENTS = "events"
|
|
@@ -429,10 +413,6 @@ class ModelMonitoringAppLabel:
|
|
|
429
413
|
return f"{self.KEY}={self.VAL}"
|
|
430
414
|
|
|
431
415
|
|
|
432
|
-
class ControllerPolicy:
|
|
433
|
-
BASE_PERIOD = "base_period"
|
|
434
|
-
|
|
435
|
-
|
|
436
416
|
class HistogramDataDriftApplicationConstants:
|
|
437
417
|
NAME = "histogram-data-drift"
|
|
438
418
|
GENERAL_RESULT_NAME = "general_drift"
|
|
@@ -449,8 +429,6 @@ class SpecialApps:
|
|
|
449
429
|
|
|
450
430
|
_RESERVED_FUNCTION_NAMES = MonitoringFunctionNames.list() + [SpecialApps.MLRUN_INFRA]
|
|
451
431
|
|
|
452
|
-
V3IO_MODEL_MONITORING_DB = "v3io"
|
|
453
|
-
|
|
454
432
|
|
|
455
433
|
class ModelEndpointMonitoringMetricType(StrEnum):
|
|
456
434
|
RESULT = "result"
|
|
@@ -36,12 +36,6 @@ from .constants import (
|
|
|
36
36
|
Model = TypeVar("Model", bound=BaseModel)
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
class ModelMonitoringStoreKinds:
|
|
40
|
-
# TODO: do changes in examples & demos In 1.5.0 remove
|
|
41
|
-
ENDPOINTS = "endpoints"
|
|
42
|
-
EVENTS = "events"
|
|
43
|
-
|
|
44
|
-
|
|
45
39
|
class Histogram(BaseModel):
|
|
46
40
|
buckets: list[float]
|
|
47
41
|
counts: list[int]
|
|
@@ -187,6 +187,12 @@ class TDEngineConnector(TSDBConnector):
|
|
|
187
187
|
"Invalid 'endpoint_id' filter: must be a string or a list."
|
|
188
188
|
)
|
|
189
189
|
|
|
190
|
+
def _drop_database_query(self) -> str:
|
|
191
|
+
return f"DROP DATABASE IF EXISTS {self.database};"
|
|
192
|
+
|
|
193
|
+
def _get_table_name_query(self) -> str:
|
|
194
|
+
return f"SELECT table_name FROM information_schema.ins_tables where db_name='{self.database}' LIMIT 1;"
|
|
195
|
+
|
|
190
196
|
def apply_monitoring_stream_steps(self, graph, **kwarg):
|
|
191
197
|
"""
|
|
192
198
|
Apply TSDB steps on the provided monitoring graph. Throughout these steps, the graph stores live data of
|
|
@@ -297,6 +303,54 @@ class TDEngineConnector(TSDBConnector):
|
|
|
297
303
|
project=self.project,
|
|
298
304
|
)
|
|
299
305
|
|
|
306
|
+
# Check if database is empty and if so, drop it
|
|
307
|
+
self._drop_database_if_empty()
|
|
308
|
+
|
|
309
|
+
def _drop_database_if_empty(self):
|
|
310
|
+
query_random_table_name = self._get_table_name_query()
|
|
311
|
+
drop_database = False
|
|
312
|
+
try:
|
|
313
|
+
table_name = self.connection.run(
|
|
314
|
+
query=query_random_table_name,
|
|
315
|
+
timeout=self._timeout,
|
|
316
|
+
retries=self._retries,
|
|
317
|
+
)
|
|
318
|
+
if len(table_name.data) == 0:
|
|
319
|
+
# no tables were found under the database
|
|
320
|
+
drop_database = True
|
|
321
|
+
|
|
322
|
+
except Exception as e:
|
|
323
|
+
logger.warning(
|
|
324
|
+
"Failed to query tables in the database. You may need to drop the database manually if it is empty.",
|
|
325
|
+
project=self.project,
|
|
326
|
+
error=mlrun.errors.err_to_str(e),
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
if drop_database:
|
|
330
|
+
logger.debug(
|
|
331
|
+
"Going to drop the TDEngine database",
|
|
332
|
+
project=self.project,
|
|
333
|
+
database=self.database,
|
|
334
|
+
)
|
|
335
|
+
drop_database_query = self._drop_database_query()
|
|
336
|
+
try:
|
|
337
|
+
self.connection.run(
|
|
338
|
+
statements=drop_database_query,
|
|
339
|
+
timeout=self._timeout,
|
|
340
|
+
retries=self._retries,
|
|
341
|
+
)
|
|
342
|
+
logger.debug(
|
|
343
|
+
"The TDEngine database has been successfully dropped",
|
|
344
|
+
project=self.project,
|
|
345
|
+
database=self.database,
|
|
346
|
+
)
|
|
347
|
+
except Exception as e:
|
|
348
|
+
logger.warning(
|
|
349
|
+
"Failed to drop the database. You may need to drop it manually if it is empty.",
|
|
350
|
+
project=self.project,
|
|
351
|
+
error=mlrun.errors.err_to_str(e),
|
|
352
|
+
)
|
|
353
|
+
|
|
300
354
|
def get_model_endpoint_real_time_metrics(
|
|
301
355
|
self,
|
|
302
356
|
endpoint_id: str,
|
mlrun/utils/version/version.json
CHANGED
|
@@ -12,7 +12,7 @@ mlrun/run.py,sha256=NScg8Acp62329jryOK5nldu2LYVkIZgSiEEg8IJrQwo,45124
|
|
|
12
12
|
mlrun/secrets.py,sha256=dZPdkc_zzfscVQepOHUwmzFqnBavDCBXV9DQoH_eIYM,7800
|
|
13
13
|
mlrun/alerts/__init__.py,sha256=0gtG1BG0DXxFrXegIkjbM1XEN4sP9ODo0ucXrNld1hU,601
|
|
14
14
|
mlrun/alerts/alert.py,sha256=9kGTtV385Ax-aTm-450HzPwEek9e0c3O3Qln-jXjhFg,15948
|
|
15
|
-
mlrun/api/schemas/__init__.py,sha256=
|
|
15
|
+
mlrun/api/schemas/__init__.py,sha256=tVAnpexDkfI0JWMJNlPSnVOzoV4xqIjWGSln9UkPS4I,13921
|
|
16
16
|
mlrun/artifacts/__init__.py,sha256=ofC2extBCOC1wg1YtdTzWzH3eeG_f-sFBUkHjYtZJpk,1175
|
|
17
17
|
mlrun/artifacts/base.py,sha256=nz2ZqC74JGfWN0M6_hOXXQj3bXSTxNp4eUgvWHVcdvY,29979
|
|
18
18
|
mlrun/artifacts/dataset.py,sha256=QTot5vCgLHatlIWwNnKbWdZ8HHTxaZ7wk4gWQDoqQ2k,16655
|
|
@@ -39,7 +39,7 @@ mlrun/common/formatters/run.py,sha256=Gcf9lVDqxPMNfWcPX0RJasjTC_N_U0yTBkQ02jOPJ7
|
|
|
39
39
|
mlrun/common/model_monitoring/__init__.py,sha256=kXGBqhLN0rlAx0kTXhozGzFsIdSqW0uTSKMmsLgq_is,569
|
|
40
40
|
mlrun/common/model_monitoring/helpers.py,sha256=A2svqjCsZV8FmlimnY9QI_kKIEUJINu6YI7uJfO-Kn0,3173
|
|
41
41
|
mlrun/common/runtimes/constants.py,sha256=PBpCtPixbKjP9aTo6Qqtui6FjWcXbFxhbSzduV4ttc4,12324
|
|
42
|
-
mlrun/common/schemas/__init__.py,sha256=
|
|
42
|
+
mlrun/common/schemas/__init__.py,sha256=tNeYsylPAgG-3YI_Foka80alqm0JoCpXtuS_nDZzuaU,5324
|
|
43
43
|
mlrun/common/schemas/alert.py,sha256=tRsjHEQTjCb-83GS0mprsu5junvqL4aQjWN2Rt_yAaM,10183
|
|
44
44
|
mlrun/common/schemas/api_gateway.py,sha256=3a0QxECLmoDkD5IiOKtXJL-uiWB26Hg55WMA3nULYuI,7127
|
|
45
45
|
mlrun/common/schemas/artifact.py,sha256=T-CdBIqgDUH-i8hx1Dp-Msr8v6UGwwp3d9j8rUzb9ZM,4249
|
|
@@ -72,10 +72,10 @@ mlrun/common/schemas/secret.py,sha256=CCxFYiPwJtDxwg2VVJH9nUG9cAZ2a34IjeuaWv-BYl
|
|
|
72
72
|
mlrun/common/schemas/serving.py,sha256=81ZxlDHP1fm9VPmXZGkjZj2n6cVRmqEN478hsmvv5QA,744
|
|
73
73
|
mlrun/common/schemas/tag.py,sha256=HRZi5QZ4vVGaCr2AMk9eJgcNiAIXmH4YDc8a4fvF770,893
|
|
74
74
|
mlrun/common/schemas/workflow.py,sha256=6u9niXfXpV-_c2rZL97gFIdAnOfM5WK-OCbrM5Kk34s,2108
|
|
75
|
-
mlrun/common/schemas/model_monitoring/__init__.py,sha256=
|
|
76
|
-
mlrun/common/schemas/model_monitoring/constants.py,sha256=
|
|
75
|
+
mlrun/common/schemas/model_monitoring/__init__.py,sha256=SxHG-GIdcTEuFxpKzkUdT9zKaU5Xqz9qF1uCwXvZ2z8,1709
|
|
76
|
+
mlrun/common/schemas/model_monitoring/constants.py,sha256=dqCAZQM9dw_6WIlf61XYMHY7TFi_ujSkWt1r_8YlXmg,12207
|
|
77
77
|
mlrun/common/schemas/model_monitoring/grafana.py,sha256=THQlLfPBevBksta8p5OaIsBaJtsNSXexLvHrDxOaVns,2095
|
|
78
|
-
mlrun/common/schemas/model_monitoring/model_endpoints.py,sha256=
|
|
78
|
+
mlrun/common/schemas/model_monitoring/model_endpoints.py,sha256=LIRtQ_gD7n17pQbacynp7Os8HyFwqobTKIPH0lwqoUA,11663
|
|
79
79
|
mlrun/data_types/__init__.py,sha256=unRo9GGwCmj0hBKBRsXJ2P4BzpQaddlQTvIrVQaKluI,984
|
|
80
80
|
mlrun/data_types/data_types.py,sha256=0_oKLC6-sXL2_nnaDMP_HSXB3fD1nJAG4J2Jq6sGNNw,4998
|
|
81
81
|
mlrun/data_types/infer.py,sha256=Ogp3rsENVkjU0GDaGa9J1vjGrvMxgzwbSEuG51nt61E,6477
|
|
@@ -241,7 +241,7 @@ mlrun/model_monitoring/db/tsdb/helpers.py,sha256=0oUXc4aUkYtP2SGP6jTb3uPPKImIUsV
|
|
|
241
241
|
mlrun/model_monitoring/db/tsdb/tdengine/__init__.py,sha256=vgBdsKaXUURKqIf3M0y4sRatmSVA4CQiJs7J5dcVBkQ,620
|
|
242
242
|
mlrun/model_monitoring/db/tsdb/tdengine/schemas.py,sha256=qfKDUZhgteL0mp2A1aP1iMmcthgUMKmZqMUidZjQktQ,12649
|
|
243
243
|
mlrun/model_monitoring/db/tsdb/tdengine/stream_graph_steps.py,sha256=Uadj0UvAmln2MxDWod-kAzau1uNlqZh981rPhbUH_5M,2857
|
|
244
|
-
mlrun/model_monitoring/db/tsdb/tdengine/tdengine_connector.py,sha256=
|
|
244
|
+
mlrun/model_monitoring/db/tsdb/tdengine/tdengine_connector.py,sha256=2uSpIUpUGoFRCgrSv0RLGWoR7oc69GWW_bLbmjtfYEk,34860
|
|
245
245
|
mlrun/model_monitoring/db/tsdb/v3io/__init__.py,sha256=aL3bfmQsUQ-sbvKGdNihFj8gLCK3mSys0qDcXtYOwgc,616
|
|
246
246
|
mlrun/model_monitoring/db/tsdb/v3io/stream_graph_steps.py,sha256=_-zo9relCDtjGgievxAcAP9gVN9nDWs8BzGtFwTjb9M,6284
|
|
247
247
|
mlrun/model_monitoring/db/tsdb/v3io/v3io_connector.py,sha256=foxYWx7OjOfat2SHmzYrG8bIfaQ5NDnBtpDZua_NVGE,41141
|
|
@@ -339,11 +339,11 @@ mlrun/utils/notifications/notification/mail.py,sha256=ZyJ3eqd8simxffQmXzqd3bgbAq
|
|
|
339
339
|
mlrun/utils/notifications/notification/slack.py,sha256=eQvmctTh6wIG5xVOesLLV9S1-UUCu5UEQ9JIJOor3ts,7183
|
|
340
340
|
mlrun/utils/notifications/notification/webhook.py,sha256=NeyIMSBojjjTJaUHmPbxMByp34GxYkl1-16NqzU27fU,4943
|
|
341
341
|
mlrun/utils/version/__init__.py,sha256=7kkrB7hEZ3cLXoWj1kPoDwo4MaswsI2JVOBpbKgPAgc,614
|
|
342
|
-
mlrun/utils/version/version.json,sha256=
|
|
342
|
+
mlrun/utils/version/version.json,sha256=FFiu4Ob8EieKg4vHzsKJT0xi8JMKnsB2ZSCwLJgdFno,89
|
|
343
343
|
mlrun/utils/version/version.py,sha256=eEW0tqIAkU9Xifxv8Z9_qsYnNhn3YH7NRAfM-pPLt1g,1878
|
|
344
|
-
mlrun-1.8.
|
|
345
|
-
mlrun-1.8.
|
|
346
|
-
mlrun-1.8.
|
|
347
|
-
mlrun-1.8.
|
|
348
|
-
mlrun-1.8.
|
|
349
|
-
mlrun-1.8.
|
|
344
|
+
mlrun-1.8.0rc37.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
345
|
+
mlrun-1.8.0rc37.dist-info/METADATA,sha256=8KzKclwmXJVyUzlVJAmAhOsxjBZHIkYVtnBqY3LC8bE,25986
|
|
346
|
+
mlrun-1.8.0rc37.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
347
|
+
mlrun-1.8.0rc37.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
|
|
348
|
+
mlrun-1.8.0rc37.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
|
|
349
|
+
mlrun-1.8.0rc37.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|