mlrun 1.9.0rc4__py3-none-any.whl → 1.10.0rc2__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.

Files changed (193) hide show
  1. mlrun/__main__.py +13 -2
  2. mlrun/api/schemas/__init__.py +0 -1
  3. mlrun/common/__init__.py +0 -1
  4. mlrun/common/constants.py +7 -0
  5. mlrun/common/db/__init__.py +0 -1
  6. mlrun/common/db/sql_session.py +0 -1
  7. mlrun/common/formatters/__init__.py +0 -1
  8. mlrun/common/formatters/artifact.py +0 -1
  9. mlrun/common/formatters/base.py +0 -1
  10. mlrun/common/formatters/feature_set.py +0 -1
  11. mlrun/common/formatters/function.py +0 -1
  12. mlrun/common/formatters/model_endpoint.py +0 -1
  13. mlrun/common/formatters/pipeline.py +0 -1
  14. mlrun/common/formatters/project.py +0 -1
  15. mlrun/common/formatters/run.py +0 -2
  16. mlrun/common/runtimes/constants.py +9 -2
  17. mlrun/common/schemas/__init__.py +2 -0
  18. mlrun/common/schemas/alert.py +1 -1
  19. mlrun/common/schemas/api_gateway.py +1 -1
  20. mlrun/common/schemas/artifact.py +1 -1
  21. mlrun/common/schemas/auth.py +1 -1
  22. mlrun/common/schemas/background_task.py +1 -1
  23. mlrun/common/schemas/client_spec.py +1 -1
  24. mlrun/common/schemas/clusterization_spec.py +1 -1
  25. mlrun/common/schemas/constants.py +1 -1
  26. mlrun/common/schemas/datastore_profile.py +0 -1
  27. mlrun/common/schemas/events.py +1 -1
  28. mlrun/common/schemas/feature_store.py +1 -1
  29. mlrun/common/schemas/frontend_spec.py +1 -1
  30. mlrun/common/schemas/function.py +1 -1
  31. mlrun/common/schemas/http.py +1 -1
  32. mlrun/common/schemas/hub.py +1 -1
  33. mlrun/common/schemas/k8s.py +1 -1
  34. mlrun/common/schemas/memory_reports.py +0 -1
  35. mlrun/common/schemas/notification.py +4 -0
  36. mlrun/common/schemas/object.py +1 -1
  37. mlrun/common/schemas/partition.py +1 -1
  38. mlrun/common/schemas/pipeline.py +1 -1
  39. mlrun/common/schemas/project.py +1 -1
  40. mlrun/common/schemas/regex.py +1 -1
  41. mlrun/common/schemas/runtime_resource.py +1 -1
  42. mlrun/common/schemas/schedule.py +1 -1
  43. mlrun/common/schemas/secret.py +1 -1
  44. mlrun/common/schemas/serving.py +17 -0
  45. mlrun/common/schemas/tag.py +0 -1
  46. mlrun/common/schemas/workflow.py +1 -1
  47. mlrun/common/secrets.py +0 -1
  48. mlrun/config.py +9 -11
  49. mlrun/data_types/infer.py +1 -1
  50. mlrun/data_types/spark.py +1 -1
  51. mlrun/datastore/datastore.py +1 -1
  52. mlrun/datastore/datastore_profile.py +5 -55
  53. mlrun/datastore/snowflake_utils.py +0 -1
  54. mlrun/datastore/sources.py +21 -13
  55. mlrun/datastore/spark_utils.py +0 -1
  56. mlrun/datastore/utils.py +20 -5
  57. mlrun/db/base.py +1 -1
  58. mlrun/db/httpdb.py +17 -12
  59. mlrun/db/nopdb.py +1 -2
  60. mlrun/errors.py +8 -1
  61. mlrun/execution.py +22 -1
  62. mlrun/feature_store/feature_set.py +0 -12
  63. mlrun/feature_store/retrieval/base.py +1 -1
  64. mlrun/feature_store/retrieval/dask_merger.py +1 -1
  65. mlrun/feature_store/retrieval/job.py +1 -1
  66. mlrun/feature_store/retrieval/spark_merger.py +0 -2
  67. mlrun/feature_store/steps.py +1 -1
  68. mlrun/features.py +1 -1
  69. mlrun/frameworks/_common/artifacts_library.py +1 -1
  70. mlrun/frameworks/_common/mlrun_interface.py +1 -1
  71. mlrun/frameworks/_common/model_handler.py +3 -3
  72. mlrun/frameworks/_common/producer.py +0 -1
  73. mlrun/frameworks/_common/utils.py +1 -1
  74. mlrun/frameworks/_dl_common/loggers/logger.py +0 -1
  75. mlrun/frameworks/_dl_common/loggers/mlrun_logger.py +1 -1
  76. mlrun/frameworks/_dl_common/loggers/tensorboard_logger.py +1 -1
  77. mlrun/frameworks/_dl_common/model_handler.py +1 -1
  78. mlrun/frameworks/_dl_common/utils.py +1 -1
  79. mlrun/frameworks/_ml_common/artifacts_library.py +1 -1
  80. mlrun/frameworks/_ml_common/loggers/logger.py +0 -1
  81. mlrun/frameworks/_ml_common/loggers/mlrun_logger.py +1 -1
  82. mlrun/frameworks/_ml_common/model_handler.py +1 -1
  83. mlrun/frameworks/_ml_common/pkl_model_server.py +1 -1
  84. mlrun/frameworks/_ml_common/plan.py +1 -1
  85. mlrun/frameworks/_ml_common/plans/calibration_curve_plan.py +0 -1
  86. mlrun/frameworks/_ml_common/plans/confusion_matrix_plan.py +0 -1
  87. mlrun/frameworks/_ml_common/plans/dataset_plan.py +1 -1
  88. mlrun/frameworks/_ml_common/plans/feature_importance_plan.py +1 -1
  89. mlrun/frameworks/_ml_common/plans/roc_curve_plan.py +1 -1
  90. mlrun/frameworks/_ml_common/producer.py +1 -1
  91. mlrun/frameworks/_ml_common/utils.py +1 -1
  92. mlrun/frameworks/lgbm/callbacks/callback.py +1 -1
  93. mlrun/frameworks/lgbm/callbacks/logging_callback.py +0 -1
  94. mlrun/frameworks/lgbm/callbacks/mlrun_logging_callback.py +0 -1
  95. mlrun/frameworks/lgbm/mlrun_interfaces/booster_mlrun_interface.py +1 -1
  96. mlrun/frameworks/lgbm/mlrun_interfaces/mlrun_interface.py +1 -1
  97. mlrun/frameworks/lgbm/mlrun_interfaces/model_mlrun_interface.py +1 -1
  98. mlrun/frameworks/lgbm/model_handler.py +1 -1
  99. mlrun/frameworks/lgbm/model_server.py +1 -1
  100. mlrun/frameworks/lgbm/utils.py +1 -1
  101. mlrun/frameworks/onnx/dataset.py +1 -1
  102. mlrun/frameworks/onnx/mlrun_interface.py +1 -1
  103. mlrun/frameworks/onnx/model_handler.py +1 -1
  104. mlrun/frameworks/onnx/model_server.py +1 -1
  105. mlrun/frameworks/pytorch/callbacks/callback.py +1 -1
  106. mlrun/frameworks/pytorch/callbacks/logging_callback.py +1 -1
  107. mlrun/frameworks/pytorch/callbacks/mlrun_logging_callback.py +1 -1
  108. mlrun/frameworks/pytorch/callbacks/tensorboard_logging_callback.py +1 -1
  109. mlrun/frameworks/pytorch/callbacks_handler.py +1 -1
  110. mlrun/frameworks/pytorch/mlrun_interface.py +1 -1
  111. mlrun/frameworks/pytorch/model_handler.py +1 -1
  112. mlrun/frameworks/pytorch/model_server.py +1 -1
  113. mlrun/frameworks/pytorch/utils.py +1 -1
  114. mlrun/frameworks/sklearn/__init__.py +0 -14
  115. mlrun/frameworks/sklearn/estimator.py +1 -1
  116. mlrun/frameworks/sklearn/metric.py +1 -1
  117. mlrun/frameworks/sklearn/metrics_library.py +1 -1
  118. mlrun/frameworks/sklearn/mlrun_interface.py +1 -1
  119. mlrun/frameworks/sklearn/model_handler.py +1 -1
  120. mlrun/frameworks/sklearn/utils.py +1 -1
  121. mlrun/frameworks/tf_keras/callbacks/logging_callback.py +1 -1
  122. mlrun/frameworks/tf_keras/callbacks/mlrun_logging_callback.py +1 -1
  123. mlrun/frameworks/tf_keras/callbacks/tensorboard_logging_callback.py +1 -1
  124. mlrun/frameworks/tf_keras/mlrun_interface.py +1 -1
  125. mlrun/frameworks/tf_keras/model_handler.py +1 -1
  126. mlrun/frameworks/tf_keras/model_server.py +1 -1
  127. mlrun/frameworks/tf_keras/utils.py +1 -1
  128. mlrun/frameworks/xgboost/mlrun_interface.py +1 -1
  129. mlrun/frameworks/xgboost/model_handler.py +1 -1
  130. mlrun/frameworks/xgboost/utils.py +1 -1
  131. mlrun/k8s_utils.py +340 -0
  132. mlrun/launcher/base.py +3 -3
  133. mlrun/launcher/client.py +1 -1
  134. mlrun/launcher/local.py +2 -2
  135. mlrun/launcher/remote.py +2 -2
  136. mlrun/model.py +14 -0
  137. mlrun/model_monitoring/applications/__init__.py +0 -1
  138. mlrun/model_monitoring/applications/_application_steps.py +3 -1
  139. mlrun/model_monitoring/applications/evidently/base.py +59 -71
  140. mlrun/model_monitoring/controller.py +26 -13
  141. mlrun/model_monitoring/db/tsdb/v3io/v3io_connector.py +13 -5
  142. mlrun/package/context_handler.py +1 -1
  143. mlrun/package/errors.py +1 -1
  144. mlrun/package/packager.py +1 -1
  145. mlrun/package/packagers/default_packager.py +1 -1
  146. mlrun/package/packagers/numpy_packagers.py +1 -1
  147. mlrun/package/packagers/pandas_packagers.py +1 -1
  148. mlrun/package/packagers/python_standard_library_packagers.py +1 -1
  149. mlrun/package/packagers_manager.py +1 -1
  150. mlrun/package/utils/_archiver.py +1 -1
  151. mlrun/package/utils/_formatter.py +1 -1
  152. mlrun/package/utils/_pickler.py +1 -1
  153. mlrun/package/utils/_supported_format.py +1 -1
  154. mlrun/package/utils/log_hint_utils.py +1 -1
  155. mlrun/package/utils/type_hint_utils.py +1 -1
  156. mlrun/projects/operations.py +36 -21
  157. mlrun/projects/project.py +147 -92
  158. mlrun/render.py +5 -9
  159. mlrun/run.py +1 -1
  160. mlrun/runtimes/base.py +17 -7
  161. mlrun/runtimes/daskjob.py +2 -1
  162. mlrun/runtimes/databricks_job/databricks_cancel_task.py +0 -1
  163. mlrun/runtimes/databricks_job/databricks_runtime.py +2 -1
  164. mlrun/runtimes/databricks_job/databricks_wrapper.py +0 -1
  165. mlrun/runtimes/mounts.py +2 -0
  166. mlrun/runtimes/nuclio/function.py +5 -0
  167. mlrun/runtimes/nuclio/serving.py +1 -1
  168. mlrun/runtimes/pod.py +4 -349
  169. mlrun/runtimes/sparkjob/spark3job.py +0 -12
  170. mlrun/runtimes/utils.py +25 -8
  171. mlrun/serving/merger.py +0 -1
  172. mlrun/serving/remote.py +1 -1
  173. mlrun/serving/serving_wrapper.py +1 -1
  174. mlrun/serving/states.py +142 -9
  175. mlrun/serving/utils.py +1 -1
  176. mlrun/utils/async_http.py +0 -1
  177. mlrun/utils/clones.py +1 -1
  178. mlrun/utils/db.py +1 -1
  179. mlrun/utils/helpers.py +3 -1
  180. mlrun/utils/http.py +0 -1
  181. mlrun/utils/regex.py +0 -1
  182. mlrun/utils/singleton.py +1 -1
  183. mlrun/utils/vault.py +1 -1
  184. mlrun/utils/version/__init__.py +1 -1
  185. mlrun/utils/version/version.json +2 -2
  186. mlrun/utils/version/version.py +1 -1
  187. {mlrun-1.9.0rc4.dist-info → mlrun-1.10.0rc2.dist-info}/METADATA +12 -12
  188. mlrun-1.10.0rc2.dist-info/RECORD +351 -0
  189. {mlrun-1.9.0rc4.dist-info → mlrun-1.10.0rc2.dist-info}/WHEEL +1 -1
  190. mlrun-1.9.0rc4.dist-info/RECORD +0 -351
  191. {mlrun-1.9.0rc4.dist-info → mlrun-1.10.0rc2.dist-info}/entry_points.txt +0 -0
  192. {mlrun-1.9.0rc4.dist-info → mlrun-1.10.0rc2.dist-info}/licenses/LICENSE +0 -0
  193. {mlrun-1.9.0rc4.dist-info → mlrun-1.10.0rc2.dist-info}/top_level.txt +0 -0
