mlrun 1.8.0rc60__py3-none-any.whl → 1.8.0rc62__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/utils/helpers.py +45 -6
- mlrun/utils/notifications/notification/slack.py +5 -1
- mlrun/utils/notifications/notification_pusher.py +2 -1
- mlrun/utils/version/version.json +2 -2
- {mlrun-1.8.0rc60.dist-info → mlrun-1.8.0rc62.dist-info}/METADATA +1 -1
- {mlrun-1.8.0rc60.dist-info → mlrun-1.8.0rc62.dist-info}/RECORD +10 -10
- {mlrun-1.8.0rc60.dist-info → mlrun-1.8.0rc62.dist-info}/WHEEL +1 -1
- {mlrun-1.8.0rc60.dist-info → mlrun-1.8.0rc62.dist-info}/entry_points.txt +0 -0
- {mlrun-1.8.0rc60.dist-info → mlrun-1.8.0rc62.dist-info}/licenses/LICENSE +0 -0
- {mlrun-1.8.0rc60.dist-info → mlrun-1.8.0rc62.dist-info}/top_level.txt +0 -0
mlrun/utils/helpers.py
CHANGED
|
@@ -2088,22 +2088,60 @@ def join_urls(base_url: Optional[str], path: Optional[str]) -> str:
|
|
|
2088
2088
|
|
|
2089
2089
|
class Workflow:
|
|
2090
2090
|
@staticmethod
|
|
2091
|
-
def get_workflow_steps(
|
|
2091
|
+
def get_workflow_steps(
|
|
2092
|
+
db: "mlrun.db.RunDBInterface", workflow_id: str, project: str
|
|
2093
|
+
) -> list:
|
|
2092
2094
|
steps = []
|
|
2093
|
-
db = mlrun.get_run_db()
|
|
2094
2095
|
|
|
2095
2096
|
def _add_run_step(_step: mlrun_pipelines.models.PipelineStep):
|
|
2097
|
+
# on kfp 1.8 argo sets the pod hostname differently than what we have with kfp 2.5
|
|
2098
|
+
# therefore, the heuristic needs to change. what we do here is first trying against 1.8 conventions
|
|
2099
|
+
# and if we can't find it then falling back to 2.5
|
|
2096
2100
|
try:
|
|
2097
|
-
|
|
2101
|
+
# runner_pod = x-y-N
|
|
2102
|
+
_runs = db.list_runs(
|
|
2098
2103
|
project=project,
|
|
2099
2104
|
labels=f"{mlrun_constants.MLRunInternalLabels.runner_pod}={_step.node_name}",
|
|
2100
|
-
)
|
|
2105
|
+
)
|
|
2106
|
+
if not _runs:
|
|
2107
|
+
try:
|
|
2108
|
+
# x-y-N -> x-y, N
|
|
2109
|
+
node_name_initials, node_name_generated_id = (
|
|
2110
|
+
_step.node_name.rsplit("-", 1)
|
|
2111
|
+
)
|
|
2112
|
+
|
|
2113
|
+
except ValueError:
|
|
2114
|
+
# defensive programming, if the node name is not in the expected format
|
|
2115
|
+
node_name_initials = _step.node_name
|
|
2116
|
+
node_name_generated_id = ""
|
|
2117
|
+
|
|
2118
|
+
# compile the expected runner pod hostname as per kfp >= 2.4
|
|
2119
|
+
# x-y, Z, N -> runner_pod = x-y-Z-N
|
|
2120
|
+
runner_pod_value = "-".join(
|
|
2121
|
+
[
|
|
2122
|
+
node_name_initials,
|
|
2123
|
+
_step.display_name,
|
|
2124
|
+
node_name_generated_id,
|
|
2125
|
+
]
|
|
2126
|
+
).rstrip("-")
|
|
2127
|
+
logger.debug(
|
|
2128
|
+
"No run found for step, trying with different node name",
|
|
2129
|
+
step_node_name=runner_pod_value,
|
|
2130
|
+
)
|
|
2131
|
+
_runs = db.list_runs(
|
|
2132
|
+
project=project,
|
|
2133
|
+
labels=f"{mlrun_constants.MLRunInternalLabels.runner_pod}={runner_pod_value}",
|
|
2134
|
+
)
|
|
2135
|
+
|
|
2136
|
+
_run = _runs[0]
|
|
2101
2137
|
except IndexError:
|
|
2138
|
+
logger.warning("No run found for step", step=_step.to_dict())
|
|
2102
2139
|
_run = {
|
|
2103
2140
|
"metadata": {
|
|
2104
2141
|
"name": _step.display_name,
|
|
2105
2142
|
"project": project,
|
|
2106
2143
|
},
|
|
2144
|
+
"status": {},
|
|
2107
2145
|
}
|
|
2108
2146
|
_run["step_kind"] = _step.step_type
|
|
2109
2147
|
if _step.skipped:
|
|
@@ -2218,8 +2256,9 @@ class Workflow:
|
|
|
2218
2256
|
) -> typing.Optional[mlrun_pipelines.models.PipelineManifest]:
|
|
2219
2257
|
kfp_client = mlrun_pipelines.utils.get_client(mlrun.mlconf.kfp_url)
|
|
2220
2258
|
|
|
2221
|
-
# arbitrary timeout of
|
|
2222
|
-
|
|
2259
|
+
# arbitrary timeout of 30 seconds, the workflow should be done by now, however sometimes kfp takes a few
|
|
2260
|
+
# seconds to update the workflow status
|
|
2261
|
+
kfp_run = kfp_client.wait_for_run_completion(workflow_id, 30)
|
|
2223
2262
|
if not kfp_run:
|
|
2224
2263
|
return None
|
|
2225
2264
|
|
|
@@ -16,6 +16,7 @@ import typing
|
|
|
16
16
|
|
|
17
17
|
import aiohttp
|
|
18
18
|
|
|
19
|
+
import mlrun.common.runtimes.constants as runtimes_constants
|
|
19
20
|
import mlrun.common.schemas
|
|
20
21
|
import mlrun.lists
|
|
21
22
|
import mlrun.utils.helpers
|
|
@@ -177,7 +178,10 @@ class SlackNotification(NotificationBase):
|
|
|
177
178
|
# Only show the URL if the run is not a function (serving or mlrun function)
|
|
178
179
|
kind = run.get("step_kind")
|
|
179
180
|
state = run["status"].get("state", "")
|
|
180
|
-
|
|
181
|
+
|
|
182
|
+
if state != runtimes_constants.RunStates.skipped and (
|
|
183
|
+
url and not kind or kind == "run"
|
|
184
|
+
):
|
|
181
185
|
line = f'<{url}|*{meta.get("name")}*>'
|
|
182
186
|
else:
|
|
183
187
|
line = meta.get("name")
|
|
@@ -287,7 +287,8 @@ class NotificationPusher(_NotificationPusherBase):
|
|
|
287
287
|
)
|
|
288
288
|
project = run.metadata.project
|
|
289
289
|
workflow_id = run.status.results.get("workflow_id", None)
|
|
290
|
-
|
|
290
|
+
db = mlrun.get_run_db()
|
|
291
|
+
runs.extend(Workflow.get_workflow_steps(db, workflow_id, project))
|
|
291
292
|
|
|
292
293
|
message = (
|
|
293
294
|
self.messages.get(run.state(), "").format(resource=resource)
|
mlrun/utils/version/version.json
CHANGED
|
@@ -322,7 +322,7 @@ mlrun/utils/azure_vault.py,sha256=IEFizrDGDbAaoWwDr1WoA88S_EZ0T--vjYtY-i0cvYQ,34
|
|
|
322
322
|
mlrun/utils/clones.py,sha256=yXOeuLtgIiKZdmjeKK0Z_vIrH19ds5JuoJaCeDjhwOo,7516
|
|
323
323
|
mlrun/utils/condition_evaluator.py,sha256=-nGfRmZzivn01rHTroiGY4rqEv8T1irMyhzxEei-sKc,1897
|
|
324
324
|
mlrun/utils/db.py,sha256=blQgkWMfFH9lcN4sgJQcPQgEETz2Dl_zwbVA0SslpFg,2186
|
|
325
|
-
mlrun/utils/helpers.py,sha256=
|
|
325
|
+
mlrun/utils/helpers.py,sha256=m5WwqAjneDiF0k9YKBwcwqdE-z0oWd-_4mZvYlNJa18,78461
|
|
326
326
|
mlrun/utils/http.py,sha256=t6FrXQstZm9xVVjxqIGiLzrwZNCR4CSienSOuVgNIcI,8706
|
|
327
327
|
mlrun/utils/logger.py,sha256=RG0m1rx6gfkJ-2C1r_p41MMpPiaDYqaYM2lYHDlNZEU,14767
|
|
328
328
|
mlrun/utils/regex.py,sha256=jbR7IiOp6OO0mg9Fl_cVZCpWb9fL9nTPONCUxCDNWXg,5201
|
|
@@ -331,21 +331,21 @@ mlrun/utils/singleton.py,sha256=p1Y-X0mPSs_At092GS-pZCA8CTR62HOqPU07_ZH6-To,869
|
|
|
331
331
|
mlrun/utils/v3io_clients.py,sha256=0aCFiQFBmgdSeLzJr_nEP6SG-zyieSgH8RdtcUq4dc0,1294
|
|
332
332
|
mlrun/utils/vault.py,sha256=xUiKL17dCXjwQJ33YRzQj0oadUXATlFWPzKKYAESoQk,10447
|
|
333
333
|
mlrun/utils/notifications/__init__.py,sha256=eUzQDBxSQmMZASRY-YAnYS6tL5801P0wEjycp3Dvoe0,990
|
|
334
|
-
mlrun/utils/notifications/notification_pusher.py,sha256=
|
|
334
|
+
mlrun/utils/notifications/notification_pusher.py,sha256=s5Iu6u9_LXeVRPA70BNqrFIamTk7D3_AG6DH7K9qVQA,26668
|
|
335
335
|
mlrun/utils/notifications/notification/__init__.py,sha256=9Rfy6Jm8n0LaEDO1VAQb6kIbr7_uVuQhK1pS_abELIY,2581
|
|
336
336
|
mlrun/utils/notifications/notification/base.py,sha256=-9e3XqUixrWwImnTGrIL4enJRSIUP9gMrJVxwaLqeXc,5403
|
|
337
337
|
mlrun/utils/notifications/notification/console.py,sha256=ICbIhOf9fEBJky_3j9TFiKAewDGyDHJr9l4VeT7G2sc,2745
|
|
338
338
|
mlrun/utils/notifications/notification/git.py,sha256=t2lqRrPRBO4awf_uhxJreH9CpcbYSH8T3CvHtwspHkE,6306
|
|
339
339
|
mlrun/utils/notifications/notification/ipython.py,sha256=9uZvI1uOLFaNuAsfJPXmL3l6dOzFoWdBK5GYNYFAfks,2282
|
|
340
340
|
mlrun/utils/notifications/notification/mail.py,sha256=ZyJ3eqd8simxffQmXzqd3bgbAqp1vij7C6aRJ9h2mgs,6012
|
|
341
|
-
mlrun/utils/notifications/notification/slack.py,sha256=
|
|
341
|
+
mlrun/utils/notifications/notification/slack.py,sha256=kfhogR5keR7Zjh0VCjJNK3NR5_yXT7Cv-x9GdOUW4Z8,7294
|
|
342
342
|
mlrun/utils/notifications/notification/webhook.py,sha256=zxh8CAlbPnTazsk6r05X5TKwqUZVOH5KBU2fJbzQlG4,5330
|
|
343
343
|
mlrun/utils/version/__init__.py,sha256=7kkrB7hEZ3cLXoWj1kPoDwo4MaswsI2JVOBpbKgPAgc,614
|
|
344
|
-
mlrun/utils/version/version.json,sha256=
|
|
344
|
+
mlrun/utils/version/version.json,sha256=pftUvz4mfka5ERnvT8qp-923vew4A898akorrF6GIK0,89
|
|
345
345
|
mlrun/utils/version/version.py,sha256=eEW0tqIAkU9Xifxv8Z9_qsYnNhn3YH7NRAfM-pPLt1g,1878
|
|
346
|
-
mlrun-1.8.
|
|
347
|
-
mlrun-1.8.
|
|
348
|
-
mlrun-1.8.
|
|
349
|
-
mlrun-1.8.
|
|
350
|
-
mlrun-1.8.
|
|
351
|
-
mlrun-1.8.
|
|
346
|
+
mlrun-1.8.0rc62.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
347
|
+
mlrun-1.8.0rc62.dist-info/METADATA,sha256=_qTx4TQ65fT8WIQ-NuWfELnelYX5HsR-12CEXfcizaU,25805
|
|
348
|
+
mlrun-1.8.0rc62.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
349
|
+
mlrun-1.8.0rc62.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
|
|
350
|
+
mlrun-1.8.0rc62.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
|
|
351
|
+
mlrun-1.8.0rc62.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|