mlrun 1.7.2rc3__py3-none-any.whl → 1.8.0__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/__init__.py +26 -22
- mlrun/__main__.py +15 -16
- mlrun/alerts/alert.py +150 -15
- mlrun/api/schemas/__init__.py +1 -9
- mlrun/artifacts/__init__.py +2 -3
- mlrun/artifacts/base.py +62 -19
- mlrun/artifacts/dataset.py +17 -17
- mlrun/artifacts/document.py +454 -0
- mlrun/artifacts/manager.py +28 -18
- mlrun/artifacts/model.py +91 -59
- mlrun/artifacts/plots.py +2 -2
- mlrun/common/constants.py +8 -0
- mlrun/common/formatters/__init__.py +1 -0
- mlrun/common/formatters/artifact.py +1 -1
- mlrun/common/formatters/feature_set.py +2 -0
- mlrun/common/formatters/function.py +1 -0
- mlrun/{model_monitoring/db/stores/v3io_kv/__init__.py → common/formatters/model_endpoint.py} +17 -0
- mlrun/common/formatters/pipeline.py +1 -2
- mlrun/common/formatters/project.py +9 -0
- mlrun/common/model_monitoring/__init__.py +0 -5
- mlrun/common/model_monitoring/helpers.py +12 -62
- mlrun/common/runtimes/constants.py +25 -4
- mlrun/common/schemas/__init__.py +9 -5
- mlrun/common/schemas/alert.py +114 -19
- mlrun/common/schemas/api_gateway.py +3 -3
- mlrun/common/schemas/artifact.py +22 -9
- mlrun/common/schemas/auth.py +8 -4
- mlrun/common/schemas/background_task.py +7 -7
- mlrun/common/schemas/client_spec.py +4 -4
- mlrun/common/schemas/clusterization_spec.py +2 -2
- mlrun/common/schemas/common.py +53 -3
- mlrun/common/schemas/constants.py +15 -0
- mlrun/common/schemas/datastore_profile.py +1 -1
- mlrun/common/schemas/feature_store.py +9 -9
- mlrun/common/schemas/frontend_spec.py +4 -4
- mlrun/common/schemas/function.py +10 -10
- mlrun/common/schemas/hub.py +1 -1
- mlrun/common/schemas/k8s.py +3 -3
- mlrun/common/schemas/memory_reports.py +3 -3
- mlrun/common/schemas/model_monitoring/__init__.py +4 -8
- mlrun/common/schemas/model_monitoring/constants.py +127 -46
- mlrun/common/schemas/model_monitoring/grafana.py +18 -12
- mlrun/common/schemas/model_monitoring/model_endpoints.py +154 -160
- mlrun/common/schemas/notification.py +24 -3
- mlrun/common/schemas/object.py +1 -1
- mlrun/common/schemas/pagination.py +4 -4
- mlrun/common/schemas/partition.py +142 -0
- mlrun/common/schemas/pipeline.py +3 -3
- mlrun/common/schemas/project.py +26 -18
- mlrun/common/schemas/runs.py +3 -3
- mlrun/common/schemas/runtime_resource.py +5 -5
- mlrun/common/schemas/schedule.py +1 -1
- mlrun/common/schemas/secret.py +1 -1
- mlrun/{model_monitoring/db/stores/sqldb/__init__.py → common/schemas/serving.py} +10 -1
- mlrun/common/schemas/tag.py +3 -3
- mlrun/common/schemas/workflow.py +6 -5
- mlrun/common/types.py +1 -0
- mlrun/config.py +157 -89
- mlrun/data_types/__init__.py +5 -3
- mlrun/data_types/infer.py +13 -3
- mlrun/data_types/spark.py +2 -1
- mlrun/datastore/__init__.py +59 -18
- mlrun/datastore/alibaba_oss.py +4 -1
- mlrun/datastore/azure_blob.py +4 -1
- mlrun/datastore/base.py +19 -24
- mlrun/datastore/datastore.py +10 -4
- mlrun/datastore/datastore_profile.py +178 -45
- mlrun/datastore/dbfs_store.py +4 -1
- mlrun/datastore/filestore.py +4 -1
- mlrun/datastore/google_cloud_storage.py +4 -1
- mlrun/datastore/hdfs.py +4 -1
- mlrun/datastore/inmem.py +4 -1
- mlrun/datastore/redis.py +4 -1
- mlrun/datastore/s3.py +14 -3
- mlrun/datastore/sources.py +89 -92
- mlrun/datastore/store_resources.py +7 -4
- mlrun/datastore/storeytargets.py +51 -16
- mlrun/datastore/targets.py +38 -31
- mlrun/datastore/utils.py +87 -4
- mlrun/datastore/v3io.py +4 -1
- mlrun/datastore/vectorstore.py +291 -0
- mlrun/datastore/wasbfs/fs.py +13 -12
- mlrun/db/base.py +286 -100
- mlrun/db/httpdb.py +1562 -490
- mlrun/db/nopdb.py +250 -83
- mlrun/errors.py +6 -2
- mlrun/execution.py +194 -50
- mlrun/feature_store/__init__.py +2 -10
- mlrun/feature_store/api.py +20 -458
- mlrun/feature_store/common.py +9 -9
- mlrun/feature_store/feature_set.py +20 -18
- mlrun/feature_store/feature_vector.py +105 -479
- mlrun/feature_store/feature_vector_utils.py +466 -0
- mlrun/feature_store/retrieval/base.py +15 -11
- mlrun/feature_store/retrieval/job.py +2 -1
- mlrun/feature_store/retrieval/storey_merger.py +1 -1
- mlrun/feature_store/steps.py +3 -3
- mlrun/features.py +30 -13
- mlrun/frameworks/__init__.py +1 -2
- mlrun/frameworks/_common/__init__.py +1 -2
- mlrun/frameworks/_common/artifacts_library.py +2 -2
- mlrun/frameworks/_common/mlrun_interface.py +10 -6
- mlrun/frameworks/_common/model_handler.py +31 -31
- mlrun/frameworks/_common/producer.py +3 -1
- mlrun/frameworks/_dl_common/__init__.py +1 -2
- mlrun/frameworks/_dl_common/loggers/__init__.py +1 -2
- mlrun/frameworks/_dl_common/loggers/mlrun_logger.py +4 -4
- mlrun/frameworks/_dl_common/loggers/tensorboard_logger.py +3 -3
- mlrun/frameworks/_ml_common/__init__.py +1 -2
- mlrun/frameworks/_ml_common/loggers/__init__.py +1 -2
- mlrun/frameworks/_ml_common/model_handler.py +21 -21
- mlrun/frameworks/_ml_common/plans/__init__.py +1 -2
- mlrun/frameworks/_ml_common/plans/confusion_matrix_plan.py +3 -1
- mlrun/frameworks/_ml_common/plans/dataset_plan.py +3 -3
- mlrun/frameworks/_ml_common/plans/roc_curve_plan.py +4 -4
- mlrun/frameworks/auto_mlrun/__init__.py +1 -2
- mlrun/frameworks/auto_mlrun/auto_mlrun.py +22 -15
- mlrun/frameworks/huggingface/__init__.py +1 -2
- mlrun/frameworks/huggingface/model_server.py +9 -9
- mlrun/frameworks/lgbm/__init__.py +47 -44
- mlrun/frameworks/lgbm/callbacks/__init__.py +1 -2
- mlrun/frameworks/lgbm/callbacks/logging_callback.py +4 -2
- mlrun/frameworks/lgbm/callbacks/mlrun_logging_callback.py +4 -2
- mlrun/frameworks/lgbm/mlrun_interfaces/__init__.py +1 -2
- mlrun/frameworks/lgbm/mlrun_interfaces/mlrun_interface.py +5 -5
- mlrun/frameworks/lgbm/model_handler.py +15 -11
- mlrun/frameworks/lgbm/model_server.py +11 -7
- mlrun/frameworks/lgbm/utils.py +2 -2
- mlrun/frameworks/onnx/__init__.py +1 -2
- mlrun/frameworks/onnx/dataset.py +3 -3
- mlrun/frameworks/onnx/mlrun_interface.py +2 -2
- mlrun/frameworks/onnx/model_handler.py +7 -5
- mlrun/frameworks/onnx/model_server.py +8 -6
- mlrun/frameworks/parallel_coordinates.py +11 -11
- mlrun/frameworks/pytorch/__init__.py +22 -23
- mlrun/frameworks/pytorch/callbacks/__init__.py +1 -2
- mlrun/frameworks/pytorch/callbacks/callback.py +2 -1
- mlrun/frameworks/pytorch/callbacks/logging_callback.py +15 -8
- mlrun/frameworks/pytorch/callbacks/mlrun_logging_callback.py +19 -12
- mlrun/frameworks/pytorch/callbacks/tensorboard_logging_callback.py +22 -15
- mlrun/frameworks/pytorch/callbacks_handler.py +36 -30
- mlrun/frameworks/pytorch/mlrun_interface.py +17 -17
- mlrun/frameworks/pytorch/model_handler.py +21 -17
- mlrun/frameworks/pytorch/model_server.py +13 -9
- mlrun/frameworks/sklearn/__init__.py +19 -18
- mlrun/frameworks/sklearn/estimator.py +2 -2
- mlrun/frameworks/sklearn/metric.py +3 -3
- mlrun/frameworks/sklearn/metrics_library.py +8 -6
- mlrun/frameworks/sklearn/mlrun_interface.py +3 -2
- mlrun/frameworks/sklearn/model_handler.py +4 -3
- mlrun/frameworks/tf_keras/__init__.py +11 -12
- mlrun/frameworks/tf_keras/callbacks/__init__.py +1 -2
- mlrun/frameworks/tf_keras/callbacks/logging_callback.py +17 -14
- mlrun/frameworks/tf_keras/callbacks/mlrun_logging_callback.py +15 -12
- mlrun/frameworks/tf_keras/callbacks/tensorboard_logging_callback.py +21 -18
- mlrun/frameworks/tf_keras/model_handler.py +17 -13
- mlrun/frameworks/tf_keras/model_server.py +12 -8
- mlrun/frameworks/xgboost/__init__.py +19 -18
- mlrun/frameworks/xgboost/model_handler.py +13 -9
- mlrun/k8s_utils.py +2 -5
- mlrun/launcher/base.py +3 -4
- mlrun/launcher/client.py +2 -2
- mlrun/launcher/local.py +6 -2
- mlrun/launcher/remote.py +1 -1
- mlrun/lists.py +8 -4
- mlrun/model.py +132 -46
- mlrun/model_monitoring/__init__.py +3 -5
- mlrun/model_monitoring/api.py +113 -98
- mlrun/model_monitoring/applications/__init__.py +0 -5
- mlrun/model_monitoring/applications/_application_steps.py +81 -50
- mlrun/model_monitoring/applications/base.py +467 -14
- mlrun/model_monitoring/applications/context.py +212 -134
- mlrun/model_monitoring/{db/stores/base → applications/evidently}/__init__.py +6 -2
- mlrun/model_monitoring/applications/evidently/base.py +146 -0
- mlrun/model_monitoring/applications/histogram_data_drift.py +89 -56
- mlrun/model_monitoring/applications/results.py +67 -15
- mlrun/model_monitoring/controller.py +701 -315
- mlrun/model_monitoring/db/__init__.py +0 -2
- mlrun/model_monitoring/db/_schedules.py +242 -0
- mlrun/model_monitoring/db/_stats.py +189 -0
- mlrun/model_monitoring/db/tsdb/__init__.py +33 -22
- mlrun/model_monitoring/db/tsdb/base.py +243 -49
- mlrun/model_monitoring/db/tsdb/tdengine/schemas.py +76 -36
- mlrun/model_monitoring/db/tsdb/tdengine/stream_graph_steps.py +33 -0
- mlrun/model_monitoring/db/tsdb/tdengine/tdengine_connection.py +213 -0
- mlrun/model_monitoring/db/tsdb/tdengine/tdengine_connector.py +534 -88
- mlrun/model_monitoring/db/tsdb/v3io/stream_graph_steps.py +1 -0
- mlrun/model_monitoring/db/tsdb/v3io/v3io_connector.py +436 -106
- mlrun/model_monitoring/helpers.py +356 -114
- mlrun/model_monitoring/stream_processing.py +190 -345
- mlrun/model_monitoring/tracking_policy.py +11 -4
- mlrun/model_monitoring/writer.py +49 -90
- mlrun/package/__init__.py +3 -6
- mlrun/package/context_handler.py +2 -2
- mlrun/package/packager.py +12 -9
- mlrun/package/packagers/__init__.py +0 -2
- mlrun/package/packagers/default_packager.py +14 -11
- mlrun/package/packagers/numpy_packagers.py +16 -7
- mlrun/package/packagers/pandas_packagers.py +18 -18
- mlrun/package/packagers/python_standard_library_packagers.py +25 -11
- mlrun/package/packagers_manager.py +35 -32
- mlrun/package/utils/__init__.py +0 -3
- mlrun/package/utils/_pickler.py +6 -6
- mlrun/platforms/__init__.py +47 -16
- mlrun/platforms/iguazio.py +4 -1
- mlrun/projects/operations.py +30 -30
- mlrun/projects/pipelines.py +116 -47
- mlrun/projects/project.py +1292 -329
- mlrun/render.py +5 -9
- mlrun/run.py +57 -14
- mlrun/runtimes/__init__.py +1 -3
- mlrun/runtimes/base.py +30 -22
- mlrun/runtimes/daskjob.py +9 -9
- mlrun/runtimes/databricks_job/databricks_runtime.py +6 -5
- mlrun/runtimes/function_reference.py +5 -2
- mlrun/runtimes/generators.py +3 -2
- mlrun/runtimes/kubejob.py +6 -7
- mlrun/runtimes/mounts.py +574 -0
- mlrun/runtimes/mpijob/__init__.py +0 -2
- mlrun/runtimes/mpijob/abstract.py +7 -6
- mlrun/runtimes/nuclio/api_gateway.py +7 -7
- mlrun/runtimes/nuclio/application/application.py +11 -13
- mlrun/runtimes/nuclio/application/reverse_proxy.go +66 -64
- mlrun/runtimes/nuclio/function.py +127 -70
- mlrun/runtimes/nuclio/serving.py +105 -37
- mlrun/runtimes/pod.py +159 -54
- mlrun/runtimes/remotesparkjob.py +3 -2
- mlrun/runtimes/sparkjob/__init__.py +0 -2
- mlrun/runtimes/sparkjob/spark3job.py +22 -12
- mlrun/runtimes/utils.py +7 -6
- mlrun/secrets.py +2 -2
- mlrun/serving/__init__.py +8 -0
- mlrun/serving/merger.py +7 -5
- mlrun/serving/remote.py +35 -22
- mlrun/serving/routers.py +186 -240
- mlrun/serving/server.py +41 -10
- mlrun/serving/states.py +432 -118
- mlrun/serving/utils.py +13 -2
- mlrun/serving/v1_serving.py +3 -2
- mlrun/serving/v2_serving.py +161 -203
- mlrun/track/__init__.py +1 -1
- mlrun/track/tracker.py +2 -2
- mlrun/track/trackers/mlflow_tracker.py +6 -5
- mlrun/utils/async_http.py +35 -22
- mlrun/utils/clones.py +7 -4
- mlrun/utils/helpers.py +511 -58
- mlrun/utils/logger.py +119 -13
- mlrun/utils/notifications/notification/__init__.py +22 -19
- mlrun/utils/notifications/notification/base.py +39 -15
- mlrun/utils/notifications/notification/console.py +6 -6
- mlrun/utils/notifications/notification/git.py +11 -11
- mlrun/utils/notifications/notification/ipython.py +10 -9
- mlrun/utils/notifications/notification/mail.py +176 -0
- mlrun/utils/notifications/notification/slack.py +16 -8
- mlrun/utils/notifications/notification/webhook.py +24 -8
- mlrun/utils/notifications/notification_pusher.py +191 -200
- mlrun/utils/regex.py +12 -2
- mlrun/utils/version/version.json +2 -2
- {mlrun-1.7.2rc3.dist-info → mlrun-1.8.0.dist-info}/METADATA +81 -54
- mlrun-1.8.0.dist-info/RECORD +351 -0
- {mlrun-1.7.2rc3.dist-info → mlrun-1.8.0.dist-info}/WHEEL +1 -1
- mlrun/model_monitoring/applications/evidently_base.py +0 -137
- mlrun/model_monitoring/db/stores/__init__.py +0 -136
- mlrun/model_monitoring/db/stores/base/store.py +0 -213
- mlrun/model_monitoring/db/stores/sqldb/models/__init__.py +0 -71
- mlrun/model_monitoring/db/stores/sqldb/models/base.py +0 -190
- mlrun/model_monitoring/db/stores/sqldb/models/mysql.py +0 -103
- mlrun/model_monitoring/db/stores/sqldb/models/sqlite.py +0 -40
- mlrun/model_monitoring/db/stores/sqldb/sql_store.py +0 -659
- mlrun/model_monitoring/db/stores/v3io_kv/kv_store.py +0 -726
- mlrun/model_monitoring/model_endpoint.py +0 -118
- mlrun-1.7.2rc3.dist-info/RECORD +0 -351
- {mlrun-1.7.2rc3.dist-info → mlrun-1.8.0.dist-info}/entry_points.txt +0 -0
- {mlrun-1.7.2rc3.dist-info → mlrun-1.8.0.dist-info/licenses}/LICENSE +0 -0
- {mlrun-1.7.2rc3.dist-info → mlrun-1.8.0.dist-info}/top_level.txt +0 -0
mlrun/common/schemas/project.py
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import datetime
|
|
16
16
|
import typing
|
|
17
17
|
|
|
18
|
-
import pydantic
|
|
18
|
+
import pydantic.v1
|
|
19
19
|
from deprecated import deprecated
|
|
20
20
|
|
|
21
21
|
import mlrun.common.types
|
|
@@ -26,7 +26,7 @@ from .object import ObjectKind, ObjectStatus
|
|
|
26
26
|
|
|
27
27
|
@deprecated(
|
|
28
28
|
version="1.7.0",
|
|
29
|
-
reason="mlrun.common.schemas.ProjectsFormat is deprecated and will be removed in 1.
|
|
29
|
+
reason="mlrun.common.schemas.ProjectsFormat is deprecated and will be removed in 1.10.0. "
|
|
30
30
|
"Use mlrun.common.formatters.ProjectFormat instead.",
|
|
31
31
|
category=FutureWarning,
|
|
32
32
|
)
|
|
@@ -40,14 +40,14 @@ class ProjectsFormat(mlrun.common.types.StrEnum):
|
|
|
40
40
|
leader = "leader"
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
class ProjectMetadata(pydantic.BaseModel):
|
|
43
|
+
class ProjectMetadata(pydantic.v1.BaseModel):
|
|
44
44
|
name: str
|
|
45
45
|
created: typing.Optional[datetime.datetime] = None
|
|
46
46
|
labels: typing.Optional[dict] = {}
|
|
47
47
|
annotations: typing.Optional[dict] = {}
|
|
48
48
|
|
|
49
49
|
class Config:
|
|
50
|
-
extra = pydantic.Extra.allow
|
|
50
|
+
extra = pydantic.v1.Extra.allow
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
class ProjectDesiredState(mlrun.common.types.StrEnum):
|
|
@@ -77,7 +77,7 @@ class ProjectStatus(ObjectStatus):
|
|
|
77
77
|
state: typing.Optional[ProjectState]
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
class ProjectSpec(pydantic.BaseModel):
|
|
80
|
+
class ProjectSpec(pydantic.v1.BaseModel):
|
|
81
81
|
description: typing.Optional[str] = None
|
|
82
82
|
owner: typing.Optional[str] = None
|
|
83
83
|
goals: typing.Optional[str] = None
|
|
@@ -97,10 +97,10 @@ class ProjectSpec(pydantic.BaseModel):
|
|
|
97
97
|
default_function_node_selector: typing.Optional[dict] = {}
|
|
98
98
|
|
|
99
99
|
class Config:
|
|
100
|
-
extra = pydantic.Extra.allow
|
|
100
|
+
extra = pydantic.v1.Extra.allow
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
class ProjectSpecOut(pydantic.BaseModel):
|
|
103
|
+
class ProjectSpecOut(pydantic.v1.BaseModel):
|
|
104
104
|
description: typing.Optional[str] = None
|
|
105
105
|
owner: typing.Optional[str] = None
|
|
106
106
|
goals: typing.Optional[str] = None
|
|
@@ -120,11 +120,11 @@ class ProjectSpecOut(pydantic.BaseModel):
|
|
|
120
120
|
default_function_node_selector: typing.Optional[dict] = {}
|
|
121
121
|
|
|
122
122
|
class Config:
|
|
123
|
-
extra = pydantic.Extra.allow
|
|
123
|
+
extra = pydantic.v1.Extra.allow
|
|
124
124
|
|
|
125
125
|
|
|
126
|
-
class Project(pydantic.BaseModel):
|
|
127
|
-
kind: ObjectKind = pydantic.Field(ObjectKind.project, const=True)
|
|
126
|
+
class Project(pydantic.v1.BaseModel):
|
|
127
|
+
kind: ObjectKind = pydantic.v1.Field(ObjectKind.project, const=True)
|
|
128
128
|
metadata: ProjectMetadata
|
|
129
129
|
spec: ProjectSpec = ProjectSpec()
|
|
130
130
|
status: ObjectStatus = ObjectStatus()
|
|
@@ -132,19 +132,19 @@ class Project(pydantic.BaseModel):
|
|
|
132
132
|
|
|
133
133
|
# The reason we have a different schema for the response model is that we don't want to validate project.spec.build in
|
|
134
134
|
# the response as the validation was added late and there may be corrupted values in the DB.
|
|
135
|
-
class ProjectOut(pydantic.BaseModel):
|
|
136
|
-
kind: ObjectKind = pydantic.Field(ObjectKind.project, const=True)
|
|
135
|
+
class ProjectOut(pydantic.v1.BaseModel):
|
|
136
|
+
kind: ObjectKind = pydantic.v1.Field(ObjectKind.project, const=True)
|
|
137
137
|
metadata: ProjectMetadata
|
|
138
138
|
spec: ProjectSpecOut = ProjectSpecOut()
|
|
139
139
|
status: ObjectStatus = ObjectStatus()
|
|
140
140
|
|
|
141
141
|
|
|
142
|
-
class ProjectOwner(pydantic.BaseModel):
|
|
142
|
+
class ProjectOwner(pydantic.v1.BaseModel):
|
|
143
143
|
username: str
|
|
144
144
|
access_key: str
|
|
145
145
|
|
|
146
146
|
|
|
147
|
-
class ProjectSummary(pydantic.BaseModel):
|
|
147
|
+
class ProjectSummary(pydantic.v1.BaseModel):
|
|
148
148
|
name: str
|
|
149
149
|
files_count: int = 0
|
|
150
150
|
feature_sets_count: int = 0
|
|
@@ -159,9 +159,12 @@ class ProjectSummary(pydantic.BaseModel):
|
|
|
159
159
|
pipelines_failed_recent_count: typing.Optional[int] = None
|
|
160
160
|
pipelines_running_count: typing.Optional[int] = None
|
|
161
161
|
updated: typing.Optional[datetime.datetime] = None
|
|
162
|
+
endpoint_alerts_count: int = 0
|
|
163
|
+
job_alerts_count: int = 0
|
|
164
|
+
other_alerts_count: int = 0
|
|
162
165
|
|
|
163
166
|
|
|
164
|
-
class IguazioProject(pydantic.BaseModel):
|
|
167
|
+
class IguazioProject(pydantic.v1.BaseModel):
|
|
165
168
|
data: dict
|
|
166
169
|
|
|
167
170
|
|
|
@@ -175,13 +178,18 @@ class IguazioProject(pydantic.BaseModel):
|
|
|
175
178
|
# to add a specific classes for them. it's frustrating but couldn't find other workaround, see:
|
|
176
179
|
# https://github.com/samuelcolvin/pydantic/issues/1423, https://github.com/samuelcolvin/pydantic/issues/619
|
|
177
180
|
ProjectOutput = typing.TypeVar(
|
|
178
|
-
"ProjectOutput",
|
|
181
|
+
"ProjectOutput",
|
|
182
|
+
ProjectOut,
|
|
183
|
+
str,
|
|
184
|
+
ProjectSummary,
|
|
185
|
+
IguazioProject,
|
|
186
|
+
tuple[str, datetime.datetime],
|
|
179
187
|
)
|
|
180
188
|
|
|
181
189
|
|
|
182
|
-
class ProjectsOutput(pydantic.BaseModel):
|
|
190
|
+
class ProjectsOutput(pydantic.v1.BaseModel):
|
|
183
191
|
projects: list[ProjectOutput]
|
|
184
192
|
|
|
185
193
|
|
|
186
|
-
class ProjectSummariesOutput(pydantic.BaseModel):
|
|
194
|
+
class ProjectSummariesOutput(pydantic.v1.BaseModel):
|
|
187
195
|
project_summaries: list[ProjectSummary]
|
mlrun/common/schemas/runs.py
CHANGED
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
|
|
15
15
|
import typing
|
|
16
16
|
|
|
17
|
-
import pydantic
|
|
17
|
+
import pydantic.v1
|
|
18
18
|
from deprecated import deprecated
|
|
19
19
|
|
|
20
20
|
import mlrun.common.types
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
class RunIdentifier(pydantic.BaseModel):
|
|
23
|
+
class RunIdentifier(pydantic.v1.BaseModel):
|
|
24
24
|
kind: typing.Literal["run"] = "run"
|
|
25
25
|
uid: typing.Optional[str]
|
|
26
26
|
iter: typing.Optional[int]
|
|
@@ -28,7 +28,7 @@ class RunIdentifier(pydantic.BaseModel):
|
|
|
28
28
|
|
|
29
29
|
@deprecated(
|
|
30
30
|
version="1.7.0",
|
|
31
|
-
reason="mlrun.common.schemas.RunsFormat is deprecated and will be removed in 1.
|
|
31
|
+
reason="mlrun.common.schemas.RunsFormat is deprecated and will be removed in 1.10.0. "
|
|
32
32
|
"Use mlrun.common.formatters.RunFormat instead.",
|
|
33
33
|
category=FutureWarning,
|
|
34
34
|
)
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
#
|
|
15
15
|
import typing
|
|
16
16
|
|
|
17
|
-
import pydantic
|
|
17
|
+
import pydantic.v1
|
|
18
18
|
|
|
19
19
|
import mlrun.common.types
|
|
20
20
|
|
|
@@ -24,23 +24,23 @@ class ListRuntimeResourcesGroupByField(mlrun.common.types.StrEnum):
|
|
|
24
24
|
project = "project"
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
class RuntimeResource(pydantic.BaseModel):
|
|
27
|
+
class RuntimeResource(pydantic.v1.BaseModel):
|
|
28
28
|
name: str
|
|
29
29
|
labels: dict[str, str] = {}
|
|
30
30
|
status: typing.Optional[dict]
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
class RuntimeResources(pydantic.BaseModel):
|
|
33
|
+
class RuntimeResources(pydantic.v1.BaseModel):
|
|
34
34
|
crd_resources: list[RuntimeResource] = []
|
|
35
35
|
pod_resources: list[RuntimeResource] = []
|
|
36
36
|
# only for dask runtime
|
|
37
37
|
service_resources: typing.Optional[list[RuntimeResource]] = None
|
|
38
38
|
|
|
39
39
|
class Config:
|
|
40
|
-
extra = pydantic.Extra.allow
|
|
40
|
+
extra = pydantic.v1.Extra.allow
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
class KindRuntimeResources(pydantic.BaseModel):
|
|
43
|
+
class KindRuntimeResources(pydantic.v1.BaseModel):
|
|
44
44
|
kind: str
|
|
45
45
|
resources: RuntimeResources
|
|
46
46
|
|
mlrun/common/schemas/schedule.py
CHANGED
mlrun/common/schemas/secret.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025 Iguazio
|
|
2
2
|
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
@@ -11,3 +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
|
+
|
|
15
|
+
from pydantic.v1 import BaseModel
|
|
16
|
+
|
|
17
|
+
from .background_task import BackgroundTaskList
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class DeployResponse(BaseModel):
|
|
21
|
+
data: dict
|
|
22
|
+
background_tasks: BackgroundTaskList
|
mlrun/common/schemas/tag.py
CHANGED
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
#
|
|
15
15
|
|
|
16
|
-
import pydantic
|
|
16
|
+
import pydantic.v1
|
|
17
17
|
|
|
18
18
|
from .artifact import ArtifactIdentifier
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
class Tag(pydantic.BaseModel):
|
|
21
|
+
class Tag(pydantic.v1.BaseModel):
|
|
22
22
|
name: str
|
|
23
23
|
project: str
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class TagObjects(pydantic.BaseModel):
|
|
26
|
+
class TagObjects(pydantic.v1.BaseModel):
|
|
27
27
|
"""Tag object"""
|
|
28
28
|
|
|
29
29
|
kind: str
|
mlrun/common/schemas/workflow.py
CHANGED
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
#
|
|
15
15
|
import typing
|
|
16
16
|
|
|
17
|
-
import pydantic
|
|
17
|
+
import pydantic.v1
|
|
18
18
|
|
|
19
19
|
from mlrun.common.schemas.notification import Notification
|
|
20
20
|
from mlrun.common.schemas.schedule import ScheduleCronTrigger
|
|
21
21
|
from mlrun.common.types import StrEnum
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
class WorkflowSpec(pydantic.BaseModel):
|
|
24
|
+
class WorkflowSpec(pydantic.v1.BaseModel):
|
|
25
25
|
name: str
|
|
26
26
|
engine: typing.Optional[str] = None
|
|
27
27
|
code: typing.Optional[str] = None
|
|
@@ -36,7 +36,7 @@ class WorkflowSpec(pydantic.BaseModel):
|
|
|
36
36
|
workflow_runner_node_selector: typing.Optional[dict[str, str]] = None
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
class WorkflowRequest(pydantic.BaseModel):
|
|
39
|
+
class WorkflowRequest(pydantic.v1.BaseModel):
|
|
40
40
|
spec: typing.Optional[WorkflowSpec] = None
|
|
41
41
|
arguments: typing.Optional[dict] = None
|
|
42
42
|
artifact_path: typing.Optional[str] = None
|
|
@@ -46,7 +46,7 @@ class WorkflowRequest(pydantic.BaseModel):
|
|
|
46
46
|
notifications: typing.Optional[list[Notification]] = None
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
class WorkflowResponse(pydantic.BaseModel):
|
|
49
|
+
class WorkflowResponse(pydantic.v1.BaseModel):
|
|
50
50
|
project: str = None
|
|
51
51
|
name: str = None
|
|
52
52
|
status: str = None
|
|
@@ -54,7 +54,7 @@ class WorkflowResponse(pydantic.BaseModel):
|
|
|
54
54
|
schedule: typing.Union[str, ScheduleCronTrigger] = None
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
class GetWorkflowResponse(pydantic.BaseModel):
|
|
57
|
+
class GetWorkflowResponse(pydantic.v1.BaseModel):
|
|
58
58
|
workflow_id: str = None
|
|
59
59
|
|
|
60
60
|
|
|
@@ -62,3 +62,4 @@ class EngineType(StrEnum):
|
|
|
62
62
|
LOCAL = "local"
|
|
63
63
|
REMOTE = "remote"
|
|
64
64
|
KFP = "kfp"
|
|
65
|
+
REMOTE_KFP = "remote:kfp"
|