mlrun 1.9.0rc3__py3-none-any.whl → 1.10.0rc1__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/api/schemas/__init__.py +0 -1
- mlrun/common/__init__.py +0 -1
- mlrun/common/db/__init__.py +0 -1
- mlrun/common/db/sql_session.py +0 -1
- mlrun/common/formatters/__init__.py +0 -1
- mlrun/common/formatters/artifact.py +0 -1
- mlrun/common/formatters/base.py +0 -1
- mlrun/common/formatters/feature_set.py +0 -1
- mlrun/common/formatters/function.py +0 -1
- mlrun/common/formatters/model_endpoint.py +0 -1
- mlrun/common/formatters/pipeline.py +0 -1
- mlrun/common/formatters/project.py +0 -1
- mlrun/common/formatters/run.py +0 -2
- mlrun/common/runtimes/constants.py +1 -1
- mlrun/common/schemas/__init__.py +1 -0
- mlrun/common/schemas/alert.py +1 -1
- mlrun/common/schemas/api_gateway.py +1 -1
- mlrun/common/schemas/artifact.py +1 -1
- mlrun/common/schemas/auth.py +1 -1
- mlrun/common/schemas/background_task.py +1 -1
- mlrun/common/schemas/client_spec.py +1 -1
- mlrun/common/schemas/clusterization_spec.py +1 -1
- mlrun/common/schemas/constants.py +1 -1
- mlrun/common/schemas/datastore_profile.py +0 -1
- mlrun/common/schemas/events.py +1 -1
- mlrun/common/schemas/feature_store.py +1 -1
- mlrun/common/schemas/frontend_spec.py +1 -1
- mlrun/common/schemas/function.py +1 -1
- mlrun/common/schemas/http.py +1 -1
- mlrun/common/schemas/hub.py +1 -1
- mlrun/common/schemas/k8s.py +1 -1
- mlrun/common/schemas/memory_reports.py +0 -1
- mlrun/common/schemas/model_monitoring/model_endpoints.py +32 -8
- mlrun/common/schemas/notification.py +4 -0
- mlrun/common/schemas/object.py +1 -1
- mlrun/common/schemas/partition.py +1 -1
- mlrun/common/schemas/pipeline.py +1 -1
- mlrun/common/schemas/project.py +1 -1
- mlrun/common/schemas/regex.py +1 -1
- mlrun/common/schemas/runtime_resource.py +1 -1
- mlrun/common/schemas/schedule.py +1 -1
- mlrun/common/schemas/secret.py +1 -1
- mlrun/common/schemas/tag.py +0 -1
- mlrun/common/schemas/workflow.py +1 -1
- mlrun/common/secrets.py +0 -1
- mlrun/config.py +9 -17
- mlrun/data_types/infer.py +1 -1
- mlrun/data_types/spark.py +1 -1
- mlrun/datastore/datastore.py +1 -1
- mlrun/datastore/snowflake_utils.py +0 -1
- mlrun/datastore/spark_utils.py +0 -1
- mlrun/datastore/utils.py +1 -1
- mlrun/db/base.py +2 -0
- mlrun/db/httpdb.py +29 -19
- mlrun/db/nopdb.py +2 -1
- mlrun/errors.py +1 -1
- mlrun/execution.py +21 -9
- mlrun/feature_store/feature_set.py +0 -12
- mlrun/feature_store/retrieval/base.py +1 -1
- mlrun/feature_store/retrieval/dask_merger.py +1 -1
- mlrun/feature_store/retrieval/job.py +1 -1
- mlrun/feature_store/retrieval/spark_merger.py +0 -2
- mlrun/feature_store/steps.py +1 -1
- mlrun/features.py +1 -1
- mlrun/frameworks/_common/artifacts_library.py +1 -1
- mlrun/frameworks/_common/mlrun_interface.py +1 -1
- mlrun/frameworks/_common/model_handler.py +3 -3
- mlrun/frameworks/_common/producer.py +0 -1
- mlrun/frameworks/_common/utils.py +1 -1
- mlrun/frameworks/_dl_common/loggers/logger.py +0 -1
- mlrun/frameworks/_dl_common/loggers/mlrun_logger.py +1 -1
- mlrun/frameworks/_dl_common/loggers/tensorboard_logger.py +1 -1
- mlrun/frameworks/_dl_common/model_handler.py +1 -1
- mlrun/frameworks/_dl_common/utils.py +1 -1
- mlrun/frameworks/_ml_common/artifacts_library.py +1 -1
- mlrun/frameworks/_ml_common/loggers/logger.py +0 -1
- mlrun/frameworks/_ml_common/loggers/mlrun_logger.py +1 -1
- mlrun/frameworks/_ml_common/model_handler.py +1 -1
- mlrun/frameworks/_ml_common/pkl_model_server.py +1 -1
- mlrun/frameworks/_ml_common/plan.py +1 -1
- mlrun/frameworks/_ml_common/plans/calibration_curve_plan.py +0 -1
- mlrun/frameworks/_ml_common/plans/confusion_matrix_plan.py +0 -1
- mlrun/frameworks/_ml_common/plans/dataset_plan.py +1 -1
- mlrun/frameworks/_ml_common/plans/feature_importance_plan.py +1 -1
- mlrun/frameworks/_ml_common/plans/roc_curve_plan.py +1 -1
- mlrun/frameworks/_ml_common/producer.py +1 -1
- mlrun/frameworks/_ml_common/utils.py +1 -1
- mlrun/frameworks/lgbm/callbacks/callback.py +1 -1
- mlrun/frameworks/lgbm/callbacks/logging_callback.py +0 -1
- mlrun/frameworks/lgbm/callbacks/mlrun_logging_callback.py +0 -1
- mlrun/frameworks/lgbm/mlrun_interfaces/booster_mlrun_interface.py +1 -1
- mlrun/frameworks/lgbm/mlrun_interfaces/mlrun_interface.py +1 -1
- mlrun/frameworks/lgbm/mlrun_interfaces/model_mlrun_interface.py +1 -1
- mlrun/frameworks/lgbm/model_handler.py +1 -1
- mlrun/frameworks/lgbm/model_server.py +1 -1
- mlrun/frameworks/lgbm/utils.py +1 -1
- mlrun/frameworks/onnx/dataset.py +1 -1
- mlrun/frameworks/onnx/mlrun_interface.py +1 -1
- mlrun/frameworks/onnx/model_handler.py +1 -1
- mlrun/frameworks/onnx/model_server.py +1 -1
- mlrun/frameworks/pytorch/callbacks/callback.py +1 -1
- mlrun/frameworks/pytorch/callbacks/logging_callback.py +1 -1
- mlrun/frameworks/pytorch/callbacks/mlrun_logging_callback.py +1 -1
- mlrun/frameworks/pytorch/callbacks/tensorboard_logging_callback.py +1 -1
- mlrun/frameworks/pytorch/callbacks_handler.py +1 -1
- mlrun/frameworks/pytorch/mlrun_interface.py +1 -1
- mlrun/frameworks/pytorch/model_handler.py +1 -1
- mlrun/frameworks/pytorch/model_server.py +1 -1
- mlrun/frameworks/pytorch/utils.py +1 -1
- mlrun/frameworks/sklearn/__init__.py +0 -14
- mlrun/frameworks/sklearn/estimator.py +1 -1
- mlrun/frameworks/sklearn/metric.py +1 -1
- mlrun/frameworks/sklearn/metrics_library.py +1 -1
- mlrun/frameworks/sklearn/mlrun_interface.py +1 -1
- mlrun/frameworks/sklearn/model_handler.py +1 -1
- mlrun/frameworks/sklearn/utils.py +1 -1
- mlrun/frameworks/tf_keras/callbacks/logging_callback.py +1 -1
- mlrun/frameworks/tf_keras/callbacks/mlrun_logging_callback.py +1 -1
- mlrun/frameworks/tf_keras/callbacks/tensorboard_logging_callback.py +1 -1
- mlrun/frameworks/tf_keras/mlrun_interface.py +1 -1
- mlrun/frameworks/tf_keras/model_handler.py +1 -1
- mlrun/frameworks/tf_keras/model_server.py +1 -1
- mlrun/frameworks/tf_keras/utils.py +1 -1
- mlrun/frameworks/xgboost/mlrun_interface.py +1 -1
- mlrun/frameworks/xgboost/model_handler.py +1 -1
- mlrun/frameworks/xgboost/utils.py +1 -1
- mlrun/k8s_utils.py +340 -0
- mlrun/launcher/base.py +3 -3
- mlrun/launcher/local.py +2 -2
- mlrun/launcher/remote.py +2 -2
- mlrun/model.py +14 -0
- mlrun/model_monitoring/applications/__init__.py +0 -1
- mlrun/model_monitoring/applications/_application_steps.py +3 -1
- mlrun/model_monitoring/controller.py +3 -1
- 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 +35 -30
- mlrun/package/context_handler.py +1 -1
- mlrun/package/errors.py +1 -1
- mlrun/package/packager.py +1 -1
- mlrun/package/packagers/default_packager.py +1 -1
- mlrun/package/packagers/numpy_packagers.py +1 -1
- mlrun/package/packagers/pandas_packagers.py +1 -1
- mlrun/package/packagers/python_standard_library_packagers.py +1 -1
- mlrun/package/packagers_manager.py +1 -1
- mlrun/package/utils/_archiver.py +1 -1
- mlrun/package/utils/_formatter.py +1 -1
- mlrun/package/utils/_pickler.py +1 -1
- mlrun/package/utils/_supported_format.py +1 -1
- mlrun/package/utils/log_hint_utils.py +1 -1
- mlrun/package/utils/type_hint_utils.py +1 -1
- mlrun/projects/operations.py +36 -21
- mlrun/projects/project.py +82 -74
- mlrun/run.py +1 -1
- mlrun/runtimes/base.py +16 -6
- mlrun/runtimes/daskjob.py +2 -1
- mlrun/runtimes/databricks_job/databricks_cancel_task.py +0 -1
- mlrun/runtimes/databricks_job/databricks_runtime.py +2 -1
- mlrun/runtimes/databricks_job/databricks_wrapper.py +0 -1
- mlrun/runtimes/mounts.py +2 -0
- mlrun/runtimes/nuclio/function.py +6 -1
- mlrun/runtimes/nuclio/serving.py +1 -1
- mlrun/runtimes/pod.py +4 -349
- mlrun/runtimes/sparkjob/spark3job.py +0 -12
- mlrun/serving/merger.py +0 -1
- mlrun/serving/remote.py +1 -1
- mlrun/serving/serving_wrapper.py +1 -1
- mlrun/serving/utils.py +1 -1
- mlrun/utils/async_http.py +0 -1
- mlrun/utils/clones.py +1 -1
- mlrun/utils/db.py +1 -1
- mlrun/utils/helpers.py +3 -1
- mlrun/utils/http.py +0 -1
- mlrun/utils/notifications/notification/webhook.py +18 -2
- mlrun/utils/regex.py +0 -1
- mlrun/utils/singleton.py +1 -1
- mlrun/utils/vault.py +1 -1
- mlrun/utils/version/__init__.py +1 -1
- mlrun/utils/version/version.json +2 -2
- mlrun/utils/version/version.py +1 -1
- {mlrun-1.9.0rc3.dist-info → mlrun-1.10.0rc1.dist-info}/METADATA +6 -10
- mlrun-1.10.0rc1.dist-info/RECORD +351 -0
- {mlrun-1.9.0rc3.dist-info → mlrun-1.10.0rc1.dist-info}/WHEEL +1 -1
- mlrun-1.9.0rc3.dist-info/RECORD +0 -350
- {mlrun-1.9.0rc3.dist-info → mlrun-1.10.0rc1.dist-info}/entry_points.txt +0 -0
- {mlrun-1.9.0rc3.dist-info → mlrun-1.10.0rc1.dist-info}/licenses/LICENSE +0 -0
- {mlrun-1.9.0rc3.dist-info → mlrun-1.10.0rc1.dist-info}/top_level.txt +0 -0
mlrun/db/base.py
CHANGED
|
@@ -735,6 +735,7 @@ class RunDBInterface(ABC):
|
|
|
735
735
|
start: Optional[datetime.datetime] = None,
|
|
736
736
|
end: Optional[datetime.datetime] = None,
|
|
737
737
|
tsdb_metrics: bool = True,
|
|
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
|
mlrun/db/httpdb.py
CHANGED
|
@@ -937,7 +937,7 @@ class HTTPRunDB(RunDBInterface):
|
|
|
937
937
|
|
|
938
938
|
:param name: Name of the run to retrieve.
|
|
939
939
|
:param uid: Unique ID of the run, or a list of run UIDs.
|
|
940
|
-
:param project: Project that the runs belongs to.
|
|
940
|
+
:param project: Project that the runs belongs to. If not specified, the default project will be used.
|
|
941
941
|
:param labels: Filter runs by label key-value pairs or key existence. This can be provided as:
|
|
942
942
|
- A dictionary in the format `{"label": "value"}` to match specific label key-value pairs,
|
|
943
943
|
or `{"label": None}` to check for key existence.
|
|
@@ -3584,7 +3584,7 @@ class HTTPRunDB(RunDBInterface):
|
|
|
3584
3584
|
params = {
|
|
3585
3585
|
"type": type,
|
|
3586
3586
|
"endpoint-id": endpoint_ids,
|
|
3587
|
-
"
|
|
3587
|
+
"events-format": events_format,
|
|
3588
3588
|
}
|
|
3589
3589
|
error_message = (
|
|
3590
3590
|
f"Failed to get model monitoring metrics,"
|
|
@@ -3720,7 +3720,7 @@ class HTTPRunDB(RunDBInterface):
|
|
|
3720
3720
|
path=path,
|
|
3721
3721
|
body=model_endpoint.json(),
|
|
3722
3722
|
params={
|
|
3723
|
-
"
|
|
3723
|
+
"creation-strategy": creation_strategy,
|
|
3724
3724
|
},
|
|
3725
3725
|
)
|
|
3726
3726
|
return mlrun.common.schemas.ModelEndpoint(**response.json())
|
|
@@ -3750,9 +3750,9 @@ class HTTPRunDB(RunDBInterface):
|
|
|
3750
3750
|
method=mlrun.common.types.HTTPMethod.DELETE,
|
|
3751
3751
|
path=path,
|
|
3752
3752
|
params={
|
|
3753
|
-
"
|
|
3754
|
-
"
|
|
3755
|
-
"
|
|
3753
|
+
"function-name": function_name,
|
|
3754
|
+
"function-tag": function_tag,
|
|
3755
|
+
"endpoint-id": endpoint_id,
|
|
3756
3756
|
},
|
|
3757
3757
|
)
|
|
3758
3758
|
|
|
@@ -3768,6 +3768,7 @@ class HTTPRunDB(RunDBInterface):
|
|
|
3768
3768
|
start: Optional[datetime] = None,
|
|
3769
3769
|
end: Optional[datetime] = None,
|
|
3770
3770
|
tsdb_metrics: bool = True,
|
|
3771
|
+
metric_list: Optional[list[str]] = None,
|
|
3771
3772
|
top_level: bool = False,
|
|
3772
3773
|
uids: Optional[list[str]] = None,
|
|
3773
3774
|
latest_only: bool = False,
|
|
@@ -3785,6 +3786,9 @@ class HTTPRunDB(RunDBInterface):
|
|
|
3785
3786
|
:param start: The start time to filter by.Corresponding to the `created` field.
|
|
3786
3787
|
:param end: The end time to filter by. Corresponding to the `created` field.
|
|
3787
3788
|
:param tsdb_metrics: Whether to include metrics from the time series DB.
|
|
3789
|
+
:param metric_list: List of metrics to include from the time series DB. Defaults to all metrics.
|
|
3790
|
+
If tsdb_metrics=False, this parameter will be ignored and no tsdb metrics
|
|
3791
|
+
will be included.
|
|
3788
3792
|
:param top_level: Whether to return only top level model endpoints.
|
|
3789
3793
|
:param uids: A list of unique ids to filter by.
|
|
3790
3794
|
:param latest_only: Whether to return only the latest model endpoint version.
|
|
@@ -3799,17 +3803,18 @@ class HTTPRunDB(RunDBInterface):
|
|
|
3799
3803
|
path=path,
|
|
3800
3804
|
params={
|
|
3801
3805
|
"name": names,
|
|
3802
|
-
"
|
|
3803
|
-
"
|
|
3804
|
-
"
|
|
3805
|
-
"
|
|
3806
|
+
"model-name": model_name,
|
|
3807
|
+
"model-tag": model_tag,
|
|
3808
|
+
"function-name": function_name,
|
|
3809
|
+
"function-tag": function_tag,
|
|
3806
3810
|
"label": labels,
|
|
3807
3811
|
"start": datetime_to_iso(start),
|
|
3808
3812
|
"end": datetime_to_iso(end),
|
|
3809
|
-
"
|
|
3813
|
+
"tsdb-metrics": tsdb_metrics,
|
|
3814
|
+
"metric": metric_list,
|
|
3810
3815
|
"top-level": top_level,
|
|
3811
3816
|
"uid": uids,
|
|
3812
|
-
"
|
|
3817
|
+
"latest-only": latest_only,
|
|
3813
3818
|
},
|
|
3814
3819
|
)
|
|
3815
3820
|
|
|
@@ -3823,6 +3828,7 @@ class HTTPRunDB(RunDBInterface):
|
|
|
3823
3828
|
function_tag: Optional[str] = None,
|
|
3824
3829
|
endpoint_id: Optional[str] = None,
|
|
3825
3830
|
tsdb_metrics: bool = True,
|
|
3831
|
+
metric_list: Optional[list[str]] = None,
|
|
3826
3832
|
feature_analysis: bool = False,
|
|
3827
3833
|
) -> mlrun.common.schemas.ModelEndpoint:
|
|
3828
3834
|
"""
|
|
@@ -3834,6 +3840,9 @@ class HTTPRunDB(RunDBInterface):
|
|
|
3834
3840
|
:param function_tag: The tag of the function
|
|
3835
3841
|
:param endpoint_id: The id of the endpoint
|
|
3836
3842
|
:param tsdb_metrics: Whether to include metrics from the time series DB.
|
|
3843
|
+
:param metric_list: List of metrics to include from the time series DB. Defaults to all metrics.
|
|
3844
|
+
If tsdb_metrics=False, this parameter will be ignored and no tsdb metrics
|
|
3845
|
+
will be included.
|
|
3837
3846
|
:param feature_analysis: Whether to include feature analysis data (feature_stats,
|
|
3838
3847
|
current_stats & drift_measures).
|
|
3839
3848
|
|
|
@@ -3847,11 +3856,12 @@ class HTTPRunDB(RunDBInterface):
|
|
|
3847
3856
|
method=mlrun.common.types.HTTPMethod.GET,
|
|
3848
3857
|
path=path,
|
|
3849
3858
|
params={
|
|
3850
|
-
"
|
|
3851
|
-
"
|
|
3852
|
-
"
|
|
3853
|
-
"
|
|
3854
|
-
"
|
|
3859
|
+
"function-name": function_name,
|
|
3860
|
+
"function-tag": function_tag,
|
|
3861
|
+
"endpoint-id": endpoint_id,
|
|
3862
|
+
"tsdb-metrics": tsdb_metrics,
|
|
3863
|
+
"metric": metric_list,
|
|
3864
|
+
"feature-analysis": feature_analysis,
|
|
3855
3865
|
},
|
|
3856
3866
|
)
|
|
3857
3867
|
|
|
@@ -3879,8 +3889,8 @@ class HTTPRunDB(RunDBInterface):
|
|
|
3879
3889
|
attributes_keys = list(attributes.keys())
|
|
3880
3890
|
attributes["name"] = name
|
|
3881
3891
|
attributes["project"] = project
|
|
3882
|
-
attributes["
|
|
3883
|
-
attributes["
|
|
3892
|
+
attributes["function-name"] = function_name or None
|
|
3893
|
+
attributes["function-tag"] = function_tag or None
|
|
3884
3894
|
attributes["uid"] = endpoint_id or None
|
|
3885
3895
|
model_endpoint = mlrun.common.schemas.ModelEndpoint.from_flat_dict(attributes)
|
|
3886
3896
|
path = f"projects/{project}/model-endpoints"
|
mlrun/db/nopdb.py
CHANGED
|
@@ -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
|
import datetime
|
|
17
16
|
from typing import Optional, Union
|
|
18
17
|
|
|
@@ -632,6 +631,7 @@ class NopDB(RunDBInterface):
|
|
|
632
631
|
start: Optional[datetime.datetime] = None,
|
|
633
632
|
end: Optional[datetime.datetime] = None,
|
|
634
633
|
tsdb_metrics: bool = True,
|
|
634
|
+
metric_list: Optional[list[str]] = None,
|
|
635
635
|
top_level: bool = False,
|
|
636
636
|
uids: Optional[list[str]] = None,
|
|
637
637
|
latest_only: bool = False,
|
|
@@ -646,6 +646,7 @@ class NopDB(RunDBInterface):
|
|
|
646
646
|
function_tag: Optional[str] = None,
|
|
647
647
|
endpoint_id: Optional[str] = None,
|
|
648
648
|
tsdb_metrics: bool = True,
|
|
649
|
+
metric_list: Optional[list[str]] = None,
|
|
649
650
|
feature_analysis: bool = False,
|
|
650
651
|
) -> mlrun.common.schemas.ModelEndpoint:
|
|
651
652
|
pass
|
mlrun/errors.py
CHANGED
mlrun/execution.py
CHANGED
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
import logging
|
|
16
16
|
import os
|
|
17
17
|
import uuid
|
|
18
|
-
import warnings
|
|
19
18
|
from copy import deepcopy
|
|
20
19
|
from typing import Optional, Union, cast
|
|
21
20
|
|
|
@@ -94,6 +93,8 @@ class MLClientCtx:
|
|
|
94
93
|
self._labels = {}
|
|
95
94
|
self._annotations = {}
|
|
96
95
|
self._node_selector = {}
|
|
96
|
+
self._tolerations = {}
|
|
97
|
+
self._affinity = {}
|
|
97
98
|
|
|
98
99
|
self._function = ""
|
|
99
100
|
self._parameters = {}
|
|
@@ -227,11 +228,26 @@ class MLClientCtx:
|
|
|
227
228
|
"""Dictionary with node selectors (read-only)"""
|
|
228
229
|
return deepcopy(self._node_selector)
|
|
229
230
|
|
|
231
|
+
@property
|
|
232
|
+
def tolerations(self):
|
|
233
|
+
"""Dictionary with tolerations (read-only)"""
|
|
234
|
+
return deepcopy(self._tolerations)
|
|
235
|
+
|
|
236
|
+
@property
|
|
237
|
+
def affinity(self):
|
|
238
|
+
"""Dictionary with affinities (read-only)"""
|
|
239
|
+
return deepcopy(self._affinity)
|
|
240
|
+
|
|
230
241
|
@property
|
|
231
242
|
def annotations(self):
|
|
232
243
|
"""Dictionary with annotations (read-only)"""
|
|
233
244
|
return deepcopy(self._annotations)
|
|
234
245
|
|
|
246
|
+
@property
|
|
247
|
+
def host(self):
|
|
248
|
+
"""Execution host"""
|
|
249
|
+
return self._host
|
|
250
|
+
|
|
235
251
|
def get_child_context(self, with_parent_params=False, **params):
|
|
236
252
|
"""Get child context (iteration)
|
|
237
253
|
|
|
@@ -411,6 +427,8 @@ class MLClientCtx:
|
|
|
411
427
|
"state_thresholds", self._state_thresholds
|
|
412
428
|
)
|
|
413
429
|
self._node_selector = spec.get("node_selector", self._node_selector)
|
|
430
|
+
self._tolerations = spec.get("tolerations", self._tolerations)
|
|
431
|
+
self._affinity = spec.get("affinity", self._affinity)
|
|
414
432
|
self._reset_on_run = spec.get("reset_on_run", self._reset_on_run)
|
|
415
433
|
|
|
416
434
|
self._init_dbs(rundb)
|
|
@@ -973,14 +991,6 @@ class MLClientCtx:
|
|
|
973
991
|
self._update_run()
|
|
974
992
|
return item
|
|
975
993
|
|
|
976
|
-
def get_cached_artifact(self, key):
|
|
977
|
-
"""Return a logged artifact from cache (for potential updates)"""
|
|
978
|
-
warnings.warn(
|
|
979
|
-
"get_cached_artifact is deprecated in 1.8.0 and will be removed in 1.10.0. Use get_artifact instead.",
|
|
980
|
-
FutureWarning,
|
|
981
|
-
)
|
|
982
|
-
return self.get_artifact(key)
|
|
983
|
-
|
|
984
994
|
def get_artifact(
|
|
985
995
|
self, key, tag=None, iter=None, tree=None, uid=None
|
|
986
996
|
) -> Optional[Artifact]:
|
|
@@ -1134,6 +1144,8 @@ class MLClientCtx:
|
|
|
1134
1144
|
"notifications": self._notifications,
|
|
1135
1145
|
"state_thresholds": self._state_thresholds,
|
|
1136
1146
|
"node_selector": self._node_selector,
|
|
1147
|
+
"tolerations": self._tolerations,
|
|
1148
|
+
"affinity": self._affinity,
|
|
1137
1149
|
},
|
|
1138
1150
|
"status": {
|
|
1139
1151
|
"results": self._results,
|
|
@@ -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
|
-
import warnings
|
|
15
14
|
from datetime import datetime
|
|
16
15
|
from typing import Optional, Union
|
|
17
16
|
|
|
@@ -447,7 +446,6 @@ class FeatureSet(ModelObj):
|
|
|
447
446
|
targets=None,
|
|
448
447
|
with_defaults=True,
|
|
449
448
|
default_final_step=None,
|
|
450
|
-
default_final_state=None,
|
|
451
449
|
):
|
|
452
450
|
"""set the desired target list or defaults
|
|
453
451
|
|
|
@@ -457,17 +455,7 @@ class FeatureSet(ModelObj):
|
|
|
457
455
|
:param default_final_step: the final graph step after which we add the
|
|
458
456
|
target writers, used when the graph branches and
|
|
459
457
|
the end cant be determined automatically
|
|
460
|
-
:param default_final_state: *Deprecated* - use default_final_step instead
|
|
461
458
|
"""
|
|
462
|
-
if default_final_state:
|
|
463
|
-
warnings.warn(
|
|
464
|
-
"The 'default_final_state' parameter is deprecated in 1.3.0 and will be remove in 1.5.0. "
|
|
465
|
-
"Use 'default_final_step' instead.",
|
|
466
|
-
# TODO: remove in 1.5.0
|
|
467
|
-
FutureWarning,
|
|
468
|
-
)
|
|
469
|
-
default_final_step = default_final_step or default_final_state
|
|
470
|
-
|
|
471
459
|
if targets is not None and not isinstance(targets, list):
|
|
472
460
|
raise mlrun.errors.MLRunInvalidArgumentError(
|
|
473
461
|
"targets can only be None or a list of kinds or DataTargetBase derivatives"
|
|
@@ -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
|
|
18
16
|
from mlrun.data_types.to_pandas import spark_df_to_pandas
|
mlrun/feature_store/steps.py
CHANGED
mlrun/features.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
|
import math
|
|
16
16
|
import re
|
|
17
17
|
from typing import Optional, Union
|
|
@@ -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 abc import ABC, abstractmethod
|
|
16
16
|
from typing import 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
|
import importlib.util
|
|
16
16
|
import json
|
|
17
17
|
import os
|
|
@@ -690,10 +690,10 @@ class ModelHandler(ABC, Generic[CommonTypes.ModelType, CommonTypes.IOSampleType]
|
|
|
690
690
|
}
|
|
691
691
|
self._registered_artifacts = {}
|
|
692
692
|
|
|
693
|
-
# Get the model artifact. If the model was logged during this run, use the
|
|
693
|
+
# Get the model artifact. If the model was logged during this run, use the artifact, otherwise use the
|
|
694
694
|
# user's given model path:
|
|
695
695
|
model_artifact = (
|
|
696
|
-
self._context.
|
|
696
|
+
self._context.get_artifact(self._model_name)
|
|
697
697
|
if self._is_logged
|
|
698
698
|
else self._model_path
|
|
699
699
|
)
|
|
@@ -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 os
|
|
16
16
|
from abc import abstractmethod
|
|
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
|
from abc import ABC
|
|
16
16
|
|
|
17
17
|
from .._common.artifacts_library import ArtifactsLibrary, Plan
|
|
@@ -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 json
|
|
16
16
|
from abc import ABC, abstractmethod
|
|
17
17
|
from enum import Enum
|
|
@@ -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 plotly.graph_objects as go
|
|
17
16
|
from sklearn.calibration import calibration_curve
|
|
@@ -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 enum import Enum
|
|
16
16
|
from typing import 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 .._common import LoggingMode, Producer
|
|
16
16
|
from .plan import MLPlanStages
|
|
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 abc import ABC
|
|
16
16
|
from enum import Enum
|
|
17
17
|
from typing import Callable, Union
|
|
@@ -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 abc import ABC
|
|
16
16
|
|
|
17
17
|
from lightgbm.callback import CallbackEnv
|
|
@@ -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 abc import ABC
|
|
16
16
|
from types import ModuleType
|
|
17
17
|
from typing import Callable, Optional, Union
|
|
@@ -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 abc import ABC
|
|
16
16
|
|
|
17
17
|
from ...sklearn import SKLearnMLRunInterface
|