mlrun 1.8.0rc49__py3-none-any.whl → 1.8.0rc50__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 +4 -0
- mlrun/datastore/sources.py +2 -7
- mlrun/model_monitoring/stream_processing.py +6 -6
- mlrun/runtimes/nuclio/function.py +3 -7
- mlrun/runtimes/nuclio/serving.py +3 -2
- mlrun/utils/helpers.py +76 -13
- mlrun/utils/version/version.json +2 -2
- {mlrun-1.8.0rc49.dist-info → mlrun-1.8.0rc50.dist-info}/METADATA +1 -1
- {mlrun-1.8.0rc49.dist-info → mlrun-1.8.0rc50.dist-info}/RECORD +13 -13
- {mlrun-1.8.0rc49.dist-info → mlrun-1.8.0rc50.dist-info}/WHEEL +0 -0
- {mlrun-1.8.0rc49.dist-info → mlrun-1.8.0rc50.dist-info}/entry_points.txt +0 -0
- {mlrun-1.8.0rc49.dist-info → mlrun-1.8.0rc50.dist-info}/licenses/LICENSE +0 -0
- {mlrun-1.8.0rc49.dist-info → mlrun-1.8.0rc50.dist-info}/top_level.txt +0 -0
mlrun/config.py
CHANGED
|
@@ -486,6 +486,10 @@ default_config = {
|
|
|
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",
|
|
489
|
+
"summaries": {
|
|
490
|
+
# Number of days back to include when calculating the project pipeline summary.
|
|
491
|
+
"list_pipelines_time_period_in_days": 7,
|
|
492
|
+
},
|
|
489
493
|
},
|
|
490
494
|
# The API needs to know what is its k8s svc url so it could enrich it in the jobs it creates
|
|
491
495
|
"api_url": "",
|
mlrun/datastore/sources.py
CHANGED
|
@@ -971,13 +971,8 @@ class OnlineSource(BaseSourceDriver):
|
|
|
971
971
|
def set_explicit_ack_mode(function: Function, **extra_arguments) -> dict[str, Any]:
|
|
972
972
|
extra_arguments = extra_arguments or {}
|
|
973
973
|
engine = "sync"
|
|
974
|
-
if (
|
|
975
|
-
function.spec
|
|
976
|
-
and hasattr(function.spec, "graph")
|
|
977
|
-
and function.spec.graph
|
|
978
|
-
and function.spec.graph.engine
|
|
979
|
-
):
|
|
980
|
-
engine = function.spec.graph.engine
|
|
974
|
+
if function.spec and hasattr(function.spec, "graph"):
|
|
975
|
+
engine = getattr(function.spec.graph, "engine", None) or engine
|
|
981
976
|
if mlrun.mlconf.is_explicit_ack_enabled() and engine == "async":
|
|
982
977
|
extra_arguments["explicit_ack_mode"] = extra_arguments.get(
|
|
983
978
|
"explicit_ack_mode", "explicitOnly"
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
import datetime
|
|
16
16
|
import typing
|
|
17
17
|
|
|
18
|
-
import storey
|
|
19
|
-
|
|
20
18
|
import mlrun
|
|
21
19
|
import mlrun.common.model_monitoring.helpers
|
|
22
20
|
import mlrun.feature_store as fstore
|
|
@@ -144,7 +142,7 @@ class EventStreamProcessor:
|
|
|
144
142
|
|
|
145
143
|
graph = typing.cast(
|
|
146
144
|
mlrun.serving.states.RootFlowStep,
|
|
147
|
-
fn.set_topology(mlrun.serving.states.StepKinds.flow),
|
|
145
|
+
fn.set_topology(mlrun.serving.states.StepKinds.flow, engine="async"),
|
|
148
146
|
)
|
|
149
147
|
|
|
150
148
|
# split the graph between event with error vs valid event
|
|
@@ -345,7 +343,8 @@ class ProcessEndpointEvent(mlrun.feature_store.steps.MapClass):
|
|
|
345
343
|
logger.debug(
|
|
346
344
|
"Skipped nop event inside of ProcessEndpointEvent", event=event
|
|
347
345
|
)
|
|
348
|
-
|
|
346
|
+
full_event.body = [event]
|
|
347
|
+
return full_event
|
|
349
348
|
# Getting model version and function uri from event
|
|
350
349
|
# and use them for retrieving the endpoint_id
|
|
351
350
|
function_uri = full_event.body.get(EventFieldType.FUNCTION_URI)
|
|
@@ -478,8 +477,9 @@ class ProcessEndpointEvent(mlrun.feature_store.steps.MapClass):
|
|
|
478
477
|
|
|
479
478
|
# Create a storey event object with list of events, based on endpoint_id which will be used
|
|
480
479
|
# in the upcoming steps
|
|
481
|
-
|
|
482
|
-
|
|
480
|
+
full_event.key = endpoint_id
|
|
481
|
+
full_event.body = events
|
|
482
|
+
return full_event
|
|
483
483
|
|
|
484
484
|
def resume_state(self, endpoint_id, endpoint_name):
|
|
485
485
|
# Make sure process is resumable, if process fails for any reason, be able to pick things up close to where we
|
|
@@ -577,13 +577,9 @@ class RemoteRuntime(KubeResource):
|
|
|
577
577
|
access_key = self._resolve_v3io_access_key()
|
|
578
578
|
engine = "sync"
|
|
579
579
|
explicit_ack_mode = kwargs.pop("explicit_ack_mode", None)
|
|
580
|
-
if (
|
|
581
|
-
self.spec
|
|
582
|
-
|
|
583
|
-
and self.spec.graph
|
|
584
|
-
and self.spec.graph.engine
|
|
585
|
-
):
|
|
586
|
-
engine = self.spec.graph.engine
|
|
580
|
+
if self.spec and hasattr(self.spec, "graph"):
|
|
581
|
+
engine = getattr(self.spec.graph, "engine", None) or engine
|
|
582
|
+
|
|
587
583
|
if mlrun.mlconf.is_explicit_ack_enabled() and engine == "async":
|
|
588
584
|
explicit_ack_mode = explicit_ack_mode or "explicitOnly"
|
|
589
585
|
|
mlrun/runtimes/nuclio/serving.py
CHANGED
|
@@ -271,7 +271,8 @@ class ServingRuntime(RemoteRuntime):
|
|
|
271
271
|
can specify special router class and router arguments
|
|
272
272
|
|
|
273
273
|
flow - workflow (DAG) with a chain of states
|
|
274
|
-
flow
|
|
274
|
+
flow supports both "sync" and "async" engines, with "async" being the default.
|
|
275
|
+
Branches are not allowed in sync mode.
|
|
275
276
|
when using async mode calling state.respond() will mark the state as the
|
|
276
277
|
one which generates the (REST) call response
|
|
277
278
|
|
|
@@ -300,7 +301,7 @@ class ServingRuntime(RemoteRuntime):
|
|
|
300
301
|
step = RouterStep(class_name=class_name, class_args=class_args)
|
|
301
302
|
self.spec.graph = step
|
|
302
303
|
elif topology == StepKinds.flow:
|
|
303
|
-
self.spec.graph = RootFlowStep(engine=engine)
|
|
304
|
+
self.spec.graph = RootFlowStep(engine=engine or "async")
|
|
304
305
|
else:
|
|
305
306
|
raise mlrun.errors.MLRunInvalidArgumentError(
|
|
306
307
|
f"unsupported topology {topology}, use 'router' or 'flow'"
|
mlrun/utils/helpers.py
CHANGED
|
@@ -41,6 +41,7 @@ import inflection
|
|
|
41
41
|
import numpy as np
|
|
42
42
|
import packaging.version
|
|
43
43
|
import pandas
|
|
44
|
+
import pytz
|
|
44
45
|
import semver
|
|
45
46
|
import yaml
|
|
46
47
|
from dateutil import parser
|
|
@@ -1128,21 +1129,83 @@ def get_workflow_url(
|
|
|
1128
1129
|
return url
|
|
1129
1130
|
|
|
1130
1131
|
|
|
1131
|
-
def
|
|
1132
|
+
def get_kfp_list_runs_filter(
|
|
1133
|
+
project_name: Optional[str] = None,
|
|
1134
|
+
end_date: Optional[str] = None,
|
|
1135
|
+
start_date: Optional[str] = None,
|
|
1136
|
+
) -> str:
|
|
1132
1137
|
"""
|
|
1133
|
-
Generates a filter
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
+
Generates a filter for listing Kubeflow Pipelines (KFP) runs.
|
|
1139
|
+
|
|
1140
|
+
:param project_name: The name of the project. If "*", it won't filter by project.
|
|
1141
|
+
:param end_date: The latest creation date for filtering runs (ISO 8601 format).
|
|
1142
|
+
:param start_date: The earliest creation date for filtering runs (ISO 8601 format).
|
|
1143
|
+
:return: A JSON-formatted filter string for KFP.
|
|
1138
1144
|
"""
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1145
|
+
|
|
1146
|
+
# KFP filter operation codes
|
|
1147
|
+
kfp_less_than_or_equal_op = 7 # '<='
|
|
1148
|
+
kfp_greater_than_or_equal_op = 5 # '>='
|
|
1149
|
+
kfp_substring_op = 9 # Substring match
|
|
1150
|
+
|
|
1151
|
+
filters = {"predicates": []}
|
|
1152
|
+
|
|
1153
|
+
if end_date:
|
|
1154
|
+
filters["predicates"].append(
|
|
1155
|
+
{
|
|
1156
|
+
"key": "created_at",
|
|
1157
|
+
"op": kfp_less_than_or_equal_op,
|
|
1158
|
+
"timestamp_value": end_date,
|
|
1159
|
+
}
|
|
1160
|
+
)
|
|
1161
|
+
|
|
1162
|
+
if project_name and project_name != "*":
|
|
1163
|
+
filters["predicates"].append(
|
|
1164
|
+
{
|
|
1165
|
+
"key": "name",
|
|
1166
|
+
"op": kfp_substring_op,
|
|
1167
|
+
"string_value": project_name,
|
|
1168
|
+
}
|
|
1169
|
+
)
|
|
1170
|
+
if start_date:
|
|
1171
|
+
filters["predicates"].append(
|
|
1172
|
+
{
|
|
1173
|
+
"key": "created_at",
|
|
1174
|
+
"op": kfp_greater_than_or_equal_op,
|
|
1175
|
+
"timestamp_value": start_date,
|
|
1176
|
+
}
|
|
1177
|
+
)
|
|
1178
|
+
return json.dumps(filters)
|
|
1179
|
+
|
|
1180
|
+
|
|
1181
|
+
def validate_and_convert_date(date_input: str) -> str:
|
|
1182
|
+
"""
|
|
1183
|
+
Converts any recognizable date string into a standardized RFC 3339 format.
|
|
1184
|
+
:param date_input: A date string in a recognizable format.
|
|
1185
|
+
"""
|
|
1186
|
+
try:
|
|
1187
|
+
dt_object = parser.parse(date_input)
|
|
1188
|
+
if dt_object.tzinfo is not None:
|
|
1189
|
+
# Convert to UTC if it's in a different timezone
|
|
1190
|
+
dt_object = dt_object.astimezone(pytz.utc)
|
|
1191
|
+
else:
|
|
1192
|
+
# If no timezone info is present, assume it's in local time
|
|
1193
|
+
local_tz = pytz.timezone("UTC")
|
|
1194
|
+
dt_object = local_tz.localize(dt_object)
|
|
1195
|
+
|
|
1196
|
+
# Convert the datetime object to an RFC 3339-compliant string.
|
|
1197
|
+
# RFC 3339 requires timestamps to be in ISO 8601 format with a 'Z' suffix for UTC time.
|
|
1198
|
+
# The isoformat() method adds a "+00:00" suffix for UTC by default,
|
|
1199
|
+
# so we replace it with "Z" to ensure compliance.
|
|
1200
|
+
formatted_date = dt_object.isoformat().replace("+00:00", "Z")
|
|
1201
|
+
formatted_date = formatted_date.rstrip("Z") + "Z"
|
|
1202
|
+
|
|
1203
|
+
return formatted_date
|
|
1204
|
+
except (ValueError, OverflowError) as e:
|
|
1205
|
+
raise ValueError(
|
|
1206
|
+
f"Invalid date format: {date_input}."
|
|
1207
|
+
f" Date format must adhere to the RFC 3339 standard (e.g., 'YYYY-MM-DDTHH:MM:SSZ' for UTC)."
|
|
1208
|
+
) from e
|
|
1146
1209
|
|
|
1147
1210
|
|
|
1148
1211
|
def are_strings_in_exception_chain_messages(
|
mlrun/utils/version/version.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
mlrun/__init__.py,sha256=Cqm9U9eCEdLpMejhU2BEhubu0mHL71igJJIwYa738EA,7450
|
|
2
2
|
mlrun/__main__.py,sha256=0NDzPf9VFRO8KFfGgb8mkGUPIDS285aASV8Hbxs-ND0,45920
|
|
3
|
-
mlrun/config.py,sha256=
|
|
3
|
+
mlrun/config.py,sha256=yfG69T-Gnu3Nps2tq_xKHM6C4d7ok7ulhHDo-1mJrSk,72126
|
|
4
4
|
mlrun/errors.py,sha256=LkcbXTLANGdsgo2CRX2pdbyNmt--lMsjGv0XZMgP-Nc,8222
|
|
5
5
|
mlrun/execution.py,sha256=FUktsD3puSFjc3LZJU35b-OmFBrBPBNntViCLQVuwnk,50008
|
|
6
6
|
mlrun/features.py,sha256=ReBaNGsBYXqcbgI012n-SO_j6oHIbk_Vpv0CGPXbUmo,15842
|
|
@@ -95,7 +95,7 @@ mlrun/datastore/inmem.py,sha256=IsM83nn-3CqmGdLzim7i9ZmJwG6ZGhBZGN6_hszWZnE,2951
|
|
|
95
95
|
mlrun/datastore/redis.py,sha256=QeNMkSz3zQXiXZhFUZcEtViqqbUysGJditbqe5M-J48,5682
|
|
96
96
|
mlrun/datastore/s3.py,sha256=lD4Fs69rwMeISovZzOxRdz_z9FuffysTdjJA9ybdnLA,9262
|
|
97
97
|
mlrun/datastore/snowflake_utils.py,sha256=Wohvnlmq8j1d98RCaknll-iWdZZpSlCrKhUOEy0_-CA,1483
|
|
98
|
-
mlrun/datastore/sources.py,sha256=
|
|
98
|
+
mlrun/datastore/sources.py,sha256=juPTIDpxHxbRBoTMPEG1V-6bgR3E3ufCir-Dnq_SFyg,48975
|
|
99
99
|
mlrun/datastore/spark_udf.py,sha256=NnnB3DZxZb-rqpRy7b-NC7QWXuuqFn3XkBDc86tU4mQ,1498
|
|
100
100
|
mlrun/datastore/spark_utils.py,sha256=_AsVoU5Ix_-W7Gyq8io8V-2GTk0m8THJNDP3WGGaWJY,2865
|
|
101
101
|
mlrun/datastore/store_resources.py,sha256=PFOMrZ6KH6hBOb0PiO-cHx_kv0UpHu5P2t8_mrR-lS4,6842
|
|
@@ -222,7 +222,7 @@ mlrun/model_monitoring/api.py,sha256=LU58dzE4QZiMH23lgiqfI__3m2E3eEZP-DQe2ioUSwM
|
|
|
222
222
|
mlrun/model_monitoring/controller.py,sha256=m4Zx_NQ0C-A7WtjBoXnqBmS11RRtLvBaFgbFbIgrdVc,36847
|
|
223
223
|
mlrun/model_monitoring/features_drift_table.py,sha256=c6GpKtpOJbuT1u5uMWDL_S-6N4YPOmlktWMqPme3KFY,25308
|
|
224
224
|
mlrun/model_monitoring/helpers.py,sha256=8QsoYRPOVSnR3Lcv99m4XYrp_cR6hSqBUflYSOkJmFQ,21019
|
|
225
|
-
mlrun/model_monitoring/stream_processing.py,sha256=
|
|
225
|
+
mlrun/model_monitoring/stream_processing.py,sha256=CEVcIFJ0jYvkIMu8hKsIH0HEkrn5l_NoHsxNLk72D5E,33583
|
|
226
226
|
mlrun/model_monitoring/tracking_policy.py,sha256=PBIGrUYWrwcE5gwXupBIVzOb0QRRwPJsgQm_yLGQxB4,5595
|
|
227
227
|
mlrun/model_monitoring/writer.py,sha256=ibbhvfSHb8Reqlb7RGFEAUNM4iTyK1gk8-2m46mP6VM,8428
|
|
228
228
|
mlrun/model_monitoring/applications/__init__.py,sha256=xDBxkBjl-whHSG_4t1mLkxiypLH-fzn8TmAW9Mjo2uI,759
|
|
@@ -292,9 +292,9 @@ mlrun/runtimes/mpijob/abstract.py,sha256=JGMjcJ4dvpJbctF6psU9UvYyNCutMxTMgBQeTlz
|
|
|
292
292
|
mlrun/runtimes/mpijob/v1.py,sha256=1XQZC7AIMGX_AQCbApcwpH8I7y39-v0v2O35MvxjXoo,3213
|
|
293
293
|
mlrun/runtimes/nuclio/__init__.py,sha256=gx1kizzKv8pGT5TNloN1js1hdbxqDw3rM90sLVYVffY,794
|
|
294
294
|
mlrun/runtimes/nuclio/api_gateway.py,sha256=vH9ClKVP4Mb24rvA67xPuAvAhX-gAv6vVtjVxyplhdc,26969
|
|
295
|
-
mlrun/runtimes/nuclio/function.py,sha256=
|
|
295
|
+
mlrun/runtimes/nuclio/function.py,sha256=8wzAFYCpSs0KoGPSN6DC19smSfYh8dVqDUhpicr8sJ0,54540
|
|
296
296
|
mlrun/runtimes/nuclio/nuclio.py,sha256=sLK8KdGO1LbftlL3HqPZlFOFTAAuxJACZCVl1c0Ha6E,2942
|
|
297
|
-
mlrun/runtimes/nuclio/serving.py,sha256=
|
|
297
|
+
mlrun/runtimes/nuclio/serving.py,sha256=d0nzPALUYXO4fKFFhxW3hY-_NU-ZhBLWXa2vWIetBRI,33434
|
|
298
298
|
mlrun/runtimes/nuclio/application/__init__.py,sha256=rRs5vasy_G9IyoTpYIjYDafGoL6ifFBKgBtsXn31Atw,614
|
|
299
299
|
mlrun/runtimes/nuclio/application/application.py,sha256=VPX-ruYQJ7-7yd5c2sWdF4U5JCGSS3kYjUfOgev6l_Y,29186
|
|
300
300
|
mlrun/runtimes/nuclio/application/reverse_proxy.go,sha256=lEHH74vr2PridIHp1Jkc_NjkrWb5b6zawRrNxHQhwGU,2913
|
|
@@ -321,7 +321,7 @@ mlrun/utils/azure_vault.py,sha256=IEFizrDGDbAaoWwDr1WoA88S_EZ0T--vjYtY-i0cvYQ,34
|
|
|
321
321
|
mlrun/utils/clones.py,sha256=yXOeuLtgIiKZdmjeKK0Z_vIrH19ds5JuoJaCeDjhwOo,7516
|
|
322
322
|
mlrun/utils/condition_evaluator.py,sha256=-nGfRmZzivn01rHTroiGY4rqEv8T1irMyhzxEei-sKc,1897
|
|
323
323
|
mlrun/utils/db.py,sha256=blQgkWMfFH9lcN4sgJQcPQgEETz2Dl_zwbVA0SslpFg,2186
|
|
324
|
-
mlrun/utils/helpers.py,sha256=
|
|
324
|
+
mlrun/utils/helpers.py,sha256=PY8MVhqWEB-aF1T31PaIMTYlxiw8_3ywI49QWk8frQQ,76587
|
|
325
325
|
mlrun/utils/http.py,sha256=t6FrXQstZm9xVVjxqIGiLzrwZNCR4CSienSOuVgNIcI,8706
|
|
326
326
|
mlrun/utils/logger.py,sha256=RG0m1rx6gfkJ-2C1r_p41MMpPiaDYqaYM2lYHDlNZEU,14767
|
|
327
327
|
mlrun/utils/regex.py,sha256=jbR7IiOp6OO0mg9Fl_cVZCpWb9fL9nTPONCUxCDNWXg,5201
|
|
@@ -340,11 +340,11 @@ mlrun/utils/notifications/notification/mail.py,sha256=ZyJ3eqd8simxffQmXzqd3bgbAq
|
|
|
340
340
|
mlrun/utils/notifications/notification/slack.py,sha256=eQvmctTh6wIG5xVOesLLV9S1-UUCu5UEQ9JIJOor3ts,7183
|
|
341
341
|
mlrun/utils/notifications/notification/webhook.py,sha256=NeyIMSBojjjTJaUHmPbxMByp34GxYkl1-16NqzU27fU,4943
|
|
342
342
|
mlrun/utils/version/__init__.py,sha256=7kkrB7hEZ3cLXoWj1kPoDwo4MaswsI2JVOBpbKgPAgc,614
|
|
343
|
-
mlrun/utils/version/version.json,sha256=
|
|
343
|
+
mlrun/utils/version/version.json,sha256=RjTCuRy3GfFmwMHEpX2EDiMuT-NVXkkSv3yDkLci76E,89
|
|
344
344
|
mlrun/utils/version/version.py,sha256=eEW0tqIAkU9Xifxv8Z9_qsYnNhn3YH7NRAfM-pPLt1g,1878
|
|
345
|
-
mlrun-1.8.
|
|
346
|
-
mlrun-1.8.
|
|
347
|
-
mlrun-1.8.
|
|
348
|
-
mlrun-1.8.
|
|
349
|
-
mlrun-1.8.
|
|
350
|
-
mlrun-1.8.
|
|
345
|
+
mlrun-1.8.0rc50.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
346
|
+
mlrun-1.8.0rc50.dist-info/METADATA,sha256=YlWNT5wCVmdArEFkjRbixRD0tAY-Kzaz54rgHYdQabY,26009
|
|
347
|
+
mlrun-1.8.0rc50.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
348
|
+
mlrun-1.8.0rc50.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
|
|
349
|
+
mlrun-1.8.0rc50.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
|
|
350
|
+
mlrun-1.8.0rc50.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|