mlrun 1.9.0rc5__py3-none-any.whl → 1.9.0rc7__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 +3 -3
- mlrun/datastore/datastore_profile.py +3 -3
- mlrun/db/httpdb.py +1 -1
- mlrun/model_monitoring/applications/evidently/base.py +3 -41
- mlrun/projects/project.py +48 -31
- mlrun/run.py +1 -1
- mlrun/runtimes/mounts.py +2 -0
- mlrun/utils/helpers.py +51 -8
- 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.0rc5.dist-info → mlrun-1.9.0rc7.dist-info}/METADATA +5 -5
- {mlrun-1.9.0rc5.dist-info → mlrun-1.9.0rc7.dist-info}/RECORD +17 -17
- {mlrun-1.9.0rc5.dist-info → mlrun-1.9.0rc7.dist-info}/WHEEL +1 -1
- {mlrun-1.9.0rc5.dist-info → mlrun-1.9.0rc7.dist-info}/entry_points.txt +0 -0
- {mlrun-1.9.0rc5.dist-info → mlrun-1.9.0rc7.dist-info}/licenses/LICENSE +0 -0
- {mlrun-1.9.0rc5.dist-info → mlrun-1.9.0rc7.dist-info}/top_level.txt +0 -0
mlrun/config.py
CHANGED
|
@@ -79,7 +79,7 @@ default_config = {
|
|
|
79
79
|
# comma separated list of images that are in the specified images_registry, and therefore will be enriched with this
|
|
80
80
|
# registry when used. default to mlrun/* which means any image which is of the mlrun repository (mlrun/mlrun,
|
|
81
81
|
# mlrun/ml-base, etc...)
|
|
82
|
-
"images_to_enrich_registry": "^mlrun
|
|
82
|
+
"images_to_enrich_registry": "^mlrun/*,^python:3.(9|11)$",
|
|
83
83
|
"kfp_url": "",
|
|
84
84
|
"kfp_ttl": "14400", # KFP ttl in sec, after that completed PODs will be deleted
|
|
85
85
|
"kfp_image": "mlrun/mlrun-kfp", # image to use for KFP runner
|
|
@@ -286,7 +286,7 @@ default_config = {
|
|
|
286
286
|
"remote": "mlrun/mlrun",
|
|
287
287
|
"dask": "mlrun/ml-base",
|
|
288
288
|
"mpijob": "mlrun/mlrun",
|
|
289
|
-
"application": "python
|
|
289
|
+
"application": "python",
|
|
290
290
|
},
|
|
291
291
|
# see enrich_function_preemption_spec for more info,
|
|
292
292
|
# and mlrun.common.schemas.function.PreemptionModes for available options
|
|
@@ -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",
|
|
@@ -255,7 +255,7 @@ class DatastoreProfileS3(DatastoreProfile):
|
|
|
255
255
|
def check_bucket(cls, v):
|
|
256
256
|
if not v:
|
|
257
257
|
warnings.warn(
|
|
258
|
-
"The 'bucket' attribute will be mandatory starting from version 1.
|
|
258
|
+
"The 'bucket' attribute will be mandatory starting from version 1.10",
|
|
259
259
|
FutureWarning,
|
|
260
260
|
stacklevel=2,
|
|
261
261
|
)
|
|
@@ -360,7 +360,7 @@ class DatastoreProfileGCS(DatastoreProfile):
|
|
|
360
360
|
def check_bucket(cls, v):
|
|
361
361
|
if not v:
|
|
362
362
|
warnings.warn(
|
|
363
|
-
"The 'bucket' attribute will be mandatory starting from version 1.
|
|
363
|
+
"The 'bucket' attribute will be mandatory starting from version 1.10",
|
|
364
364
|
FutureWarning,
|
|
365
365
|
stacklevel=2,
|
|
366
366
|
)
|
|
@@ -417,7 +417,7 @@ class DatastoreProfileAzureBlob(DatastoreProfile):
|
|
|
417
417
|
def check_container(cls, v):
|
|
418
418
|
if not v:
|
|
419
419
|
warnings.warn(
|
|
420
|
-
"The 'container' attribute will be mandatory starting from version 1.
|
|
420
|
+
"The 'container' attribute will be mandatory starting from version 1.10",
|
|
421
421
|
FutureWarning,
|
|
422
422
|
stacklevel=2,
|
|
423
423
|
)
|
mlrun/db/httpdb.py
CHANGED
|
@@ -939,7 +939,7 @@ class HTTPRunDB(RunDBInterface):
|
|
|
939
939
|
|
|
940
940
|
:param name: Name of the run to retrieve.
|
|
941
941
|
:param uid: Unique ID of the run, or a list of run UIDs.
|
|
942
|
-
:param project: Project that the runs belongs to.
|
|
942
|
+
:param project: Project that the runs belongs to. If not specified, the default project will be used.
|
|
943
943
|
:param labels: Filter runs by label key-value pairs or key existence. This can be provided as:
|
|
944
944
|
- A dictionary in the format `{"label": "value"}` to match specific label key-value pairs,
|
|
945
945
|
or `{"label": None}` to check for key existence.
|
|
@@ -12,8 +12,6 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
import json
|
|
16
|
-
import posixpath
|
|
17
15
|
import warnings
|
|
18
16
|
from abc import ABC
|
|
19
17
|
from tempfile import NamedTemporaryFile
|
|
@@ -60,7 +58,6 @@ except ModuleNotFoundError:
|
|
|
60
58
|
|
|
61
59
|
if _HAS_EVIDENTLY:
|
|
62
60
|
from evidently.core.report import Snapshot
|
|
63
|
-
from evidently.legacy.ui.storage.local.base import METADATA_PATH, FSLocation
|
|
64
61
|
from evidently.ui.workspace import (
|
|
65
62
|
STR_UUID,
|
|
66
63
|
CloudWorkspace,
|
|
@@ -100,14 +97,13 @@ class EvidentlyModelMonitoringApplicationBase(
|
|
|
100
97
|
self.evidently_project_id = evidently_project_id
|
|
101
98
|
self.evidently_project = self.load_project()
|
|
102
99
|
|
|
103
|
-
def load_project(self) -> Project:
|
|
100
|
+
def load_project(self) -> "Project":
|
|
104
101
|
"""Load the Evidently project."""
|
|
105
102
|
return self.evidently_workspace.get_project(self.evidently_project_id)
|
|
106
103
|
|
|
107
|
-
def get_workspace(self) -> WorkspaceBase:
|
|
104
|
+
def get_workspace(self) -> "WorkspaceBase":
|
|
108
105
|
"""Get the Evidently workspace. Override this method for customize access to the workspace."""
|
|
109
106
|
if self.evidently_workspace_path:
|
|
110
|
-
self._log_location(self.evidently_workspace_path)
|
|
111
107
|
return Workspace.create(self.evidently_workspace_path)
|
|
112
108
|
else:
|
|
113
109
|
raise MLRunValueError(
|
|
@@ -116,44 +112,10 @@ class EvidentlyModelMonitoringApplicationBase(
|
|
|
116
112
|
"`EVIDENTLY_API_KEY` environment variable. In other cases, override this method."
|
|
117
113
|
)
|
|
118
114
|
|
|
119
|
-
def get_cloud_workspace(self) -> CloudWorkspace:
|
|
115
|
+
def get_cloud_workspace(self) -> "CloudWorkspace":
|
|
120
116
|
"""Load the Evidently cloud workspace according to the `EVIDENTLY_API_KEY` environment variable."""
|
|
121
117
|
return CloudWorkspace()
|
|
122
118
|
|
|
123
|
-
@staticmethod
|
|
124
|
-
def _log_location(evidently_workspace_path):
|
|
125
|
-
# TODO remove function + usage after solving issue ML-9530
|
|
126
|
-
location = FSLocation(base_path=evidently_workspace_path)
|
|
127
|
-
location.invalidate_cache("")
|
|
128
|
-
paths = [p for p in location.listdir("") if location.isdir(p)]
|
|
129
|
-
|
|
130
|
-
for path in paths:
|
|
131
|
-
metadata_path = posixpath.join(path, METADATA_PATH)
|
|
132
|
-
full_path = posixpath.join(location.path, metadata_path)
|
|
133
|
-
print(f"evidently json issue, working on path: {full_path}")
|
|
134
|
-
try:
|
|
135
|
-
with location.open(metadata_path) as f:
|
|
136
|
-
content = json.load(f)
|
|
137
|
-
print(
|
|
138
|
-
f"evidently json issue, successful load path: {full_path}, content: {content}"
|
|
139
|
-
)
|
|
140
|
-
except FileNotFoundError:
|
|
141
|
-
print(f"evidently json issue, path not found: {full_path}")
|
|
142
|
-
continue
|
|
143
|
-
except json.decoder.JSONDecodeError as json_error:
|
|
144
|
-
print(
|
|
145
|
-
f"evidently json issue, path got json error, path:{full_path}, error: {json_error}"
|
|
146
|
-
)
|
|
147
|
-
print("evidently json issue, file content:")
|
|
148
|
-
with location.open(metadata_path) as f:
|
|
149
|
-
print(f.read())
|
|
150
|
-
continue
|
|
151
|
-
except Exception as error:
|
|
152
|
-
print(
|
|
153
|
-
f"evidently json issue, path got general error, path:{full_path}, error: {error}"
|
|
154
|
-
)
|
|
155
|
-
continue
|
|
156
|
-
|
|
157
119
|
@staticmethod
|
|
158
120
|
def log_evidently_object(
|
|
159
121
|
monitoring_context: mm_context.MonitoringApplicationContext,
|
mlrun/projects/project.py
CHANGED
|
@@ -470,7 +470,8 @@ def get_or_create_project(
|
|
|
470
470
|
parameters: Optional[dict] = None,
|
|
471
471
|
allow_cross_project: Optional[bool] = None,
|
|
472
472
|
) -> "MlrunProject":
|
|
473
|
-
"""Load a project from MLRun DB, or create/import if it does not exist
|
|
473
|
+
"""Load a project from MLRun DB, or create/import if it does not exist.
|
|
474
|
+
The project will become the default project for the current session.
|
|
474
475
|
|
|
475
476
|
MLRun looks for a project.yaml file with project definition and objects in the project root path
|
|
476
477
|
and use it to initialize the project, in addition it runs the project_setup.py file (if it exists)
|
|
@@ -4002,8 +4003,10 @@ class MlrunProject(ModelObj):
|
|
|
4002
4003
|
e.g. builder_env={"GIT_TOKEN": token}, does not work yet in KFP
|
|
4003
4004
|
:param overwrite_build_params: Overwrite existing build configuration (currently applies to
|
|
4004
4005
|
requirements and commands)
|
|
4006
|
+
|
|
4005
4007
|
* False: The new params are merged with the existing
|
|
4006
4008
|
* True: The existing params are replaced by the new ones
|
|
4009
|
+
|
|
4007
4010
|
:param extra_args: A string containing additional builder arguments in the format of command-line options,
|
|
4008
4011
|
e.g. extra_args="--skip-tls-verify --build-arg A=val"
|
|
4009
4012
|
:param force_build: force building the image, even when no changes were made
|
|
@@ -4054,8 +4057,10 @@ class MlrunProject(ModelObj):
|
|
|
4054
4057
|
:param requirements_file: requirements file to install on the built image
|
|
4055
4058
|
:param overwrite_build_params: Overwrite existing build configuration (currently applies to
|
|
4056
4059
|
requirements and commands)
|
|
4060
|
+
|
|
4057
4061
|
* False: The new params are merged with the existing
|
|
4058
4062
|
* True: The existing params are replaced by the new ones
|
|
4063
|
+
|
|
4059
4064
|
:param builder_env: Kaniko builder pod env vars dict (for config/credentials)
|
|
4060
4065
|
e.g. builder_env={"GIT_TOKEN": token}, does not work yet in KFP
|
|
4061
4066
|
:param extra_args: A string containing additional builder arguments in the format of command-line options,
|
|
@@ -4127,8 +4132,10 @@ class MlrunProject(ModelObj):
|
|
|
4127
4132
|
e.g. builder_env={"GIT_TOKEN": token}, does not work yet in KFP
|
|
4128
4133
|
:param overwrite_build_params: Overwrite existing build configuration (currently applies to
|
|
4129
4134
|
requirements and commands)
|
|
4135
|
+
|
|
4130
4136
|
* False: The new params are merged with the existing
|
|
4131
4137
|
* True: The existing params are replaced by the new ones
|
|
4138
|
+
|
|
4132
4139
|
:param extra_args: A string containing additional builder arguments in the format of command-line options,
|
|
4133
4140
|
e.g. extra_args="--skip-tls-verify --build-arg A=val"
|
|
4134
4141
|
:param target_dir: Path on the image where source code would be extracted (by default `/home/mlrun_code`)
|
|
@@ -4306,12 +4313,14 @@ class MlrunProject(ModelObj):
|
|
|
4306
4313
|
``my_Name_1`` or ``surname``.
|
|
4307
4314
|
:param tag: Return artifacts assigned this tag.
|
|
4308
4315
|
:param labels: Filter artifacts by label key-value pairs or key existence. This can be provided as:
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4316
|
+
|
|
4317
|
+
- A dictionary in the format `{"label": "value"}` to match specific label key-value pairs,
|
|
4318
|
+
or `{"label": None}` to check for key existence.
|
|
4319
|
+
- A list of strings formatted as `"label=value"` to match specific label key-value pairs,
|
|
4320
|
+
or just `"label"` for key existence.
|
|
4321
|
+
- A comma-separated string formatted as `"label1=value1,label2"` to match entities with
|
|
4322
|
+
the specified key-value pairs or key existence.
|
|
4323
|
+
|
|
4315
4324
|
:param since: Not in use in :py:class:`HTTPRunDB`.
|
|
4316
4325
|
:param until: Not in use in :py:class:`HTTPRunDB`.
|
|
4317
4326
|
:param iter: Return artifacts from a specific iteration (where ``iter=0`` means the root iteration). If
|
|
@@ -4453,12 +4462,14 @@ class MlrunProject(ModelObj):
|
|
|
4453
4462
|
``my_Name_1`` or ``surname``.
|
|
4454
4463
|
:param tag: Return artifacts assigned this tag.
|
|
4455
4464
|
:param labels: Filter model artifacts by label key-value pairs or key existence. This can be provided as:
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4465
|
+
|
|
4466
|
+
- A dictionary in the format `{"label": "value"}` to match specific label key-value pairs,
|
|
4467
|
+
or `{"label": None}` to check for key existence.
|
|
4468
|
+
- A list of strings formatted as `"label=value"` to match specific label key-value pairs,
|
|
4469
|
+
or just `"label"` for key existence.
|
|
4470
|
+
- A comma-separated string formatted as `"label1=value1,label2"` to match entities with
|
|
4471
|
+
the specified key-value pairs or key existence.
|
|
4472
|
+
|
|
4462
4473
|
:param since: Not in use in :py:class:`HTTPRunDB`.
|
|
4463
4474
|
:param until: Not in use in :py:class:`HTTPRunDB`.
|
|
4464
4475
|
:param iter: Return artifacts from a specific iteration (where ``iter=0`` means the root iteration). If
|
|
@@ -4564,12 +4575,14 @@ class MlrunProject(ModelObj):
|
|
|
4564
4575
|
:param name: Return only functions with a specific name.
|
|
4565
4576
|
:param tag: Return function versions with specific tags. To return only tagged functions, set tag to ``"*"``.
|
|
4566
4577
|
:param labels: Filter functions by label key-value pairs or key existence. This can be provided as:
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4578
|
+
|
|
4579
|
+
- A dictionary in the format `{"label": "value"}` to match specific label key-value pairs,
|
|
4580
|
+
or `{"label": None}` to check for key existence.
|
|
4581
|
+
- A list of strings formatted as `"label=value"` to match specific label key-value pairs,
|
|
4582
|
+
or just `"label"` for key existence.
|
|
4583
|
+
- A comma-separated string formatted as `"label1=value1,label2"` to match entities with
|
|
4584
|
+
the specified key-value pairs or key existence.
|
|
4585
|
+
|
|
4573
4586
|
:param kind: Return functions of the specified kind. If not provided, all function kinds will be returned.
|
|
4574
4587
|
:param format_: The format in which to return the functions. Default is 'full'.
|
|
4575
4588
|
:returns: List of function objects.
|
|
@@ -4663,12 +4676,14 @@ class MlrunProject(ModelObj):
|
|
|
4663
4676
|
:param name: Return only functions with a specific name.
|
|
4664
4677
|
:param tag: Return function versions with specific tags.
|
|
4665
4678
|
:param labels: Filter functions by label key-value pairs or key existence. This can be provided as:
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4679
|
+
|
|
4680
|
+
- A dictionary in the format `{"label": "value"}` to match specific label key-value pairs,
|
|
4681
|
+
or `{"label": None}` to check for key existence.
|
|
4682
|
+
- A list of strings formatted as `"label=value"` to match specific label key-value pairs,
|
|
4683
|
+
or just `"label"` for key existence.
|
|
4684
|
+
- A comma-separated string formatted as `"label1=value1,label2"` to match entities with
|
|
4685
|
+
the specified key-value pairs or key existence.
|
|
4686
|
+
|
|
4672
4687
|
:returns: List of function objects.
|
|
4673
4688
|
"""
|
|
4674
4689
|
|
|
@@ -4724,12 +4739,14 @@ class MlrunProject(ModelObj):
|
|
|
4724
4739
|
:param name: Name of the run to retrieve.
|
|
4725
4740
|
:param uid: Unique ID of the run.
|
|
4726
4741
|
:param labels: Filter runs by label key-value pairs or key existence. This can be provided as:
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4742
|
+
|
|
4743
|
+
- A dictionary in the format `{"label": "value"}` to match specific label key-value pairs,
|
|
4744
|
+
or `{"label": None}` to check for key existence.
|
|
4745
|
+
- A list of strings formatted as `"label=value"` to match specific label key-value pairs,
|
|
4746
|
+
or just `"label"` for key existence.
|
|
4747
|
+
- A comma-separated string formatted as `"label1=value1,label2"` to match entities with
|
|
4748
|
+
the specified key-value pairs or key existence.
|
|
4749
|
+
|
|
4733
4750
|
:param state: Deprecated - List only runs whose state is specified.
|
|
4734
4751
|
:param states: List only runs whose state is one of the provided states.
|
|
4735
4752
|
:param sort: Whether to sort the result according to their start time. Otherwise, results will be
|
mlrun/run.py
CHANGED
|
@@ -637,7 +637,7 @@ def code_to_function(
|
|
|
637
637
|
- databricks: run code on Databricks cluster (python scripts, Spark etc.)
|
|
638
638
|
- application: run a long living application (e.g. a web server, UI, etc.)
|
|
639
639
|
|
|
640
|
-
Learn more about
|
|
640
|
+
Learn more about :doc:`../../concepts/functions-overview`
|
|
641
641
|
|
|
642
642
|
:param name: function name, typically best to use hyphen-case
|
|
643
643
|
:param project: project used to namespace the function, defaults to 'default'
|
mlrun/runtimes/mounts.py
CHANGED
|
@@ -352,10 +352,12 @@ def auto_mount(
|
|
|
352
352
|
"""Choose the mount based on env variables and params
|
|
353
353
|
|
|
354
354
|
Volume will be selected by the following order:
|
|
355
|
+
|
|
355
356
|
- k8s PVC volume when both pvc_name and volume_mount_path are set
|
|
356
357
|
- k8s PVC volume when env var is set: MLRUN_PVC_MOUNT=<pvc-name>:<mount-path>
|
|
357
358
|
- k8s PVC volume if it's configured as the auto mount type
|
|
358
359
|
- iguazio v3io volume when V3IO_ACCESS_KEY and V3IO_USERNAME env vars are set
|
|
360
|
+
|
|
359
361
|
"""
|
|
360
362
|
if pvc_name and volume_mount_path:
|
|
361
363
|
return mount_pvc(
|
mlrun/utils/helpers.py
CHANGED
|
@@ -876,13 +876,18 @@ def enrich_image_url(
|
|
|
876
876
|
client_version: Optional[str] = None,
|
|
877
877
|
client_python_version: Optional[str] = None,
|
|
878
878
|
) -> str:
|
|
879
|
+
image_url = image_url.strip()
|
|
880
|
+
|
|
881
|
+
# Add python version tag if needed
|
|
882
|
+
if image_url == "python" and client_python_version:
|
|
883
|
+
image_url = f"python:{client_python_version}"
|
|
884
|
+
|
|
879
885
|
client_version = _convert_python_package_version_to_image_tag(client_version)
|
|
880
886
|
server_version = _convert_python_package_version_to_image_tag(
|
|
881
887
|
mlrun.utils.version.Version().get()["version"]
|
|
882
888
|
)
|
|
883
|
-
image_url = image_url.strip()
|
|
884
889
|
mlrun_version = config.images_tag or client_version or server_version
|
|
885
|
-
tag = mlrun_version
|
|
890
|
+
tag = mlrun_version or ""
|
|
886
891
|
|
|
887
892
|
# TODO: Remove condition when mlrun/mlrun-kfp image is also supported
|
|
888
893
|
if "mlrun-kfp" not in image_url:
|
|
@@ -2091,22 +2096,60 @@ def join_urls(base_url: Optional[str], path: Optional[str]) -> str:
|
|
|
2091
2096
|
|
|
2092
2097
|
class Workflow:
|
|
2093
2098
|
@staticmethod
|
|
2094
|
-
def get_workflow_steps(
|
|
2099
|
+
def get_workflow_steps(
|
|
2100
|
+
db: "mlrun.db.RunDBInterface", workflow_id: str, project: str
|
|
2101
|
+
) -> list:
|
|
2095
2102
|
steps = []
|
|
2096
|
-
db = mlrun.get_run_db()
|
|
2097
2103
|
|
|
2098
2104
|
def _add_run_step(_step: mlrun_pipelines.models.PipelineStep):
|
|
2105
|
+
# on kfp 1.8 argo sets the pod hostname differently than what we have with kfp 2.5
|
|
2106
|
+
# therefore, the heuristic needs to change. what we do here is first trying against 1.8 conventions
|
|
2107
|
+
# and if we can't find it then falling back to 2.5
|
|
2099
2108
|
try:
|
|
2100
|
-
|
|
2109
|
+
# runner_pod = x-y-N
|
|
2110
|
+
_runs = db.list_runs(
|
|
2101
2111
|
project=project,
|
|
2102
2112
|
labels=f"{mlrun_constants.MLRunInternalLabels.runner_pod}={_step.node_name}",
|
|
2103
|
-
)
|
|
2113
|
+
)
|
|
2114
|
+
if not _runs:
|
|
2115
|
+
try:
|
|
2116
|
+
# x-y-N -> x-y, N
|
|
2117
|
+
node_name_initials, node_name_generated_id = (
|
|
2118
|
+
_step.node_name.rsplit("-", 1)
|
|
2119
|
+
)
|
|
2120
|
+
|
|
2121
|
+
except ValueError:
|
|
2122
|
+
# defensive programming, if the node name is not in the expected format
|
|
2123
|
+
node_name_initials = _step.node_name
|
|
2124
|
+
node_name_generated_id = ""
|
|
2125
|
+
|
|
2126
|
+
# compile the expected runner pod hostname as per kfp >= 2.4
|
|
2127
|
+
# x-y, Z, N -> runner_pod = x-y-Z-N
|
|
2128
|
+
runner_pod_value = "-".join(
|
|
2129
|
+
[
|
|
2130
|
+
node_name_initials,
|
|
2131
|
+
_step.display_name,
|
|
2132
|
+
node_name_generated_id,
|
|
2133
|
+
]
|
|
2134
|
+
).rstrip("-")
|
|
2135
|
+
logger.debug(
|
|
2136
|
+
"No run found for step, trying with different node name",
|
|
2137
|
+
step_node_name=runner_pod_value,
|
|
2138
|
+
)
|
|
2139
|
+
_runs = db.list_runs(
|
|
2140
|
+
project=project,
|
|
2141
|
+
labels=f"{mlrun_constants.MLRunInternalLabels.runner_pod}={runner_pod_value}",
|
|
2142
|
+
)
|
|
2143
|
+
|
|
2144
|
+
_run = _runs[0]
|
|
2104
2145
|
except IndexError:
|
|
2146
|
+
logger.warning("No run found for step", step=_step.to_dict())
|
|
2105
2147
|
_run = {
|
|
2106
2148
|
"metadata": {
|
|
2107
2149
|
"name": _step.display_name,
|
|
2108
2150
|
"project": project,
|
|
2109
2151
|
},
|
|
2152
|
+
"status": {},
|
|
2110
2153
|
}
|
|
2111
2154
|
_run["step_kind"] = _step.step_type
|
|
2112
2155
|
if _step.skipped:
|
|
@@ -2224,9 +2267,9 @@ class Workflow:
|
|
|
2224
2267
|
namespace=mlrun.mlconf.namespace,
|
|
2225
2268
|
)
|
|
2226
2269
|
|
|
2227
|
-
# arbitrary timeout of
|
|
2270
|
+
# arbitrary timeout of 30 seconds, the workflow should be done by now, however sometimes kfp takes a few
|
|
2228
2271
|
# seconds to update the workflow status
|
|
2229
|
-
kfp_run = kfp_client.wait_for_run_completion(workflow_id,
|
|
2272
|
+
kfp_run = kfp_client.wait_for_run_completion(workflow_id, 30)
|
|
2230
2273
|
if not kfp_run:
|
|
2231
2274
|
return None
|
|
2232
2275
|
|
|
@@ -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
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mlrun
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.0rc7
|
|
4
4
|
Summary: Tracking and config of machine learning runs
|
|
5
5
|
Home-page: https://github.com/mlrun/mlrun
|
|
6
6
|
Author: Yaron Haviv
|
|
@@ -35,7 +35,7 @@ Requires-Dist: pyarrow<17,>=10.0
|
|
|
35
35
|
Requires-Dist: pyyaml<7,>=6.0.2
|
|
36
36
|
Requires-Dist: requests~=2.32
|
|
37
37
|
Requires-Dist: tabulate~=0.8.6
|
|
38
|
-
Requires-Dist: v3io~=0.
|
|
38
|
+
Requires-Dist: v3io~=0.7.0
|
|
39
39
|
Requires-Dist: pydantic>=1.10.15
|
|
40
40
|
Requires-Dist: mergedeep~=1.3
|
|
41
41
|
Requires-Dist: v3io-frames~=0.10.14; python_version < "3.11"
|
|
@@ -52,7 +52,7 @@ Requires-Dist: deprecated~=1.2
|
|
|
52
52
|
Requires-Dist: jinja2>=3.1.3,~=3.1
|
|
53
53
|
Requires-Dist: orjson<4,>=3.9.15
|
|
54
54
|
Requires-Dist: mlrun-pipelines-kfp-common~=0.4.3
|
|
55
|
-
Requires-Dist: mlrun-pipelines-kfp-v1-8~=0.4.
|
|
55
|
+
Requires-Dist: mlrun-pipelines-kfp-v1-8~=0.4.3
|
|
56
56
|
Requires-Dist: docstring_parser~=0.16
|
|
57
57
|
Requires-Dist: aiosmtplib~=3.0
|
|
58
58
|
Provides-Extra: s3
|
|
@@ -118,7 +118,7 @@ Requires-Dist: timelength~=1.1; extra == "api"
|
|
|
118
118
|
Requires-Dist: memray~=1.12; sys_platform != "win32" and extra == "api"
|
|
119
119
|
Requires-Dist: aiosmtplib~=3.0; extra == "api"
|
|
120
120
|
Requires-Dist: pydantic<2,>=1; extra == "api"
|
|
121
|
-
Requires-Dist: mlrun-pipelines-kfp-v1-8~=0.4.
|
|
121
|
+
Requires-Dist: mlrun-pipelines-kfp-v1-8~=0.4.3; extra == "api"
|
|
122
122
|
Requires-Dist: grpcio~=1.70.0; extra == "api"
|
|
123
123
|
Provides-Extra: all
|
|
124
124
|
Requires-Dist: adlfs==2023.9.0; extra == "all"
|
|
@@ -212,7 +212,7 @@ Requires-Dist: igz-mgmt~=0.4.1; extra == "complete-api"
|
|
|
212
212
|
Requires-Dist: kafka-python~=2.1.0; extra == "complete-api"
|
|
213
213
|
Requires-Dist: memray~=1.12; sys_platform != "win32" and extra == "complete-api"
|
|
214
214
|
Requires-Dist: mlflow~=2.16; extra == "complete-api"
|
|
215
|
-
Requires-Dist: mlrun-pipelines-kfp-v1-8~=0.4.
|
|
215
|
+
Requires-Dist: mlrun-pipelines-kfp-v1-8~=0.4.3; extra == "complete-api"
|
|
216
216
|
Requires-Dist: msrest~=0.6.21; extra == "complete-api"
|
|
217
217
|
Requires-Dist: objgraph~=3.6; extra == "complete-api"
|
|
218
218
|
Requires-Dist: oss2==2.18.1; extra == "complete-api"
|
|
@@ -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
|
|
@@ -8,7 +8,7 @@ mlrun/k8s_utils.py,sha256=-RmKAlSBo_qVeJa1bIiwi6TUyuEpb4AhF7wIQ_H5ZJ0,8909
|
|
|
8
8
|
mlrun/lists.py,sha256=-nbmqScRia0v2IdSHt6Pd0fLRLSEtdB9bSxyD92BWvs,8562
|
|
9
9
|
mlrun/model.py,sha256=5YedJfY9La867fhW8sZJdWb4FwyXPR1r1C5SqYyB4_w,85864
|
|
10
10
|
mlrun/render.py,sha256=5DlhD6JtzHgmj5RVlpaYiHGhX84Q7qdi4RCEUj2UMgw,13195
|
|
11
|
-
mlrun/run.py,sha256=
|
|
11
|
+
mlrun/run.py,sha256=vEgESyKS6mwl6L4qtU71HtoaVQSzbxQguJESGdndyEc,45122
|
|
12
12
|
mlrun/secrets.py,sha256=dZPdkc_zzfscVQepOHUwmzFqnBavDCBXV9DQoH_eIYM,7800
|
|
13
13
|
mlrun/alerts/__init__.py,sha256=0gtG1BG0DXxFrXegIkjbM1XEN4sP9ODo0ucXrNld1hU,601
|
|
14
14
|
mlrun/alerts/alert.py,sha256=QQFZGydQbx9RvAaSiaH-ALQZVcDKQX5lgizqj_rXW2k,15948
|
|
@@ -86,7 +86,7 @@ mlrun/datastore/alibaba_oss.py,sha256=k-OHVe08HjMewlkpsT657CbOiVFAfSq9_EqhCE-k86
|
|
|
86
86
|
mlrun/datastore/azure_blob.py,sha256=SzAcHYSXkm8Zpopz2Ea-rWVClH0URocUazcNK04S9W0,12776
|
|
87
87
|
mlrun/datastore/base.py,sha256=9R3lwB_L4hv5WW2q24WS62_KTh-wO4UG6pwzISZU6bM,26231
|
|
88
88
|
mlrun/datastore/datastore.py,sha256=AXXPgHpSG8Ig1RtTDGfdCJu4UT-AQPC43FGBOptIVOg,9484
|
|
89
|
-
mlrun/datastore/datastore_profile.py,sha256=
|
|
89
|
+
mlrun/datastore/datastore_profile.py,sha256=ywIFYRzMWgb510GuRBDhsJvUbkPENl2qUDQbIBifuWE,23865
|
|
90
90
|
mlrun/datastore/dbfs_store.py,sha256=QkDRzwFnvm7CgEg4NuGxes6tBgKDyhX0CiBUvK8c9pk,6568
|
|
91
91
|
mlrun/datastore/filestore.py,sha256=OcykjzhbUAZ6_Cb9bGAXRL2ngsOpxXSb4rR0lyogZtM,3773
|
|
92
92
|
mlrun/datastore/google_cloud_storage.py,sha256=MnToY6irdhBZ8Wcapqnr1Yq2724LAh2uPO7MAtdWfUY,8716
|
|
@@ -110,7 +110,7 @@ mlrun/db/__init__.py,sha256=WqJ4x8lqJ7ZoKbhEyFqkYADd9P6E3citckx9e9ZLcIU,1163
|
|
|
110
110
|
mlrun/db/auth_utils.py,sha256=hpg8D2r82oN0BWabuWN04BTNZ7jYMAF242YSUpK7LFM,5211
|
|
111
111
|
mlrun/db/base.py,sha256=lfPEPUBXPdmzXUhFD0hDBBWXdV7HXfcsz9Gj_AMLllg,30819
|
|
112
112
|
mlrun/db/factory.py,sha256=yP2vVmveUE7LYTCHbS6lQIxP9rW--zdISWuPd_I3d_4,2111
|
|
113
|
-
mlrun/db/httpdb.py,sha256=
|
|
113
|
+
mlrun/db/httpdb.py,sha256=AxfZuJQJl8yGv9rt2pPOPMrDik3bZ73gbdyEfeEZvyM,232833
|
|
114
114
|
mlrun/db/nopdb.py,sha256=ttC1pe95rZdMgiLG9kzrjZFYB1gWj3SEqeqK5c0q0w4,27197
|
|
115
115
|
mlrun/feature_store/__init__.py,sha256=SlI845bWt6xX34SXunHHqhmFAR9-5v2ak8N-qpcAPGo,1328
|
|
116
116
|
mlrun/feature_store/api.py,sha256=qKj5Tk6prTab6XWatWhBuPRVp0eJEctoxRMN2wz48vA,32168
|
|
@@ -232,7 +232,7 @@ mlrun/model_monitoring/applications/context.py,sha256=VfyPCIdO4z73uqFcJs87jzSI4P
|
|
|
232
232
|
mlrun/model_monitoring/applications/histogram_data_drift.py,sha256=2qgfFmrpHf-x0_EaHD-0T28piwSQzw-HH71aV1GwbZs,15389
|
|
233
233
|
mlrun/model_monitoring/applications/results.py,sha256=_qmj6TWT0SR2bi7gUyRKBU418eGgGoLW2_hTJ7S-ock,5782
|
|
234
234
|
mlrun/model_monitoring/applications/evidently/__init__.py,sha256=-DqdPnBSrjZhFvKOu_Ie3MiFvlur9sPTZpZ1u0_1AE8,690
|
|
235
|
-
mlrun/model_monitoring/applications/evidently/base.py,sha256=
|
|
235
|
+
mlrun/model_monitoring/applications/evidently/base.py,sha256=shH9YwuFrGNWy1IDAbv622l-GE4o1z_u1bqhqTyTHDA,5661
|
|
236
236
|
mlrun/model_monitoring/db/__init__.py,sha256=r47xPGZpIfMuv8J3PQCZTSqVPMhUta4sSJCZFKcS7FM,644
|
|
237
237
|
mlrun/model_monitoring/db/_schedules.py,sha256=RWn4wtKsIXg668gMLpxO9I8GlkxvPSaA5y7w-wFDcgE,9048
|
|
238
238
|
mlrun/model_monitoring/db/_stats.py,sha256=VVMWLMqG3Us3ozBkLaokJF22Ewv8WKmVE1-OvS_g9vA,6943
|
|
@@ -271,7 +271,7 @@ mlrun/platforms/iguazio.py,sha256=6VBTq8eQ3mzT96tzjYhAtcMQ2VjF4x8LpIPW5DAcX2Q,13
|
|
|
271
271
|
mlrun/projects/__init__.py,sha256=0Krf0WIKfnZa71WthYOg0SoaTodGg3sV_hK3f_OlTPI,1220
|
|
272
272
|
mlrun/projects/operations.py,sha256=9ntpM8WnnyRk1iCY0NDKW-3aR4j2QZPSJM0SdMnsQKs,20032
|
|
273
273
|
mlrun/projects/pipelines.py,sha256=wud7ezeEmhIJvfYE_wzQbA4ygEfGXHtbOtoOpan6poY,48556
|
|
274
|
-
mlrun/projects/project.py,sha256=
|
|
274
|
+
mlrun/projects/project.py,sha256=O3oeg5ZZLvsvftN_T6syB1xQJ7e1eFg37mrlIaL4VCY,237075
|
|
275
275
|
mlrun/runtimes/__init__.py,sha256=J9Sy2HiyMlztNv6VUurMzF5H2XzttNil8nRsWDsqLyg,8923
|
|
276
276
|
mlrun/runtimes/base.py,sha256=K-38p2HYSpaPcenJgEzQqLlLVFxfwLu2Bwe9oXGWCTM,37853
|
|
277
277
|
mlrun/runtimes/daskjob.py,sha256=JwuGvOiPsxEDHHMMUS4Oie4hLlYYIZwihAl6DjroTY0,19521
|
|
@@ -280,7 +280,7 @@ mlrun/runtimes/function_reference.py,sha256=fnMKUEieKgy4JyVLhFpDtr6JvKgOaQP8F_K2
|
|
|
280
280
|
mlrun/runtimes/generators.py,sha256=X8NDlCEPveDDPOHtOGcSpbl3pAVM3DP7fuPj5xVhxEY,7290
|
|
281
281
|
mlrun/runtimes/kubejob.py,sha256=xt6NyPiIiPYmGDFtTe4RHF-zhrFdgwcnRr2NQEBB5NI,8799
|
|
282
282
|
mlrun/runtimes/local.py,sha256=yedo3R1c46cB1mX7aOz8zORXswQPvX86U-_fYxXoqTY,22717
|
|
283
|
-
mlrun/runtimes/mounts.py,sha256=
|
|
283
|
+
mlrun/runtimes/mounts.py,sha256=2dkoktm3TXHe4XHmRhvC0UfvWzq2vy_13MeaW7wgyPo,18735
|
|
284
284
|
mlrun/runtimes/pod.py,sha256=kjnDKOQKqfmprzA3tbXhaB58Dp6So4cOApcjYZ3kVko,67691
|
|
285
285
|
mlrun/runtimes/remotesparkjob.py,sha256=dod99nqz3GdRfmnBoQKfwFCXTetfuCScd2pKH3HJyoY,7394
|
|
286
286
|
mlrun/runtimes/utils.py,sha256=VFKA7dWuILAcJGia_7Pw_zBBG00wZlat7o2N6u5EItw,16284
|
|
@@ -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=qB64U2US81iDKZ61Q8LvPZTlgFXZ0IDMGSyfnONHmAI,78813
|
|
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=0KDOVrkEj6xzrlXk-swBxwCKTmKJFpwPcEISYHnkZyc,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.0rc7.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
347
|
+
mlrun-1.9.0rc7.dist-info/METADATA,sha256=NF4zWRstCbOQKe5_7kaLvP8ENRhlGNeY3S4ttpF33W4,25708
|
|
348
|
+
mlrun-1.9.0rc7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
349
|
+
mlrun-1.9.0rc7.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
|
|
350
|
+
mlrun-1.9.0rc7.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
|
|
351
|
+
mlrun-1.9.0rc7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|