mlrun 1.6.3rc14__py3-none-any.whl → 1.6.4rc5__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.

@@ -156,7 +156,7 @@ from .project import (
156
156
  ProjectSummary,
157
157
  )
158
158
  from .regex import RegexMatchModes
159
- from .runs import RunIdentifier
159
+ from .runs import RunIdentifier, RunsFormat
160
160
  from .runtime_resource import (
161
161
  GroupedByJobRuntimeResourcesOutput,
162
162
  GroupedByProjectRuntimeResourcesOutput,
@@ -16,8 +16,19 @@ import typing
16
16
 
17
17
  import pydantic
18
18
 
19
+ import mlrun.common.types
20
+
19
21
 
20
22
  class RunIdentifier(pydantic.BaseModel):
21
23
  kind: typing.Literal["run"] = "run"
22
24
  uid: typing.Optional[str]
23
25
  iter: typing.Optional[int]
26
+
27
+
28
+ # In 1.7 should be moved to mlrun.common.formatters.run.py
29
+ class RunsFormat(mlrun.common.types.StrEnum):
30
+ # No enrichment, data is pulled as-is from the database.
31
+ standard = "standard"
32
+
33
+ # Performs run enrichment, including the run's artifacts. Only available for the `get` run API.
34
+ full = "full"
mlrun/db/base.py CHANGED
@@ -53,7 +53,13 @@ class RunDBInterface(ABC):
53
53
  pass
54
54
 
55
55
  @abstractmethod
56
- def read_run(self, uid, project="", iter=0):
56
+ def read_run(
57
+ self,
58
+ uid: str,
59
+ project: str = "",
60
+ iter: int = 0,
61
+ format_: mlrun.common.schemas.runs.RunsFormat = mlrun.common.schemas.runs.RunsFormat.full,
62
+ ):
57
63
  pass
58
64
 
59
65
  @abstractmethod
mlrun/db/httpdb.py CHANGED
@@ -646,16 +646,26 @@ class HTTPRunDB(RunDBInterface):
646
646
  )
647
647
  return None
648
648
 
649
- def read_run(self, uid, project="", iter=0):
649
+ def read_run(
650
+ self,
651
+ uid,
652
+ project="",
653
+ iter=0,
654
+ format_: mlrun.common.schemas.runs.RunsFormat = mlrun.common.schemas.runs.RunsFormat.full,
655
+ ):
650
656
  """Read the details of a stored run from the DB.
651
657
 
652
- :param uid: The run's unique ID.
653
- :param project: Project name.
654
- :param iter: Iteration within a specific execution.
658
+ :param uid: The run's unique ID.
659
+ :param project: Project name.
660
+ :param iter: Iteration within a specific execution.
661
+ :param format_: The format in which to return the run details.
655
662
  """
656
663
 
657
664
  path = self._path_of("runs", project, uid)
658
- params = {"iter": iter}
665
+ params = {
666
+ "iter": iter,
667
+ "format": format_.value,
668
+ }
659
669
  error = f"get run {project}/{uid}"
660
670
  resp = self.api_call("GET", path, error, params=params)
661
671
  return resp.json()["data"]
mlrun/db/nopdb.py CHANGED
@@ -70,7 +70,13 @@ class NopDB(RunDBInterface):
70
70
  def abort_run(self, uid, project="", iter=0, timeout=45, status_text=""):
71
71
  pass
72
72
 
73
- def read_run(self, uid, project="", iter=0):
73
+ def read_run(
74
+ self,
75
+ uid,
76
+ project="",
77
+ iter=0,
78
+ format_: mlrun.common.schemas.runs.RunsFormat = mlrun.common.schemas.runs.RunsFormat.full,
79
+ ):
74
80
  pass
75
81
 
76
82
  def list_runs(
@@ -11,7 +11,7 @@
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
- #
14
+
15
15
  import abc
16
16
  import collections
17
17
  import dataclasses
@@ -20,13 +20,17 @@ import json
20
20
  import os
21
21
  import re
22
22
  from typing import Any, ClassVar, Dict, List, Optional, Tuple, Type, Union
23
+ from urllib.parse import urlparse
23
24
 
25
+ import fsspec
24
26
  import numpy as np
25
27
  import pandas as pd
28
+ import pyarrow
26
29
  import requests
27
30
  import v3io
28
31
  import v3io.dataplane
29
32
  import v3io_frames
33
+ import v3iofs # noqa: F401, required for V3IO file system with fsspec
30
34
  from v3io_frames.frames_pb2 import IGNORE
31
35
 
32
36
  import mlrun.common.helpers
@@ -720,6 +724,21 @@ class BatchProcessor:
720
724
  )
