mlrun 1.6.4rc1__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(
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)
@@ -1,4 +1,4 @@
1
1
  {
2
- "git_commit": "d4ac13d8ffd2423e6c46360355a9d49b9f062648",
3
- "version": "1.6.4-rc1"
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.4rc1
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
@@ -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
@@ -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=rrYscIrwZh0eAnNK_L9Y7nGxnABkbj9VLbKj2eMstyQ,88
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.4rc1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
310
- mlrun-1.6.4rc1.dist-info/METADATA,sha256=roaK7X4wrleuMOoErCMZfVRxSksVlOO2HOI_NJIBGPA,18403
311
- mlrun-1.6.4rc1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
312
- mlrun-1.6.4rc1.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
313
- mlrun-1.6.4rc1.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
314
- mlrun-1.6.4rc1.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,,