mlrun 1.7.2rc1__py3-none-any.whl → 1.7.2rc2__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/common/schemas/artifact.py +6 -0
- mlrun/db/factory.py +0 -3
- mlrun/utils/notifications/notification/webhook.py +16 -12
- mlrun/utils/notifications/notification_pusher.py +5 -0
- mlrun/utils/version/version.json +2 -2
- {mlrun-1.7.2rc1.dist-info → mlrun-1.7.2rc2.dist-info}/METADATA +1 -1
- {mlrun-1.7.2rc1.dist-info → mlrun-1.7.2rc2.dist-info}/RECORD +11 -11
- {mlrun-1.7.2rc1.dist-info → mlrun-1.7.2rc2.dist-info}/LICENSE +0 -0
- {mlrun-1.7.2rc1.dist-info → mlrun-1.7.2rc2.dist-info}/WHEEL +0 -0
- {mlrun-1.7.2rc1.dist-info → mlrun-1.7.2rc2.dist-info}/entry_points.txt +0 -0
- {mlrun-1.7.2rc1.dist-info → mlrun-1.7.2rc2.dist-info}/top_level.txt +0 -0
mlrun/common/schemas/artifact.py
CHANGED
|
@@ -47,6 +47,12 @@ 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
|
+
|
|
50
56
|
|
|
51
57
|
class ArtifactIdentifier(pydantic.BaseModel):
|
|
52
58
|
# artifact kind
|
mlrun/db/factory.py
CHANGED
|
@@ -54,9 +54,6 @@ 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.
|
|
60
57
|
self._run_db = self._rundb_container.run_db(url)
|
|
61
58
|
|
|
62
59
|
self._run_db.connect(secrets=secrets)
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
+
import re
|
|
15
16
|
import typing
|
|
16
17
|
|
|
17
18
|
import aiohttp
|
|
@@ -93,7 +94,6 @@ class WebhookNotification(NotificationBase):
|
|
|
93
94
|
|
|
94
95
|
@staticmethod
|
|
95
96
|
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,22 +105,26 @@ 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"],
|
|
109
108
|
"status": {"state": run["status"]["state"]},
|
|
110
109
|
}
|
|
111
|
-
if run["
|
|
112
|
-
parsed_run["
|
|
113
|
-
|
|
114
|
-
parsed_run["status"]["
|
|
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
|
|
115
116
|
parsed_runs.append(parsed_run)
|
|
116
117
|
return str(parsed_runs)
|
|
117
118
|
|
|
118
119
|
if isinstance(override_body, dict):
|
|
119
120
|
for key, value in override_body.items():
|
|
120
|
-
if
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
+
|
|
126
130
|
return override_body
|
|
@@ -168,6 +168,11 @@ 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
|
+
),
|
|
171
176
|
)
|
|
172
177
|
|
|
173
178
|
logger.debug(
|
mlrun/utils/version/version.json
CHANGED
|
@@ -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=
|
|
43
|
+
mlrun/common/schemas/artifact.py,sha256=lX0tAjvIxrMDmubvTUKKKl-BAt0FKDG0s7lzfvi1jb0,3758
|
|
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=
|
|
107
|
+
mlrun/db/factory.py,sha256=yP2vVmveUE7LYTCHbS6lQIxP9rW--zdISWuPd_I3d_4,2111
|
|
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
|
|
@@ -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=
|
|
335
|
+
mlrun/utils/notifications/notification_pusher.py,sha256=ASBnYSjroV4y2BDK93w_0ZDSp92F6oDZWEax07uvAdY,26984
|
|
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=
|
|
342
|
+
mlrun/utils/notifications/notification/webhook.py,sha256=ux-KGV0mjFtpgq5NvgMhNfjjMZwlVjpQKNBDFvRJKBo,4841
|
|
343
343
|
mlrun/utils/version/__init__.py,sha256=7kkrB7hEZ3cLXoWj1kPoDwo4MaswsI2JVOBpbKgPAgc,614
|
|
344
|
-
mlrun/utils/version/version.json,sha256=
|
|
344
|
+
mlrun/utils/version/version.json,sha256=gl1OJrqCgFhVqO1szxLl6BksaJ4jEbMCRrNew6e8eeM,88
|
|
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.2rc2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
347
|
+
mlrun-1.7.2rc2.dist-info/METADATA,sha256=yIM3Igci744I_pDWGTMBQxyGnaE2cQ3O9B-k0Vk_bvc,24167
|
|
348
|
+
mlrun-1.7.2rc2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
349
|
+
mlrun-1.7.2rc2.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
|
|
350
|
+
mlrun-1.7.2rc2.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
|
|
351
|
+
mlrun-1.7.2rc2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|