mlrun 1.7.0rc53__py3-none-any.whl → 1.7.0rc58__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/utils/version/version.json +2 -2
- {mlrun-1.7.0rc53.dist-info → mlrun-1.7.0rc58.dist-info}/METADATA +3 -3
- {mlrun-1.7.0rc53.dist-info → mlrun-1.7.0rc58.dist-info}/RECORD +10 -10
- {mlrun-1.7.0rc53.dist-info → mlrun-1.7.0rc58.dist-info}/WHEEL +1 -1
- {mlrun-1.7.0rc53.dist-info → mlrun-1.7.0rc58.dist-info}/LICENSE +0 -0
- {mlrun-1.7.0rc53.dist-info → mlrun-1.7.0rc58.dist-info}/entry_points.txt +0 -0
- {mlrun-1.7.0rc53.dist-info → mlrun-1.7.0rc58.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",
|
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.0rc58
|
|
4
4
|
Summary: Tracking and config of machine learning runs
|
|
5
5
|
Home-page: https://github.com/mlrun/mlrun
|
|
6
6
|
Author: Yaron Haviv
|
|
@@ -24,7 +24,7 @@ License-File: LICENSE
|
|
|
24
24
|
Requires-Dist: urllib3 <1.27,>=1.26.9
|
|
25
25
|
Requires-Dist: GitPython >=3.1.41,~=3.1
|
|
26
26
|
Requires-Dist: aiohttp ~=3.9
|
|
27
|
-
Requires-Dist: aiohttp-retry ~=2.8
|
|
27
|
+
Requires-Dist: aiohttp-retry ~=2.8.0
|
|
28
28
|
Requires-Dist: click ~=8.1
|
|
29
29
|
Requires-Dist: nest-asyncio ~=1.0
|
|
30
30
|
Requires-Dist: ipython ~=8.10
|
|
@@ -43,7 +43,7 @@ Requires-Dist: semver ~=3.0
|
|
|
43
43
|
Requires-Dist: dependency-injector ~=4.41
|
|
44
44
|
Requires-Dist: fsspec <2024.7,>=2023.9.2
|
|
45
45
|
Requires-Dist: v3iofs ~=0.1.17
|
|
46
|
-
Requires-Dist: storey
|
|
46
|
+
Requires-Dist: storey <1.7.50,>1.7.27
|
|
47
47
|
Requires-Dist: inflection ~=0.5.0
|
|
48
48
|
Requires-Dist: python-dotenv ~=0.17.0
|
|
49
49
|
Requires-Dist: setuptools ~=71.0
|
|
@@ -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
|
|
@@ -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=NYJc_hNnvRnk8bck1nZwGEcjw03CCSbKVC1pAcCVJFA,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.0rc58.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
347
|
+
mlrun-1.7.0rc58.dist-info/METADATA,sha256=JR9H-DN9dpIJ6iNgd0x3wsKU_kjYroRA6sgpt-7VMvo,24494
|
|
348
|
+
mlrun-1.7.0rc58.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
|
349
|
+
mlrun-1.7.0rc58.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
|
|
350
|
+
mlrun-1.7.0rc58.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
|
|
351
|
+
mlrun-1.7.0rc58.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|