mlrun 1.7.2__py3-none-any.whl → 1.7.2rc1__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.

@@ -47,12 +47,6 @@ class ArtifactCategories(mlrun.common.types.StrEnum):
47
47
  True,
48
48
  )
49
49
 
50
- @classmethod
51
- def from_kind(cls, kind: str) -> "ArtifactCategories":
52
- if kind in [cls.model.value, cls.dataset.value]:
53
- return cls(kind)
54
- return cls.other
55
-
56
50
 
57
51
  class ArtifactIdentifier(pydantic.BaseModel):
58
52
  # artifact kind
mlrun/db/factory.py CHANGED
@@ -54,6 +54,9 @@ class RunDBFactory(
54
54
  self._run_db = self._rundb_container.nop(url)
55
55
 
56
56
  else:
57
+ # TODO: this practically makes the SQLRunDB a singleton, which mean that its session is shared, needs
58
+ # to be refreshed frequently and cannot be used concurrently.
59
+ # The SQLRunDB should always get its session from the FastAPI dependency injection.
57
60
  self._run_db = self._rundb_container.run_db(url)
58
61
 
59
62
  self._run_db.connect(secrets=secrets)
@@ -1003,7 +1003,6 @@ class RemoteRuntime(KubeResource):
1003
1003
  ):
