mlrun 1.7.2rc4__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.2rc4.dist-info → mlrun-1.8.0.dist-info}/METADATA +69 -54
- mlrun-1.8.0.dist-info/RECORD +351 -0
- {mlrun-1.7.2rc4.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.2rc4.dist-info/RECORD +0 -351
- {mlrun-1.7.2rc4.dist-info → mlrun-1.8.0.dist-info}/entry_points.txt +0 -0
- {mlrun-1.7.2rc4.dist-info → mlrun-1.8.0.dist-info/licenses}/LICENSE +0 -0
- {mlrun-1.7.2rc4.dist-info → mlrun-1.8.0.dist-info}/top_level.txt +0 -0
mlrun/render.py
CHANGED
|
@@ -361,9 +361,6 @@ def get_tblframe(df, display, classes=None):
|
|
|
361
361
|
return ipython_display(html, display)
|
|
362
362
|
|
|
363
363
|
|
|
364
|
-
uid_template = '<div title="{}"><a href="{}/{}/{}/jobs/monitor/{}/overview" target="_blank" >...{}</a></div>'
|
|
365
|
-
|
|
366
|
-
|
|
367
364
|
def runs_to_html(
|
|
368
365
|
df: pd.DataFrame,
|
|
369
366
|
display: bool = True,
|
|
@@ -379,15 +376,14 @@ def runs_to_html(
|
|
|
379
376
|
df["results"] = df["results"].apply(dict_html)
|
|
380
377
|
df["start"] = df["start"].apply(time_str)
|
|
381
378
|
df["parameters"] = df["parameters"].apply(dict_html)
|
|
379
|
+
uid_template = '<div title="{}"><a href="{}" target="_blank" >...{}</a></div>'
|
|
380
|
+
|
|
382
381
|
if config.resolve_ui_url():
|
|
383
382
|
df["uid"] = df.apply(
|
|
384
383
|
lambda x: uid_template.format(
|
|
385
|
-
x
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
x.project,
|
|
389
|
-
x.uid,
|
|
390
|
-
x.uid[-8:],
|
|
384
|
+
x["uid"],
|
|
385
|
+
mlrun.utils.get_run_url(x["project"], x["uid"], x["name"]),
|
|
386
|
+
x["uid"][-8:],
|
|
391
387
|
),
|
|
392
388
|
axis=1,
|
|
393
389
|
)
|
mlrun/run.py
CHANGED
|
@@ -30,15 +30,15 @@ from typing import Optional, Union
|
|
|
30
30
|
|
|
31
31
|
import nuclio
|
|
32
32
|
import yaml
|
|
33
|
-
from mlrun_pipelines.common.models import RunStatuses
|
|
34
|
-
from mlrun_pipelines.common.ops import format_summary_from_kfp_run, show_kfp_run
|
|
35
|
-
from mlrun_pipelines.utils import get_client
|
|
36
33
|
|
|
37
34
|
import mlrun.common.constants as mlrun_constants
|
|
38
35
|
import mlrun.common.formatters
|
|
39
36
|
import mlrun.common.schemas
|
|
40
37
|
import mlrun.errors
|
|
41
38
|
import mlrun.utils.helpers
|
|
39
|
+
import mlrun_pipelines.utils
|
|
40
|
+
from mlrun_pipelines.common.models import RunStatuses
|
|
41
|
+
from mlrun_pipelines.common.ops import format_summary_from_kfp_run, show_kfp_run
|
|
42
42
|
|
|
43
43
|
from .common.helpers import parse_versioned_object_uri
|
|
44
44
|
from .config import config as mlconf
|
|
@@ -73,6 +73,9 @@ from .utils import (
|
|
|
73
73
|
update_in,
|
|
74
74
|
)
|
|
75
75
|
|
|
76
|
+
if typing.TYPE_CHECKING:
|
|
77
|
+
from mlrun.datastore import DataItem
|
|
78
|
+
|
|
76
79
|
|
|
77
80
|
def function_to_module(code="", workdir=None, secrets=None, silent=False):
|
|
78
81
|
"""Load code, notebook or mlrun function as .py module
|
|
@@ -200,7 +203,7 @@ def get_or_create_ctx(
|
|
|
200
203
|
event=None,
|
|
201
204
|
spec: Optional[dict] = None,
|
|
202
205
|
with_env: bool = True,
|
|
203
|
-
rundb: str = "",
|
|
206
|
+
rundb: Union[str, "mlrun.db.RunDBInterface"] = "",
|
|
204
207
|
project: str = "",
|
|
205
208
|
upload_artifacts: bool = False,
|
|
206
209
|
labels: Optional[dict] = None,
|
|
@@ -258,7 +261,7 @@ def get_or_create_ctx(
|
|
|
258
261
|
"""
|
|
259
262
|
if labels:
|
|
260
263
|
warnings.warn(
|
|
261
|
-
"The `labels` argument is deprecated and will be removed in 1.
|
|
264
|
+
"The `labels` argument is deprecated in 1.7.0 and will be removed in 1.10.0. "
|
|
262
265
|
"Please use `spec` instead, e.g.:\n"
|
|
263
266
|
"spec={'metadata': {'labels': {'key': 'value'}}}",
|
|
264
267
|
FutureWarning,
|
|
@@ -306,7 +309,7 @@ def get_or_create_ctx(
|
|
|
306
309
|
out = rundb or mlconf.dbpath or environ.get("MLRUN_DBPATH")
|
|
307
310
|
if out:
|
|
308
311
|
autocommit = True
|
|
309
|
-
logger.info(f"
|
|
312
|
+
logger.info(f"Logging run results to: {out}")
|
|
310
313
|
|
|
311
314
|
newspec["metadata"]["project"] = (
|
|
312
315
|
newspec["metadata"].get("project") or project or mlconf.default_project
|
|
@@ -434,7 +437,7 @@ def new_function(
|
|
|
434
437
|
mode: Optional[str] = None,
|
|
435
438
|
handler: Optional[str] = None,
|
|
436
439
|
source: Optional[str] = None,
|
|
437
|
-
requirements:
|
|
440
|
+
requirements: Optional[list[str]] = None,
|
|
438
441
|
kfp: Optional[bool] = None,
|
|
439
442
|
requirements_file: str = "",
|
|
440
443
|
):
|
|
@@ -634,7 +637,7 @@ def code_to_function(
|
|
|
634
637
|
- databricks: run code on Databricks cluster (python scripts, Spark etc.)
|
|
635
638
|
- application: run a long living application (e.g. a web server, UI, etc.)
|
|
636
639
|
|
|
637
|
-
Learn more about
|
|
640
|
+
Learn more about :doc:`../../concepts/functions-overview`
|
|
638
641
|
|
|
639
642
|
:param name: function name, typically best to use hyphen-case
|
|
640
643
|
:param project: project used to namespace the function, defaults to 'default'
|
|
@@ -906,13 +909,53 @@ def _run_pipeline(
|
|
|
906
909
|
return pipeline_run_id
|
|
907
910
|
|
|
908
911
|
|
|
912
|
+
def retry_pipeline(
|
|
913
|
+
run_id: str,
|
|
914
|
+
project: str,
|
|
915
|
+
namespace: Optional[str] = None,
|
|
916
|
+
) -> str:
|
|
917
|
+
"""Retry a pipeline run.
|
|
918
|
+
|
|
919
|
+
This function retries a previously executed pipeline run using the specified run ID. If the run is not in a
|
|
920
|
+
retryable state, a new run is created as a clone of the original run.
|
|
921
|
+
|
|
922
|
+
:param run_id: ID of the pipeline run to retry.
|
|
923
|
+
:param project: name of the project associated with the pipeline run.
|
|
924
|
+
:param namespace: Optional; Kubernetes namespace to use if not the default.
|
|
925
|
+
|
|
926
|
+
:returns: ID of the retried pipeline run or the ID of a cloned run if the original run is not retryable.
|
|
927
|
+
:raises ValueError: If access to the remote API service is not available.
|
|
928
|
+
"""
|
|
929
|
+
mldb = mlrun.db.get_run_db()
|
|
930
|
+
if mldb.kind != "http":
|
|
931
|
+
raise ValueError(
|
|
932
|
+
"Retrying a pipeline requires access to remote API service. "
|
|
933
|
+
"Please set the dbpath URL."
|
|
934
|
+
)
|
|
935
|
+
|
|
936
|
+
pipeline_run_id = mldb.retry_pipeline(
|
|
937
|
+
run_id=run_id,
|
|
938
|
+
project=project,
|
|
939
|
+
namespace=namespace,
|
|
940
|
+
)
|
|
941
|
+
if pipeline_run_id == run_id:
|
|
942
|
+
logger.info(
|
|
943
|
+
f"Retried pipeline run ID={pipeline_run_id}, check UI for progress."
|
|
944
|
+
)
|
|
945
|
+
else:
|
|
946
|
+
logger.info(
|
|
947
|
+
f"Copy of pipeline {run_id} was retried as run ID={pipeline_run_id}, check UI for progress."
|
|
948
|
+
)
|
|
949
|
+
return pipeline_run_id
|
|
950
|
+
|
|
951
|
+
|
|
909
952
|
def wait_for_pipeline_completion(
|
|
910
953
|
run_id,
|
|
911
954
|
timeout=60 * 60,
|
|
912
|
-
expected_statuses: list[str] = None,
|
|
955
|
+
expected_statuses: Optional[list[str]] = None,
|
|
913
956
|
namespace=None,
|
|
914
957
|
remote=True,
|
|
915
|
-
project: str = None,
|
|
958
|
+
project: Optional[str] = None,
|
|
916
959
|
):
|
|
917
960
|
"""Wait for Pipeline status, timeout in sec
|
|
918
961
|
|
|
@@ -972,7 +1015,7 @@ def wait_for_pipeline_completion(
|
|
|
972
1015
|
_wait_for_pipeline_completion,
|
|
973
1016
|
)
|
|
974
1017
|
else:
|
|
975
|
-
client = get_client(namespace=namespace)
|
|
1018
|
+
client = mlrun_pipelines.utils.get_client(namespace=namespace)
|
|
976
1019
|
resp = client.wait_for_run_completion(run_id, timeout)
|
|
977
1020
|
if resp:
|
|
978
1021
|
resp = resp.to_dict()
|
|
@@ -1004,7 +1047,7 @@ def get_pipeline(
|
|
|
1004
1047
|
format_: Union[
|
|
1005
1048
|
str, mlrun.common.formatters.PipelineFormat
|
|
1006
1049
|
] = mlrun.common.formatters.PipelineFormat.summary,
|
|
1007
|
-
project: str = None,
|
|
1050
|
+
project: Optional[str] = None,
|
|
1008
1051
|
remote: bool = True,
|
|
1009
1052
|
):
|
|
1010
1053
|
"""Get Pipeline status
|
|
@@ -1033,7 +1076,7 @@ def get_pipeline(
|
|
|
1033
1076
|
)
|
|
1034
1077
|
|
|
1035
1078
|
else:
|
|
1036
|
-
client = get_client(namespace=namespace)
|
|
1079
|
+
client = mlrun_pipelines.utils.get_client(namespace=namespace)
|
|
1037
1080
|
resp = client.get_run(run_id)
|
|
1038
1081
|
if resp:
|
|
1039
1082
|
resp = resp.to_dict()
|
|
@@ -1089,7 +1132,7 @@ def get_object(url, secrets=None, size=None, offset=0, db=None):
|
|
|
1089
1132
|
return stores.object(url=url).get(size, offset)
|
|
1090
1133
|
|
|
1091
1134
|
|
|
1092
|
-
def get_dataitem(url, secrets=None, db=None) ->
|
|
1135
|
+
def get_dataitem(url, secrets=None, db=None) -> "DataItem":
|
|
1093
1136
|
"""get mlrun dataitem object (from path/url)"""
|
|
1094
1137
|
stores = store_manager.set(secrets, db=db)
|
|
1095
1138
|
return stores.object(url=url)
|
mlrun/runtimes/__init__.py
CHANGED
|
@@ -12,8 +12,6 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
# flake8: noqa - this is until we take care of the F401 violations with respect to __all__ & sphinx
|
|
16
|
-
|
|
17
15
|
__all__ = [
|
|
18
16
|
"BaseRuntime",
|
|
19
17
|
"KubejobRuntime",
|
|
@@ -60,7 +58,7 @@ from ..serving import MLModelServer, new_v1_model_server # noqa isort: skip
|
|
|
60
58
|
def new_model_server(
|
|
61
59
|
name,
|
|
62
60
|
model_class: str,
|
|
63
|
-
models: dict = None,
|
|
61
|
+
models: typing.Optional[dict] = None,
|
|
64
62
|
filename="",
|
|
65
63
|
protocol="",
|
|
66
64
|
image="",
|
mlrun/runtimes/base.py
CHANGED
|
@@ -16,31 +16,38 @@ import http
|
|
|
16
16
|
import re
|
|
17
17
|
import typing
|
|
18
18
|
import warnings
|
|
19
|
-
from base64 import b64encode
|
|
20
19
|
from os import environ
|
|
21
20
|
from typing import Callable, Optional, Union
|
|
22
21
|
|
|
23
22
|
import requests.exceptions
|
|
24
|
-
from mlrun_pipelines.common.ops import mlrun_op
|
|
25
23
|
from nuclio.build import mlrun_footer
|
|
26
24
|
|
|
27
25
|
import mlrun.common.constants
|
|
28
26
|
import mlrun.common.constants as mlrun_constants
|
|
27
|
+
import mlrun.common.formatters
|
|
28
|
+
import mlrun.common.runtimes
|
|
29
29
|
import mlrun.common.schemas
|
|
30
30
|
import mlrun.common.schemas.model_monitoring.constants as mm_constants
|
|
31
|
-
import mlrun.db
|
|
32
31
|
import mlrun.errors
|
|
33
32
|
import mlrun.launcher.factory
|
|
34
33
|
import mlrun.utils.helpers
|
|
35
34
|
import mlrun.utils.notifications
|
|
36
35
|
import mlrun.utils.regex
|
|
36
|
+
from mlrun.model import (
|
|
37
|
+
BaseMetadata,
|
|
38
|
+
HyperParamOptions,
|
|
39
|
+
ImageBuilder,
|
|
40
|
+
ModelObj,
|
|
41
|
+
RunObject,
|
|
42
|
+
RunTemplate,
|
|
43
|
+
)
|
|
37
44
|
from mlrun.utils.helpers import generate_object_uri, verify_field_regex
|
|
45
|
+
from mlrun_pipelines.common.ops import mlrun_op
|
|
38
46
|
|
|
39
47
|
from ..config import config
|
|
40
48
|
from ..datastore import store_manager
|
|
41
49
|
from ..errors import err_to_str
|
|
42
50
|
from ..lists import RunList
|
|
43
|
-
from ..model import BaseMetadata, HyperParamOptions, ImageBuilder, ModelObj, RunObject
|
|
44
51
|
from ..utils import (
|
|
45
52
|
dict_to_json,
|
|
46
53
|
dict_to_yaml,
|
|
@@ -141,10 +148,10 @@ class FunctionSpec(ModelObj):
|
|
|
141
148
|
|
|
142
149
|
@property
|
|
143
150
|
def clone_target_dir(self):
|
|
144
|
-
# TODO: remove this property in 1.
|
|
151
|
+
# TODO: remove this property in 1.10.0
|
|
145
152
|
if self.build.source_code_target_dir:
|
|
146
153
|
warnings.warn(
|
|
147
|
-
"The clone_target_dir attribute is deprecated in 1.6.2 and will be removed in 1.
|
|
154
|
+
"The clone_target_dir attribute is deprecated in 1.6.2 and will be removed in 1.10.0. "
|
|
148
155
|
"Use spec.build.source_code_target_dir instead.",
|
|
149
156
|
FutureWarning,
|
|
150
157
|
)
|
|
@@ -152,10 +159,10 @@ class FunctionSpec(ModelObj):
|
|
|
152
159
|
|
|
153
160
|
@clone_target_dir.setter
|
|
154
161
|
def clone_target_dir(self, clone_target_dir):
|
|
155
|
-
# TODO: remove this property in 1.
|
|
162
|
+
# TODO: remove this property in 1.10.0
|
|
156
163
|
if clone_target_dir:
|
|
157
164
|
warnings.warn(
|
|
158
|
-
"The clone_target_dir attribute is deprecated in 1.6.2 and will be removed in 1.
|
|
165
|
+
"The clone_target_dir attribute is deprecated in 1.6.2 and will be removed in 1.10.0. "
|
|
159
166
|
"Use spec.build.source_code_target_dir instead.",
|
|
160
167
|
FutureWarning,
|
|
161
168
|
)
|
|
@@ -517,7 +524,7 @@ class BaseRuntime(ModelObj):
|
|
|
517
524
|
run_results = resp["status"].get("results", {})
|
|
518
525
|
if generator.eval_stop_condition(run_results):
|
|
519
526
|
logger.info(
|
|
520
|
-
f"
|
|
527
|
+
f"Reached early stop condition ({generator.options.stop_condition}), stopping iterations!"
|
|
521
528
|
)
|
|
522
529
|
results.append(resp)
|
|
523
530
|
break
|
|
@@ -529,7 +536,7 @@ class BaseRuntime(ModelObj):
|
|
|
529
536
|
resp = self._update_run_state(task=task, err=error_string)
|
|
530
537
|
num_errors += 1
|
|
531
538
|
if num_errors > generator.max_errors:
|
|
532
|
-
logger.error("
|
|
539
|
+
logger.error("Too many errors, stopping iterations!")
|
|
533
540
|
results.append(resp)
|
|
534
541
|
break
|
|
535
542
|
|
|
@@ -553,9 +560,9 @@ class BaseRuntime(ModelObj):
|
|
|
553
560
|
|
|
554
561
|
def _update_run_state(
|
|
555
562
|
self,
|
|
556
|
-
resp: dict = None,
|
|
563
|
+
resp: Optional[dict] = None,
|
|
557
564
|
task: RunObject = None,
|
|
558
|
-
err: Union[Exception, str] = None,
|
|
565
|
+
err: Optional[Union[Exception, str]] = None,
|
|
559
566
|
run_format: mlrun.common.formatters.RunFormat = mlrun.common.formatters.RunFormat.full,
|
|
560
567
|
) -> typing.Optional[dict]:
|
|
561
568
|
"""update the task state in the DB"""
|
|
@@ -644,7 +651,10 @@ class BaseRuntime(ModelObj):
|
|
|
644
651
|
return updates
|
|
645
652
|
|
|
646
653
|
def full_image_path(
|
|
647
|
-
self,
|
|
654
|
+
self,
|
|
655
|
+
image=None,
|
|
656
|
+
client_version: Optional[str] = None,
|
|
657
|
+
client_python_version: Optional[str] = None,
|
|
648
658
|
):
|
|
649
659
|
image = image or self.spec.image or ""
|
|
650
660
|
|
|
@@ -665,20 +675,20 @@ class BaseRuntime(ModelObj):
|
|
|
665
675
|
|
|
666
676
|
def as_step(
|
|
667
677
|
self,
|
|
668
|
-
runspec: RunObject = None,
|
|
678
|
+
runspec: Union[RunObject, RunTemplate] = None,
|
|
669
679
|
handler=None,
|
|
670
680
|
name: str = "",
|
|
671
681
|
project: str = "",
|
|
672
|
-
params: dict = None,
|
|
682
|
+
params: Optional[dict] = None,
|
|
673
683
|
hyperparams=None,
|
|
674
684
|
selector="",
|
|
675
685
|
hyper_param_options: HyperParamOptions = None,
|
|
676
|
-
inputs: dict = None,
|
|
677
|
-
outputs: list = None,
|
|
686
|
+
inputs: Optional[dict] = None,
|
|
687
|
+
outputs: Optional[list] = None,
|
|
678
688
|
workdir: str = "",
|
|
679
689
|
artifact_path: str = "",
|
|
680
690
|
image: str = "",
|
|
681
|
-
labels: dict = None,
|
|
691
|
+
labels: Optional[dict] = None,
|
|
682
692
|
use_db=True,
|
|
683
693
|
verbose=None,
|
|
684
694
|
scrape_metrics=False,
|
|
@@ -791,9 +801,7 @@ class BaseRuntime(ModelObj):
|
|
|
791
801
|
mlrun.runtimes.nuclio.serving.serving_subkind
|
|
792
802
|
)
|
|
793
803
|
|
|
794
|
-
self.spec.build.functionSourceCode =
|
|
795
|
-
"utf-8"
|
|
796
|
-
)
|
|
804
|
+
self.spec.build.functionSourceCode = mlrun.utils.helpers.encode_user_code(body)
|
|
797
805
|
if with_doc:
|
|
798
806
|
update_function_entry_points(self, body)
|
|
799
807
|
return self
|
|
@@ -851,7 +859,7 @@ class BaseRuntime(ModelObj):
|
|
|
851
859
|
|
|
852
860
|
def requires_build(self) -> bool:
|
|
853
861
|
build = self.spec.build
|
|
854
|
-
return (
|
|
862
|
+
return bool(
|
|
855
863
|
build.commands
|
|
856
864
|
or build.requirements
|
|
857
865
|
or (build.source and not build.load_source_on_run)
|
mlrun/runtimes/daskjob.py
CHANGED
|
@@ -363,7 +363,7 @@ class DaskCluster(KubejobRuntime):
|
|
|
363
363
|
skip_deployed=False,
|
|
364
364
|
is_kfp=False,
|
|
365
365
|
mlrun_version_specifier=None,
|
|
366
|
-
builder_env: dict = None,
|
|
366
|
+
builder_env: Optional[dict] = None,
|
|
367
367
|
show_on_failure: bool = False,
|
|
368
368
|
force_build: bool = False,
|
|
369
369
|
):
|
|
@@ -406,9 +406,9 @@ class DaskCluster(KubejobRuntime):
|
|
|
406
406
|
|
|
407
407
|
def with_scheduler_limits(
|
|
408
408
|
self,
|
|
409
|
-
mem: str = None,
|
|
410
|
-
cpu: str = None,
|
|
411
|
-
gpus: int = None,
|
|
409
|
+
mem: Optional[str] = None,
|
|
410
|
+
cpu: Optional[str] = None,
|
|
411
|
+
gpus: Optional[int] = None,
|
|
412
412
|
gpu_type: str = "nvidia.com/gpu",
|
|
413
413
|
patch: bool = False,
|
|
414
414
|
):
|
|
@@ -422,9 +422,9 @@ class DaskCluster(KubejobRuntime):
|
|
|
422
422
|
|
|
423
423
|
def with_worker_limits(
|
|
424
424
|
self,
|
|
425
|
-
mem: str = None,
|
|
426
|
-
cpu: str = None,
|
|
427
|
-
gpus: int = None,
|
|
425
|
+
mem: Optional[str] = None,
|
|
426
|
+
cpu: Optional[str] = None,
|
|
427
|
+
gpus: Optional[int] = None,
|
|
428
428
|
gpu_type: str = "nvidia.com/gpu",
|
|
429
429
|
patch: bool = False,
|
|
430
430
|
):
|
|
@@ -442,7 +442,7 @@ class DaskCluster(KubejobRuntime):
|
|
|
442
442
|
)
|
|
443
443
|
|
|
444
444
|
def with_scheduler_requests(
|
|
445
|
-
self, mem: str = None, cpu: str = None, patch: bool = False
|
|
445
|
+
self, mem: Optional[str] = None, cpu: Optional[str] = None, patch: bool = False
|
|
446
446
|
):
|
|
447
447
|
"""
|
|
448
448
|
set scheduler pod resources requests
|
|
@@ -451,7 +451,7 @@ class DaskCluster(KubejobRuntime):
|
|
|
451
451
|
self.spec._verify_and_set_requests("scheduler_resources", mem, cpu, patch=patch)
|
|
452
452
|
|
|
453
453
|
def with_worker_requests(
|
|
454
|
-
self, mem: str = None, cpu: str = None, patch: bool = False
|
|
454
|
+
self, mem: Optional[str] = None, cpu: Optional[str] = None, patch: bool = False
|
|
455
455
|
):
|
|
456
456
|
"""
|
|
457
457
|
set worker pod resources requests
|
|
@@ -11,14 +11,15 @@
|
|
|
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
|
+
import typing
|
|
15
15
|
from ast import FunctionDef, parse, unparse
|
|
16
|
-
from base64 import b64decode
|
|
16
|
+
from base64 import b64decode
|
|
17
17
|
from typing import Callable, Optional, Union
|
|
18
18
|
|
|
19
19
|
import mlrun
|
|
20
20
|
import mlrun.runtimes.kubejob as kubejob
|
|
21
21
|
import mlrun.runtimes.pod as pod
|
|
22
|
+
import mlrun.utils.helpers
|
|
22
23
|
from mlrun.errors import MLRunInvalidArgumentError
|
|
23
24
|
from mlrun.model import HyperParamOptions, RunObject
|
|
24
25
|
|
|
@@ -138,7 +139,7 @@ class DatabricksRuntime(kubejob.KubejobRuntime):
|
|
|
138
139
|
)
|
|
139
140
|
|
|
140
141
|
def _get_modified_user_code(self, original_handler: str, log_artifacts_code: str):
|
|
141
|
-
encoded_code = (
|
|
142
|
+
encoded_code: typing.Optional[str] = (
|
|
142
143
|
self.spec.build.functionSourceCode if hasattr(self.spec, "build") else None
|
|
143
144
|
)
|
|
144
145
|
if not encoded_code:
|
|
@@ -162,7 +163,7 @@ class DatabricksRuntime(kubejob.KubejobRuntime):
|
|
|
162
163
|
if original_handler:
|
|
163
164
|
decoded_code += f"\nresult = {original_handler}(**handler_arguments)\n"
|
|
164
165
|
decoded_code += _return_artifacts_code
|
|
165
|
-
return
|
|
166
|
+
return mlrun.utils.helpers.encode_user_code(decoded_code)
|
|
166
167
|
|
|
167
168
|
def get_internal_parameters(self, runobj: RunObject):
|
|
168
169
|
"""
|
|
@@ -202,7 +203,7 @@ from mlrun.runtimes.databricks_job import databricks_wrapper
|
|
|
202
203
|
def run_mlrun_databricks_job(context,task_parameters: dict, **kwargs):
|
|
203
204
|
databricks_wrapper.run_mlrun_databricks_job(context, task_parameters, **kwargs)
|
|
204
205
|
"""
|
|
205
|
-
wrap_code =
|
|
206
|
+
wrap_code = mlrun.utils.helpers.encode_user_code(wrap_code)
|
|
206
207
|
self.spec.build.functionSourceCode = wrap_code
|
|
207
208
|
runspec.spec.handler = "run_mlrun_databricks_job"
|
|
208
209
|
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
import os
|
|
16
|
-
from base64 import b64encode
|
|
17
16
|
|
|
18
17
|
from nuclio.build import mlrun_footer
|
|
19
18
|
|
|
20
19
|
import mlrun
|
|
20
|
+
import mlrun.utils.helpers
|
|
21
21
|
|
|
22
22
|
from ..model import ModelObj
|
|
23
23
|
from ..utils import generate_object_uri
|
|
@@ -36,6 +36,7 @@ class FunctionReference(ModelObj):
|
|
|
36
36
|
spec=None,
|
|
37
37
|
kind=None,
|
|
38
38
|
name=None,
|
|
39
|
+
track_models=None,
|
|
39
40
|
):
|
|
40
41
|
self.url = url
|
|
41
42
|
self.kind = kind
|
|
@@ -46,6 +47,7 @@ class FunctionReference(ModelObj):
|
|
|
46
47
|
spec = spec.to_dict()
|
|
47
48
|
self.spec = spec
|
|
48
49
|
self.code = code
|
|
50
|
+
self.track_models = track_models
|
|
49
51
|
|
|
50
52
|
self._function = None
|
|
51
53
|
self._address = None
|
|
@@ -116,7 +118,7 @@ class FunctionReference(ModelObj):
|
|
|
116
118
|
func = mlrun.new_function(
|
|
117
119
|
self.name, kind=kind, image=self.image or default_image
|
|
118
120
|
)
|
|
119
|
-
data =
|
|
121
|
+
data = mlrun.utils.helpers.encode_user_code(code)
|
|
120
122
|
func.spec.build.functionSourceCode = data
|
|
121
123
|
if kind not in mlrun.runtimes.RuntimeKinds.nuclio_runtimes():
|
|
122
124
|
func.spec.default_handler = "handler"
|
|
@@ -130,6 +132,7 @@ class FunctionReference(ModelObj):
|
|
|
130
132
|
if self.requirements:
|
|
131
133
|
func.with_requirements(self.requirements)
|
|
132
134
|
self._function = func
|
|
135
|
+
func.spec.track_models = self.track_models
|
|
133
136
|
return func
|
|
134
137
|
|
|
135
138
|
@property
|
mlrun/runtimes/generators.py
CHANGED
|
@@ -15,6 +15,7 @@ import json
|
|
|
15
15
|
import random
|
|
16
16
|
import sys
|
|
17
17
|
from copy import deepcopy
|
|
18
|
+
from typing import Optional
|
|
18
19
|
|
|
19
20
|
import pandas as pd
|
|
20
21
|
|
|
@@ -26,7 +27,7 @@ default_max_iterations = 10
|
|
|
26
27
|
default_max_errors = 3
|
|
27
28
|
|
|
28
29
|
|
|
29
|
-
def get_generator(spec: RunSpec, execution, param_file_secrets: dict = None):
|
|
30
|
+
def get_generator(spec: RunSpec, execution, param_file_secrets: Optional[dict] = None):
|
|
30
31
|
options = spec.hyper_param_options
|
|
31
32
|
strategy = spec.strategy or options.strategy
|
|
32
33
|
if not spec.is_hyper_job() or strategy == "custom":
|
|
@@ -181,7 +182,7 @@ class ListGenerator(TaskGenerator):
|
|
|
181
182
|
yield newrun
|
|
182
183
|
|
|
183
184
|
|
|
184
|
-
def get_run_copy(run):
|
|
185
|
+
def get_run_copy(run: RunObject):
|
|
185
186
|
newrun = deepcopy(run)
|
|
186
187
|
newrun.spec.hyperparams = None
|
|
187
188
|
newrun.spec.param_file = None
|
mlrun/runtimes/kubejob.py
CHANGED
|
@@ -14,11 +14,10 @@
|
|
|
14
14
|
import typing
|
|
15
15
|
import warnings
|
|
16
16
|
|
|
17
|
-
from mlrun_pipelines.common.ops import build_op
|
|
18
|
-
|
|
19
17
|
import mlrun.common.schemas
|
|
20
18
|
import mlrun.db
|
|
21
19
|
import mlrun.errors
|
|
20
|
+
from mlrun_pipelines.common.ops import build_op
|
|
22
21
|
|
|
23
22
|
from ..model import RunObject
|
|
24
23
|
from .pod import KubeResource
|
|
@@ -76,7 +75,7 @@ class KubejobRuntime(KubeResource):
|
|
|
76
75
|
self,
|
|
77
76
|
image="",
|
|
78
77
|
base_image=None,
|
|
79
|
-
commands: list = None,
|
|
78
|
+
commands: typing.Optional[list] = None,
|
|
80
79
|
secret=None,
|
|
81
80
|
source=None,
|
|
82
81
|
extra=None,
|
|
@@ -115,9 +114,9 @@ class KubejobRuntime(KubeResource):
|
|
|
115
114
|
e.g. builder_env={"GIT_TOKEN": token}
|
|
116
115
|
"""
|
|
117
116
|
if not overwrite:
|
|
118
|
-
# TODO: change overwrite default to True in 1.
|
|
117
|
+
# TODO: change overwrite default to True in 1.10.0
|
|
119
118
|
warnings.warn(
|
|
120
|
-
"The `overwrite` parameter default will change from 'False' to 'True' in 1.
|
|
119
|
+
"The `overwrite` parameter default will change from 'False' to 'True' in 1.10.0.",
|
|
121
120
|
mlrun.utils.OverwriteBuildParamsWarning,
|
|
122
121
|
)
|
|
123
122
|
image = mlrun.utils.helpers.remove_image_protocol_prefix(image)
|
|
@@ -148,7 +147,7 @@ class KubejobRuntime(KubeResource):
|
|
|
148
147
|
skip_deployed: bool = False,
|
|
149
148
|
is_kfp: bool = False,
|
|
150
149
|
mlrun_version_specifier: typing.Optional[bool] = None,
|
|
151
|
-
builder_env: dict = None,
|
|
150
|
+
builder_env: typing.Optional[dict] = None,
|
|
152
151
|
show_on_failure: bool = False,
|
|
153
152
|
force_build: bool = False,
|
|
154
153
|
) -> bool:
|
|
@@ -190,7 +189,7 @@ class KubejobRuntime(KubeResource):
|
|
|
190
189
|
self,
|
|
191
190
|
image=None,
|
|
192
191
|
base_image=None,
|
|
193
|
-
commands: list = None,
|
|
192
|
+
commands: typing.Optional[list] = None,
|
|
194
193
|
secret_name="",
|
|
195
194
|
with_mlrun=True,
|
|
196
195
|
skip_deployed=False,
|