mlrun 1.10.0rc33__py3-none-any.whl → 1.10.0rc34__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.

@@ -234,7 +234,18 @@ class AzureBlobStore(DataStore):
234
234
  # if called without passing dataitem - like in fset.purge_targets,
235
235
  # key will include schema.
236
236
  if not schema:
237
- key = Path(self.endpoint, key).as_posix()
237
+ # For wasbs/wasb, the filesystem is scoped to the container, so we need to use
238
+ # the container name as the base path, not the hostname endpoint.
239
+ # For az://, endpoint already contains the container name.
240
+ if self.kind in ["wasbs", "wasb"]:
241
+ container = self.storage_options.get("container")
242
+ if container:
243
+ key = Path(container, key).as_posix()
244
+ else:
245
+ # If no container found, use endpoint (might be hostname, but better than nothing)
246
+ key = Path(self.endpoint, key).as_posix()
247
+ else:
248
+ key = Path(self.endpoint, key).as_posix()
238
249
  return key
239
250
 
240
251
  def upload(self, key, src_path):
mlrun/projects/project.py CHANGED
@@ -2574,7 +2574,7 @@ class MlrunProject(ModelObj):
2574
2574
  *,
2575
2575
  deploy_histogram_data_drift_app: bool = True,
2576
2576
  wait_for_deployment: bool = False,
2577
- fetch_credentials_from_sys_config: bool = False,
2577
+ fetch_credentials_from_sys_config: bool = False, # deprecated
2578
2578
  ) -> None:
2579
2579
  """
2580
2580
  Deploy model monitoring application controller, writer and stream functions.
@@ -2609,14 +2609,20 @@ class MlrunProject(ModelObj):
2609
2609
  :param wait_for_deployment: If true, return only after the deployment is done on the backend.
2610
2610
  Otherwise, deploy the model monitoring infrastructure on the
2611
2611
  background, including the histogram data drift app if selected.
2612
- :param fetch_credentials_from_sys_config: If true, fetch the credentials from the system configuration.
2612
+ :param fetch_credentials_from_sys_config: Deprecated. If true, fetch the credentials from the project
2613
+ configuration.
2613
2614
  """
2615
+ if fetch_credentials_from_sys_config:
2616
+ warnings.warn(
2617
+ "`fetch_credentials_from_sys_config` is deprecated in 1.10.0 and will be removed in 1.12.0.",
2618
+ # TODO: Remove this in 1.12.0
2619
+ FutureWarning,
2620
+ )
2614
2621
  if base_period < 10:
2615
2622
  logger.warn(
2616
2623
  "enable_model_monitoring: 'base_period' < 10 minutes is not supported in production environments",
2617
2624
  project=self.name,
2618
2625
  )
2619
-
2620
2626
  db = mlrun.db.get_run_db(secrets=self._secrets)