1004
1004
  """
1005
1005
  Add a sidecar container to the function pod
1006
-
1007
1006
  :param name: Sidecar container name.
1008
1007
  :param image: Sidecar container image.
1009
1008
  :param ports: Sidecar container ports to expose. Can be a single port or a list of ports.
@@ -12,7 +12,6 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- import re
16
15
  import typing
17
16
 
18
17
  import aiohttp
@@ -94,6 +93,7 @@ class WebhookNotification(NotificationBase):
94
93
 
95
94
  @staticmethod
96
95
  def _serialize_runs_in_request_body(override_body, runs):
96
+ str_parsed_runs = ""
97
97
  runs = runs or []
98
98
 
99
99
  def parse_runs():
@@ -105,26 +105,22 @@ class WebhookNotification(NotificationBase):
105
105
  parsed_run = {
106
106
  "project": run["metadata"]["project"],
107
107
  "name": run["metadata"]["name"],
108
+ "host": run["metadata"]["labels"]["host"],
108
109
  "status": {"state": run["status"]["state"]},
109
110
  }
110
- if host := run["metadata"].get("labels", {}).get("host", ""):
111
- parsed_run["host"] = host
112
- if error := run["status"].get("error"):
113
- parsed_run["status"]["error"] = error
114
- elif results := run["status"].get("results"):
115
- parsed_run["status"]["results"] = results
111
+ if run["status"].get("error", None):
112
+ parsed_run["status"]["error"] = run["status"]["error"]
113
+ elif run["status"].get("results", None):
114
+ parsed_run["status"]["results"] = run["status"]["results"]
116
115
  parsed_runs.append(parsed_run)
117
116
  return str(parsed_runs)
118
117
 
119
118
  if isinstance(override_body, dict):
120
119
  for key, value in override_body.items():
121
- if not isinstance(value, str):
122
- # If the value is not a string, we don't want to parse it
123
- continue
124
- if re.search(r"{{\s*runs\s*}}", value):
125
- str_parsed_runs = parse_runs()
126
- override_body[key] = re.sub(
127
- r"{{\s*runs\s*}}", str_parsed_runs, value
128
- )
129
-
120
+ if "{{ runs }}" or "{{runs}}" in value:
121
+ if not str_parsed_runs:
122
+ str_parsed_runs = parse_runs()
123
+ override_body[key] = value.replace(
124
+ "{{ runs }}", str_parsed_runs
125
+ ).replace("{{runs}}", str_parsed_runs)
130
126
  return override_body
@@ -168,11 +168,6 @@ class NotificationPusher(_NotificationPusherBase):
168
168
  logger.warning(
169
169
  "Failed to push notification async",
170
170
  error=mlrun.errors.err_to_str(result),
171
- traceback=traceback.format_exception(
172
- etype=type(result),
173
- value=result,
174
- tb=result.__traceback__,
175
- ),
176
171
  )
177
172
 
178
173
  logger.debug(
@@ -1,4 +1,4 @@
1
1
  {
2
- "git_commit": "bb224abaed1b5d221269586c9497124a526615e8",
3
- "version": "1.7.2"
2
+ "git_commit": "b61d75d3cac7eb070d9b545b9c26df0106d77ae5",
3
+ "version": "1.7.2-rc1"
4
4
  }
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.1
2
2
  Name: mlrun
3
- Version: 1.7.2
3
+ Version: 1.7.2rc1
4
4
  Summary: Tracking and config of machine learning runs
5
5
  Home-page: https://github.com/mlrun/mlrun
6
6
  Author: Yaron Haviv
@@ -214,18 +214,6 @@ Requires-Dist: taos-ws-py==0.3.2; extra == "complete-api"
214
214
  Requires-Dist: taoswswrap~=0.2.0; extra == "complete-api"
215
215
  Requires-Dist: timelength~=1.1; extra == "complete-api"
216
216
  Requires-Dist: uvicorn~=0.27.1; extra == "complete-api"
217
- Dynamic: author
218
- Dynamic: author-email
219
- Dynamic: classifier
220
- Dynamic: description
221
- Dynamic: description-content-type
222
- Dynamic: home-page
223
- Dynamic: keywords
224
- Dynamic: license
225
- Dynamic: provides-extra
226
- Dynamic: requires-dist
227
- Dynamic: requires-python
228
- Dynamic: summary
229
217
 
230
218
  <a id="top"></a>
231
219
  [![Build Status](https://github.com/mlrun/mlrun/actions/workflows/build.yaml/badge.svg?branch=development)](https://github.com/mlrun/mlrun/actions/workflows/build.yaml?query=branch%3Adevelopment)
@@ -40,7 +40,7 @@ mlrun/common/runtimes/constants.py,sha256=Rl0Sd8n_L7Imo-uF1LL9CJ5Szi0W1gUm36yrF8
40
40
  mlrun/common/schemas/__init__.py,sha256=QZMyVHjIoa88JmyVy45JGkNGz5K39XX7A72TUnXrLNA,5267
41
41
  mlrun/common/schemas/alert.py,sha256=qWYCISNYMdkgAARVQNxshVr9d-s8LGscfLKpczkTBms,6749
42
42
  mlrun/common/schemas/api_gateway.py,sha256=9ilorgLOiWxFZbv89-dbPNfVdaChlGOIdC4SLTxQwNI,7118
43
- mlrun/common/schemas/artifact.py,sha256=lX0tAjvIxrMDmubvTUKKKl-BAt0FKDG0s7lzfvi1jb0,3758
43
+ mlrun/common/schemas/artifact.py,sha256=V3ngobnzI1v2eoOroWBEedjAZu0ntCSIQ-LzsOK1Z9k,3570
44
44
  mlrun/common/schemas/auth.py,sha256=7XpEXICjDhHHkAppOp0mHvEtCwG68L3mhgSHPqqTBMk,6584
45
45
  mlrun/common/schemas/background_task.py,sha256=2qZxib2qrF_nPZj0ncitCG-2jxz2hg1qj0hFc8eswWQ,1707
46
46
  mlrun/common/schemas/client_spec.py,sha256=wqzQ5R4Zc7FL-8lV_BRN6nLrD0jK1kon05-JQ3fy2KY,2892
@@ -104,7 +104,7 @@ mlrun/datastore/wasbfs/fs.py,sha256=MnSj7Q4OKA2L55ihCmUnj2t3GA3B77oLMdAw-yxvN9w,
104
104
  mlrun/db/__init__.py,sha256=WqJ4x8lqJ7ZoKbhEyFqkYADd9P6E3citckx9e9ZLcIU,1163
105
105
  mlrun/db/auth_utils.py,sha256=hpg8D2r82oN0BWabuWN04BTNZ7jYMAF242YSUpK7LFM,5211
106
106
  mlrun/db/base.py,sha256=lUfJrCWbuRUErIrUUXAKI2sSlrwfB-dHDz-Ck_cnZHU,24297
107
- mlrun/db/factory.py,sha256=yP2vVmveUE7LYTCHbS6lQIxP9rW--zdISWuPd_I3d_4,2111
107
+ mlrun/db/factory.py,sha256=ibIrE5QkIIyzDU1FXKrfbc31cZiRLYKDZb8dqCpQwyU,2397
108
108
  mlrun/db/httpdb.py,sha256=VSk5lCrxBQydla9Cw4lYLA7W9o0Ge4WNfmmKFB4x3WM,184966
109
109
  mlrun/db/nopdb.py,sha256=1oCZR2EmQQDkwXUgmyI3SB76zvOwA6Ml3Lk_xvuwHfc,21620
110
110
  mlrun/feature_store/__init__.py,sha256=FhHRc8NdqL_HWpCs7A8dKruxJS5wEm55Gs3dcgBiRUg,1522
@@ -294,7 +294,7 @@ mlrun/runtimes/mpijob/abstract.py,sha256=kDWo-IY1FKLZhI30j38Xx9HMhlUvHezfd1DT2Sh
294
294
  mlrun/runtimes/mpijob/v1.py,sha256=1XQZC7AIMGX_AQCbApcwpH8I7y39-v0v2O35MvxjXoo,3213
295
295
  mlrun/runtimes/nuclio/__init__.py,sha256=gx1kizzKv8pGT5TNloN1js1hdbxqDw3rM90sLVYVffY,794
296
296
  mlrun/runtimes/nuclio/api_gateway.py,sha256=oQRSOvqtODKCzT2LqlqSXZbq2vcZ7epsFZwO9jvarhc,26899
297
- mlrun/runtimes/nuclio/function.py,sha256=RNcTcxElHmVPBXc3B_V5JVEFDqLTXaZF6fW-1mNpUDM,52185
297
+ mlrun/runtimes/nuclio/function.py,sha256=jtwtD9xfH3261cuekuHT97oBhNDqjBXCzHgQ2Y6IYs8,52184
298
298
  mlrun/runtimes/nuclio/nuclio.py,sha256=sLK8KdGO1LbftlL3HqPZlFOFTAAuxJACZCVl1c0Ha6E,2942
299
299
  mlrun/runtimes/nuclio/serving.py,sha256=L1Tz5EZyo8JZmUBNmIRYL9AoWfqSm4zLQQ9DWbnlmp8,29726
300
300
  mlrun/runtimes/nuclio/application/__init__.py,sha256=rRs5vasy_G9IyoTpYIjYDafGoL6ifFBKgBtsXn31Atw,614
@@ -332,20 +332,20 @@ mlrun/utils/singleton.py,sha256=p1Y-X0mPSs_At092GS-pZCA8CTR62HOqPU07_ZH6-To,869
332
332
  mlrun/utils/v3io_clients.py,sha256=0aCFiQFBmgdSeLzJr_nEP6SG-zyieSgH8RdtcUq4dc0,1294
333
333
  mlrun/utils/vault.py,sha256=xUiKL17dCXjwQJ33YRzQj0oadUXATlFWPzKKYAESoQk,10447
334
334
  mlrun/utils/notifications/__init__.py,sha256=eUzQDBxSQmMZASRY-YAnYS6tL5801P0wEjycp3Dvoe0,990
335
- mlrun/utils/notifications/notification_pusher.py,sha256=ASBnYSjroV4y2BDK93w_0ZDSp92F6oDZWEax07uvAdY,26984
335
+ mlrun/utils/notifications/notification_pusher.py,sha256=4ecV6JfCtvYpb0kl1-sdg4Cw6XTrAjmmh2olhUenesY,26752
336
336
  mlrun/utils/notifications/notification/__init__.py,sha256=o1OgBKFSQoD6g8Lh20Cw-_CLa-FPVaL33Kv6YwKiLGA,2154
337
337
  mlrun/utils/notifications/notification/base.py,sha256=hf3BDZ4-bq92MsqofQHt8DZqqlcKbWHscZFvzHdMcw4,4265
338
338
  mlrun/utils/notifications/notification/console.py,sha256=MAVk7v5PJ52vdGRv76YcEPixWgV0licBPWGpR01uR40,2643
339
339
  mlrun/utils/notifications/notification/git.py,sha256=g_8RksjCboGrKKjyhkePk5nSWrfdT61JkhMeg9EeGcY,6119
340
340
  mlrun/utils/notifications/notification/ipython.py,sha256=ZtVL30B_Ha0VGoo4LxO-voT1U41IYwyytovv5X_LsI4,2066
341
341
  mlrun/utils/notifications/notification/slack.py,sha256=wqpFGr5BTvFO5KuUSzFfxsgmyU1Ohq7fbrGeNe9TXOk,7006
342
- mlrun/utils/notifications/notification/webhook.py,sha256=ux-KGV0mjFtpgq5NvgMhNfjjMZwlVjpQKNBDFvRJKBo,4841
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=HxwMueAEZD0g-k4tb_eAOiBOSxoeMM2uXZBIwT2GDP4,84
344
+ mlrun/utils/version/version.json,sha256=sDk3CDMueqP8IH8s0yEDeuuj3VXORqX7IyNjtmlQq-Q,88
345
345
  mlrun/utils/version/version.py,sha256=eEW0tqIAkU9Xifxv8Z9_qsYnNhn3YH7NRAfM-pPLt1g,1878
346
- mlrun-1.7.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
347
- mlrun-1.7.2.dist-info/METADATA,sha256=4IDKnXeoqrDhNFcoqZpsKURvTUPAhfpjliCuIXZRRA8,24420
348
- mlrun-1.7.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
349
- mlrun-1.7.2.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
350
- mlrun-1.7.2.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
351
- mlrun-1.7.2.dist-info/RECORD,,
346
+ mlrun-1.7.2rc1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
347
+ mlrun-1.7.2rc1.dist-info/METADATA,sha256=5nu3JRwswWivHFCwSFHZXBl3pg1YwINYVUaHE_7f2lk,24167
348
+ mlrun-1.7.2rc1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
349
+ mlrun-1.7.2rc1.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
350
+ mlrun-1.7.2rc1.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
351
+ mlrun-1.7.2rc1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5