mlrun/__main__.py CHANGED
@@ -13,6 +13,8 @@
13
13
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
+ import functools
17
+ import importlib.metadata
16
18
  import json
17
19
  import pathlib
18
20
  import socket
@@ -25,12 +27,14 @@ from pprint import pprint
25
27
  import click
26
28
  import dotenv
27
29
  import pandas as pd
30
+ import semver
28
31
  import yaml
29
32
  from tabulate import tabulate
30
33
 
31
34
  import mlrun
32
35
  import mlrun.common.constants as mlrun_constants
33
36
  import mlrun.common.schemas
37
+ import mlrun.platforms
34
38
  import mlrun.utils.helpers
35
39
  from mlrun.common.helpers import parse_versioned_object_uri
36
40
  from mlrun.runtimes.mounts import auto_mount as auto_mount_modifier
@@ -63,12 +67,19 @@ from .utils.version import Version
63
67
  pd.set_option("mode.chained_assignment", None)
64
68
 
65
69
 
66
- def validate_base_argument(ctx, param, value):
70
+ def validate_base_argument(ctx: click.Context, param: click.Parameter, value: str):
71
+ # click 8.2 expects the context to be passed to make_metavar
72
+ if semver.VersionInfo.parse(
73
+ importlib.metadata.version("click")
74
+ ) < semver.VersionInfo.parse("8.2.0"):
75
+ metavar_func = functools.partial(param.make_metavar)
76
+ else:
77
+ metavar_func = functools.partial(param.make_metavar, ctx)
67
78
  if value and value.startswith("-"):
