mlrun 1.9.0rc6__py3-none-any.whl → 1.9.0rc8__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/config.py +1 -1
- mlrun/utils/helpers.py +46 -7
- 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.9.0rc6.dist-info → mlrun-1.9.0rc8.dist-info}/METADATA +1 -1
- {mlrun-1.9.0rc6.dist-info → mlrun-1.9.0rc8.dist-info}/RECORD +11 -11
- {mlrun-1.9.0rc6.dist-info → mlrun-1.9.0rc8.dist-info}/WHEEL +0 -0
- {mlrun-1.9.0rc6.dist-info → mlrun-1.9.0rc8.dist-info}/entry_points.txt +0 -0
- {mlrun-1.9.0rc6.dist-info → mlrun-1.9.0rc8.dist-info}/licenses/LICENSE +0 -0
- {mlrun-1.9.0rc6.dist-info → mlrun-1.9.0rc8.dist-info}/top_level.txt +0 -0
mlrun/config.py
CHANGED
|
@@ -482,7 +482,7 @@ default_config = {
|
|
|
482
482
|
"project_owners_cache_ttl": "30 seconds",
|
|
483
483
|
# access key to be used when the leader is iguazio and polling is done from it
|
|
484
484
|
"iguazio_access_key": "",
|
|
485
|
-
"iguazio_list_projects_default_page_size":
|
|
485
|
+
"iguazio_list_projects_default_page_size": 200,
|
|
486
486
|
"iguazio_client_job_cache_ttl": "20 minutes",
|
|
487
487
|
"nuclio_project_deletion_verification_timeout": "300 seconds",
|
|
488
488
|
"nuclio_project_deletion_verification_interval": "5 seconds",
|
mlrun/utils/helpers.py
CHANGED
|
@@ -880,7 +880,8 @@ def enrich_image_url(
|
|
|
880
880
|
|
|
881
881
|
# Add python version tag if needed
|
|
882
882
|
if image_url == "python" and client_python_version:
|
|
883
|
-
|
|
883
|
+
image_tag = ".".join(client_python_version.split(".")[:2])
|
|
884
|
+
image_url = f"python:{image_tag}"
|
|
884
885
|
|
|
885
886
|
client_version = _convert_python_package_version_to_image_tag(client_version)
|
|
886
887
|
server_version = _convert_python_package_version_to_image_tag(
|
|
@@ -2096,22 +2097,60 @@ def join_urls(base_url: Optional[str], path: Optional[str]) -> str:
|
|
|
2096
2097
|
|
|
2097
2098
|
class Workflow:
|
|
2098
2099
|
@staticmethod
|
|
2099
|
-
def get_workflow_steps(
|
|
2100
|
+
def get_workflow_steps(
|
|
2101
|
+
db: "mlrun.db.RunDBInterface", workflow_id: str, project: str
|
|
2102
|
+
) -> list:
|
|
2100
2103
|
steps = []
|
|
2101
|
-
db = mlrun.get_run_db()
|
|
2102
2104
|
|
|
2103
2105
|
def _add_run_step(_step: mlrun_pipelines.models.PipelineStep):
|
|
2106
|
+
# on kfp 1.8 argo sets the pod hostname differently than what we have with kfp 2.5
|
|
2107
|
+
# therefore, the heuristic needs to change. what we do here is first trying against 1.8 conventions
|
|
2108
|
+
# and if we can't find it then falling back to 2.5
|
|
2104
2109
|
try:
|
|
2105
|
-
|
|
2110
|
+
# runner_pod = x-y-N
|
|
2111
|
+
_runs = db.list_runs(
|
|
2106
2112
|
project=project,
|
|
2107
2113
|
labels=f"{mlrun_constants.MLRunInternalLabels.runner_pod}={_step.node_name}",
|
|
2108
|
-
)
|
|
2114
|
+
)
|
|
2115
|
+
if not _runs:
|
|
2116
|
+
try:
|
|
2117
|
+
# x-y-N -> x-y, N
|
|
2118
|
+
node_name_initials, node_name_generated_id = (
|
|
2119
|
+
_step.node_name.rsplit("-", 1)
|
|
2120
|
+
)
|
|
2121
|
+
|
|
2122
|
+
except ValueError:
|
|
2123
|
+
# defensive programming, if the node name is not in the expected format
|
|
2124
|
+
node_name_initials = _step.node_name
|
|
2125
|
+
node_name_generated_id = ""
|
|
2126
|
+
|
|
2127
|
+
# compile the expected runner pod hostname as per kfp >= 2.4
|
|
2128
|
+
# x-y, Z, N -> runner_pod = x-y-Z-N
|
|
2129
|
+
runner_pod_value = "-".join(
|
|
2130
|
+
[
|
|
2131
|
+
node_name_initials,
|
|
2132
|
+
_step.display_name,
|
|
2133
|
+
node_name_generated_id,
|
|
2134
|
+
]
|
|
2135
|
+
).rstrip("-")
|
|
2136
|
+
logger.debug(
|
|
2137
|
+
"No run found for step, trying with different node name",
|
|
2138
|
+
step_node_name=runner_pod_value,
|
|
2139
|
+
)
|
|
2140
|
+
_runs = db.list_runs(
|
|
2141
|
+
project=project,
|
|
2142
|
+
labels=f"{mlrun_constants.MLRunInternalLabels.runner_pod}={runner_pod_value}",
|
|
2143
|
+
)
|
|
2144
|
+
|
|
2145
|
+
_run = _runs[0]
|
|
2109
2146
|
except IndexError:
|
|
2147
|
+
logger.warning("No run found for step", step=_step.to_dict())
|
|
2110
2148
|
_run = {
|
|
2111
2149
|
"metadata": {
|
|
2112
2150
|
"name": _step.display_name,
|
|
2113
2151
|
"project": project,
|
|
2114
2152
|
},
|
|
2153
|
+
"status": {},
|
|
2115
2154
|
}
|
|
2116
2155
|
_run["step_kind"] = _step.step_type
|
|
2117
2156
|
if _step.skipped:
|
|
@@ -2229,9 +2268,9 @@ class Workflow:
|
|
|
2229
2268
|
namespace=mlrun.mlconf.namespace,
|
|
2230
2269
|
)
|
|
2231
2270
|
|
|
2232
|
-
# arbitrary timeout of
|
|
2271
|
+
# arbitrary timeout of 30 seconds, the workflow should be done by now, however sometimes kfp takes a few
|
|
2233
2272
|
# seconds to update the workflow status
|
|
2234
|
-
kfp_run = kfp_client.wait_for_run_completion(workflow_id,
|
|
2273
|
+
kfp_run = kfp_client.wait_for_run_completion(workflow_id, 30)
|
|
2235
2274
|
if not kfp_run:
|
|
2236
2275
|
return None
|
|
2237
2276
|
|
|
@@ -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
mlrun/__init__.py,sha256=Cqm9U9eCEdLpMejhU2BEhubu0mHL71igJJIwYa738EA,7450
|
|
2
2
|
mlrun/__main__.py,sha256=ktsoMxLmW65ABu5oG7TbUJvusyAYy_PRollQOGj4cGY,46352
|
|
3
|
-
mlrun/config.py,sha256=
|
|
3
|
+
mlrun/config.py,sha256=R8RDtYt2EZ4lU-H_oi8cSx52Zw33C92MBe9Lv4JqHl8,71933
|
|
4
4
|
mlrun/errors.py,sha256=LkcbXTLANGdsgo2CRX2pdbyNmt--lMsjGv0XZMgP-Nc,8222
|
|
5
5
|
mlrun/execution.py,sha256=rss4zA5M9tOCnSaXrK_-_BQ5F5DfF9OzesgQliq7jvQ,50008
|
|
6
6
|
mlrun/features.py,sha256=ReBaNGsBYXqcbgI012n-SO_j6oHIbk_Vpv0CGPXbUmo,15842
|
|
@@ -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=ED6uhiximgL9_StrXWnfDNn5uAQFDGIHFOmvQddK6KE,78868
|
|
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=-dffrM4IxXc-h_dn68qDgfH05FcPVSknGFKhWh-Ltsw,88
|
|
345
345
|
mlrun/utils/version/version.py,sha256=eEW0tqIAkU9Xifxv8Z9_qsYnNhn3YH7NRAfM-pPLt1g,1878
|
|
346
|
-
mlrun-1.9.
|
|
347
|
-
mlrun-1.9.
|
|
348
|
-
mlrun-1.9.
|
|
349
|
-
mlrun-1.9.
|
|
350
|
-
mlrun-1.9.
|
|
351
|
-
mlrun-1.9.
|
|
346
|
+
mlrun-1.9.0rc8.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
347
|
+
mlrun-1.9.0rc8.dist-info/METADATA,sha256=itS4CUiW4wWgXKfGDT7AUaSKoT32z2Ao09gzQI7_HDw,25708
|
|
348
|
+
mlrun-1.9.0rc8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
349
|
+
mlrun-1.9.0rc8.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
|
|
350
|
+
mlrun-1.9.0rc8.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
|
|
351
|
+
mlrun-1.9.0rc8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|