mlrun 1.7.0rc52__py3-none-any.whl → 1.7.0rc57__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/errors.py +7 -1
- mlrun/model_monitoring/applications/_application_steps.py +5 -1
- mlrun/model_monitoring/controller.py +18 -13
- mlrun/model_monitoring/db/tsdb/tdengine/tdengine_connector.py +1 -1
- mlrun/projects/pipelines.py +1 -1
- mlrun/utils/version/version.json +2 -2
- {mlrun-1.7.0rc52.dist-info → mlrun-1.7.0rc57.dist-info}/METADATA +5 -5
- {mlrun-1.7.0rc52.dist-info → mlrun-1.7.0rc57.dist-info}/RECORD +12 -12
- {mlrun-1.7.0rc52.dist-info → mlrun-1.7.0rc57.dist-info}/WHEEL +1 -1
- {mlrun-1.7.0rc52.dist-info → mlrun-1.7.0rc57.dist-info}/LICENSE +0 -0
- {mlrun-1.7.0rc52.dist-info → mlrun-1.7.0rc57.dist-info}/entry_points.txt +0 -0
- {mlrun-1.7.0rc52.dist-info → mlrun-1.7.0rc57.dist-info}/top_level.txt +0 -0
mlrun/errors.py
CHANGED
|
@@ -140,7 +140,13 @@ def err_to_str(err):
|
|
|
140
140
|
error_strings.append(err_msg)
|
|
141
141
|
err = err.__cause__
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
err_msg = ", caused by: ".join(error_strings)
|
|
144
|
+
|
|
145
|
+
# in case the error string is longer than 32k, we truncate it
|
|
146
|
+
# the truncation takes the first 16k, then the last 16k characters
|
|
147
|
+
if len(err_msg) > 32_000:
|
|
148
|
+
err_msg = err_msg[:16_000] + "...truncated..." + err_msg[-16_000:]
|
|
149
|
+
return err_msg
|
|
144
150
|
|
|
145
151
|
|
|
146
152
|
# Specific Errors
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
import json
|
|
16
|
+
import traceback
|
|
16
17
|
from typing import Any, Optional, Union
|
|
17
18
|
|
|
18
19
|
import mlrun.common.schemas.alert as alert_objects
|
|
@@ -161,7 +162,10 @@ class _ApplicationErrorHandler(StepToDict):
|
|
|
161
162
|
:param event: Application event.
|
|
162
163
|
"""
|
|
163
164
|
|
|
164
|
-
|
|
165
|
+
exception_with_trace = "".join(
|
|
166
|
+
traceback.format_exception(None, event.error, event.error.__traceback__)
|
|
167
|
+
)
|
|
168
|
+
logger.error(f"Error in application step: {exception_with_trace}")
|
|
165
169
|
|
|
166
170
|
event_data = alert_objects.Event(
|
|
167
171
|
kind=alert_objects.EventKind.MM_APP_FAILED,
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
|
|
15
14
|
import concurrent.futures
|
|
16
15
|
import datetime
|
|
17
16
|
import json
|
|
@@ -25,7 +24,9 @@ import nuclio
|
|
|
25
24
|
import mlrun
|
|
26
25
|
import mlrun.common.schemas.model_monitoring.constants as mm_constants
|
|
27
26
|
import mlrun.data_types.infer
|
|
27
|
+
import mlrun.feature_store as fstore
|
|
28
28
|
import mlrun.model_monitoring.db.stores
|
|
29
|
+
from mlrun.config import config as mlconf
|
|
29
30
|
from mlrun.datastore import get_stream_pusher
|
|
30
31
|
from mlrun.errors import err_to_str
|
|
31
32
|
from mlrun.model_monitoring.helpers import (
|
|
@@ -286,9 +287,9 @@ class MonitoringApplicationController:
|
|
|
286
287
|
)
|
|
287
288
|
|
|
288
289
|
self.model_monitoring_access_key = self._get_model_monitoring_access_key()
|
|
289
|
-
self.
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
self.storage_options = None
|
|
291
|
+
if mlconf.artifact_path.startswith("s3://"):
|
|
292
|
+
self.storage_options = mlrun.mlconf.get_s3_storage_options()
|
|
292
293
|
|
|
293
294
|
@staticmethod
|
|
294
295
|
def _get_model_monitoring_access_key() -> Optional[str]:
|
|
@@ -375,7 +376,7 @@ class MonitoringApplicationController:
|
|
|
375
376
|
batch_window_generator=self._batch_window_generator,
|
|
376
377
|
project=self.project,
|
|
377
378
|
model_monitoring_access_key=self.model_monitoring_access_key,
|
|
378
|
-
|
|
379
|
+
storage_options=self.storage_options,
|
|
379
380
|
)
|
|
380
381
|
|
|
381
382
|
@classmethod
|
|
@@ -386,7 +387,7 @@ class MonitoringApplicationController:
|
|
|
386
387
|
batch_window_generator: _BatchWindowGenerator,
|
|
387
388
|
project: str,
|
|
388
389
|
model_monitoring_access_key: str,
|
|
389
|
-
|
|
390
|
+
storage_options: Optional[dict] = None,
|
|
390
391
|
) -> None:
|
|
391
392
|
"""
|
|
392
393
|
Process a model endpoint and trigger the monitoring applications. This function running on different process
|
|
@@ -398,11 +399,13 @@ class MonitoringApplicationController:
|
|
|
398
399
|
:param batch_window_generator: (_BatchWindowGenerator) An object that generates _BatchWindow objects.
|
|
399
400
|
:param project: (str) Project name.
|
|
400
401
|
:param model_monitoring_access_key: (str) Access key to apply the model monitoring process.
|
|
401
|
-
:param
|
|
402
|
+
:param storage_options: (dict) Storage options for reading the infer parquet files.
|
|
402
403
|
"""
|
|
403
404
|
endpoint_id = endpoint[mm_constants.EventFieldType.UID]
|
|
404
|
-
# if false the endpoint represent batch infer step.
|
|
405
405
|
has_stream = endpoint[mm_constants.EventFieldType.STREAM_PATH] != ""
|
|
406
|
+
m_fs = fstore.get_feature_set(
|
|
407
|
+
endpoint[mm_constants.EventFieldType.FEATURE_SET_URI]
|
|
408
|
+
)
|
|
406
409
|
try:
|
|
407
410
|
for application in applications_names:
|
|
408
411
|
batch_window = batch_window_generator.get_batch_window(
|
|
@@ -415,12 +418,13 @@ class MonitoringApplicationController:
|
|
|
415
418
|
)
|
|
416
419
|
|
|
417
420
|
for start_infer_time, end_infer_time in batch_window.get_intervals():
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
421
|
+
df = m_fs.to_dataframe(
|
|
422
|
+
start_time=start_infer_time,
|
|
423
|
+
end_time=end_infer_time,
|
|
424
|
+
time_column=mm_constants.EventFieldType.TIMESTAMP,
|
|
425
|
+
storage_options=storage_options,
|
|
422
426
|
)
|
|
423
|
-
if
|
|
427
|
+
if len(df) == 0:
|
|
424
428
|
logger.info(
|
|
425
429
|
"No data found for the given interval",
|
|
426
430
|
start=start_infer_time,
|
|
@@ -442,6 +446,7 @@ class MonitoringApplicationController:
|
|
|
442
446
|
applications_names=[application],
|
|
443
447
|
model_monitoring_access_key=model_monitoring_access_key,
|
|
444
448
|
)
|
|
449
|
+
|
|
445
450
|
except Exception:
|
|
446
451
|
logger.exception(
|
|
447
452
|
"Encountered an exception",
|
|
@@ -217,7 +217,7 @@ class TDEngineConnector(TSDBConnector):
|
|
|
217
217
|
drop_statements.append(
|
|
218
218
|
self.tables[table]._drop_subtable_query(subtable=subtable[0])
|
|
219
219
|
)
|
|
220
|
-
self.connection.run(statements=
|
|
220
|
+
self.connection.run(statements=drop_statements)
|
|
221
221
|
logger.debug(
|
|
222
222
|
"Deleted all project resources using the TDEngine connector",
|
|
223
223
|
project=self.project,
|
mlrun/projects/pipelines.py
CHANGED
|
@@ -593,7 +593,7 @@ class _KFPRunner(_PipelineRunner):
|
|
|
593
593
|
logger.warning(
|
|
594
594
|
"Setting notifications on kfp pipeline runner uses old notification behavior. "
|
|
595
595
|
"Notifications will only be sent if you wait for pipeline completion. "
|
|
596
|
-
"
|
|
596
|
+
"Some of the features (like setting message or severity level) are not supported."
|
|
597
597
|
)
|
|
598
598
|
# for start message, fallback to old notification behavior
|
|
599
599
|
for notification in notifications or []:
|
mlrun/utils/version/version.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mlrun
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.0rc57
|
|
4
4
|
Summary: Tracking and config of machine learning runs
|
|
5
5
|
Home-page: https://github.com/mlrun/mlrun
|
|
6
6
|
Author: Yaron Haviv
|
|
@@ -85,7 +85,7 @@ Requires-Dist: s3fs <2024.7,>=2023.9.2 ; extra == 'all'
|
|
|
85
85
|
Requires-Dist: snowflake-connector-python ~=3.7 ; extra == 'all'
|
|
86
86
|
Requires-Dist: sqlalchemy ~=1.4 ; extra == 'all'
|
|
87
87
|
Requires-Dist: taos-ws-py ==0.3.2 ; extra == 'all'
|
|
88
|
-
Requires-Dist: taoswswrap ~=0.
|
|
88
|
+
Requires-Dist: taoswswrap ~=0.2.0 ; extra == 'all'
|
|
89
89
|
Provides-Extra: api
|
|
90
90
|
Requires-Dist: uvicorn ~=0.27.1 ; extra == 'api'
|
|
91
91
|
Requires-Dist: dask-kubernetes ~=0.11.0 ; extra == 'api'
|
|
@@ -139,7 +139,7 @@ Requires-Dist: s3fs <2024.7,>=2023.9.2 ; extra == 'complete'
|
|
|
139
139
|
Requires-Dist: snowflake-connector-python ~=3.7 ; extra == 'complete'
|
|
140
140
|
Requires-Dist: sqlalchemy ~=1.4 ; extra == 'complete'
|
|
141
141
|
Requires-Dist: taos-ws-py ==0.3.2 ; extra == 'complete'
|
|
142
|
-
Requires-Dist: taoswswrap ~=0.
|
|
142
|
+
Requires-Dist: taoswswrap ~=0.2.0 ; extra == 'complete'
|
|
143
143
|
Provides-Extra: complete-api
|
|
144
144
|
Requires-Dist: adlfs ==2023.9.0 ; extra == 'complete-api'
|
|
145
145
|
Requires-Dist: aiobotocore <2.16,>=2.5.0 ; extra == 'complete-api'
|
|
@@ -177,7 +177,7 @@ Requires-Dist: s3fs <2024.7,>=2023.9.2 ; extra == 'complete-api'
|
|
|
177
177
|
Requires-Dist: snowflake-connector-python ~=3.7 ; extra == 'complete-api'
|
|
178
178
|
Requires-Dist: sqlalchemy ~=1.4 ; extra == 'complete-api'
|
|
179
179
|
Requires-Dist: taos-ws-py ==0.3.2 ; extra == 'complete-api'
|
|
180
|
-
Requires-Dist: taoswswrap ~=0.
|
|
180
|
+
Requires-Dist: taoswswrap ~=0.2.0 ; extra == 'complete-api'
|
|
181
181
|
Requires-Dist: timelength ~=1.1 ; extra == 'complete-api'
|
|
182
182
|
Requires-Dist: uvicorn ~=0.27.1 ; extra == 'complete-api'
|
|
183
183
|
Requires-Dist: memray ~=1.12 ; (sys_platform != "win32") and extra == 'complete-api'
|
|
@@ -213,7 +213,7 @@ Provides-Extra: sqlalchemy
|
|
|
213
213
|
Requires-Dist: sqlalchemy ~=1.4 ; extra == 'sqlalchemy'
|
|
214
214
|
Provides-Extra: tdengine
|
|
215
215
|
Requires-Dist: taos-ws-py ==0.3.2 ; extra == 'tdengine'
|
|
216
|
-
Requires-Dist: taoswswrap ~=0.
|
|
216
|
+
Requires-Dist: taoswswrap ~=0.2.0 ; extra == 'tdengine'
|
|
217
217
|
|
|
218
218
|
<a id="top"></a>
|
|
219
219
|
[](https://github.com/mlrun/mlrun/actions/workflows/build.yaml?query=branch%3Adevelopment)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
mlrun/__init__.py,sha256=y08M1JcKXy5-9_5WaI9fn5aV5BxIQ5QkbduJK0OxWbA,7470
|
|
2
2
|
mlrun/__main__.py,sha256=mC_Izs4kuHUHQi88QJFLN22n1kbygGM0wAirjNt7uj4,45938
|
|
3
3
|
mlrun/config.py,sha256=NJG59Rl_5-mwgCdPDboRhjHD1ujW9ITYL7gtCbSMkM8,67308
|
|
4
|
-
mlrun/errors.py,sha256=
|
|
4
|
+
mlrun/errors.py,sha256=G8GP4_wb3v2UEbiAS8OlamC7nYJNzbSvQ3sViZlyYhk,8063
|
|
5
5
|
mlrun/execution.py,sha256=nXvvN8euzjuxhJouJD8VxfK0keTTA6UoMrcD_17AL-4,44252
|
|
6
6
|
mlrun/features.py,sha256=m17K_3l9Jktwb9dOwlHLTAPTlemsWrRF7dJhXUX0iJU,15429
|
|
7
7
|
mlrun/k8s_utils.py,sha256=mRQMs6NzPq36vx1n5_2BfFapXysc8wv3NcrZ77_2ANA,8949
|
|
@@ -213,7 +213,7 @@ mlrun/launcher/local.py,sha256=pP9-ZrNL8OnNDEiXTAKAZQnmLpS_mCc2v-mJw329eks,11269
|
|
|
213
213
|
mlrun/launcher/remote.py,sha256=tGICSfWtvUHeR31mbzy6gqHejmDxjPUgjtxXTWhRubg,7699
|
|
214
214
|
mlrun/model_monitoring/__init__.py,sha256=dm5_j0_pwqrdzFwTaEtGnKfv2nVpNaM56nBI-oqLbNU,879
|
|
215
215
|
mlrun/model_monitoring/api.py,sha256=2EHCzB_5sCDgalYPkrFbI01cSO7LVWBv9yWoooJ-a0g,28106
|
|
216
|
-
mlrun/model_monitoring/controller.py,sha256=
|
|
216
|
+
mlrun/model_monitoring/controller.py,sha256=m2Z2Nwqj3A3byxrV6PAbkqzT0AsNxmlNqOk61nNJxOc,20637
|
|
217
217
|
mlrun/model_monitoring/features_drift_table.py,sha256=c6GpKtpOJbuT1u5uMWDL_S-6N4YPOmlktWMqPme3KFY,25308
|
|
218
218
|
mlrun/model_monitoring/helpers.py,sha256=KsbSH0kEjCPajvLUpv3q5GWyvx0bZj-JkghGJlzbLZI,12757
|
|
219
219
|
mlrun/model_monitoring/model_endpoint.py,sha256=7VX0cBATqLsA4sSinDzouf41ndxqh2mf5bO9BW0G5Z4,4017
|
|
@@ -221,7 +221,7 @@ mlrun/model_monitoring/stream_processing.py,sha256=0eu1Gq1Obq87LFno6eIZ55poXoFae
|
|
|
221
221
|
mlrun/model_monitoring/tracking_policy.py,sha256=sQq956akAQpntkrJwIgFWcEq-JpyVcg0FxgNa4h3V70,5502
|
|
222
222
|
mlrun/model_monitoring/writer.py,sha256=TrBwngRmdwr67De71UCcCFsJOfcqQe8jDp0vkBvGf0o,10177
|
|
223
223
|
mlrun/model_monitoring/applications/__init__.py,sha256=QYvzgCutFdAkzqKPD3mvkX_3c1X4tzd-kW8ojUOE9ic,889
|
|
224
|
-
mlrun/model_monitoring/applications/_application_steps.py,sha256=
|
|
224
|
+
mlrun/model_monitoring/applications/_application_steps.py,sha256=i6gyVaZHif0xEWl60QoU4VJCJx5-KRVdR1djUKuLBjI,7222
|
|
225
225
|
mlrun/model_monitoring/applications/base.py,sha256=uzc14lFlwTJnL0p2VBCzmp-CNoHd73cK_Iz0YHC1KAs,4380
|
|
226
226
|
mlrun/model_monitoring/applications/context.py,sha256=vOZ_ZgUuy5UsNe22-puJSt7TB32HiZtqBdN1hegykuQ,12436
|
|
227
227
|
mlrun/model_monitoring/applications/evidently_base.py,sha256=FSzmoDZP8EiSQ3tq5RmU7kJ6edh8bWaKQh0rBORjODY,5099
|
|
@@ -245,7 +245,7 @@ mlrun/model_monitoring/db/tsdb/helpers.py,sha256=0oUXc4aUkYtP2SGP6jTb3uPPKImIUsV
|
|
|
245
245
|
mlrun/model_monitoring/db/tsdb/tdengine/__init__.py,sha256=vgBdsKaXUURKqIf3M0y4sRatmSVA4CQiJs7J5dcVBkQ,620
|
|
246
246
|
mlrun/model_monitoring/db/tsdb/tdengine/schemas.py,sha256=LqWJebDXrXo0mteKVG6LnvPYlWBYh2lMCXEcv-lWoKA,10551
|
|
247
247
|
mlrun/model_monitoring/db/tsdb/tdengine/stream_graph_steps.py,sha256=Hb0vcCBP-o0ET78mU4P32fnhUL65QZv-pMuv2lnCby4,1586
|
|
248
|
-
mlrun/model_monitoring/db/tsdb/tdengine/tdengine_connector.py,sha256=
|
|
248
|
+
mlrun/model_monitoring/db/tsdb/tdengine/tdengine_connector.py,sha256=tx8W40cqKKnwuAvFVa7pbX8mv6P-gS1dWNifjPuIG7c,18988
|
|
249
249
|
mlrun/model_monitoring/db/tsdb/v3io/__init__.py,sha256=aL3bfmQsUQ-sbvKGdNihFj8gLCK3mSys0qDcXtYOwgc,616
|
|
250
250
|
mlrun/model_monitoring/db/tsdb/v3io/stream_graph_steps.py,sha256=mbmhN4f_F58ptVjhwoMF6ifZSdnZWhK7x8eNsWS39IA,6217
|
|
251
251
|
mlrun/model_monitoring/db/tsdb/v3io/v3io_connector.py,sha256=1H-IBXPNJPRAaxDMGWpUU25QqfR87LpZbJ03vaJkICs,32858
|
|
@@ -272,7 +272,7 @@ mlrun/platforms/__init__.py,sha256=ggSGF7inITs6S-vj9u4S9X_5psgbA0G3GVqf7zu8qYc,2
|
|
|
272
272
|
mlrun/platforms/iguazio.py,sha256=1h5BpdAEQJBg2vIt7ySjUADU0ip5OkaMYr0_VREi9ys,13084
|
|
273
273
|
mlrun/projects/__init__.py,sha256=Lv5rfxyXJrw6WGOWJKhBz66M6t3_zsNMCfUD6waPwx4,1153
|
|
274
274
|
mlrun/projects/operations.py,sha256=gtqSU9OvYOV-b681uQtWgnW7YSnX6qfa1Mt1Xm4f1ZI,19752
|
|
275
|
-
mlrun/projects/pipelines.py,sha256=
|
|
275
|
+
mlrun/projects/pipelines.py,sha256=tJsoqHYJw0jsB9rawUtTHQ71xnT03b_JVyPROPX-EGU,40962
|
|
276
276
|
mlrun/projects/project.py,sha256=FjgkBBBP6geuxOGGp1Es5EFqsrs3M6PNWejBdoM08ng,190769
|
|
277
277
|
mlrun/runtimes/__init__.py,sha256=egLM94cDMUyQ1GVABdFGXUQcDhU70lP3k7qSnM_UnHY,9008
|
|
278
278
|
mlrun/runtimes/base.py,sha256=JXWmTIcm3b0klGUOHDlyFNa3bUgsNzQIgWhUQpSZoE0,37692
|
|
@@ -341,11 +341,11 @@ mlrun/utils/notifications/notification/ipython.py,sha256=ZtVL30B_Ha0VGoo4LxO-voT
|
|
|
341
341
|
mlrun/utils/notifications/notification/slack.py,sha256=wqpFGr5BTvFO5KuUSzFfxsgmyU1Ohq7fbrGeNe9TXOk,7006
|
|
342
342
|
mlrun/utils/notifications/notification/webhook.py,sha256=cb9w1Mc8ENfJBdgan7iiVHK9eVls4-R3tUxmXM-P-8I,4746
|
|
343
343
|
mlrun/utils/version/__init__.py,sha256=7kkrB7hEZ3cLXoWj1kPoDwo4MaswsI2JVOBpbKgPAgc,614
|
|
344
|
-
mlrun/utils/version/version.json,sha256=
|
|
344
|
+
mlrun/utils/version/version.json,sha256=2gLjdFu6FTXJq5Qo9gVAozN80SS7B7ymDVVut5IiECM,89
|
|
345
345
|
mlrun/utils/version/version.py,sha256=eEW0tqIAkU9Xifxv8Z9_qsYnNhn3YH7NRAfM-pPLt1g,1878
|
|
346
|
-
mlrun-1.7.
|
|
347
|
-
mlrun-1.7.
|
|
348
|
-
mlrun-1.7.
|
|
349
|
-
mlrun-1.7.
|
|
350
|
-
mlrun-1.7.
|
|
351
|
-
mlrun-1.7.
|
|
346
|
+
mlrun-1.7.0rc57.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
347
|
+
mlrun-1.7.0rc57.dist-info/METADATA,sha256=X8t8a2srkg8jb147WeKPA5In1ZAZz73qd6_tuoR1New,24485
|
|
348
|
+
mlrun-1.7.0rc57.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
|
349
|
+
mlrun-1.7.0rc57.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
|
|
350
|
+
mlrun-1.7.0rc57.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
|
|
351
|
+
mlrun-1.7.0rc57.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|