mlrun 1.9.0rc3__py3-none-any.whl → 1.9.0rc5__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 +13 -3
- mlrun/artifacts/base.py +5 -5
- mlrun/artifacts/dataset.py +1 -1
- mlrun/artifacts/model.py +1 -1
- mlrun/artifacts/plots.py +2 -2
- mlrun/common/constants.py +7 -0
- mlrun/common/runtimes/constants.py +1 -1
- mlrun/common/schemas/artifact.py +1 -1
- mlrun/common/schemas/model_monitoring/model_endpoints.py +32 -8
- mlrun/common/schemas/pipeline.py +1 -1
- mlrun/common/schemas/project.py +1 -1
- mlrun/common/schemas/runs.py +1 -1
- mlrun/config.py +5 -11
- mlrun/datastore/datastore.py +1 -1
- mlrun/datastore/datastore_profile.py +2 -2
- mlrun/datastore/sources.py +3 -3
- mlrun/datastore/targets.py +4 -4
- mlrun/datastore/utils.py +2 -2
- mlrun/db/base.py +9 -7
- mlrun/db/httpdb.py +48 -27
- mlrun/db/nopdb.py +3 -1
- mlrun/execution.py +1 -1
- mlrun/frameworks/_common/model_handler.py +2 -2
- mlrun/launcher/client.py +1 -1
- mlrun/model_monitoring/api.py +4 -4
- mlrun/model_monitoring/applications/_application_steps.py +3 -1
- mlrun/model_monitoring/applications/evidently/base.py +59 -71
- mlrun/model_monitoring/controller.py +26 -11
- mlrun/model_monitoring/db/tsdb/base.py +3 -1
- mlrun/model_monitoring/db/tsdb/tdengine/tdengine_connection.py +213 -0
- mlrun/model_monitoring/db/tsdb/tdengine/tdengine_connector.py +27 -49
- mlrun/model_monitoring/db/tsdb/v3io/v3io_connector.py +48 -35
- mlrun/model_monitoring/tracking_policy.py +1 -1
- mlrun/model_monitoring/writer.py +1 -1
- mlrun/projects/operations.py +3 -3
- mlrun/projects/project.py +37 -22
- mlrun/render.py +5 -9
- mlrun/run.py +1 -1
- mlrun/runtimes/base.py +5 -5
- mlrun/runtimes/kubejob.py +2 -2
- mlrun/runtimes/nuclio/function.py +3 -3
- mlrun/runtimes/nuclio/serving.py +4 -4
- mlrun/runtimes/utils.py +25 -8
- mlrun/utils/helpers.py +3 -2
- mlrun/utils/notifications/notification/webhook.py +18 -2
- mlrun/utils/version/version.json +2 -2
- {mlrun-1.9.0rc3.dist-info → mlrun-1.9.0rc5.dist-info}/METADATA +9 -13
- {mlrun-1.9.0rc3.dist-info → mlrun-1.9.0rc5.dist-info}/RECORD +52 -51
- {mlrun-1.9.0rc3.dist-info → mlrun-1.9.0rc5.dist-info}/WHEEL +1 -1
- {mlrun-1.9.0rc3.dist-info → mlrun-1.9.0rc5.dist-info}/entry_points.txt +0 -0
- {mlrun-1.9.0rc3.dist-info → mlrun-1.9.0rc5.dist-info}/licenses/LICENSE +0 -0
- {mlrun-1.9.0rc3.dist-info → mlrun-1.9.0rc5.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,16 +67,22 @@ 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 -- {
|
|
82
|
+
f"e.g. 'mlrun run --option1 --option2 -- {metavar_func()} [--arg1|arg1] [--arg2|arg2]'",
|
|
72
83
|
ctx=ctx,
|
|
73
84
|
param=param,
|
|
74
85
|
)
|
|
75
|
-
|
|
76
86
|
return value
|
|
77
87
|
|
|
78
88
|
|
mlrun/artifacts/base.py
CHANGED
|
@@ -219,7 +219,7 @@ class Artifact(ModelObj):
|
|
|
219
219
|
project=None,
|
|
220
220
|
src_path: typing.Optional[str] = None,
|
|
221
221
|
# All params up until here are legacy params for compatibility with legacy artifacts.
|
|
222
|
-
# TODO: remove them in 1.
|
|
222
|
+
# TODO: remove them in 1.10.0.
|
|
223
223
|
metadata: ArtifactMetadata = None,
|
|
224
224
|
spec: ArtifactSpec = None,
|
|
225
225
|
):
|
|
@@ -235,7 +235,7 @@ class Artifact(ModelObj):
|
|
|
235
235
|
or src_path
|
|
236
236
|
):
|
|
237
237
|
warnings.warn(
|
|
238
|
-
"Artifact constructor parameters are deprecated and will be removed in 1.
|
|
238
|
+
"Artifact constructor parameters are deprecated in 1.7.0 and will be removed in 1.10.0. "
|
|
239
239
|
"Use the metadata and spec parameters instead.",
|
|
240
240
|
DeprecationWarning,
|
|
241
241
|
)
|
|
@@ -758,13 +758,13 @@ class LinkArtifact(Artifact):
|
|
|
758
758
|
link_tree=None,
|
|
759
759
|
project=None,
|
|
760
760
|
# All params up until here are legacy params for compatibility with legacy artifacts.
|
|
761
|
-
# TODO: remove them in 1.
|
|
761
|
+
# TODO: remove them in 1.10.0.
|
|
762
762
|
metadata: ArtifactMetadata = None,
|
|
763
763
|
spec: LinkArtifactSpec = None,
|
|
764
764
|
):
|
|
765
765
|
if key or target_path or link_iteration or link_key or link_tree or project:
|
|
766
766
|
warnings.warn(
|
|
767
|
-
"Artifact constructor parameters are deprecated and will be removed in 1.
|
|
767
|
+
"Artifact constructor parameters are deprecated in 1.7.0 and will be removed in 1.10.0. "
|
|
768
768
|
"Use the metadata and spec parameters instead.",
|
|
769
769
|
DeprecationWarning,
|
|
770
770
|
)
|
|
@@ -907,7 +907,7 @@ def convert_legacy_artifact_to_new_format(
|
|
|
907
907
|
artifact_key = f"{artifact_key}:{artifact_tag}"
|
|
908
908
|
# TODO: Remove once data migration v5 is obsolete
|
|
909
909
|
warnings.warn(
|
|
910
|
-
f"Converting legacy artifact '{artifact_key}' to new format. This will not be supported in MLRun 1.
|
|
910
|
+
f"Converting legacy artifact '{artifact_key}' to new format. This will not be supported in MLRun 1.10.0. "
|
|
911
911
|
f"Make sure to save the artifact/project in the new format.",
|
|
912
912
|
FutureWarning,
|
|
913
913
|
)
|
mlrun/artifacts/dataset.py
CHANGED
|
@@ -163,7 +163,7 @@ class DatasetArtifact(Artifact):
|
|
|
163
163
|
):
|
|
164
164
|
if key or format or target_path:
|
|
165
165
|
warnings.warn(
|
|
166
|
-
"Artifact constructor parameters are deprecated and will be removed in 1.
|
|
166
|
+
"Artifact constructor parameters are deprecated in 1.7.0 and will be removed in 1.10.0. "
|
|
167
167
|
"Use the metadata and spec parameters instead.",
|
|
168
168
|
DeprecationWarning,
|
|
169
169
|
)
|
mlrun/artifacts/model.py
CHANGED
|
@@ -152,7 +152,7 @@ class ModelArtifact(Artifact):
|
|
|
152
152
|
):
|
|
153
153
|
if key or body or format or target_path:
|
|
154
154
|
warnings.warn(
|
|
155
|
-
"Artifact constructor parameters are deprecated and will be removed in 1.
|
|
155
|
+
"Artifact constructor parameters are deprecated in 1.7.0 and will be removed in 1.10.0. "
|
|
156
156
|
"Use the metadata and spec parameters instead.",
|
|
157
157
|
DeprecationWarning,
|
|
158
158
|
)
|
mlrun/artifacts/plots.py
CHANGED
|
@@ -37,7 +37,7 @@ class PlotArtifact(Artifact):
|
|
|
37
37
|
):
|
|
38
38
|
if key or body or is_inline or target_path:
|
|
39
39
|
warnings.warn(
|
|
40
|
-
"Artifact constructor parameters are deprecated and will be removed in 1.
|
|
40
|
+
"Artifact constructor parameters are deprecated in 1.7.0 and will be removed in 1.10.0. "
|
|
41
41
|
"Use the metadata and spec parameters instead.",
|
|
42
42
|
DeprecationWarning,
|
|
43
43
|
)
|
|
@@ -96,7 +96,7 @@ class PlotlyArtifact(Artifact):
|
|
|
96
96
|
"""
|
|
97
97
|
if key or target_path:
|
|
98
98
|
warnings.warn(
|
|
99
|
-
"Artifact constructor parameters are deprecated and will be removed in 1.
|
|
99
|
+
"Artifact constructor parameters are deprecated in 1.7.0 and will be removed in 1.10.0. "
|
|
100
100
|
"Use the metadata and spec parameters instead.",
|
|
101
101
|
DeprecationWarning,
|
|
102
102
|
)
|
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"
|
|
@@ -237,7 +237,7 @@ class RunStates:
|
|
|
237
237
|
}[pipeline_run_status]
|
|
238
238
|
|
|
239
239
|
|
|
240
|
-
# TODO: remove this class in 1.
|
|
240
|
+
# TODO: remove this class in 1.10.0 - use only MlrunInternalLabels
|
|
241
241
|
class RunLabels(enum.Enum):
|
|
242
242
|
owner = mlrun_constants.MLRunInternalLabels.owner
|
|
243
243
|
v3io_user = mlrun_constants.MLRunInternalLabels.v3io_user
|
mlrun/common/schemas/artifact.py
CHANGED
|
@@ -80,7 +80,7 @@ class ArtifactIdentifier(pydantic.v1.BaseModel):
|
|
|
80
80
|
|
|
81
81
|
@deprecated(
|
|
82
82
|
version="1.7.0",
|
|
83
|
-
reason="mlrun.common.schemas.ArtifactsFormat is deprecated and will be removed in 1.
|
|
83
|
+
reason="mlrun.common.schemas.ArtifactsFormat is deprecated and will be removed in 1.10.0. "
|
|
84
84
|
"Use mlrun.common.formatters.ArtifactFormat instead.",
|
|
85
85
|
category=FutureWarning,
|
|
86
86
|
)
|
|
@@ -88,13 +88,18 @@ class ModelEndpointParser(abc.ABC, BaseModel):
|
|
|
88
88
|
|
|
89
89
|
@classmethod
|
|
90
90
|
def from_flat_dict(
|
|
91
|
-
cls,
|
|
91
|
+
cls,
|
|
92
|
+
endpoint_dict: dict,
|
|
93
|
+
json_parse_values: Optional[list] = None,
|
|
94
|
+
validate: bool = True,
|
|
92
95
|
) -> "ModelEndpointParser":
|
|
93
96
|
"""Create a `ModelEndpointParser` object from an endpoint dictionary
|
|
94
97
|
|
|
95
98
|
:param endpoint_dict: Model endpoint dictionary.
|
|
96
99
|
:param json_parse_values: List of dictionary keys with a JSON string value that will be parsed into a
|
|
97
100
|
dictionary using json.loads().
|
|
101
|
+
:param validate: Whether to validate the flattened dictionary.
|
|
102
|
+
Skip validation to optimize performance when it is safe to do so.
|
|
98
103
|
"""
|
|
99
104
|
if json_parse_values is None:
|
|
100
105
|
json_parse_values = cls.json_parse_values()
|
|
@@ -103,6 +108,7 @@ class ModelEndpointParser(abc.ABC, BaseModel):
|
|
|
103
108
|
model_class=cls,
|
|
104
109
|
flattened_dictionary=endpoint_dict,
|
|
105
110
|
json_parse_values=json_parse_values,
|
|
111
|
+
validate=validate,
|
|
106
112
|
)
|
|
107
113
|
|
|
108
114
|
|
|
@@ -213,17 +219,27 @@ class ModelEndpoint(BaseModel):
|
|
|
213
219
|
return flatten_dict
|
|
214
220
|
|
|
215
221
|
@classmethod
|
|
216
|
-
def from_flat_dict(
|
|
222
|
+
def from_flat_dict(
|
|
223
|
+
cls, endpoint_dict: dict, validate: bool = True
|
|
224
|
+
) -> "ModelEndpoint":
|
|
217
225
|
"""Create a `ModelEndpoint` object from an endpoint flattened dictionary. Because the provided dictionary
|
|
218
226
|
is flattened, we pass it as is to the subclasses without splitting the keys into spec, metadata, and status.
|
|
219
227
|
|
|
220
228
|
:param endpoint_dict: Model endpoint dictionary.
|
|
229
|
+
:param validate: Whether to validate the flattened dictionary.
|
|
230
|
+
Skip validation to optimize performance when it is safe to do so.
|
|
221
231
|
"""
|
|
222
232
|
|
|
223
233
|
return cls(
|
|
224
|
-
metadata=ModelEndpointMetadata.from_flat_dict(
|
|
225
|
-
|
|
226
|
-
|
|
234
|
+
metadata=ModelEndpointMetadata.from_flat_dict(
|
|
235
|
+
endpoint_dict=endpoint_dict, validate=validate
|
|
236
|
+
),
|
|
237
|
+
spec=ModelEndpointSpec.from_flat_dict(
|
|
238
|
+
endpoint_dict=endpoint_dict, validate=validate
|
|
239
|
+
),
|
|
240
|
+
status=ModelEndpointStatus.from_flat_dict(
|
|
241
|
+
endpoint_dict=endpoint_dict, validate=validate
|
|
242
|
+
),
|
|
227
243
|
)
|
|
228
244
|
|
|
229
245
|
def get(self, field, default=None):
|
|
@@ -311,7 +327,10 @@ class ModelEndpointMonitoringMetricNoData(_ModelEndpointMonitoringMetricValuesBa
|
|
|
311
327
|
|
|
312
328
|
|
|
313
329
|
def _mapping_attributes(
|
|
314
|
-
model_class: type[Model],
|
|
330
|
+
model_class: type[Model],
|
|
331
|
+
flattened_dictionary: dict,
|
|
332
|
+
json_parse_values: list,
|
|
333
|
+
validate: bool = True,
|
|
315
334
|
) -> Model:
|
|
316
335
|
"""Generate a `BaseModel` object with the provided dictionary attributes.
|
|
317
336
|
|
|
@@ -319,8 +338,10 @@ def _mapping_attributes(
|
|
|
319
338
|
:param flattened_dictionary: Flattened dictionary that contains the model endpoint attributes.
|
|
320
339
|
:param json_parse_values: List of dictionary keys with a JSON string value that will be parsed into a
|
|
321
340
|
dictionary using json.loads().
|
|
341
|
+
:param validate: Whether to validate the flattened dictionary.
|
|
342
|
+
Skip validation to optimize performance when it is safe to do so.
|
|
322
343
|
"""
|
|
323
|
-
# Get the fields of the provided base model object. These fields will be used to filter to
|
|
344
|
+
# Get the fields of the provided base model object. These fields will be used to filter to relevant keys
|
|
324
345
|
# from the flattened dictionary.
|
|
325
346
|
wanted_keys = model_class.__fields__.keys()
|
|
326
347
|
|
|
@@ -338,7 +359,10 @@ def _mapping_attributes(
|
|
|
338
359
|
else:
|
|
339
360
|
dict_to_parse[field_key] = None
|
|
340
361
|
|
|
341
|
-
|
|
362
|
+
if validate:
|
|
363
|
+
return model_class.parse_obj(dict_to_parse)
|
|
364
|
+
|
|
365
|
+
return model_class.construct(**dict_to_parse)
|
|
342
366
|
|
|
343
367
|
|
|
344
368
|
def _json_loads_if_not_none(field: Any) -> Any:
|
mlrun/common/schemas/pipeline.py
CHANGED
|
@@ -22,7 +22,7 @@ import mlrun.common.types
|
|
|
22
22
|
|
|
23
23
|
@deprecated(
|
|
24
24
|
version="1.7.0",
|
|
25
|
-
reason="mlrun.common.schemas.PipelinesFormat is deprecated and will be removed in 1.
|
|
25
|
+
reason="mlrun.common.schemas.PipelinesFormat is deprecated and will be removed in 1.10.0. "
|
|
26
26
|
"Use mlrun.common.formatters.PipelineFormat instead.",
|
|
27
27
|
category=FutureWarning,
|
|
28
28
|
)
|
mlrun/common/schemas/project.py
CHANGED
|
@@ -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
|
)
|
mlrun/common/schemas/runs.py
CHANGED
|
@@ -28,7 +28,7 @@ class RunIdentifier(pydantic.v1.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
|
)
|
mlrun/config.py
CHANGED
|
@@ -482,7 +482,7 @@ default_config = {
|
|
|
482
482
|
"project_owners_cache_ttl": "30 seconds",
|
|
483
483
|
# access key to be used when the leader is iguazio and polling is done from it
|
|
484
484
|
"iguazio_access_key": "",
|
|
485
|
-
"iguazio_list_projects_default_page_size":
|
|
485
|
+
"iguazio_list_projects_default_page_size": 500,
|
|
486
486
|
"iguazio_client_job_cache_ttl": "20 minutes",
|
|
487
487
|
"nuclio_project_deletion_verification_timeout": "300 seconds",
|
|
488
488
|
"nuclio_project_deletion_verification_interval": "5 seconds",
|
|
@@ -591,17 +591,17 @@ default_config = {
|
|
|
591
591
|
},
|
|
592
592
|
"writer_stream_args": {
|
|
593
593
|
"v3io": {
|
|
594
|
-
"shard_count":
|
|
594
|
+
"shard_count": 4,
|
|
595
595
|
"retention_period_hours": 24,
|
|
596
|
-
"num_workers":
|
|
596
|
+
"num_workers": 4,
|
|
597
597
|
"min_replicas": 1,
|
|
598
598
|
"max_replicas": 1,
|
|
599
599
|
},
|
|
600
600
|
"kafka": {
|
|
601
|
-
"partition_count":
|
|
601
|
+
"partition_count": 4,
|
|
602
602
|
# TODO: add retention period configuration
|
|
603
603
|
"replication_factor": 1,
|
|
604
|
-
"num_workers":
|
|
604
|
+
"num_workers": 4,
|
|
605
605
|
"min_replicas": 1,
|
|
606
606
|
"max_replicas": 1,
|
|
607
607
|
},
|
|
@@ -634,12 +634,6 @@ default_config = {
|
|
|
634
634
|
"offline_storage_path": "model-endpoints/{kind}",
|
|
635
635
|
"parquet_batching_max_events": 10_000,
|
|
636
636
|
"parquet_batching_timeout_secs": timedelta(minutes=1).total_seconds(),
|
|
637
|
-
"tdengine": {
|
|
638
|
-
"run_directly": True,
|
|
639
|
-
# timeout and retry are ignored when run_directly is set to True
|
|
640
|
-
"timeout": 10,
|
|
641
|
-
"retries": 1,
|
|
642
|
-
},
|
|
643
637
|
},
|
|
644
638
|
"secret_stores": {
|
|
645
639
|
# Use only in testing scenarios (such as integration tests) to avoid using k8s for secrets (will use in-memory
|
mlrun/datastore/datastore.py
CHANGED
|
@@ -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
|
|
|
@@ -165,9 +165,9 @@ class DatastoreProfileKafkaTarget(DatastoreProfile):
|
|
|
165
165
|
self.brokers = self.bootstrap_servers
|
|
166
166
|
self.bootstrap_servers = None
|
|
167
167
|
warnings.warn(
|
|
168
|
-
"'bootstrap_servers' parameter is deprecated in 1.7.0 and will be removed in 1.
|
|
168
|
+
"'bootstrap_servers' parameter is deprecated in 1.7.0 and will be removed in 1.10.0, "
|
|
169
169
|
"use 'brokers' instead.",
|
|
170
|
-
# TODO: Remove this in 1.
|
|
170
|
+
# TODO: Remove this in 1.10.0
|
|
171
171
|
FutureWarning,
|
|
172
172
|
)
|
|
173
173
|
|
mlrun/datastore/sources.py
CHANGED
|
@@ -794,12 +794,12 @@ class SnowflakeSource(BaseSourceDriver):
|
|
|
794
794
|
warehouse: Optional[str] = None,
|
|
795
795
|
**kwargs,
|
|
796
796
|
):
|
|
797
|
-
# TODO: Remove in 1.
|
|
797
|
+
# TODO: Remove in 1.10.0
|
|
798
798
|
if schema:
|
|
799
799
|
warnings.warn(
|
|
800
|
-
"schema is deprecated in 1.7.0, and will be removed in 1.
|
|
800
|
+
"schema is deprecated in 1.7.0, and will be removed in 1.10.0, please use db_schema"
|
|
801
801
|
)
|
|
802
|
-
db_schema = db_schema or schema # TODO: Remove in 1.
|
|
802
|
+
db_schema = db_schema or schema # TODO: Remove in 1.10.0
|
|
803
803
|
|
|
804
804
|
attributes = attributes or {}
|
|
805
805
|
if url:
|
mlrun/datastore/targets.py
CHANGED
|
@@ -443,8 +443,8 @@ class BaseStoreTarget(DataTargetBase):
|
|
|
443
443
|
self.credentials_prefix = credentials_prefix
|
|
444
444
|
if credentials_prefix:
|
|
445
445
|
warnings.warn(
|
|
446
|
-
"The 'credentials_prefix' parameter is deprecated and will be removed in "
|
|
447
|
-
"1.
|
|
446
|
+
"The 'credentials_prefix' parameter is deprecated in 1.7.0 and will be removed in "
|
|
447
|
+
"1.10.0. Please use datastore profiles instead.",
|
|
448
448
|
FutureWarning,
|
|
449
449
|
)
|
|
450
450
|
|
|
@@ -1671,7 +1671,7 @@ class KafkaTarget(BaseStoreTarget):
|
|
|
1671
1671
|
):
|
|
1672
1672
|
attrs = {}
|
|
1673
1673
|
|
|
1674
|
-
# TODO: Remove this in 1.
|
|
1674
|
+
# TODO: Remove this in 1.10.0
|
|
1675
1675
|
if bootstrap_servers:
|
|
1676
1676
|
if brokers:
|
|
1677
1677
|
raise mlrun.errors.MLRunInvalidArgumentError(
|
|
@@ -1679,7 +1679,7 @@ class KafkaTarget(BaseStoreTarget):
|
|
|
1679
1679
|
"'bootstrap_servers' parameter. Please use 'brokers' only."
|
|
1680
1680
|
)
|
|
1681
1681
|
warnings.warn(
|
|
1682
|
-
"'bootstrap_servers' parameter is deprecated in 1.7.0 and will be removed in 1.
|
|
1682
|
+
"'bootstrap_servers' parameter is deprecated in 1.7.0 and will be removed in 1.10.0, "
|
|
1683
1683
|
"use 'brokers' instead.",
|
|
1684
1684
|
FutureWarning,
|
|
1685
1685
|
)
|
mlrun/datastore/utils.py
CHANGED
|
@@ -176,8 +176,8 @@ def get_kafka_brokers_from_dict(options: dict, pop=False) -> typing.Optional[str
|
|
|
176
176
|
kafka_bootstrap_servers = get_or_pop("kafka_bootstrap_servers", None)
|
|
177
177
|
if kafka_bootstrap_servers:
|
|
178
178
|
warnings.warn(
|
|
179
|
-
"The 'kafka_bootstrap_servers' parameter is deprecated and will be removed in "
|
|
180
|
-
"1.
|
|
179
|
+
"The 'kafka_bootstrap_servers' parameter is deprecated in 1.7.0 and will be removed in "
|
|
180
|
+
"1.10.0. Please pass the 'kafka_brokers' parameter instead.",
|
|
181
181
|
FutureWarning,
|
|
182
182
|
)
|
|
183
183
|
return kafka_bootstrap_servers
|
mlrun/db/base.py
CHANGED
|
@@ -441,10 +441,10 @@ class RunDBInterface(ABC):
|
|
|
441
441
|
) -> dict:
|
|
442
442
|
pass
|
|
443
443
|
|
|
444
|
-
# TODO: remove in 1.
|
|
444
|
+
# TODO: remove in 1.10.0
|
|
445
445
|
@deprecated(
|
|
446
|
-
version="1.
|
|
447
|
-
reason="'list_features' will be removed in 1.
|
|
446
|
+
version="1.7.0",
|
|
447
|
+
reason="'list_features' will be removed in 1.10.0, use 'list_features_v2' instead",
|
|
448
448
|
category=FutureWarning,
|
|
449
449
|
)
|
|
450
450
|
@abstractmethod
|
|
@@ -469,10 +469,10 @@ class RunDBInterface(ABC):
|
|
|
469
469
|
) -> mlrun.common.schemas.FeaturesOutputV2:
|
|
470
470
|
pass
|
|
471
471
|
|
|
472
|
-
# TODO: remove in 1.
|
|
472
|
+
# TODO: remove in 1.10.0
|
|
473
473
|
@deprecated(
|
|
474
|
-
version="1.
|
|
475
|
-
reason="'list_entities' will be removed in 1.
|
|
474
|
+
version="1.7.0",
|
|
475
|
+
reason="'list_entities' will be removed in 1.10.0, use 'list_entities_v2' instead",
|
|
476
476
|
category=FutureWarning,
|
|
477
477
|
)
|
|
478
478
|
@abstractmethod
|
|
@@ -734,7 +734,8 @@ class RunDBInterface(ABC):
|
|
|
734
734
|
labels: Optional[Union[str, dict[str, Optional[str]], list[str]]] = None,
|
|
735
735
|
start: Optional[datetime.datetime] = None,
|
|
736
736
|
end: Optional[datetime.datetime] = None,
|
|
737
|
-
tsdb_metrics: bool =
|
|
737
|
+
tsdb_metrics: bool = False,
|
|
738
|
+
metric_list: Optional[list[str]] = None,
|
|
738
739
|
top_level: bool = False,
|
|
739
740
|
uids: Optional[list[str]] = None,
|
|
740
741
|
latest_only: bool = False,
|
|
@@ -750,6 +751,7 @@ class RunDBInterface(ABC):
|
|
|
750
751
|
function_tag: Optional[str] = None,
|
|
751
752
|
endpoint_id: Optional[str] = None,
|
|
752
753
|
tsdb_metrics: bool = True,
|
|
754
|
+
metric_list: Optional[list[str]] = None,
|
|
753
755
|
feature_analysis: bool = False,
|
|
754
756
|
) -> mlrun.common.schemas.ModelEndpoint:
|
|
755
757
|
pass
|