68
79
  raise click.BadParameter(
69
80
  f"{param.human_readable_name} ({value}) cannot start with '-', ensure the command options are typed "
70
81
  f"correctly. Preferably use '--' to separate options and arguments "
71
- f"e.g. 'mlrun run --option1 --option2 -- {param.make_metavar()} [--arg1|arg1] [--arg2|arg2]'",
82
+ f"e.g. 'mlrun run --option1 --option2 -- {metavar_func()} [--arg1|arg1] [--arg2|arg2]'",
72
83
  ctx=ctx,
73
84
  param=param,
74
85
  )
@@ -11,7 +11,6 @@
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
- #
15
14
 
16
15
  """
17
16
  Schemas were moved to mlrun.common.schemas.
mlrun/common/__init__.py CHANGED
@@ -11,4 +11,3 @@
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
- #
mlrun/common/constants.py CHANGED
@@ -90,6 +90,13 @@ class MLRunInternalLabels:
90
90
  if not key.startswith("__") and isinstance(value, str)
91
91
  ]
92
92
 
93
+ @staticmethod
94
+ def default_run_labels_to_enrich():
95
+ return [
96
+ MLRunInternalLabels.owner,
97
+ MLRunInternalLabels.v3io_user,
98
+ ]
99
+
93
100
 
94
101
  class DeployStatusTextKind(mlrun.common.types.StrEnum):
95
102
  logs = "logs"
@@ -11,4 +11,3 @@
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
- #
@@ -12,7 +12,6 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
-
16
15
  from sqlalchemy import create_engine
17
16
  from sqlalchemy.engine import Engine
18
17
  from sqlalchemy.orm import Session
@@ -11,7 +11,6 @@
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
- #
15
14
 
16
15
  from .artifact import ArtifactFormat # noqa
17
16
  from .function import FunctionFormat # noqa
@@ -11,7 +11,6 @@
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
- #
15
14
 
16
15
  import typing
17
16
 
@@ -11,7 +11,6 @@
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
- #
15
14
 
16
15
  import typing
17
16
 
@@ -11,7 +11,6 @@
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
- #
15
14
 
16
15
  import typing
17
16
 
@@ -11,7 +11,6 @@
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
- #
15
14
 
16
15
  import typing
17
16
 
@@ -11,7 +11,6 @@
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
- #
15
14
 
16
15
  import typing
17
16
 
@@ -11,7 +11,6 @@
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
- #
15
14
 
16
15
  import typing
17
16
 
@@ -11,7 +11,6 @@
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
- #
15
14
 
16
15
  import datetime
17
16
  import typing
@@ -11,8 +11,6 @@
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
- #
15
-
16
14
 
17
15
  import mlrun.common.types
18
16
  from mlrun.common.formatters.base import ObjectFormat
@@ -11,10 +11,12 @@
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
+
15
15
  import enum
16
16
  import typing
17
17
 
18
+ from deprecated import deprecated
19
+
18
20
  import mlrun.common.constants as mlrun_constants
19
21
  import mlrun_pipelines.common.models
20
22
 
@@ -237,7 +239,12 @@ class RunStates:
237
239
  }[pipeline_run_status]
238
240
 
239
241
 
240
- # TODO: remove this class in 1.9.0 - use only MlrunInternalLabels
242
+ # TODO: remove this class in 1.11.0 - use only MLRunInternalLabels
243
+ @deprecated(
244
+ version="1.9.0",
245
+ reason="This class is deprecated and will be removed in 1.11.0. Use MLRunInternalLabels instead.",
246
+ category=FutureWarning,
247
+ )
241
248
  class RunLabels(enum.Enum):
242
249
  owner = mlrun_constants.MLRunInternalLabels.owner
243
250
  v3io_user = mlrun_constants.MLRunInternalLabels.v3io_user
@@ -17,6 +17,7 @@ from .alert import (
17
17
  AlertActivations,
18
18
  AlertActiveState,
19
19
  AlertConfig,
20
+ AlertCriteria,
20
21
  AlertNotification,
21
22
  AlertTemplate,
22
23
  Event,
@@ -213,6 +214,7 @@ from .secret import (
213
214
  SecretsData,
214
215
  UserSecretCreationRequest,
215
216
  )
217
+ from .serving import ModelRunnerStepData, MonitoringData
216
218
  from .tag import Tag, TagObjects
217
219
  from .workflow import (
218
220
  GetWorkflowResponse,
@@ -11,7 +11,7 @@
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
+
15
15
  from collections import defaultdict
16
16
  from collections.abc import Iterator
17
17
  from datetime import datetime
@@ -11,7 +11,7 @@
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
+
15
15
  import typing
16
16
  from typing import Optional
17
17
 
@@ -11,7 +11,7 @@
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
+
15
15
  import typing
16
16
 
17
17
  import pydantic.v1
@@ -11,7 +11,7 @@
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
+
15
15
  import typing
16
16
 
17
17
  import pydantic.v1
@@ -11,7 +11,7 @@
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
+
15
15
  import datetime
16
16
  import typing
17
17
 
@@ -11,7 +11,7 @@
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
+
15
15
  import typing
16
16
 
17
17
  import pydantic.v1
@@ -11,7 +11,7 @@
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
+
15
15
  import typing
16
16
 
17
17
  import pydantic.v1
@@ -11,7 +11,7 @@
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
+
15
15
  import mergedeep
16
16
 
17
17
  import mlrun.common.types
@@ -11,7 +11,6 @@
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
- #
15
14
 
16
15
  import typing
17
16
 
@@ -11,7 +11,7 @@
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
+
15
15
  import mlrun.common.types
16
16
 
17
17
 
@@ -11,7 +11,7 @@
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
+
15
15
  from typing import Optional
16
16
 
17
17
  import pydantic.v1
@@ -11,7 +11,7 @@
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
+
15
15
  import typing
16
16
 
17
17
  import pydantic.v1
@@ -11,7 +11,7 @@
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
+
15
15
  import typing
16
16
 
17
17
  import pydantic.v1
@@ -11,7 +11,7 @@
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
+
15
15
  import mlrun.common.types
16
16
 
17
17
 
@@ -11,7 +11,7 @@
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
+
15
15
  from datetime import datetime, timezone
16
16
  from typing import Optional
17
17
 
@@ -11,7 +11,7 @@
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
+
15
15
  import typing
16
16
 
17
17
  import pydantic.v1
@@ -11,7 +11,6 @@
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
- #
15
14
 
16
15
  import typing
17
16
 
@@ -73,6 +73,10 @@ class NotificationKind(mlrun.common.types.StrEnum):
73
73
  The default is set to True.\n
74
74
  """
