mlrun 1.10.0rc36__py3-none-any.whl → 1.10.0rc37__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 -0
- mlrun/db/base.py +3 -1
- mlrun/db/httpdb.py +10 -3
- mlrun/db/nopdb.py +3 -1
- mlrun/model_monitoring/applications/base.py +85 -47
- mlrun/runtimes/nuclio/application/application.py +25 -11
- mlrun/runtimes/nuclio/function.py +0 -5
- mlrun/runtimes/nuclio/serving.py +7 -3
- mlrun/secrets.py +54 -13
- mlrun/serving/server.py +10 -0
- mlrun/serving/system_steps.py +7 -9
- mlrun/utils/version/version.json +2 -2
- {mlrun-1.10.0rc36.dist-info → mlrun-1.10.0rc37.dist-info}/METADATA +1 -1
- {mlrun-1.10.0rc36.dist-info → mlrun-1.10.0rc37.dist-info}/RECORD +18 -18
- {mlrun-1.10.0rc36.dist-info → mlrun-1.10.0rc37.dist-info}/WHEEL +0 -0
- {mlrun-1.10.0rc36.dist-info → mlrun-1.10.0rc37.dist-info}/entry_points.txt +0 -0
- {mlrun-1.10.0rc36.dist-info → mlrun-1.10.0rc37.dist-info}/licenses/LICENSE +0 -0
- {mlrun-1.10.0rc36.dist-info → mlrun-1.10.0rc37.dist-info}/top_level.txt +0 -0
mlrun/config.py
CHANGED
|
@@ -304,6 +304,7 @@ default_config = {
|
|
|
304
304
|
"application": {
|
|
305
305
|
"default_sidecar_internal_port": 8050,
|
|
306
306
|
"default_authentication_mode": mlrun.common.schemas.APIGatewayAuthenticationMode.none,
|
|
307
|
+
"default_worker_number": 10000,
|
|
307
308
|
},
|
|
308
309
|
},
|
|
309
310
|
# TODO: function defaults should be moved to the function spec config above
|
mlrun/db/base.py
CHANGED
|
@@ -722,7 +722,9 @@ class RunDBInterface(ABC):
|
|
|
722
722
|
tsdb_metrics: bool = False,
|
|
723
723
|
metric_list: Optional[list[str]] = None,
|
|
724
724
|
top_level: bool = False,
|
|
725
|
-
modes: Optional[
|
|
725
|
+
modes: Optional[
|
|
726
|
+
Union[mm_constants.EndpointMode, list[mm_constants.EndpointMode]]
|
|
727
|
+
] = None,
|
|
726
728
|
uids: Optional[list[str]] = None,
|
|
727
729
|
latest_only: bool = False,
|
|
728
730
|
) -> mlrun.common.schemas.ModelEndpointList:
|
mlrun/db/httpdb.py
CHANGED
|
@@ -3771,7 +3771,9 @@ class HTTPRunDB(RunDBInterface):
|
|
|
3771
3771
|
tsdb_metrics: bool = False,
|
|
3772
3772
|
metric_list: Optional[list[str]] = None,
|
|
3773
3773
|
top_level: bool = False,
|
|
3774
|
-
modes: Optional[
|
|
3774
|
+
modes: Optional[
|
|
3775
|
+
Union[mm_constants.EndpointMode, list[mm_constants.EndpointMode]]
|
|
3776
|
+
] = None,
|
|
3775
3777
|
uids: Optional[list[str]] = None,
|
|
3776
3778
|
latest_only: bool = False,
|
|
3777
3779
|
) -> mlrun.common.schemas.ModelEndpointList:
|
|
@@ -3802,8 +3804,13 @@ class HTTPRunDB(RunDBInterface):
|
|
|
3802
3804
|
labels = self._parse_labels(labels)
|
|
3803
3805
|
if names and isinstance(names, str):
|
|
3804
3806
|
names = [names]
|
|
3805
|
-
if
|
|
3806
|
-
modes
|
|
3807
|
+
if modes:
|
|
3808
|
+
# Ensure backward compatibility with Python 3.9 clients by converting IntEnum modes to integer values
|
|
3809
|
+
modes = (
|
|
3810
|
+
[modes.value]
|
|
3811
|
+
if isinstance(modes, mm_constants.EndpointMode)
|
|
3812
|
+
else [mode.value for mode in modes]
|
|
3813
|
+
)
|
|
3807
3814
|
response = self.api_call(
|
|
3808
3815
|
method=mlrun.common.types.HTTPMethod.GET,
|
|
3809
3816
|
path=path,
|
mlrun/db/nopdb.py
CHANGED
|
@@ -626,7 +626,9 @@ class NopDB(RunDBInterface):
|
|
|
626
626
|
tsdb_metrics: bool = False,
|
|
627
627
|
metric_list: Optional[list[str]] = None,
|
|
628
628
|
top_level: bool = False,
|
|
629
|
-
modes: Optional[
|
|
629
|
+
modes: Optional[
|
|
630
|
+
Union[mm_constants.EndpointMode, list[mm_constants.EndpointMode]]
|
|
631
|
+
] = None,
|
|
630
632
|
uids: Optional[list[str]] = None,
|
|
631
633
|
latest_only: bool = False,
|
|
632
634
|
) -> mlrun.common.schemas.ModelEndpointList:
|
|
@@ -233,7 +233,7 @@ class ModelMonitoringApplicationBase(MonitoringApplicationToDict, ABC):
|
|
|
233
233
|
try:
|
|
234
234
|
yield endpoints_output, application_schedules.__enter__()
|
|
235
235
|
finally:
|
|
236
|
-
if write_output:
|
|
236
|
+
if write_output and any(endpoints_output.values()):
|
|
237
237
|
logger.debug(
|
|
238
238
|
"Pushing model monitoring application job data to the writer stream",
|
|
239
239
|
passed_stream_profile=str(stream_profile),
|
|
@@ -344,7 +344,7 @@ class ModelMonitoringApplicationBase(MonitoringApplicationToDict, ABC):
|
|
|
344
344
|
return result
|
|
345
345
|
|
|
346
346
|
if endpoints is not None:
|
|
347
|
-
resolved_endpoints = self.
|
|
347
|
+
resolved_endpoints = self._normalize_and_validate_endpoints(
|
|
348
348
|
project=project, endpoints=endpoints
|
|
349
349
|
)
|
|
350
350
|
if (
|
|
@@ -390,6 +390,16 @@ class ModelMonitoringApplicationBase(MonitoringApplicationToDict, ABC):
|
|
|
390
390
|
context.log_result(
|
|
391
391
|
result_key, self._flatten_data_result(result)
|
|
392
392
|
)
|
|
393
|
+
# Check if no result was produced for any endpoint (e.g., due to no data in all windows)
|
|
394
|
+
if not any(endpoints_output.values()):
|
|
395
|
+
context.logger.warning(
|
|
396
|
+
"No data was found for any of the specified endpoints. "
|
|
397
|
+
"No results were produced",
|
|
398
|
+
application_name=application_name,
|
|
399
|
+
endpoints=endpoints,
|
|
400
|
+
start=start,
|
|
401
|
+
end=end,
|
|
402
|
+
)
|
|
393
403
|
else:
|
|
394
404
|
result = call_do_tracking(
|
|
395
405
|
mm_context.MonitoringApplicationContext._from_ml_ctx(
|
|
@@ -421,69 +431,97 @@ class ModelMonitoringApplicationBase(MonitoringApplicationToDict, ABC):
|
|
|
421
431
|
)
|
|
422
432
|
|
|
423
433
|
@classmethod
|
|
424
|
-
def
|
|
434
|
+
def _normalize_and_validate_endpoints(
|
|
425
435
|
cls,
|
|
426
436
|
project: "mlrun.MlrunProject",
|
|
427
437
|
endpoints: Union[
|
|
428
438
|
list[tuple[str, str]], list[list[str]], list[str], Literal["all"]
|
|
429
439
|
],
|
|
430
|
-
) ->
|
|
431
|
-
if
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
)
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
440
|
+
) -> list[tuple[str, str]]:
|
|
441
|
+
if isinstance(endpoints, list):
|
|
442
|
+
if all(
|
|
443
|
+
isinstance(endpoint, (tuple, list)) and len(endpoint) == 2
|
|
444
|
+
for endpoint in endpoints
|
|
445
|
+
):
|
|
446
|
+
# A list of [(name, uid), ...] / [[name, uid], ...] tuples/lists
|
|
447
|
+
endpoint_uids_to_names = {
|
|
448
|
+
endpoint[1]: endpoint[0] for endpoint in endpoints
|
|
449
|
+
}
|
|
450
|
+
endpoints_list = project.list_model_endpoints(
|
|
451
|
+
uids=list(endpoint_uids_to_names.keys()), latest_only=True
|
|
452
|
+
).endpoints
|
|
453
|
+
|
|
454
|
+
# Check for missing endpoint uids or name/uid mismatches
|
|
455
|
+
for endpoint in endpoints_list:
|
|
456
|
+
if (
|
|
457
|
+
endpoint_uids_to_names[cast(str, endpoint.metadata.uid)]
|
|
458
|
+
!= endpoint.metadata.name
|
|
459
|
+
):
|
|
460
|
+
raise mlrun.errors.MLRunNotFoundError(
|
|
461
|
+
"Could not find model endpoint with name "
|
|
462
|
+
f"'{endpoint_uids_to_names[cast(str, endpoint.metadata.uid)]}' "
|
|
463
|
+
f"and uid '{endpoint.metadata.uid}'"
|
|
464
|
+
)
|
|
465
|
+
missing = set(endpoint_uids_to_names.keys()) - {
|
|
466
|
+
cast(str, endpoint.metadata.uid) for endpoint in endpoints_list
|
|
467
|
+
}
|
|
468
|
+
if missing:
|
|
469
|
+
raise mlrun.errors.MLRunNotFoundError(
|
|
470
|
+
"Could not find model endpoints with the following uids: "
|
|
471
|
+
f"{missing}"
|
|
447
472
|
)
|
|
448
|
-
else:
|
|
449
|
-
raise mlrun.errors.MLRunValueError(
|
|
450
|
-
f"Could not resolve endpoints as list of [(name, uid)], {endpoints=}"
|
|
451
|
-
)
|
|
452
473
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
names=endpoint_names, latest_only=True
|
|
460
|
-
).endpoints
|
|
474
|
+
elif all(isinstance(endpoint, str) for endpoint in endpoints):
|
|
475
|
+
# A list of [name, ...] strings
|
|
476
|
+
endpoint_names = cast(list[str], endpoints)
|
|
477
|
+
endpoints_list = project.list_model_endpoints(
|
|
478
|
+
names=endpoint_names, latest_only=True
|
|
479
|
+
).endpoints
|
|
461
480
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
if endpoints_list:
|
|
465
|
-
list_endpoints_result = [
|
|
466
|
-
(endpoint.metadata.name, endpoint.metadata.uid)
|
|
467
|
-
for endpoint in endpoints_list
|
|
468
|
-
]
|
|
469
|
-
if endpoints != "all":
|
|
481
|
+
# Check for missing endpoint names
|
|
470
482
|
missing = set(endpoints) - {
|
|
471
|
-
endpoint
|
|
483
|
+
endpoint.metadata.name for endpoint in endpoints_list
|
|
472
484
|
}
|
|
473
485
|
if missing:
|
|
474
486
|
logger.warning(
|
|
475
487
|
"Could not list all the required endpoints",
|
|
476
|
-
|
|
477
|
-
|
|
488
|
+
missing_endpoints=missing,
|
|
489
|
+
endpoints_list=endpoints_list,
|
|
478
490
|
)
|
|
479
|
-
|
|
491
|
+
else:
|
|
492
|
+
raise mlrun.errors.MLRunValueError(
|
|
493
|
+
"Could not resolve the following list as a list of endpoints:\n"
|
|
494
|
+
f"{endpoints}\n"
|
|
495
|
+
"The list must be either a list of (name, uid) tuples/lists or a list of names."
|
|
496
|
+
)
|
|
497
|
+
elif endpoints == "all":
|
|
498
|
+
endpoints_list = project.list_model_endpoints(latest_only=True).endpoints
|
|
499
|
+
elif isinstance(endpoints, str):
|
|
500
|
+
raise mlrun.errors.MLRunValueError(
|
|
501
|
+
'A string input for `endpoints` can only be "all" for all the model endpoints in '
|
|
502
|
+
"the project. If you want to select a single model endpoint with the given name, "
|
|
503
|
+
f'use a list: `endpoints=["{endpoints}"]`.'
|
|
504
|
+
)
|
|
480
505
|
else:
|
|
481
|
-
|
|
482
|
-
|
|
506
|
+
raise mlrun.errors.MLRunValueError(
|
|
507
|
+
"Could not resolve the `endpoints` parameter. The parameter must be either:\n"
|
|
508
|
+
"- a list of (name, uid) tuples/lists\n"
|
|
509
|
+
"- a list of names\n"
|
|
510
|
+
'- the string "all" for all the model endpoints in the project.'
|
|
511
|
+
)
|
|
512
|
+
|
|
513
|
+
if not endpoints_list:
|
|
483
514
|
raise mlrun.errors.MLRunNotFoundError(
|
|
484
|
-
f"Did not find any model endpoints {
|
|
515
|
+
f"Did not find any model endpoints {endpoints=}"
|
|
485
516
|
)
|
|
486
517
|
|
|
518
|
+
cls._check_endpoints_first_request(endpoints_list)
|
|
519
|
+
|
|
520
|
+
return [
|
|
521
|
+
(endpoint.metadata.name, cast(str, endpoint.metadata.uid))
|
|
522
|
+
for endpoint in endpoints_list
|
|
523
|
+
]
|
|
524
|
+
|
|
487
525
|
@staticmethod
|
|
488
526
|
def _validate_and_get_window_length(
|
|
489
527
|
*, base_period: int, start_dt: datetime, end_dt: datetime
|
|
@@ -413,8 +413,7 @@ class ApplicationRuntime(RemoteRuntime):
|
|
|
413
413
|
show_on_failure=show_on_failure,
|
|
414
414
|
)
|
|
415
415
|
|
|
416
|
-
|
|
417
|
-
self._ensure_reverse_proxy_configurations(self)
|
|
416
|
+
self._ensure_reverse_proxy_configurations()
|
|
418
417
|
self._configure_application_sidecar()
|
|
419
418
|
|
|
420
419
|
# We only allow accessing the application via the API Gateway
|
|
@@ -799,27 +798,42 @@ class ApplicationRuntime(RemoteRuntime):
|
|
|
799
798
|
with_mlrun=with_mlrun,
|
|
800
799
|
)
|
|
801
800
|
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
801
|
+
def _ensure_reverse_proxy_configurations(self):
|
|
802
|
+
# If an HTTP trigger already exists in the spec,
|
|
803
|
+
# it means the user explicitly defined a custom configuration,
|
|
804
|
+
# so, skip automatic creation.
|
|
805
|
+
skip_http_trigger_creation = False
|
|
806
|
+
for key, value in self.spec.config.items():
|
|
807
|
+
if key.startswith("spec.triggers"):
|
|
808
|
+
if isinstance(value, dict):
|
|
809
|
+
if value.get("kind") == "http":
|
|
810
|
+
skip_http_trigger_creation = True
|
|
811
|
+
break
|
|
812
|
+
if not skip_http_trigger_creation:
|
|
813
|
+
self.with_http(
|
|
814
|
+
workers=mlrun.mlconf.function.application.default_worker_number,
|
|
815
|
+
trigger_name="application-http",
|
|
816
|
+
)
|
|
817
|
+
|
|
818
|
+
if self.spec.build.functionSourceCode or self.status.container_image:
|
|
805
819
|
return
|
|
806
820
|
|
|
807
821
|
filename, handler = ApplicationRuntime.get_filename_and_handler()
|
|
808
822
|
name, spec, code = nuclio.build_file(
|
|
809
823
|
filename,
|
|
810
|
-
name=
|
|
824
|
+
name=self.metadata.name,
|
|
811
825
|
handler=handler,
|
|
812
826
|
)
|
|
813
|
-
|
|
814
|
-
|
|
827
|
+
self.spec.function_handler = mlrun.utils.get_in(spec, "spec.handler")
|
|
828
|
+
self.spec.build.functionSourceCode = mlrun.utils.get_in(
|
|
815
829
|
spec, "spec.build.functionSourceCode"
|
|
816
830
|
)
|
|
817
|
-
|
|
831
|
+
self.spec.nuclio_runtime = mlrun.utils.get_in(spec, "spec.runtime")
|
|
818
832
|
|
|
819
833
|
# default the reverse proxy logger level to info
|
|
820
834
|
logger_sinks_key = "spec.loggerSinks"
|
|
821
|
-
if not
|
|
822
|
-
|
|
835
|
+
if not self.spec.config.get(logger_sinks_key):
|
|
836
|
+
self.set_config(
|
|
823
837
|
logger_sinks_key, [{"level": "info", "sink": "myStdoutLoggerSink"}]
|
|
824
838
|
)
|
|
825
839
|
|
|
@@ -1224,11 +1224,6 @@ class RemoteRuntime(KubeResource):
|
|
|
1224
1224
|
# try to infer the invocation url from the internal and if not exists, use external.
|
|
1225
1225
|
# $$$$ we do not want to use the external invocation url (e.g.: ingress, nodePort, etc.)
|
|
1226
1226
|
|
|
1227
|
-
# check function state before invocation
|
|
1228
|
-
state, _, _ = self._get_state()
|
|
1229
|
-
if state not in ["ready", "scaledToZero"]:
|
|
1230
|
-
logger.warning(f"Function is in the {state} state")
|
|
1231
|
-
|
|
1232
1227
|
# prefer internal invocation url if running inside k8s cluster
|
|
1233
1228
|
if (
|
|
1234
1229
|
not force_external_address
|
mlrun/runtimes/nuclio/serving.py
CHANGED
|
@@ -679,9 +679,13 @@ class ServingRuntime(RemoteRuntime):
|
|
|
679
679
|
f"function {function} is used in steps and is not defined, "
|
|
680
680
|
"use the .add_child_function() to specify child function attributes"
|
|
681
681
|
)
|
|
682
|
-
if
|
|
683
|
-
isinstance(
|
|
684
|
-
|
|
682
|
+
if (
|
|
683
|
+
isinstance(self.spec.graph, RootFlowStep)
|
|
684
|
+
and any(
|
|
685
|
+
isinstance(step_type, mlrun.serving.states.ModelRunnerStep)
|
|
686
|
+
for step_type in self.spec.graph.steps.values()
|
|
687
|
+
)
|
|
688
|
+
and self.spec.build.functionSourceCode
|
|
685
689
|
):
|
|
686
690
|
# Add import for LLModel
|
|
687
691
|
decoded_code = b64decode(self.spec.build.functionSourceCode).decode("utf-8")
|
mlrun/secrets.py
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
|
|
14
|
+
import json
|
|
15
15
|
from ast import literal_eval
|
|
16
|
-
from os import environ
|
|
16
|
+
from os import environ
|
|
17
17
|
from typing import Callable, Optional, Union
|
|
18
18
|
|
|
19
19
|
from .utils import AzureVaultStore, list2dict
|
|
@@ -161,6 +161,9 @@ def get_secret_or_env(
|
|
|
161
161
|
4. An MLRun-generated env. variable, mounted from a project secret (to be used in MLRun runtimes)
|
|
162
162
|
5. The default value
|
|
163
163
|
|
|
164
|
+
Also supports discovering the value inside any environment variable that contains a JSON-encoded list
|
|
165
|
+
of dicts with fields: {'name': 'KEY', 'value': 'VAL', 'value_from': ...}. This fallback is applied
|
|
166
|
+
after checking normal environment variables and before returning the default.
|
|
164
167
|
Example::
|
|
165
168
|
|
|
166
169
|
secrets = {"KEY1": "VALUE1"}
|
|
@@ -187,18 +190,56 @@ def get_secret_or_env(
|
|
|
187
190
|
if prefix:
|
|
188
191
|
key = f"{prefix}_{key}"
|
|
189
192
|
|
|
190
|
-
value = None
|
|
191
193
|
if secret_provider:
|
|
192
194
|
if isinstance(secret_provider, (dict, SecretsStore)):
|
|
193
|
-
|
|
195
|
+
secret_value = secret_provider.get(key)
|
|
194
196
|
else:
|
|
195
|
-
|
|
196
|
-
if
|
|
197
|
-
return
|
|
197
|
+
secret_value = secret_provider(key)
|
|
198
|
+
if secret_value:
|
|
199
|
+
return secret_value
|
|
200
|
+
|
|
201
|
+
direct_environment_value = environ.get(key)
|
|
202
|
+
if direct_environment_value:
|
|
203
|
+
return direct_environment_value
|
|
204
|
+
|
|
205
|
+
json_list_value = _find_value_in_json_env_lists(key)
|
|
206
|
+
if json_list_value is not None:
|
|
207
|
+
return json_list_value
|
|
208
|
+
|
|
209
|
+
mlrun_env_key = SecretsStore.k8s_env_variable_name_for_secret(key)
|
|
210
|
+
mlrun_env_value = environ.get(mlrun_env_key)
|
|
211
|
+
if mlrun_env_value:
|
|
212
|
+
return mlrun_env_value
|
|
198
213
|
|
|
199
|
-
return
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
214
|
+
return default
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
def _find_value_in_json_env_lists(
|
|
218
|
+
secret_name: str,
|
|
219
|
+
) -> Optional[str]:
|
|
220
|
+
"""
|
|
221
|
+
Scan all environment variables. If any env var contains a JSON-encoded list
|
|
222
|
+
of dicts shaped like {'name': str, 'value': str|None, 'value_from': ...},
|
|
223
|
+
return the 'value' for the entry whose 'name' matches secret_name.
|
|
224
|
+
"""
|
|
225
|
+
for environment_variable_value in environ.values():
|
|
226
|
+
if not environment_variable_value or not isinstance(
|
|
227
|
+
environment_variable_value, str
|
|
228
|
+
):
|
|
229
|
+
continue
|
|
230
|
+
# Fast precheck to skip obvious non-JSON strings
|
|
231
|
+
first_char = environment_variable_value.lstrip()[:1]
|
|
232
|
+
if first_char not in ("[", "{"):
|
|
233
|
+
continue
|
|
234
|
+
try:
|
|
235
|
+
parsed_value = json.loads(environment_variable_value)
|
|
236
|
+
except ValueError:
|
|
237
|
+
continue
|
|
238
|
+
if isinstance(parsed_value, list):
|
|
239
|
+
for entry in parsed_value:
|
|
240
|
+
if isinstance(entry, dict) and entry.get("name") == secret_name:
|
|
241
|
+
value_in_entry = entry.get("value")
|
|
242
|
+
# Match original semantics: empty string is treated as "not found"
|
|
243
|
+
if value_in_entry:
|
|
244
|
+
return value_in_entry
|
|
245
|
+
return None
|
mlrun/serving/server.py
CHANGED
|
@@ -584,6 +584,16 @@ async def async_execute_graph(
|
|
|
584
584
|
read_as_lists: bool,
|
|
585
585
|
nest_under_inputs: bool,
|
|
586
586
|
) -> list[Any]:
|
|
587
|
+
# Validate that data parameter is a DataItem and not passed via params
|
|
588
|
+
if not isinstance(data, DataItem):
|
|
589
|
+
raise MLRunInvalidArgumentError(
|
|
590
|
+
f"Parameter 'data' has type hint 'DataItem' but got {type(data).__name__} instead. "
|
|
591
|
+
f"Data files and artifacts must be passed via the 'inputs' parameter, not 'params'. "
|
|
592
|
+
f"The 'params' parameter is for simple configuration values (strings, numbers, booleans), "
|
|
593
|
+
f"while 'inputs' is for data files that need to be loaded. "
|
|
594
|
+
f"Example: run_function(..., inputs={{'data': 'path/to/data.csv'}}, params={{other_config: value}})"
|
|
595
|
+
)
|
|
596
|
+
|
|
587
597
|
spec = mlrun.utils.get_serving_spec()
|
|
588
598
|
modname = None
|
|
589
599
|
code = os.getenv("MLRUN_EXEC_CODE")
|
mlrun/serving/system_steps.py
CHANGED
|
@@ -257,9 +257,10 @@ class MonitoringPreProcessor(storey.MapClass):
|
|
|
257
257
|
].get(
|
|
258
258
|
mlrun.common.schemas.MonitoringData.MODEL_ENDPOINT_UID
|
|
259
259
|
),
|
|
260
|
-
mm_schemas.StreamProcessingEvent.LABELS:
|
|
260
|
+
mm_schemas.StreamProcessingEvent.LABELS: event.body[
|
|
261
261
|
model
|
|
262
|
-
].get(
|
|
262
|
+
].get("labels")
|
|
263
|
+
or {},
|
|
263
264
|
mm_schemas.StreamProcessingEvent.FUNCTION_URI: self.server.function_uri
|
|
264
265
|
if self.server
|
|
265
266
|
else None,
|
|
@@ -301,19 +302,16 @@ class MonitoringPreProcessor(storey.MapClass):
|
|
|
301
302
|
mm_schemas.StreamProcessingEvent.ENDPOINT_ID: monitoring_data[
|
|
302
303
|
model
|
|
303
304
|
].get(mlrun.common.schemas.MonitoringData.MODEL_ENDPOINT_UID),
|
|
304
|
-
mm_schemas.StreamProcessingEvent.LABELS:
|
|
305
|
-
|
|
306
|
-
),
|
|
305
|
+
mm_schemas.StreamProcessingEvent.LABELS: event.body.get("labels")
|
|
306
|
+
or {},
|
|
307
307
|
mm_schemas.StreamProcessingEvent.FUNCTION_URI: self.server.function_uri
|
|
308
308
|
if self.server
|
|
309
309
|
else None,
|
|
310
310
|
mm_schemas.StreamProcessingEvent.REQUEST: request,
|
|
311
311
|
mm_schemas.StreamProcessingEvent.RESPONSE: resp,
|
|
312
|
-
mm_schemas.StreamProcessingEvent.ERROR: event.body
|
|
312
|
+
mm_schemas.StreamProcessingEvent.ERROR: event.body.get(
|
|
313
313
|
mm_schemas.StreamProcessingEvent.ERROR
|
|
314
|
-
|
|
315
|
-
if mm_schemas.StreamProcessingEvent.ERROR in event.body
|
|
316
|
-
else None,
|
|
314
|
+
),
|
|
317
315
|
mm_schemas.StreamProcessingEvent.METRICS: event.body[
|
|
318
316
|
mm_schemas.StreamProcessingEvent.METRICS
|
|
319
317
|
]
|
mlrun/utils/version/version.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
mlrun/__init__.py,sha256=acM2jRv7RCvBROwucuC01Rf_HdvV3xUPtJlQtX_01MY,8076
|
|
2
2
|
mlrun/__main__.py,sha256=wQNaxW7QsqFBtWffnPkw-497fnpsrQzUnscBQQAP_UM,48364
|
|
3
|
-
mlrun/config.py,sha256=
|
|
3
|
+
mlrun/config.py,sha256=7t7F5jsPI1rO78-VzZv3q6QvzTIV6CZPZEQAJTmKwtM,73477
|
|
4
4
|
mlrun/errors.py,sha256=bAk0t_qmCxQSPNK0TugOAfA5R6f0G6OYvEvXUWSJ_5U,9062
|
|
5
5
|
mlrun/execution.py,sha256=Ozu8SjO-nQ6l5vHwqrTQjmP6koMpUqNQpp6qn6jvhVE,58802
|
|
6
6
|
mlrun/features.py,sha256=jMEXo6NB36A6iaxNEJWzdtYwUmglYD90OIKTIEeWhE8,15841
|
|
@@ -9,7 +9,7 @@ mlrun/lists.py,sha256=OlaV2QIFUzmenad9kxNJ3k4whlDyxI3zFbGwr6vpC5Y,8561
|
|
|
9
9
|
mlrun/model.py,sha256=JxYWYfMvRMloVEsxfghjH8gq5vsVCVk-OJmHGhbPJuU,88954
|
|
10
10
|
mlrun/render.py,sha256=5DlhD6JtzHgmj5RVlpaYiHGhX84Q7qdi4RCEUj2UMgw,13195
|
|
11
11
|
mlrun/run.py,sha256=eXmu2C2Z-iWWRkyraYjOoM22lRfnyavOnskylHwPeV8,48948
|
|
12
|
-
mlrun/secrets.py,sha256=
|
|
12
|
+
mlrun/secrets.py,sha256=VFETVDJFZ0AGDivYjhYscO_YHnzeBnAebxlio7Svkq0,9633
|
|
13
13
|
mlrun/alerts/__init__.py,sha256=0gtG1BG0DXxFrXegIkjbM1XEN4sP9ODo0ucXrNld1hU,601
|
|
14
14
|
mlrun/alerts/alert.py,sha256=QQFZGydQbx9RvAaSiaH-ALQZVcDKQX5lgizqj_rXW2k,15948
|
|
15
15
|
mlrun/artifacts/__init__.py,sha256=ZrEUNto7tGdnBGteCp9zOyO8b78z7O3xgcpzUt9UHE4,1240
|
|
@@ -116,10 +116,10 @@ mlrun/datastore/wasbfs/__init__.py,sha256=s5Ul-0kAhYqFjKDR2X0O2vDGDbLQQduElb32Ev
|
|
|
116
116
|
mlrun/datastore/wasbfs/fs.py,sha256=ge8NK__5vTcFT-krI155_8RDUywQw4SIRX6BWATXy9Q,6299
|
|
117
117
|
mlrun/db/__init__.py,sha256=WqJ4x8lqJ7ZoKbhEyFqkYADd9P6E3citckx9e9ZLcIU,1163
|
|
118
118
|
mlrun/db/auth_utils.py,sha256=hpg8D2r82oN0BWabuWN04BTNZ7jYMAF242YSUpK7LFM,5211
|
|
119
|
-
mlrun/db/base.py,sha256=
|
|
119
|
+
mlrun/db/base.py,sha256=8K0KlVfsGce1LgoB7pVOQCmQ2ceBnDz13PJlba1xuSw,32461
|
|
120
120
|
mlrun/db/factory.py,sha256=yP2vVmveUE7LYTCHbS6lQIxP9rW--zdISWuPd_I3d_4,2111
|
|
121
|
-
mlrun/db/httpdb.py,sha256=
|
|
122
|
-
mlrun/db/nopdb.py,sha256=
|
|
121
|
+
mlrun/db/httpdb.py,sha256=QLQDhzALh6NQdpzTSw9H9XfQR9NFvnG1qct9N2dLtsk,239271
|
|
122
|
+
mlrun/db/nopdb.py,sha256=gi6O0ZSxC3PhRBeIjTTL1rIDVHp4GhJLlD1PM1I17Gs,28827
|
|
123
123
|
mlrun/feature_store/__init__.py,sha256=SlI845bWt6xX34SXunHHqhmFAR9-5v2ak8N-qpcAPGo,1328
|
|
124
124
|
mlrun/feature_store/api.py,sha256=qKj5Tk6prTab6XWatWhBuPRVp0eJEctoxRMN2wz48vA,32168
|
|
125
125
|
mlrun/feature_store/common.py,sha256=JlQA7XWkg9fLuw7cXFmWpUneQqM3NBhwv7DU_xlenWI,12819
|
|
@@ -236,7 +236,7 @@ mlrun/model_monitoring/stream_processing.py,sha256=bryYO3D0cC10MAQ-liHxUZ79MrL-V
|
|
|
236
236
|
mlrun/model_monitoring/writer.py,sha256=l2D_5Ms5Wq5jfyQRVJbGBBRTMLjMmIAxwPeHWmrc9Kg,16382
|
|
237
237
|
mlrun/model_monitoring/applications/__init__.py,sha256=BwlmRELlFJf2b2YMyv5kUSHNe8--OyqWhDgRlT8a_8g,779
|
|
238
238
|
mlrun/model_monitoring/applications/_application_steps.py,sha256=t9LDIqQUGE10cyjyhlg0QqN1yVx0apD1HpERYLJfm8U,7409
|
|
239
|
-
mlrun/model_monitoring/applications/base.py,sha256=
|
|
239
|
+
mlrun/model_monitoring/applications/base.py,sha256=f3WWMoXinsqzWtYebQnsMCGhi7M50E8LdeYmQl5QXjg,51339
|
|
240
240
|
mlrun/model_monitoring/applications/context.py,sha256=3W3AW4oyJgx_nW_5mDsV59Iy5D3frkfYMQSc6DgBc4c,17004
|
|
241
241
|
mlrun/model_monitoring/applications/histogram_data_drift.py,sha256=2qgfFmrpHf-x0_EaHD-0T28piwSQzw-HH71aV1GwbZs,15389
|
|
242
242
|
mlrun/model_monitoring/applications/results.py,sha256=LfBQOmkpKGvVGNrcj5QiXsRIG2IRgcv_Xqe4QJBmauk,5699
|
|
@@ -303,11 +303,11 @@ mlrun/runtimes/mpijob/abstract.py,sha256=QjAG4OZ6JEQ58w5-qYNd6hUGwvaW8ynLtlr9jNf
|
|
|
303
303
|
mlrun/runtimes/mpijob/v1.py,sha256=zSlRkiWHz4B3yht66sVf4mlfDs8YT9EnP9DfBLn5VNs,3372
|
|
304
304
|
mlrun/runtimes/nuclio/__init__.py,sha256=osOVMN9paIOuUoOTizmkxMb_OXRP-SlPwXHJSSYK_wk,834
|
|
305
305
|
mlrun/runtimes/nuclio/api_gateway.py,sha256=vH9ClKVP4Mb24rvA67xPuAvAhX-gAv6vVtjVxyplhdc,26969
|
|
306
|
-
mlrun/runtimes/nuclio/function.py,sha256=
|
|
306
|
+
mlrun/runtimes/nuclio/function.py,sha256=6o9SndAkd-k4FyVr4ms_oWL6MuAWMnsrtrEd_fWfnDw,55488
|
|
307
307
|
mlrun/runtimes/nuclio/nuclio.py,sha256=sLK8KdGO1LbftlL3HqPZlFOFTAAuxJACZCVl1c0Ha6E,2942
|
|
308
|
-
mlrun/runtimes/nuclio/serving.py,sha256=
|
|
308
|
+
mlrun/runtimes/nuclio/serving.py,sha256=eXffwn6xTvEwC-HEk42DRxywOrin7RMUze3JWjeBxzA,36429
|
|
309
309
|
mlrun/runtimes/nuclio/application/__init__.py,sha256=rRs5vasy_G9IyoTpYIjYDafGoL6ifFBKgBtsXn31Atw,614
|
|
310
|
-
mlrun/runtimes/nuclio/application/application.py,sha256=
|
|
310
|
+
mlrun/runtimes/nuclio/application/application.py,sha256=usovOWonpzHQ1B_El7l60y-jpUXyYwppjmrHlP5RMW8,33993
|
|
311
311
|
mlrun/runtimes/nuclio/application/reverse_proxy.go,sha256=lEHH74vr2PridIHp1Jkc_NjkrWb5b6zawRrNxHQhwGU,2913
|
|
312
312
|
mlrun/runtimes/sparkjob/__init__.py,sha256=GPP_ekItxiU9Ydn3mJa4Obph02Bg6DO-JYs791_MV58,607
|
|
313
313
|
mlrun/runtimes/sparkjob/spark3job.py,sha256=3dW7RG2T58F2dsUw0TsRvE3SIFcekx3CerLdcaG1f50,41458
|
|
@@ -315,11 +315,11 @@ mlrun/serving/__init__.py,sha256=nriJAcVn5aatwU03T7SsE6ngJEGTxr3wIGt4WuvCCzY,139
|
|
|
315
315
|
mlrun/serving/merger.py,sha256=pfOQoozUyObCTpqXAMk94PmhZefn4bBrKufO3MKnkAc,6193
|
|
316
316
|
mlrun/serving/remote.py,sha256=p29CBtKwbW_l8BzmNg3Uy__0eMf7_OubTMzga_S3EOA,22089
|
|
317
317
|
mlrun/serving/routers.py,sha256=pu5jlSLI4Ml68YP_FMFDhhwPfLcT6lRu5yL5QDgXPHQ,52889
|
|
318
|
-
mlrun/serving/server.py,sha256=
|
|
318
|
+
mlrun/serving/server.py,sha256=7RiXZ1Nf6I_rwZUyTNqVaNEzQmYUTqKLjXXZEM1OwEc,40993
|
|
319
319
|
mlrun/serving/serving_wrapper.py,sha256=UL9hhWCfMPcTJO_XrkvNaFvck1U1E7oS8trTZyak0cA,835
|
|
320
320
|
mlrun/serving/states.py,sha256=Q2Q7o0eJCvnonXd2-sfiv7zhCiyC6xthfW25nzf61KM,138976
|
|
321
321
|
mlrun/serving/steps.py,sha256=zbMgJnu-m4n7vhFRgZkCMMifIsCya-TzAj3Gjc-Fgnc,2193
|
|
322
|
-
mlrun/serving/system_steps.py,sha256=
|
|
322
|
+
mlrun/serving/system_steps.py,sha256=BDCJn73h7cUT5AoSSm25Fjg4WwzcEpMQp-ZjMw9ogEc,20025
|
|
323
323
|
mlrun/serving/utils.py,sha256=Zbfqm8TKNcTE8zRBezVBzpvR2WKeKeIRN7otNIaiYEc,4170
|
|
324
324
|
mlrun/serving/v1_serving.py,sha256=c6J_MtpE-Tqu00-6r4eJOCO6rUasHDal9W2eBIcrl50,11853
|
|
325
325
|
mlrun/serving/v2_serving.py,sha256=FbN5QAurWL_KoKMUgRLV7b227PpnvntY5tPNE36J42E,25270
|
|
@@ -352,11 +352,11 @@ mlrun/utils/notifications/notification/mail.py,sha256=ZyJ3eqd8simxffQmXzqd3bgbAq
|
|
|
352
352
|
mlrun/utils/notifications/notification/slack.py,sha256=wSu_7W0EnGLBNwIgWCYEeTP8j9SPAMPDBnfUcPnVZYA,7299
|
|
353
353
|
mlrun/utils/notifications/notification/webhook.py,sha256=FM5-LQAKAVJKp37MRzR3SsejalcnpM6r_9Oe7znxZEA,5313
|
|
354
354
|
mlrun/utils/version/__init__.py,sha256=YnzE6tlf24uOQ8y7Z7l96QLAI6-QEii7-77g8ynmzy0,613
|
|
355
|
-
mlrun/utils/version/version.json,sha256=
|
|
355
|
+
mlrun/utils/version/version.json,sha256=XVTb8THn_xGwKwbjV7Mu2mVTg-z6fmV6gXnUhrvfT6s,90
|
|
356
356
|
mlrun/utils/version/version.py,sha256=M2hVhRrgkN3SxacZHs3ZqaOsqAA7B6a22ne324IQ1HE,1877
|
|
357
|
-
mlrun-1.10.
|
|
358
|
-
mlrun-1.10.
|
|
359
|
-
mlrun-1.10.
|
|
360
|
-
mlrun-1.10.
|
|
361
|
-
mlrun-1.10.
|
|
362
|
-
mlrun-1.10.
|
|
357
|
+
mlrun-1.10.0rc37.dist-info/licenses/LICENSE,sha256=zTiv1CxWNkOk1q8eJS1G_8oD4gWpWLwWxj_Agcsi8Os,11337
|
|
358
|
+
mlrun-1.10.0rc37.dist-info/METADATA,sha256=mZhr0TYnjpEVjpPTy6JYYXqs4dnp0q4X7Hu7TPQ5R8M,26104
|
|
359
|
+
mlrun-1.10.0rc37.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
360
|
+
mlrun-1.10.0rc37.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
|
|
361
|
+
mlrun-1.10.0rc37.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
|
|
362
|
+
mlrun-1.10.0rc37.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|