mlrun 1.7.0rc20__py3-none-any.whl → 1.7.0rc28__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/__main__.py +10 -8
- mlrun/alerts/alert.py +55 -18
- mlrun/api/schemas/__init__.py +3 -3
- mlrun/artifacts/manager.py +26 -0
- mlrun/common/constants.py +3 -2
- mlrun/common/formatters/__init__.py +1 -0
- mlrun/common/formatters/artifact.py +26 -3
- mlrun/common/formatters/base.py +44 -9
- mlrun/common/formatters/function.py +12 -7
- mlrun/common/formatters/run.py +26 -0
- mlrun/common/helpers.py +11 -0
- mlrun/common/schemas/__init__.py +4 -0
- mlrun/common/schemas/alert.py +5 -9
- mlrun/common/schemas/api_gateway.py +64 -16
- mlrun/common/schemas/artifact.py +11 -0
- mlrun/common/schemas/constants.py +3 -0
- mlrun/common/schemas/feature_store.py +58 -28
- mlrun/common/schemas/model_monitoring/constants.py +21 -12
- mlrun/common/schemas/model_monitoring/model_endpoints.py +0 -12
- mlrun/common/schemas/pipeline.py +16 -0
- mlrun/common/schemas/project.py +17 -0
- mlrun/common/schemas/runs.py +17 -0
- mlrun/common/schemas/schedule.py +1 -1
- mlrun/common/types.py +6 -0
- mlrun/config.py +17 -25
- mlrun/datastore/azure_blob.py +2 -1
- mlrun/datastore/datastore.py +3 -3
- mlrun/datastore/google_cloud_storage.py +6 -2
- mlrun/datastore/snowflake_utils.py +3 -1
- mlrun/datastore/sources.py +26 -11
- mlrun/datastore/store_resources.py +2 -0
- mlrun/datastore/targets.py +68 -16
- mlrun/db/base.py +83 -2
- mlrun/db/httpdb.py +280 -63
- mlrun/db/nopdb.py +60 -3
- mlrun/errors.py +5 -3
- mlrun/execution.py +28 -13
- mlrun/feature_store/feature_vector.py +8 -0
- mlrun/feature_store/retrieval/spark_merger.py +13 -2
- mlrun/launcher/local.py +4 -0
- mlrun/launcher/remote.py +1 -0
- mlrun/model.py +32 -3
- mlrun/model_monitoring/api.py +7 -52
- mlrun/model_monitoring/applications/base.py +5 -7
- mlrun/model_monitoring/applications/histogram_data_drift.py +1 -1
- mlrun/model_monitoring/db/stores/__init__.py +37 -24
- mlrun/model_monitoring/db/stores/base/store.py +40 -1
- mlrun/model_monitoring/db/stores/sqldb/sql_store.py +42 -87
- mlrun/model_monitoring/db/stores/v3io_kv/kv_store.py +27 -35
- mlrun/model_monitoring/db/tsdb/__init__.py +15 -15
- mlrun/model_monitoring/db/tsdb/base.py +1 -14
- mlrun/model_monitoring/db/tsdb/tdengine/tdengine_connector.py +22 -18
- mlrun/model_monitoring/db/tsdb/v3io/v3io_connector.py +86 -56
- mlrun/model_monitoring/helpers.py +34 -9
- mlrun/model_monitoring/stream_processing.py +12 -11
- mlrun/model_monitoring/writer.py +11 -11
- mlrun/projects/operations.py +5 -0
- mlrun/projects/pipelines.py +35 -21
- mlrun/projects/project.py +216 -107
- mlrun/render.py +10 -5
- mlrun/run.py +15 -5
- mlrun/runtimes/__init__.py +2 -0
- mlrun/runtimes/base.py +17 -4
- mlrun/runtimes/daskjob.py +8 -1
- mlrun/runtimes/databricks_job/databricks_runtime.py +1 -0
- mlrun/runtimes/local.py +23 -4
- mlrun/runtimes/nuclio/application/application.py +0 -2
- mlrun/runtimes/nuclio/function.py +31 -2
- mlrun/runtimes/nuclio/serving.py +9 -6
- mlrun/runtimes/pod.py +5 -29
- mlrun/runtimes/remotesparkjob.py +8 -2
- mlrun/serving/__init__.py +8 -1
- mlrun/serving/routers.py +75 -59
- mlrun/serving/server.py +11 -0
- mlrun/serving/states.py +80 -8
- mlrun/serving/utils.py +19 -11
- mlrun/serving/v2_serving.py +66 -39
- mlrun/utils/helpers.py +91 -11
- mlrun/utils/logger.py +36 -2
- mlrun/utils/notifications/notification/base.py +43 -7
- mlrun/utils/notifications/notification/git.py +21 -0
- mlrun/utils/notifications/notification/slack.py +9 -14
- mlrun/utils/notifications/notification/webhook.py +41 -1
- mlrun/utils/notifications/notification_pusher.py +3 -9
- mlrun/utils/regex.py +9 -0
- mlrun/utils/version/version.json +2 -2
- {mlrun-1.7.0rc20.dist-info → mlrun-1.7.0rc28.dist-info}/METADATA +16 -9
- {mlrun-1.7.0rc20.dist-info → mlrun-1.7.0rc28.dist-info}/RECORD +92 -91
- {mlrun-1.7.0rc20.dist-info → mlrun-1.7.0rc28.dist-info}/WHEEL +1 -1
- {mlrun-1.7.0rc20.dist-info → mlrun-1.7.0rc28.dist-info}/LICENSE +0 -0
- {mlrun-1.7.0rc20.dist-info → mlrun-1.7.0rc28.dist-info}/entry_points.txt +0 -0
- {mlrun-1.7.0rc20.dist-info → mlrun-1.7.0rc28.dist-info}/top_level.txt +0 -0
mlrun/projects/pipelines.py
CHANGED
|
@@ -22,8 +22,7 @@ import uuid
|
|
|
22
22
|
|
|
23
23
|
import mlrun_pipelines.common.models
|
|
24
24
|
import mlrun_pipelines.patcher
|
|
25
|
-
|
|
26
|
-
from mlrun_pipelines.helpers import new_pipe_metadata
|
|
25
|
+
import mlrun_pipelines.utils
|
|
27
26
|
|
|
28
27
|
import mlrun
|
|
29
28
|
import mlrun.common.runtimes.constants
|
|
@@ -220,9 +219,10 @@ class _PipelineContext:
|
|
|
220
219
|
force_run_local = mlrun.mlconf.force_run_local
|
|
221
220
|
if force_run_local is None or force_run_local == "auto":
|
|
222
221
|
force_run_local = not mlrun.mlconf.is_api_running_on_k8s()
|
|
223
|
-
|
|
224
|
-
|
|
222
|
+
if not mlrun.mlconf.kfp_url:
|
|
223
|
+
logger.debug("Kubeflow pipeline URL is not set, running locally")
|
|
225
224
|
force_run_local = True
|
|
225
|
+
|
|
226
226
|
if self.workflow:
|
|
227
227
|
force_run_local = force_run_local or self.workflow.run_local
|
|
228
228
|
|
|
@@ -444,6 +444,7 @@ class _PipelineRunner(abc.ABC):
|
|
|
444
444
|
namespace=None,
|
|
445
445
|
source=None,
|
|
446
446
|
notifications: list[mlrun.model.Notification] = None,
|
|
447
|
+
send_start_notification: bool = True,
|
|
447
448
|
) -> _PipelineRunStatus:
|
|
448
449
|
pass
|
|
449
450
|
|
|
@@ -501,13 +502,14 @@ class _KFPRunner(_PipelineRunner):
|
|
|
501
502
|
functions,
|
|
502
503
|
secrets=project._secrets,
|
|
503
504
|
)
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
conf = new_pipe_metadata(
|
|
507
|
-
artifact_path=artifact_path,
|
|
505
|
+
mlrun_pipelines.utils.compile_pipeline(
|
|
506
|
+
artifact_path=artifact_path or project.spec.artifact_path,
|
|
508
507
|
cleanup_ttl=workflow_spec.cleanup_ttl,
|
|
508
|
+
ops=None,
|
|
509
|
+
pipeline=pipeline,
|
|
510
|
+
pipe_file=target,
|
|
511
|
+
type_check=True,
|
|
509
512
|
)
|
|
510
|
-
compiler.Compiler().compile(pipeline, target, pipeline_conf=conf)
|
|
511
513
|
workflow_spec.clear_tmp()
|
|
512
514
|
pipeline_context.clear()
|
|
513
515
|
|
|
@@ -523,6 +525,7 @@ class _KFPRunner(_PipelineRunner):
|
|
|
523
525
|
namespace=None,
|
|
524
526
|
source=None,
|
|
525
527
|
notifications: list[mlrun.model.Notification] = None,
|
|
528
|
+
send_start_notification: bool = True,
|
|
526
529
|
) -> _PipelineRunStatus:
|
|
527
530
|
pipeline_context.set(project, workflow_spec)
|
|
528
531
|
workflow_handler = _PipelineRunner._get_handler(
|
|
@@ -571,13 +574,13 @@ class _KFPRunner(_PipelineRunner):
|
|
|
571
574
|
func_name=func.metadata.name,
|
|
572
575
|
exc_info=err_to_str(exc),
|
|
573
576
|
)
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
577
|
+
if send_start_notification:
|
|
578
|
+
project.notifiers.push_pipeline_start_message(
|
|
579
|
+
project.metadata.name,
|
|
580
|
+
project.get_param("commit_id", None),
|
|
581
|
+
run_id,
|
|
582
|
+
True,
|
|
583
|
+
)
|
|
581
584
|
pipeline_context.clear()
|
|
582
585
|
return _PipelineRunStatus(run_id, cls, project=project, workflow=workflow_spec)
|
|
583
586
|
|
|
@@ -668,6 +671,7 @@ class _LocalRunner(_PipelineRunner):
|
|
|
668
671
|
namespace=None,
|
|
669
672
|
source=None,
|
|
670
673
|
notifications: list[mlrun.model.Notification] = None,
|
|
674
|
+
send_start_notification: bool = True,
|
|
671
675
|
) -> _PipelineRunStatus:
|
|
672
676
|
pipeline_context.set(project, workflow_spec)
|
|
673
677
|
workflow_handler = _PipelineRunner._get_handler(
|
|
@@ -688,9 +692,11 @@ class _LocalRunner(_PipelineRunner):
|
|
|
688
692
|
original_source = project.spec.source
|
|
689
693
|
project.set_source(source=source)
|
|
690
694
|
pipeline_context.workflow_artifact_path = artifact_path
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
695
|
+
|
|
696
|
+
if send_start_notification:
|
|
697
|
+
project.notifiers.push_pipeline_start_message(
|
|
698
|
+
project.metadata.name, pipeline_id=workflow_id
|
|
699
|
+
)
|
|
694
700
|
err = None
|
|
695
701
|
try:
|
|
696
702
|
workflow_handler(**workflow_spec.args)
|
|
@@ -758,13 +764,21 @@ class _RemoteRunner(_PipelineRunner):
|
|
|
758
764
|
namespace: str = None,
|
|
759
765
|
source: str = None,
|
|
760
766
|
notifications: list[mlrun.model.Notification] = None,
|
|
767
|
+
send_start_notification: bool = True,
|
|
761
768
|
) -> typing.Optional[_PipelineRunStatus]:
|
|
762
769
|
workflow_name = normalize_workflow_name(name=name, project_name=project.name)
|
|
763
770
|
workflow_id = None
|
|
764
771
|
|
|
765
772
|
# for start message, fallback to old notification behavior
|
|
766
|
-
|
|
767
|
-
|
|
773
|
+
if send_start_notification:
|
|
774
|
+
for notification in notifications or []:
|
|
775
|
+
project.notifiers.add_notification(
|
|
776
|
+
notification.kind, notification.params
|
|
777
|
+
)
|
|
778
|
+
# if a notification with `when=running` is provided, it will be used explicitly and others
|
|
779
|
+
# will be ignored
|
|
780
|
+
if "running" in notification.when:
|
|
781
|
+
break
|
|
768
782
|
|
|
769
783
|
# The returned engine for this runner is the engine of the workflow.
|
|
770
784
|
# In this way wait_for_completion/get_run_status would be executed by the correct pipeline runner.
|