75
75
 
76
+ @classmethod
77
+ def alert_notification_kinds(cls) -> list[str]:
78
+ return [cls.git, cls.slack, cls.webhook]
79
+
76
80
 
77
81
  class NotificationSeverity(mlrun.common.types.StrEnum):
78
82
  INFO = "info"
@@ -11,7 +11,7 @@
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
+
15
15
  from datetime import datetime
16
16
  from typing import Optional
17
17
 
@@ -11,7 +11,7 @@
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
+
15
15
  from datetime import datetime, timedelta
16
16
 
17
17
  from mlrun.common.types import StrEnum
@@ -11,7 +11,7 @@
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
+
15
15
  import typing
16
16
 
17
17
  import pydantic.v1
@@ -11,7 +11,7 @@
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
+
15
15
  import datetime
16
16
  import typing
17
17
 
@@ -11,7 +11,7 @@
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
+
15
15
  import mlrun.common.types
16
16
 
17
17
 
@@ -11,7 +11,7 @@
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
+
15
15
  import typing
16
16
 
17
17
  import pydantic.v1
@@ -11,7 +11,7 @@
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
+
15
15
  from datetime import datetime
16
16
  from typing import Any, Literal, Optional, Union
17
17
 
@@ -11,7 +11,7 @@
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
+
15
15
  from typing import Optional
