mlrun 1.6.4rc1__py3-none-any.whl → 1.6.4rc6__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
@@ -114,6 +120,7 @@ class RunDBInterface(ABC):
114
120
  kind: str = None,
115
121
  category: Union[str, mlrun.common.schemas.ArtifactCategories] = None,
116
122
  tree: str = None,
123
+ limit: int = None,
117
124
  ):
118
125
  pass
119
126
 
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"]
@@ -945,6 +955,7 @@ class HTTPRunDB(RunDBInterface):
945
955
  category: Union[str, mlrun.common.schemas.ArtifactCategories] = None,
946
956
  tree: str = None,
947
957
  producer_uri: str = None,
958
+ limit: int = None,
948
959
  ) -> ArtifactList:
949
960
  """List artifacts filtered by various parameters.
950
961
 
@@ -977,6 +988,7 @@ class HTTPRunDB(RunDBInterface):
977
988
  :param producer_uri: Return artifacts produced by the requested producer URI. Producer URI usually
978
989
  points to a run and is used to filter artifacts by the run that produced them when the artifact producer id
979
990
  is a workflow id (artifact was created as part of a workflow).
991
+ :param limit: Maximum number of artifacts to return.
980
992
  """
981
993
 
982
994
  project = project or config.default_project
@@ -996,6 +1008,7 @@ class HTTPRunDB(RunDBInterface):
996
1008
  "tree": tree,
997
1009
  "format": mlrun.common.schemas.ArtifactsFormat.full.value,
998
1010
  "producer_uri": producer_uri,
1011
+ "limit": limit,
999
1012
  }
1000
1013
  error = "list artifacts"
1001
1014
  endpoint_path = f"projects/{project}/artifacts"
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(
@@ -125,6 +131,7 @@ class NopDB(RunDBInterface):
125
131
  kind: str = None,
126
132
  category: Union[str, mlrun.common.schemas.ArtifactCategories] = None,
127
133
  tree: str = None,
134
+ limit: int = None,
128
135
  ):
129
136
  pass
130
137
 
mlrun/projects/project.py CHANGED
@@ -3271,6 +3271,7 @@ class MlrunProject(ModelObj):
3271
3271
  kind: str = None,
3272
3272
  category: typing.Union[str, mlrun.common.schemas.ArtifactCategories] = None,
3273
3273
  tree: str = None,
3274
+ limit: int = None,
3274
3275
  ) -> mlrun.lists.ArtifactList:
3275
3276
  """List artifacts filtered by various parameters.
3276
3277
 
@@ -3300,6 +3301,7 @@ class MlrunProject(ModelObj):
3300
3301
  :param kind: Return artifacts of the requested kind.
3301
3302
  :param category: Return artifacts of the requested category.
3302
3303
  :param tree: Return artifacts of the requested tree.
3304
+ :param limit: Maximum number of artifacts to return.
3303
3305
  """
3304
3306
  db = mlrun.db.get_run_db(secrets=self._secrets)
3305
3307
  return db.list_artifacts(
@@ -3314,6 +3316,7 @@ class MlrunProject(ModelObj):
3314
3316
  kind=kind,
3315
3317
  category=category,
3316
3318
  tree=tree,
3319
+ limit=limit,
3317
3320
  )
3318
3321
 
3319
3322
  def list_models(
mlrun/run.py CHANGED
@@ -628,7 +628,7 @@ def code_to_function(
628
628
  - spark: run distributed Spark job using Spark Kubernetes Operator
629
629
  - remote-spark: run distributed Spark job on remote Spark service
630
630
 
631
- Learn more about {Kinds of function (runtimes)](../concepts/functions-overview.html).
631
+ Learn more about [Kinds of function (runtimes)](../concepts/functions-overview.html).
632
632
 
633
633
  :param name: function name, typically best to use hyphen-case
634
634
  :param project: project used to namespace the function, defaults to 'default'
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": "dcefb06a8aaa1a3879bceff6c526f88e9ffe83e3",
3
+ "version": "1.6.4-rc6"
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.4rc6
4
4
  Summary: Tracking and config of machine learning runs
5
5
  Home-page: https://github.com/mlrun/mlrun
6
6
  Author: Yaron Haviv
@@ -9,7 +9,7 @@ mlrun/kfpops.py,sha256=VgvS_4DappCPHzV7057SbraBTbF2mn7zZ7iPAaks3KU,30493
9
9
  mlrun/lists.py,sha256=sEEfl_mw_oVUD1dfkvQZIkJ8q7LJKJPDrb5B_Dg85nY,8388
10
10
  mlrun/model.py,sha256=EbSxpwtNFkqodTwM_StcmDG5MFSG50ZuDMhqzIyzLmM,64896
11
11
  mlrun/render.py,sha256=pfAky9fTHRbINs93_Km_hEdVxmra9RA8BwqMepPbiuE,13451
12
- mlrun/run.py,sha256=gyxYJqVCBsZxp0_HWAG5_lwi2_KPqcxy6un5ZLw_-2Q,42456
12
+ mlrun/run.py,sha256=WDWJF612eiszYuk-gH4UQIx4G2noJbxRG-qPIgGDi5I,42456
13
13
  mlrun/secrets.py,sha256=m7jM8fdjGLR-j9Vx-08eNmtOmlxFx9mTUBqBWtMSVQo,7782
14
14
  mlrun/api/schemas/__init__.py,sha256=ggWbnqhp7By5HNYYfRsZ4D4EdVvjLuz4qfNfR3Kq6M4,14219
15
15
  mlrun/artifacts/__init__.py,sha256=LxEWcMYPawJYvNOl6H2_UvrxdLTNYfKeZcMEKFZnGgA,1187
@@ -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=ELEObv8fUTBEcg6kJGYTVgCC3vw5NvrfQd3bv26URR0,18405
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=4jkJ-MUObEKR3VgROywrCxCD1Z7Prkt1BfGYDCRA4IU,157710
92
+ mlrun/db/nopdb.py,sha256=i1n6kgsBMGHQHwWoSse0FTljiKuS0ucOHs1nOPFadsk,14685
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
@@ -240,9 +240,9 @@ mlrun/platforms/other.py,sha256=z4pWqxXkVVuMLk-MbNb0Y_ZR5pmIsUm0R8vHnqpEnew,1185
240
240
  mlrun/projects/__init__.py,sha256=Lv5rfxyXJrw6WGOWJKhBz66M6t3_zsNMCfUD6waPwx4,1153
241
241
  mlrun/projects/operations.py,sha256=CJRGKEFhqKXlg0VOKhcfjOUVAmWHA9WwAFNiXtUqBhg,18550
242
242
  mlrun/projects/pipelines.py,sha256=FcKNsFtRUP1sOuSEp5Hk0_Qv4ZIKT9gWpatg6bSUCsI,41165
243
- mlrun/projects/project.py,sha256=U98H5DF0q17qZcQB4VqqPoEETFgh_VvV51DTHXQhsbA,153280
243
+ mlrun/projects/project.py,sha256=o7atu7WzLx6Ezxg_yWTAPGeneVop-0TU_JGjHTD7eVw,153393
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=cbqw12I-paQmPzt7MNZ52K4YQZAE6unVTOZO5JAAh_E,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.4rc6.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
310
+ mlrun-1.6.4rc6.dist-info/METADATA,sha256=XWG49KfyXdd7M4QZfSCIaOtToKnhbeU-Q4SjvkG1keY,18403
311
+ mlrun-1.6.4rc6.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
312
+ mlrun-1.6.4rc6.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
313
+ mlrun-1.6.4rc6.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
314
+ mlrun-1.6.4rc6.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (70.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5