721
725
  return
722
726
 
727
+ except pyarrow.ArrowInvalid:
728
+ target_path = m_fs.status.targets[0].path
729
+ fs = fsspec.filesystem(urlparse(target_path).scheme)
730
+ paths = fs.glob(target_path + "/**")
731
+ logger.warn(
732
+ "Parquet found, but could not be read. Listing the files "
733
+ "and folders in the model endpoint's parquet folder",
734
+ target_path=target_path,
735
+ paths=paths,
736
+ )
737
+ for path in paths:
738
+ details = fs.listdir(path)
739
+ logger.info("Path details", path=path, details=details)
740
+ raise
741
+
723
742
  # Get feature names from monitoring feature set
724
743
  feature_names = [
725
744
  feature_name["name"] for feature_name in m_fs.spec.features.to_dict()
@@ -1078,6 +1078,9 @@ class UpdateEndpoint(mlrun.feature_store.steps.MapClass):
1078
1078
  self.model_endpoint_store_target = model_endpoint_store_target
1079
1079
 
1080
1080
  def do(self, event: dict):
1081
+ # Remove labels from the event
1082
+ event.pop(EventFieldType.LABELS)
1083
+
1081
1084
  update_endpoint_record(
1082
1085
  project=self.project,
1083
1086
  endpoint_id=event.pop(EventFieldType.ENDPOINT_ID),
mlrun/runtimes/base.py CHANGED
@@ -414,13 +414,19 @@ class BaseRuntime(ModelObj):
414
414
  state_thresholds=state_thresholds,
415
415
  )
416
416
 
417
- def _get_db_run(self, task: RunObject = None):
417
+ def _get_db_run(
418
+ self,
419
+ task: RunObject = None,
420
+ run_format: mlrun.common.schemas.runs.RunsFormat = mlrun.common.schemas.runs.RunsFormat.full,
421
+ ):
418
422
  if self._get_db() and task:
419
423
  project = task.metadata.project
420
424
  uid = task.metadata.uid
421
425
  iter = task.metadata.iteration
422
426
  try:
423
- return self._get_db().read_run(uid, project, iter=iter)
427
+ return self._get_db().read_run(
428
+ uid, project, iter=iter, format_=run_format
429
+ )
424
430
  except mlrun.db.RunDBError:
425
431
  return None
426
432
  if task:
@@ -537,13 +543,14 @@ class BaseRuntime(ModelObj):
537
543
  self,
538
544
  resp: dict = None,
539
545
  task: RunObject = None,
540
- err=None,
546
+ err: Union[Exception, str] = None,
547
+ run_format: mlrun.common.schemas.runs.RunsFormat = mlrun.common.schemas.runs.RunsFormat.full,
541
548
  ) -> typing.Optional[dict]:
542
549
  """update the task state in the DB"""
543
550
  was_none = False
544
551
  if resp is None and task:
545
552
  was_none = True
546
- resp = self._get_db_run(task)
553
+ resp = self._get_db_run(task, run_format)
547
554
 
548
555
  if not resp:
549
556
  self.store_run(task)