16
16
 
17
17
  from pydantic.v1 import BaseModel, Field
@@ -14,9 +14,26 @@
14
14
 
15
15
  from pydantic.v1 import BaseModel
16
16
 
17
+ from mlrun.common.types import StrEnum
18
+
17
19
  from .background_task import BackgroundTaskList
18
20
 
19
21
 
20
22
  class DeployResponse(BaseModel):
21
23
  data: dict
22
24
  background_tasks: BackgroundTaskList
25
+
26
+
27
+ class ModelRunnerStepData(StrEnum):
28
+ MODELS = "models"
29
+ MONITORING_DATA = "monitoring_data"
30
+
31
+
32
+ class MonitoringData(StrEnum):
33
+ INPUTS = "inputs"
34
+ OUTPUTS = "outputs"
35
+ INPUT_PATH = "input_path"
36
+ CREATION_STRATEGY = "creation_strategy"
37
+ LABELS = "labels"
38
+ MODEL_PATH = "model_path"
39
+ MODEL_ENDPOINT_UID = "model_endpoint_uid"
@@ -11,7 +11,6 @@
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
- #
15
14
 
16
15
  import pydantic.v1
17
16
 
@@ -11,7 +11,7 @@
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
+
15
15
  import typing
16
16
 
17
17
  import pydantic.v1