2621
2627
  db.enable_model_monitoring(
2622
2628
  project=self.name,
mlrun/serving/steps.py ADDED
@@ -0,0 +1,62 @@
1
+ # Copyright 2025 Iguazio
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ from typing import Union
16
+
17
+ import storey
18
+
19
+ import mlrun.errors
20
+
21
+
22
+ class ChoiceByField(storey.Choice):
23
+ """
24
+ Selects downstream outlets to route each event based on a predetermined field.
25
+ :param field_name: event field name that contains the step name or names of the desired outlet or outlets
26
+ """
27
+
28
+ def __init__(self, field_name: Union[str, list[str]], **kwargs):
29
+ self.field_name = field_name
30
+ super().__init__(**kwargs)
31
+
32
+ def select_outlets(self, event):
33
+ # Case 1: Missing field
34
+ if self.field_name not in event:
35
+ raise mlrun.errors.MLRunRuntimeError(
36
+ f"Field '{self.field_name}' is not contained in the event keys {list(event.keys())}."
37
+ )
38
+
39
+ outlet = event[self.field_name]
40
+
41
+ # Case 2: Field exists but is None
42
+ if outlet is None:
43
+ raise mlrun.errors.MLRunInvalidArgumentError(
44
+ f"Field '{self.field_name}' exists but its value is None."
45
+ )
46
+
47
+ # Case 3: Invalid type
48
+ if not isinstance(outlet, (str, list, tuple)):
49
+ raise mlrun.errors.MLRunInvalidArgumentTypeError(
50
+ f"Field '{self.field_name}' must be a string or list of strings "
51
+ f"but is instead of type '{type(outlet).__name__}'."
52
+ )
53
+
54
+ outlets = [outlet] if isinstance(outlet, str) else outlet
55
+
56
+ # Case 4: Empty list or tuple
57
+ if not outlets:
58
+ raise mlrun.errors.MLRunRuntimeError(
59
+ f"The value of the key '{self.field_name}' cannot be an empty {type(outlets).__name__}."
60
+ )
61
+
62
+ return outlets
@@ -1,4 +1,4 @@
1
1
  {
2
- "git_commit": "f4d56eca3901844a2deda33bff864e8cf20cf032",
3
- "version": "1.10.0-rc33"
2
+ "git_commit": "0d61caa563d5a76229ea18f1116fef794cd1058a",
3
+ "version": "1.10.0-rc34"
4
4
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mlrun
3
- Version: 1.10.0rc33
3
+ Version: 1.10.0rc34
4
4
  Summary: Tracking and config of machine learning runs
5
5
  Home-page: https://github.com/mlrun/mlrun
6
6
  Author: Yaron Haviv
@@ -85,7 +85,7 @@ mlrun/data_types/spark.py,sha256=I5JC887dT9RGs5Tqz5zaRxlCMyhMeFmwuNbExQoyW0E,962
85
85
  mlrun/data_types/to_pandas.py,sha256=KOy0FLXPJirsgH6szcC5BI6t70yVDCjuo6LmuYHNTuI,11429
86
86
  mlrun/datastore/__init__.py,sha256=LAAqChT1ydUpQ9f8PpAMXb20xjpr1kMMx74ZvtyiTp4,6097
87
87
  mlrun/datastore/alibaba_oss.py,sha256=E0t0-e9Me2t2Mux2LWdC9riOG921TgNjhoy897JJX7o,4932
88
- mlrun/datastore/azure_blob.py,sha256=G1NNAyJMPWB_ziHASrcxIx72ueCTK6E7qsq1Vig5xEM,17328
88
+ mlrun/datastore/azure_blob.py,sha256=LQZ3p0MEe1G5oNwCUo5xA4_xLhykMtnlV0aA5tWuzdA,17978
89
89
  mlrun/datastore/base.py,sha256=yLdnFCL2k_rcasdbxXjnQr7Lwm-A79LnW9AITtn9-p4,25450
90
90
  mlrun/datastore/datastore.py,sha256=F9NdQFwyAHgjKFSQ1mcLZBuxNqXXesNMjtIVj03L5Gk,13422
91
91
  mlrun/datastore/datastore_profile.py,sha256=K2MrA0KjznkoWci5ua6L_k1rjMGBfCsQFAql-Iwok0M,24680
@@ -281,7 +281,7 @@ mlrun/platforms/iguazio.py,sha256=32_o95Ntx9z3ciowt2NcnX7tAiLBwX3VB0mbTQ-KrIQ,13
281
281
  mlrun/projects/__init__.py,sha256=hdCOA6_fp8X4qGGGT7Bj7sPbkM1PayWuaVZL0DkpuZw,1240
282
282
  mlrun/projects/operations.py,sha256=Oo7h0TMztI_RVmj0rQxNS1igS_c94HpQZwMIFjiWt0E,21038
283
283
  mlrun/projects/pipelines.py,sha256=ZOfuIEHOXfuc4qAkuWvbWhCjP6kqpLkv-yBBaY9RXhg,52219
284
- mlrun/projects/project.py,sha256=aADGuuGz47OIBQAu_11mPf8jXLl-W6mHBnlfwSPW6uk,256836
284
+ mlrun/projects/project.py,sha256=DFyiEutH-Jy5lPp5uKP1P3EGpQAAOj78Ho9NEsE2EN8,257186
285
285
  mlrun/runtimes/__init__.py,sha256=8cqrYKy1a0_87XG7V_p96untQ4t8RocadM4LVEEN1JM,9029
286
286
  mlrun/runtimes/base.py,sha256=txynS-hiNLR97PBd49mc5q9ZX3gMf3VdJ2rJ-fz5bZU,38913
287
287
  mlrun/runtimes/daskjob.py,sha256=IN6gKKrmCIjWooj5FgFm-pAb2i7ra1ERRzClfu_rYGI,20102
@@ -318,6 +318,7 @@ mlrun/serving/routers.py,sha256=pu5jlSLI4Ml68YP_FMFDhhwPfLcT6lRu5yL5QDgXPHQ,5288
318
318
  mlrun/serving/server.py,sha256=WvAQtkNhAcd2vGuMR04OdxfynMNWvtz6LpKEYPhK3z0,40959
319
319
  mlrun/serving/serving_wrapper.py,sha256=UL9hhWCfMPcTJO_XrkvNaFvck1U1E7oS8trTZyak0cA,835
320
320
  mlrun/serving/states.py,sha256=Q2Q7o0eJCvnonXd2-sfiv7zhCiyC6xthfW25nzf61KM,138976
321
+ mlrun/serving/steps.py,sha256=zbMgJnu-m4n7vhFRgZkCMMifIsCya-TzAj3Gjc-Fgnc,2193
321
322
  mlrun/serving/system_steps.py,sha256=ZvGkUqiiYOrUlsDnsvzf9u9554mzyFwlKVrybqB7xao,20200
322
323
  mlrun/serving/utils.py,sha256=Zbfqm8TKNcTE8zRBezVBzpvR2WKeKeIRN7otNIaiYEc,4170
323
324
  mlrun/serving/v1_serving.py,sha256=c6J_MtpE-Tqu00-6r4eJOCO6rUasHDal9W2eBIcrl50,11853
@@ -351,11 +352,11 @@ mlrun/utils/notifications/notification/mail.py,sha256=ZyJ3eqd8simxffQmXzqd3bgbAq
351
352
  mlrun/utils/notifications/notification/slack.py,sha256=wSu_7W0EnGLBNwIgWCYEeTP8j9SPAMPDBnfUcPnVZYA,7299
352
353
  mlrun/utils/notifications/notification/webhook.py,sha256=FM5-LQAKAVJKp37MRzR3SsejalcnpM6r_9Oe7znxZEA,5313
353
354
  mlrun/utils/version/__init__.py,sha256=YnzE6tlf24uOQ8y7Z7l96QLAI6-QEii7-77g8ynmzy0,613
354
- mlrun/utils/version/version.json,sha256=yQnd9vqR-aQNoTvniro-ODetJzw2TOR-g7HitydZtAE,90
355
+ mlrun/utils/version/version.json,sha256=zr0lbZ3pe5GquH7vvraCJo9LaQm6FmEIuv1mXnxXqkE,90
355
356
  mlrun/utils/version/version.py,sha256=M2hVhRrgkN3SxacZHs3ZqaOsqAA7B6a22ne324IQ1HE,1877
356
- mlrun-1.10.0rc33.dist-info/licenses/LICENSE,sha256=zTiv1CxWNkOk1q8eJS1G_8oD4gWpWLwWxj_Agcsi8Os,11337
357
- mlrun-1.10.0rc33.dist-info/METADATA,sha256=DVCMqUdd9RFMsFeR1kDeftSg47qMaV7UrB9boa9HqXA,26104
358
- mlrun-1.10.0rc33.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
359
- mlrun-1.10.0rc33.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
360
- mlrun-1.10.0rc33.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
361
- mlrun-1.10.0rc33.dist-info/RECORD,,
357
+ mlrun-1.10.0rc34.dist-info/licenses/LICENSE,sha256=zTiv1CxWNkOk1q8eJS1G_8oD4gWpWLwWxj_Agcsi8Os,11337
358
+ mlrun-1.10.0rc34.dist-info/METADATA,sha256=KjpinCMYNSRXDTsD9nfKq99EKsW08Q0lreJm45tXLbw,26104
359
+ mlrun-1.10.0rc34.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
360
+ mlrun-1.10.0rc34.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
361
+ mlrun-1.10.0rc34.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
362
+ mlrun-1.10.0rc34.dist-info/RECORD,,