@@ -485,7 +485,11 @@ def _init_endpoint_record(
485
485
  return None
486
486
 
487
487
  # Generating version model value based on the model name and model version
488
- if model.version:
488
+ if model.model_path and model.model_path.startswith("store://"):
489
+ # Enrich the model server with the model artifact metadata
490
+ model.get_model()
491
+ model.version = model.model_spec.tag
492
+ model.labels = model.model_spec.labels
489
493
  versioned_model_name = f"{model.name}:{model.version}"
490
494
  else:
491
495
  versioned_model_name = f"{model.name}:latest"
@@ -1,4 +1,4 @@
1
1
  {
2
- "git_commit": "43c50e9853e34113270e42ef4b4ccc1b0cdb28cb",
3
- "version": "1.6.3-rc14"
2
+ "git_commit": "d70e1bd856abfe7e45fd3ac0d282765e755a442e",
3
+ "version": "1.6.4-rc5"
4
4
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mlrun
3
- Version: 1.6.3rc14
3
+ Version: 1.6.4rc5
4
4
  Summary: Tracking and config of machine learning runs
5
5
  Home-page: https://github.com/mlrun/mlrun
6
6
  Author: Yaron Haviv
@@ -27,7 +27,7 @@ mlrun/common/db/__init__.py,sha256=xY3wHC4TEJgez7qtnn1pQvHosi8-5UJOCtyGBS7FcGE,5
27
27
  mlrun/common/db/sql_session.py,sha256=yS5KnE3FbOr3samz9tegSga4nd0JSv6azN0RIN9DGjk,2687
28
28
  mlrun/common/model_monitoring/__init__.py,sha256=x0EMEvxVjHsm858J1t6IEA9dtKTdFpJ9sKhss10ld8A,721
29
29
  mlrun/common/model_monitoring/helpers.py,sha256=War8806vyMwdrQs2JkmPQ1DTPPUZ0DJ1B3jABiyRUe8,4249
30
- mlrun/common/schemas/__init__.py,sha256=-L8-j6zTevHDglT83i0wyMTxTgeKFMmJalkkLoy51Zg,4742
30
+ mlrun/common/schemas/__init__.py,sha256=_Nofu905uObCMc6KzhktNBR3VYVtiv3vlthbkwsfmrw,4754
31
31
  mlrun/common/schemas/artifact.py,sha256=DaJYX54tq74nu2nBiAzRmGBkBYgtZiT-IKjQI11i8F4,2824
32
32
  mlrun/common/schemas/auth.py,sha256=7fNsGhDi1DV4WGuTNtEKXfq56SeCHjpRTed8YUj8m20,5978
33
33
  mlrun/common/schemas/background_task.py,sha256=TBFiqkEY8ffKcgIZ1eHtqWcqdD0dFr1YYWl-nOff2Jc,1714
@@ -49,7 +49,7 @@ mlrun/common/schemas/object.py,sha256=W735Gmu5D_x6LxNp1qsHMkhldjY5b_1H9QvAiiITRR
49
49
  mlrun/common/schemas/pipeline.py,sha256=tvpSHmXDR20uxWIHQ5KXf1zGKi1jaT5pDUIS26zJhLI,1184
50
50
  mlrun/common/schemas/project.py,sha256=E4kIlKdPNveYoZ87Cfv3QCsn0JdIgbZv26OrgNVKJNI,4305
51
51
  mlrun/common/schemas/regex.py,sha256=8_vbDeAE0SODJDj7yUFg1FbaB9CNydYQTJ29JxE74Kc,776
52
- mlrun/common/schemas/runs.py,sha256=H9QhaN83cFUN42eE9TLgi1gs6Xdq11oQSZ96ESM94mI,745
52
+ mlrun/common/schemas/runs.py,sha256=zMZeEkP5DKboAmovKSGoylIe3ggYvXoZBts77e_npdY,1085
53
53
  mlrun/common/schemas/runtime_resource.py,sha256=GyeqRwbBoLMq-0zWCkocvKl2nz9a62dAfguaPdqUzYw,1636
54
54
  mlrun/common/schemas/schedule.py,sha256=dFaPWY3CtuW1KKGcs-br1Gsm5vPjiTgcBZGfcbAAeug,4293
55
55
  mlrun/common/schemas/secret.py,sha256=51tCN1F8DFTq4y_XdHIMDy3I1TnMEBX8kO8BHKavYF4,1484
@@ -86,10 +86,10 @@ mlrun/datastore/wasbfs/__init__.py,sha256=s5Ul-0kAhYqFjKDR2X0O2vDGDbLQQduElb32Ev
86
86
  mlrun/datastore/wasbfs/fs.py,sha256=MnSj7Q4OKA2L55ihCmUnj2t3GA3B77oLMdAw-yxvN9w,6151
87
87
  mlrun/db/__init__.py,sha256=WqJ4x8lqJ7ZoKbhEyFqkYADd9P6E3citckx9e9ZLcIU,1163
88
88
  mlrun/db/auth_utils.py,sha256=hpg8D2r82oN0BWabuWN04BTNZ7jYMAF242YSUpK7LFM,5211
89
- mlrun/db/base.py,sha256=Rg2TrcwvzN28vmoyhq8sSxNjiBS1EA6BAHr24fhcmNU,18221
89
+ mlrun/db/base.py,sha256=etuCS0YEJZCJUNI7BQEdR4LSQK7_7ajE1fh-K7f8sak,18378
90
90
  mlrun/db/factory.py,sha256=wTEKHEmdDkylM6IkTYvmEYVF8gn2HdjLoLoWICCyatI,2403
91
- mlrun/db/httpdb.py,sha256=FHrAwU7c4AQPCoXDIdkEkFfr8ViUS7XLJYIGrXrv_rs,157292
92
- mlrun/db/nopdb.py,sha256=rpZy5cpW-8--4OvMzlVoKNYjbhWJ3cn_z-JFwfuPqnI,14520
91
+ mlrun/db/httpdb.py,sha256=vtohVgg5d2EWTfgmo6OQkk6it6q-at-r3yy2myhxOlM,157584
92
+ mlrun/db/nopdb.py,sha256=RH5wrPn6RglMi4h6aO8Cu1kle_MncPr3JjOYeBgXQvY,14658
93
93
  mlrun/feature_store/__init__.py,sha256=n1F5m1svFW2chbE2dJdWzZJJiYS4E-y8PQsG9Q-F0lU,1584
94
94
  mlrun/feature_store/api.py,sha256=ehEwKlmE07pq1FUwh-ehA8Jm9LTkQofl5MQpEiMwVqM,49520
95
95
  mlrun/feature_store/common.py,sha256=jA7Flrv7iJx2Ug1-4BsOxPCQpVKeaPDcJPupBhu8MgI,12860
@@ -198,7 +198,7 @@ mlrun/launcher/remote.py,sha256=lcVV9nH_SMDsdb2XNg01EVnzZSxAMqxFGZJWxaezXeU,7487
198
198
  mlrun/model_monitoring/__init__.py,sha256=XaYyvWsIXpjJQ2gCPj8tFvfSbRSEEqgDtNz4tCE5H4g,915
199
199
  mlrun/model_monitoring/api.py,sha256=uKT733p3vUsIgX-vdvhbroeN15bmdkZT5S3gsfwbNhk,36829
200
200
  mlrun/model_monitoring/application.py,sha256=ilslJNkq3CCivPqvsDOPmu0UClWXwH9IWr58gdxM9iU,12292
201
- mlrun/model_monitoring/batch.py,sha256=l0FTSTt9frLgqeSS9jY8IU_0OwlvSevuZBWBgnBGH9A,43566
201
+ mlrun/model_monitoring/batch.py,sha256=UDtcafDFOqWtARY6lbSdXgMFIO-VYWdKbGUwY_fqfRo,44379
202
202
  mlrun/model_monitoring/controller.py,sha256=Zh7XnGevQyJCU8uMT8MC6kD7cP55vUJaIjqbBvSyuvA,27608
203
203
  mlrun/model_monitoring/controller_handler.py,sha256=kG3sTjhKdsd9QcHkUlYcvw08yPsVQs9FyFdcKP9iaCo,977
204
204
  mlrun/model_monitoring/evidently_application.py,sha256=o9PsDsjyRfcbuC1X1gb2ww5nzWCsR_KheabtpxKZ5yY,4824
@@ -206,7 +206,7 @@ mlrun/model_monitoring/features_drift_table.py,sha256=OEDb_YZm3cyzszzC4SDqi7ufwO
206
206
  mlrun/model_monitoring/helpers.py,sha256=l8RCxOGBoScZSL4M-x4fIfpsfH7wjSQpqA_t-HVk0BI,7087
207
207
  mlrun/model_monitoring/model_endpoint.py,sha256=BBtxdY5ciormI_al4zshmIp0GN7hGhOCn-hLgpCXek0,3938
208
208
  mlrun/model_monitoring/prometheus.py,sha256=Z0UWmhQ-dpGGH31gCiGdfmhfj-RFRf1Tu1bYVe-k4jk,7605
209
- mlrun/model_monitoring/stream_processing.py,sha256=mUmF12byO8h5CPszEqrI0xFbOWiyCYr493r58EElWyQ,49150
209
+ mlrun/model_monitoring/stream_processing.py,sha256=n1UpOsxOW8bUQnEAHgRm2wOOihx8VWrFYiE1FWz_zgs,49231
210
210
  mlrun/model_monitoring/tracking_policy.py,sha256=Q6_p4y1ZcRHqs24c_1_4m9E1gYnaOm6pLCNGT22dWKM,5221
211
211
  mlrun/model_monitoring/writer.py,sha256=IWPzPenoAkfIxlvn0IdcdB19Nxqmg4mjbo3-RnYWw9A,8669
212
212
  mlrun/model_monitoring/stores/__init__.py,sha256=adU_G07jkD3JUT8__d0jAxs9nNomL7igKmd6uVM9L50,4525
@@ -242,7 +242,7 @@ mlrun/projects/operations.py,sha256=CJRGKEFhqKXlg0VOKhcfjOUVAmWHA9WwAFNiXtUqBhg,
242
242
  mlrun/projects/pipelines.py,sha256=FcKNsFtRUP1sOuSEp5Hk0_Qv4ZIKT9gWpatg6bSUCsI,41165
243
243
  mlrun/projects/project.py,sha256=U98H5DF0q17qZcQB4VqqPoEETFgh_VvV51DTHXQhsbA,153280
244
244
  mlrun/runtimes/__init__.py,sha256=f5cdEg4raKNXQawJE-AuWzK6AqIsLfDODREeMnI2Ies,7062
245
- mlrun/runtimes/base.py,sha256=GTVqCR3sBqbyAlEBnDClThOf0EZUoAMzlEIFqjfoyLQ,36604
245
+ mlrun/runtimes/base.py,sha256=XRn-YTGRyV7BsM2KRDD0dVgvSoxPzxhfC3utHafI2Sc,36926
246
246
  mlrun/runtimes/constants.py,sha256=tB7nIlHob3yF0K9Uf9BUZ8yxjZNSzlzrd3K32K_vV7w,9550
247
247
  mlrun/runtimes/daskjob.py,sha256=B74NfaO8MPczrEYtOd9TsvKMAReGYc1Q691u629DwVI,19161
248
248
  mlrun/runtimes/funcdoc.py,sha256=FHwnLfFzoD6yGlsAJXAl_3VTtudgg4fTrsw_XqLOkC0,10508
@@ -275,7 +275,7 @@ mlrun/serving/serving_wrapper.py,sha256=R670-S6PX_d5ER6jiHtRvacuPyFzQH0mEf2K0sBI
275
275
  mlrun/serving/states.py,sha256=LORqEyNR6Rxq-rH0VfVvJ_aff3ws_KoT83UqXNccjyY,54821
276
276
  mlrun/serving/utils.py,sha256=PbXvmkqUAAE0jAfnsUwTOHEQsnhMpmuREv_yB21hvv4,3784
277
277
  mlrun/serving/v1_serving.py,sha256=5BVvsvjG4zsq3LMnYp0ZE8qFs-qcfQSD3SOSziEYQqQ,11813
278
- mlrun/serving/v2_serving.py,sha256=fAMA52lBvpLFpUa8LKHjRAwBZp_sR0wUmmtrN1ChJC4,21823
278
+ mlrun/serving/v2_serving.py,sha256=kZO5b-3MXD-ejwH47Kq0klvWn0INqC4vUsHgZyUBqbU,22055
279
279
  mlrun/track/__init__.py,sha256=LWRUHJt8JyFW17FyNPOVyWd-NXTf1iptzsK9KFj5fuY,765
280
280
  mlrun/track/tracker.py,sha256=y-UdhC2nzM6r-yHCwvrfiHRr93xsr4JRsZTxDrTTRJo,3541
281
281
  mlrun/track/tracker_manager.py,sha256=ZZzXtgQ-t4ah64XeAHNCbZ2VMOK_0E0RHv0pIowynjA,5732
@@ -304,11 +304,11 @@ mlrun/utils/notifications/notification/ipython.py,sha256=qrBmtECiRG6sZpCIVMg7RZc
304
304
  mlrun/utils/notifications/notification/slack.py,sha256=5JysqIpUYUZKXPSeeZtbl7qb2L9dj7p2NvnEBcEsZkA,3898
305
305
  mlrun/utils/notifications/notification/webhook.py,sha256=QHezCuN5uXkLcroAGxGrhGHaxAdUvkDLIsp27_Yrfd4,2390
306
306
  mlrun/utils/version/__init__.py,sha256=7kkrB7hEZ3cLXoWj1kPoDwo4MaswsI2JVOBpbKgPAgc,614
307
- mlrun/utils/version/version.json,sha256=u19UWYRojPqXoZSwGJQ6y8SEJ2oa-enjf_pgCw7448M,89
307
+ mlrun/utils/version/version.json,sha256=htkGDiNl4xAopZldq8VEMSMt66MkgciIY3GJ0EAYKGI,88
308
308
  mlrun/utils/version/version.py,sha256=HMwseV8xjTQ__6T6yUWojx_z6yUj7Io7O4NcCCH_sz8,1970
309
- mlrun-1.6.3rc14.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
310
- mlrun-1.6.3rc14.dist-info/METADATA,sha256=dl8rKF9vsrJjBhCpA-DjrJR2X2tytcuIBVkdiNzinhk,18404
311
- mlrun-1.6.3rc14.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
312
- mlrun-1.6.3rc14.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
313
- mlrun-1.6.3rc14.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
314
- mlrun-1.6.3rc14.dist-info/RECORD,,
309
+ mlrun-1.6.4rc5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
310
+ mlrun-1.6.4rc5.dist-info/METADATA,sha256=cLWhJFfacvceEqAcLUkh_0GL-KIu0Z71V8uxLhatnfQ,18403
311
+ mlrun-1.6.4rc5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
312
+ mlrun-1.6.4rc5.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
313
+ mlrun-1.6.4rc5.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
314
+ mlrun-1.6.4rc5.dist-info/RECORD,,