mlrun/common/secrets.py CHANGED
@@ -11,7 +11,6 @@
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
- #
15
14
 
16
15
  from abc import ABC, abstractmethod
17
16
 
mlrun/config.py CHANGED
@@ -490,6 +490,7 @@ default_config = {
490
490
  # Number of days back to include when calculating the project pipeline summary.
491
491
  "list_pipelines_time_period_in_days": 7,
492
492
  },
493
+ "resource_deletion_batch_size": 10000,
493
494
  },
494
495
  # The API needs to know what is its k8s svc url so it could enrich it in the jobs it creates
495
496
  "api_url": "",
@@ -512,7 +513,7 @@ default_config = {
512
513
  # git+https://github.com/mlrun/mlrun@development. by default uses the version
513
514
  "mlrun_version_specifier": "",
514
515
  "kaniko_image": "gcr.io/kaniko-project/executor:v1.23.2", # kaniko builder image
515
- "kaniko_init_container_image": "alpine:3.18",
516
+ "kaniko_init_container_image": "alpine:3.20",
516
517
  # image for kaniko init container when docker registry is ECR
517
518
  "kaniko_aws_cli_image": "amazon/aws-cli:2.17.16",
518
519
  # kaniko sometimes fails to get filesystem from image, this is a workaround to retry the process
@@ -591,17 +592,17 @@ default_config = {
591
592
  },
592
593
  "writer_stream_args": {
593
594
  "v3io": {
594
- "shard_count": 1,
595
+ "shard_count": 4,
595
596
  "retention_period_hours": 24,
596
- "num_workers": 1,
597
+ "num_workers": 4,
597
598
  "min_replicas": 1,
598
599
  "max_replicas": 1,
599
600
  },
600
601
  "kafka": {
601
- "partition_count": 1,
602
+ "partition_count": 4,
602
603
  # TODO: add retention period configuration
603
604
  "replication_factor": 1,
604
- "num_workers": 1,
605
+ "num_workers": 4,
605
606
  "min_replicas": 1,
606
607
  "max_replicas": 1,
607
608
  },
@@ -1039,12 +1040,9 @@ class Config:
1039
1040
  )
1040
1041
 
1041
1042
  def is_preemption_nodes_configured(self):
1042
- if (
1043
- not self.get_preemptible_tolerations()
1044
- and not self.get_preemptible_node_selector()
1045
- ):
1046
- return False
1047
- return True
1043
+ return (
1044
+ self.get_preemptible_tolerations() or self.get_preemptible_node_selector()
1045
+ )
1048
1046
 
1049
1047
  @staticmethod
1050
1048
  def get_valid_function_priority_class_names():
mlrun/data_types/infer.py CHANGED
@@ -11,7 +11,7 @@
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
+
15
15
  from typing import Optional
16
16
 
17
17
  import numpy as np
mlrun/data_types/spark.py CHANGED
@@ -11,7 +11,7 @@
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
+
15
15
  from datetime import datetime
16
16
  from os import environ
17
17
  from typing import Optional
@@ -111,7 +111,7 @@ def schema_to_store(schema):
111
111
 
112
112
  def uri_to_ipython(link):
113
113
  schema, endpoint, parsed_url = parse_url(link)
114
- if schema in [DB_SCHEMA, "memory"]:
114
+ if schema in [DB_SCHEMA, "memory", "ds"]:
115
115
  return ""
116
116
  return schema_to_store(schema).uri_to_ipython(endpoint, parsed_url.path)
117
117