mlrun 1.6.4rc2__py3-none-any.whl → 1.7.0rc20__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mlrun might be problematic. Click here for more details.

Files changed (291) hide show
  1. mlrun/__init__.py +11 -1
  2. mlrun/__main__.py +26 -112
  3. mlrun/alerts/__init__.py +15 -0
  4. mlrun/alerts/alert.py +144 -0
  5. mlrun/api/schemas/__init__.py +5 -4
  6. mlrun/artifacts/__init__.py +8 -3
  7. mlrun/artifacts/base.py +46 -257
  8. mlrun/artifacts/dataset.py +11 -192
  9. mlrun/artifacts/manager.py +47 -48
  10. mlrun/artifacts/model.py +31 -159
  11. mlrun/artifacts/plots.py +23 -380
  12. mlrun/common/constants.py +69 -0
  13. mlrun/common/db/sql_session.py +2 -3
  14. mlrun/common/formatters/__init__.py +19 -0
  15. mlrun/common/formatters/artifact.py +21 -0
  16. mlrun/common/formatters/base.py +78 -0
  17. mlrun/common/formatters/function.py +41 -0
  18. mlrun/common/formatters/pipeline.py +53 -0
  19. mlrun/common/formatters/project.py +51 -0
  20. mlrun/common/helpers.py +1 -2
  21. mlrun/common/model_monitoring/helpers.py +9 -5
  22. mlrun/{runtimes → common/runtimes}/constants.py +37 -9
  23. mlrun/common/schemas/__init__.py +24 -4
  24. mlrun/common/schemas/alert.py +203 -0
  25. mlrun/common/schemas/api_gateway.py +148 -0
  26. mlrun/common/schemas/artifact.py +18 -8
  27. mlrun/common/schemas/auth.py +11 -5
  28. mlrun/common/schemas/background_task.py +1 -1
  29. mlrun/common/schemas/client_spec.py +4 -1
  30. mlrun/common/schemas/feature_store.py +16 -16
  31. mlrun/common/schemas/frontend_spec.py +8 -7
  32. mlrun/common/schemas/function.py +5 -1
  33. mlrun/common/schemas/hub.py +11 -18
  34. mlrun/common/schemas/memory_reports.py +2 -2
  35. mlrun/common/schemas/model_monitoring/__init__.py +18 -3
  36. mlrun/common/schemas/model_monitoring/constants.py +83 -26
  37. mlrun/common/schemas/model_monitoring/grafana.py +13 -9
  38. mlrun/common/schemas/model_monitoring/model_endpoints.py +99 -16
  39. mlrun/common/schemas/notification.py +4 -4
  40. mlrun/common/schemas/object.py +2 -2
  41. mlrun/{runtimes/mpijob/v1alpha1.py → common/schemas/pagination.py} +10 -13
  42. mlrun/common/schemas/pipeline.py +1 -10
  43. mlrun/common/schemas/project.py +24 -23
  44. mlrun/common/schemas/runtime_resource.py +8 -12
  45. mlrun/common/schemas/schedule.py +3 -3
  46. mlrun/common/schemas/tag.py +1 -2
  47. mlrun/common/schemas/workflow.py +2 -2
  48. mlrun/common/types.py +7 -1
  49. mlrun/config.py +54 -17
  50. mlrun/data_types/to_pandas.py +10 -12
  51. mlrun/datastore/__init__.py +5 -8
  52. mlrun/datastore/alibaba_oss.py +130 -0
  53. mlrun/datastore/azure_blob.py +17 -5
  54. mlrun/datastore/base.py +62 -39
  55. mlrun/datastore/datastore.py +28 -9
  56. mlrun/datastore/datastore_profile.py +146 -20
  57. mlrun/datastore/filestore.py +0 -1
  58. mlrun/datastore/google_cloud_storage.py +6 -2
  59. mlrun/datastore/hdfs.py +56 -0
  60. mlrun/datastore/inmem.py +2 -2
  61. mlrun/datastore/redis.py +6 -2
  62. mlrun/datastore/s3.py +9 -0
  63. mlrun/datastore/snowflake_utils.py +43 -0
  64. mlrun/datastore/sources.py +201 -96
  65. mlrun/datastore/spark_utils.py +1 -2
  66. mlrun/datastore/store_resources.py +7 -7
  67. mlrun/datastore/targets.py +358 -104
  68. mlrun/datastore/utils.py +72 -58
  69. mlrun/datastore/v3io.py +5 -1
  70. mlrun/db/base.py +185 -35
  71. mlrun/db/factory.py +1 -1
  72. mlrun/db/httpdb.py +614 -179
  73. mlrun/db/nopdb.py +210 -26
  74. mlrun/errors.py +12 -1
  75. mlrun/execution.py +41 -24
  76. mlrun/feature_store/__init__.py +0 -2
  77. mlrun/feature_store/api.py +40 -72
  78. mlrun/feature_store/common.py +1 -1
  79. mlrun/feature_store/feature_set.py +76 -55
  80. mlrun/feature_store/feature_vector.py +28 -30
  81. mlrun/feature_store/ingestion.py +7 -6
  82. mlrun/feature_store/retrieval/base.py +16 -11
  83. mlrun/feature_store/retrieval/conversion.py +11 -13
  84. mlrun/feature_store/retrieval/dask_merger.py +2 -0
  85. mlrun/feature_store/retrieval/job.py +9 -3
  86. mlrun/feature_store/retrieval/local_merger.py +2 -0
  87. mlrun/feature_store/retrieval/spark_merger.py +34 -24
  88. mlrun/feature_store/steps.py +37 -34
  89. mlrun/features.py +9 -20
  90. mlrun/frameworks/_common/artifacts_library.py +9 -9
  91. mlrun/frameworks/_common/mlrun_interface.py +5 -5
  92. mlrun/frameworks/_common/model_handler.py +48 -48
  93. mlrun/frameworks/_common/plan.py +2 -3
  94. mlrun/frameworks/_common/producer.py +3 -4
  95. mlrun/frameworks/_common/utils.py +5 -5
  96. mlrun/frameworks/_dl_common/loggers/logger.py +6 -7
  97. mlrun/frameworks/_dl_common/loggers/mlrun_logger.py +9 -9
  98. mlrun/frameworks/_dl_common/loggers/tensorboard_logger.py +23 -47
  99. mlrun/frameworks/_ml_common/artifacts_library.py +1 -2
  100. mlrun/frameworks/_ml_common/loggers/logger.py +3 -4
  101. mlrun/frameworks/_ml_common/loggers/mlrun_logger.py +4 -5
  102. mlrun/frameworks/_ml_common/model_handler.py +24 -24
  103. mlrun/frameworks/_ml_common/pkl_model_server.py +2 -2
  104. mlrun/frameworks/_ml_common/plan.py +1 -1
  105. mlrun/frameworks/_ml_common/plans/calibration_curve_plan.py +2 -3
  106. mlrun/frameworks/_ml_common/plans/confusion_matrix_plan.py +2 -3
  107. mlrun/frameworks/_ml_common/plans/dataset_plan.py +3 -3
  108. mlrun/frameworks/_ml_common/plans/feature_importance_plan.py +3 -3
  109. mlrun/frameworks/_ml_common/plans/roc_curve_plan.py +4 -4
  110. mlrun/frameworks/_ml_common/utils.py +4 -4
  111. mlrun/frameworks/auto_mlrun/auto_mlrun.py +9 -9
  112. mlrun/frameworks/huggingface/model_server.py +4 -4
  113. mlrun/frameworks/lgbm/__init__.py +33 -33
  114. mlrun/frameworks/lgbm/callbacks/callback.py +2 -4
  115. mlrun/frameworks/lgbm/callbacks/logging_callback.py +4 -5
  116. mlrun/frameworks/lgbm/callbacks/mlrun_logging_callback.py +4 -5
  117. mlrun/frameworks/lgbm/mlrun_interfaces/booster_mlrun_interface.py +1 -3
  118. mlrun/frameworks/lgbm/mlrun_interfaces/mlrun_interface.py +6 -6
  119. mlrun/frameworks/lgbm/model_handler.py +10 -10
  120. mlrun/frameworks/lgbm/model_server.py +6 -6
  121. mlrun/frameworks/lgbm/utils.py +5 -5
  122. mlrun/frameworks/onnx/dataset.py +8 -8
  123. mlrun/frameworks/onnx/mlrun_interface.py +3 -3
  124. mlrun/frameworks/onnx/model_handler.py +6 -6
  125. mlrun/frameworks/onnx/model_server.py +7 -7
  126. mlrun/frameworks/parallel_coordinates.py +4 -3
  127. mlrun/frameworks/pytorch/__init__.py +18 -18
  128. mlrun/frameworks/pytorch/callbacks/callback.py +4 -5
  129. mlrun/frameworks/pytorch/callbacks/logging_callback.py +17 -17
  130. mlrun/frameworks/pytorch/callbacks/mlrun_logging_callback.py +11 -11
  131. mlrun/frameworks/pytorch/callbacks/tensorboard_logging_callback.py +23 -29
  132. mlrun/frameworks/pytorch/callbacks_handler.py +38 -38
  133. mlrun/frameworks/pytorch/mlrun_interface.py +20 -20
  134. mlrun/frameworks/pytorch/model_handler.py +17 -17
  135. mlrun/frameworks/pytorch/model_server.py +7 -7
  136. mlrun/frameworks/sklearn/__init__.py +13 -13
  137. mlrun/frameworks/sklearn/estimator.py +4 -4
  138. mlrun/frameworks/sklearn/metrics_library.py +14 -14
  139. mlrun/frameworks/sklearn/mlrun_interface.py +3 -6
  140. mlrun/frameworks/sklearn/model_handler.py +2 -2
  141. mlrun/frameworks/tf_keras/__init__.py +10 -7
  142. mlrun/frameworks/tf_keras/callbacks/logging_callback.py +15 -15
  143. mlrun/frameworks/tf_keras/callbacks/mlrun_logging_callback.py +11 -11
  144. mlrun/frameworks/tf_keras/callbacks/tensorboard_logging_callback.py +19 -23
  145. mlrun/frameworks/tf_keras/mlrun_interface.py +9 -11
  146. mlrun/frameworks/tf_keras/model_handler.py +14 -14
  147. mlrun/frameworks/tf_keras/model_server.py +6 -6
  148. mlrun/frameworks/xgboost/__init__.py +13 -13
  149. mlrun/frameworks/xgboost/model_handler.py +6 -6
  150. mlrun/k8s_utils.py +14 -16
  151. mlrun/launcher/__init__.py +1 -1
  152. mlrun/launcher/base.py +16 -15
  153. mlrun/launcher/client.py +8 -6
  154. mlrun/launcher/factory.py +1 -1
  155. mlrun/launcher/local.py +17 -11
  156. mlrun/launcher/remote.py +16 -10
  157. mlrun/lists.py +7 -6
  158. mlrun/model.py +238 -73
  159. mlrun/model_monitoring/__init__.py +1 -1
  160. mlrun/model_monitoring/api.py +138 -315
  161. mlrun/model_monitoring/application.py +5 -296
  162. mlrun/model_monitoring/applications/__init__.py +24 -0
  163. mlrun/model_monitoring/applications/_application_steps.py +157 -0
  164. mlrun/model_monitoring/applications/base.py +282 -0
  165. mlrun/model_monitoring/applications/context.py +214 -0
  166. mlrun/model_monitoring/applications/evidently_base.py +211 -0
  167. mlrun/model_monitoring/applications/histogram_data_drift.py +349 -0
  168. mlrun/model_monitoring/applications/results.py +99 -0
  169. mlrun/model_monitoring/controller.py +104 -84
  170. mlrun/model_monitoring/controller_handler.py +13 -5
  171. mlrun/model_monitoring/db/__init__.py +18 -0
  172. mlrun/model_monitoring/{stores → db/stores}/__init__.py +43 -36
  173. mlrun/model_monitoring/db/stores/base/__init__.py +15 -0
  174. mlrun/model_monitoring/{stores/model_endpoint_store.py → db/stores/base/store.py} +64 -40
  175. mlrun/model_monitoring/db/stores/sqldb/__init__.py +13 -0
  176. mlrun/model_monitoring/db/stores/sqldb/models/__init__.py +71 -0
  177. mlrun/model_monitoring/{stores → db/stores/sqldb}/models/base.py +109 -5
  178. mlrun/model_monitoring/db/stores/sqldb/models/mysql.py +88 -0
  179. mlrun/model_monitoring/{stores/models/mysql.py → db/stores/sqldb/models/sqlite.py} +19 -13
  180. mlrun/model_monitoring/db/stores/sqldb/sql_store.py +684 -0
  181. mlrun/model_monitoring/db/stores/v3io_kv/__init__.py +13 -0
  182. mlrun/model_monitoring/{stores/kv_model_endpoint_store.py → db/stores/v3io_kv/kv_store.py} +310 -165
  183. mlrun/model_monitoring/db/tsdb/__init__.py +100 -0
  184. mlrun/model_monitoring/db/tsdb/base.py +329 -0
  185. mlrun/model_monitoring/db/tsdb/helpers.py +30 -0
  186. mlrun/model_monitoring/db/tsdb/tdengine/__init__.py +15 -0
  187. mlrun/model_monitoring/db/tsdb/tdengine/schemas.py +240 -0
  188. mlrun/model_monitoring/db/tsdb/tdengine/stream_graph_steps.py +45 -0
  189. mlrun/model_monitoring/db/tsdb/tdengine/tdengine_connector.py +397 -0
  190. mlrun/model_monitoring/db/tsdb/v3io/__init__.py +15 -0
  191. mlrun/model_monitoring/db/tsdb/v3io/stream_graph_steps.py +117 -0
  192. mlrun/model_monitoring/db/tsdb/v3io/v3io_connector.py +630 -0
  193. mlrun/model_monitoring/evidently_application.py +6 -118
  194. mlrun/model_monitoring/features_drift_table.py +134 -106
  195. mlrun/model_monitoring/helpers.py +127 -28
  196. mlrun/model_monitoring/metrics/__init__.py +13 -0
  197. mlrun/model_monitoring/metrics/histogram_distance.py +127 -0
  198. mlrun/model_monitoring/model_endpoint.py +3 -2
  199. mlrun/model_monitoring/prometheus.py +1 -4
  200. mlrun/model_monitoring/stream_processing.py +62 -231
  201. mlrun/model_monitoring/tracking_policy.py +9 -2
  202. mlrun/model_monitoring/writer.py +152 -124
  203. mlrun/package/__init__.py +6 -6
  204. mlrun/package/context_handler.py +5 -5
  205. mlrun/package/packager.py +7 -7
  206. mlrun/package/packagers/default_packager.py +6 -6
  207. mlrun/package/packagers/numpy_packagers.py +15 -15
  208. mlrun/package/packagers/pandas_packagers.py +5 -5
  209. mlrun/package/packagers/python_standard_library_packagers.py +10 -10
  210. mlrun/package/packagers_manager.py +19 -23
  211. mlrun/package/utils/_formatter.py +6 -6
  212. mlrun/package/utils/_pickler.py +2 -2
  213. mlrun/package/utils/_supported_format.py +4 -4
  214. mlrun/package/utils/log_hint_utils.py +2 -2
  215. mlrun/package/utils/type_hint_utils.py +4 -9
  216. mlrun/platforms/__init__.py +11 -10
  217. mlrun/platforms/iguazio.py +24 -203
  218. mlrun/projects/operations.py +35 -21
  219. mlrun/projects/pipelines.py +68 -99
  220. mlrun/projects/project.py +830 -266
  221. mlrun/render.py +3 -11
  222. mlrun/run.py +162 -166
  223. mlrun/runtimes/__init__.py +62 -7
  224. mlrun/runtimes/base.py +39 -32
  225. mlrun/runtimes/daskjob.py +8 -8
  226. mlrun/runtimes/databricks_job/databricks_cancel_task.py +1 -1
  227. mlrun/runtimes/databricks_job/databricks_runtime.py +7 -7
  228. mlrun/runtimes/databricks_job/databricks_wrapper.py +1 -1
  229. mlrun/runtimes/funcdoc.py +0 -28
  230. mlrun/runtimes/function_reference.py +1 -1
  231. mlrun/runtimes/kubejob.py +28 -122
  232. mlrun/runtimes/local.py +6 -3
  233. mlrun/runtimes/mpijob/__init__.py +0 -20
  234. mlrun/runtimes/mpijob/abstract.py +9 -10
  235. mlrun/runtimes/mpijob/v1.py +1 -1
  236. mlrun/{model_monitoring/stores/models/sqlite.py → runtimes/nuclio/__init__.py} +7 -9
  237. mlrun/runtimes/nuclio/api_gateway.py +709 -0
  238. mlrun/runtimes/nuclio/application/__init__.py +15 -0
  239. mlrun/runtimes/nuclio/application/application.py +523 -0
  240. mlrun/runtimes/nuclio/application/reverse_proxy.go +95 -0
  241. mlrun/runtimes/{function.py → nuclio/function.py} +112 -73
  242. mlrun/runtimes/{nuclio.py → nuclio/nuclio.py} +6 -6
  243. mlrun/runtimes/{serving.py → nuclio/serving.py} +45 -51
  244. mlrun/runtimes/pod.py +286 -88
  245. mlrun/runtimes/remotesparkjob.py +2 -2
  246. mlrun/runtimes/sparkjob/spark3job.py +51 -34
  247. mlrun/runtimes/utils.py +7 -75
  248. mlrun/secrets.py +9 -5
  249. mlrun/serving/remote.py +2 -7
  250. mlrun/serving/routers.py +13 -10
  251. mlrun/serving/server.py +22 -26
  252. mlrun/serving/states.py +99 -25
  253. mlrun/serving/utils.py +3 -3
  254. mlrun/serving/v1_serving.py +6 -7
  255. mlrun/serving/v2_serving.py +59 -20
  256. mlrun/track/tracker.py +2 -1
  257. mlrun/track/tracker_manager.py +3 -3
  258. mlrun/track/trackers/mlflow_tracker.py +1 -2
  259. mlrun/utils/async_http.py +5 -7
  260. mlrun/utils/azure_vault.py +1 -1
  261. mlrun/utils/clones.py +1 -2
  262. mlrun/utils/condition_evaluator.py +3 -3
  263. mlrun/utils/db.py +3 -3
  264. mlrun/utils/helpers.py +183 -197
  265. mlrun/utils/http.py +2 -5
  266. mlrun/utils/logger.py +76 -14
  267. mlrun/utils/notifications/notification/__init__.py +17 -12
  268. mlrun/utils/notifications/notification/base.py +14 -2
  269. mlrun/utils/notifications/notification/console.py +2 -0
  270. mlrun/utils/notifications/notification/git.py +3 -1
  271. mlrun/utils/notifications/notification/ipython.py +3 -1
  272. mlrun/utils/notifications/notification/slack.py +101 -21
  273. mlrun/utils/notifications/notification/webhook.py +11 -1
  274. mlrun/utils/notifications/notification_pusher.py +155 -30
  275. mlrun/utils/retryer.py +208 -0
  276. mlrun/utils/singleton.py +1 -1
  277. mlrun/utils/v3io_clients.py +2 -4
  278. mlrun/utils/version/version.json +2 -2
  279. mlrun/utils/version/version.py +2 -6
  280. {mlrun-1.6.4rc2.dist-info → mlrun-1.7.0rc20.dist-info}/METADATA +31 -19
  281. mlrun-1.7.0rc20.dist-info/RECORD +353 -0
  282. mlrun/kfpops.py +0 -868
  283. mlrun/model_monitoring/batch.py +0 -1095
  284. mlrun/model_monitoring/stores/models/__init__.py +0 -27
  285. mlrun/model_monitoring/stores/sql_model_endpoint_store.py +0 -384
  286. mlrun/platforms/other.py +0 -306
  287. mlrun-1.6.4rc2.dist-info/RECORD +0 -314
  288. {mlrun-1.6.4rc2.dist-info → mlrun-1.7.0rc20.dist-info}/LICENSE +0 -0
  289. {mlrun-1.6.4rc2.dist-info → mlrun-1.7.0rc20.dist-info}/WHEEL +0 -0
  290. {mlrun-1.6.4rc2.dist-info → mlrun-1.7.0rc20.dist-info}/entry_points.txt +0 -0
  291. {mlrun-1.6.4rc2.dist-info → mlrun-1.7.0rc20.dist-info}/top_level.txt +0 -0
@@ -13,7 +13,6 @@
13
13
  # limitations under the License.
14
14
  #
15
15
  from abc import ABC, abstractmethod
16
- from typing import Dict
17
16
 
18
17
  import mlrun
19
18
  from mlrun.artifacts import Artifact
@@ -33,7 +32,7 @@ class Plan(ABC):
33
32
  self._artifacts = {} # type: Dict[str, Artifact]
34
33
 
35
34
  @property
36
- def artifacts(self) -> Dict[str, Artifact]:
35
+ def artifacts(self) -> dict[str, Artifact]:
37
36
  """
38
37
  Get the plan's produced artifacts.
39
38
 
@@ -59,7 +58,7 @@ class Plan(ABC):
59
58
  pass
60
59
 
61
60
  @abstractmethod
62
- def produce(self, *args, **kwargs) -> Dict[str, Artifact]:
61
+ def produce(self, *args, **kwargs) -> dict[str, Artifact]:
63
62
  """
64
63
  Produce the artifact according to this plan.
65
64
 
@@ -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
- from typing import Dict, List
16
15
 
17
16
  import mlrun
18
17
  from mlrun.artifacts import Artifact
@@ -29,7 +28,7 @@ class Producer:
29
28
  def __init__(
30
29
  self,
31
30
  context: mlrun.MLClientCtx = None,
32
- plans: List[Plan] = None,
31
+ plans: list[Plan] = None,
33
32
  ):
34
33
  """
35
34
  Initialize a producer with the given plans. The producer will log the produced artifacts using the given
@@ -68,7 +67,7 @@ class Producer:
68
67
  return self._context
69
68
 
70
69
  @property
71
- def artifacts(self) -> Dict[str, Artifact]:
70
+ def artifacts(self) -> dict[str, Artifact]:
72
71
  """
73
72
  Get the logged artifacts.
74
73
 
@@ -92,7 +91,7 @@ class Producer:
92
91
  """
93
92
  self._context = context
94
93
 
95
- def set_plans(self, plans: List[Plan]):
94
+ def set_plans(self, plans: list[Plan]):
96
95
  """
97
96
  Update the plans of this logger to the given list of plans here.
98
97
 
@@ -16,7 +16,7 @@ import re
16
16
  from abc import ABC
17
17
  from enum import Enum
18
18
  from pathlib import Path
19
- from typing import Any, Dict, List, Tuple, TypeVar, Union
19
+ from typing import Any, TypeVar, Union
20
20
 
21
21
  import numpy as np
22
22
  import pandas as pd
@@ -42,10 +42,10 @@ class CommonTypes(ABC):
42
42
  MLRunInterfaceableType = TypeVar("MLRunInterfaceableType")
43
43
 
44
44
  # Type for a MLRun Interface restoration tuple as returned from 'remove_interface':
45
- MLRunInterfaceRestorationType = Tuple[
46
- Dict[str, Any], # Interface properties.
47
- Dict[str, Any], # Replaced properties.
48
- List[str], # Replaced methods and functions.
45
+ MLRunInterfaceRestorationType = tuple[
46
+ dict[str, Any], # Interface properties.
47
+ dict[str, Any], # Replaced properties.
48
+ list[str], # Replaced methods and functions.
49
49
  ]
50
50
 
51
51
  # Common dataset type to all frameworks:
@@ -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
- from typing import Dict, List
16
15
 
17
16
  import mlrun
18
17
 
@@ -79,7 +78,7 @@ class Logger:
79
78
  return self._mode
80
79
 
81
80
  @property
82
- def training_results(self) -> Dict[str, List[List[float]]]:
81
+ def training_results(self) -> dict[str, list[list[float]]]:
83
82
  """
84
83
  Get the training results logged. The results will be stored in a dictionary where each key is the metric name
85
84
  and the value is a list of lists of values. The first list is by epoch and the second list is by iteration
@@ -90,7 +89,7 @@ class Logger:
90
89
  return self._training_results
91
90
 
92
91
  @property
93
- def validation_results(self) -> Dict[str, List[List[float]]]:
92
+ def validation_results(self) -> dict[str, list[list[float]]]:
94
93
  """
95
94
  Get the validation results logged. The results will be stored in a dictionary where each key is the metric name
96
95
  and the value is a list of lists of values. The first list is by epoch and the second list is by iteration
@@ -101,7 +100,7 @@ class Logger:
101
100
  return self._validation_results
102
101
 
103
102
  @property
104
- def training_summaries(self) -> Dict[str, List[float]]:
103
+ def training_summaries(self) -> dict[str, list[float]]:
105
104
  """
106
105
  Get the training summaries of the metrics results. The summaries will be stored in a dictionary where each key
107
106
  is the metric names and the value is a list of all the summary values per epoch.
@@ -111,7 +110,7 @@ class Logger:
111
110
  return self._training_summaries
112
111
 
113
112
  @property
114
- def validation_summaries(self) -> Dict[str, List[float]]:
113
+ def validation_summaries(self) -> dict[str, list[float]]:
115
114
  """
116
115
  Get the validation summaries of the metrics results. The summaries will be stored in a dictionary where each key
117
116
  is the metric names and the value is a list of all the summary values per epoch.
@@ -121,7 +120,7 @@ class Logger:
121
120
  return self._validation_summaries
122
121
 
123
122
  @property
124
- def static_hyperparameters(self) -> Dict[str, DLTypes.TrackableType]:
123
+ def static_hyperparameters(self) -> dict[str, DLTypes.TrackableType]:
125
124
  """
126
125
  Get the static hyperparameters logged. The hyperparameters will be stored in a dictionary where each key is the
127
126
  hyperparameter name and the value is his logged value.
@@ -131,7 +130,7 @@ class Logger:
131
130
  return self._static_hyperparameters
132
131
 
133
132
  @property
134
- def dynamic_hyperparameters(self) -> Dict[str, List[DLTypes.TrackableType]]:
133
+ def dynamic_hyperparameters(self) -> dict[str, list[DLTypes.TrackableType]]:
135
134
  """
136
135
  Get the dynamic hyperparameters logged. The hyperparameters will be stored in a dictionary where each key is the
137
136
  hyperparameter name and the value is a list of his logged values per epoch.
@@ -13,7 +13,7 @@
13
13
  # limitations under the License.
14
14
  #
15
15
  import itertools
16
- from typing import Dict, List, Union
16
+ from typing import Union
17
17
 
18
18
  import numpy as np
19
19
  import plotly.graph_objects as go
@@ -63,7 +63,7 @@ class MLRunLogger(Logger):
63
63
  :param context: MLRun context to log to. The context parameters can be logged as static
64
64
  hyperparameters.
65
65
  """
66
- super(MLRunLogger, self).__init__(context=context)
66
+ super().__init__(context=context)
67
67
 
68
68
  # Prepare the artifacts collection:
69
69
  self._artifacts = {} # type: Dict[str, Artifact]
@@ -144,9 +144,9 @@ class MLRunLogger(Logger):
144
144
  self,
145
145
  model_handler: DLModelHandler,
146
146
  tag: str = "",
147
- labels: Dict[str, DLTypes.TrackableType] = None,
148
- parameters: Dict[str, DLTypes.TrackableType] = None,
149
- extra_data: Dict[str, Union[DLTypes.TrackableType, Artifact]] = None,
147
+ labels: dict[str, DLTypes.TrackableType] = None,
148
+ parameters: dict[str, DLTypes.TrackableType] = None,
149
+ extra_data: dict[str, Union[DLTypes.TrackableType, Artifact]] = None,
150
150
  ):
151
151
  """
152
152
  Log the run, summarizing the validation metrics and dynamic hyperparameters across all epochs. If 'update' is
@@ -227,7 +227,7 @@ class MLRunLogger(Logger):
227
227
  # Commit to update the changes, so they will be available in the MLRun UI:
228
228
  self._context.commit(completed=False)
229
229
 
230
- def _generate_metrics_summary(self) -> Dict[str, float]:
230
+ def _generate_metrics_summary(self) -> dict[str, float]:
231
231
  """
232
232
  Generate a metrics summary to log along the model.
233
233
 
@@ -254,7 +254,7 @@ class MLRunLogger(Logger):
254
254
 
255
255
  @staticmethod
256
256
  def _generate_metric_results_artifact(
257
- loop: str, name: str, epochs_results: List[List[float]]
257
+ loop: str, name: str, epochs_results: list[list[float]]
258
258
  ) -> PlotlyArtifact:
259
259
  """
260
260
  Generate a plotly artifact for the results of the metric provided.
@@ -300,7 +300,7 @@ class MLRunLogger(Logger):
300
300
 
301
301
  @staticmethod
302
302
  def _generate_summary_results_artifact(
303
- name: str, training_results: List[float], validation_results: List[float]
303
+ name: str, training_results: list[float], validation_results: list[float]
304
304
  ) -> PlotlyArtifact:
305
305
  """
306
306
  Generate a plotly artifact for the results summary across all the epochs of training.
@@ -351,7 +351,7 @@ class MLRunLogger(Logger):
351
351
 
352
352
  @staticmethod
353
353
  def _generate_dynamic_hyperparameter_values_artifact(
354
- name: str, values: List[float]
354
+ name: str, values: list[float]
355
355
  ) -> PlotlyArtifact:
356
356
  """
357
357
  Generate a plotly artifact for the values of the hyperparameter provided.
@@ -15,7 +15,7 @@
15
15
  import os
16
16
  from abc import abstractmethod
17
17
  from datetime import datetime
18
- from typing import Any, Callable, Dict, Generic, List, Union
18
+ from typing import Any, Callable, Generic, Union
19
19
 
20
20
  import yaml
21
21
 
@@ -60,7 +60,7 @@ class TensorboardLogger(Logger, Generic[DLTypes.WeightType]):
60
60
 
61
61
  def __init__(
62
62
  self,
63
- statistics_functions: List[
63
+ statistics_functions: list[
64
64
  Callable[[DLTypes.WeightType], Union[float, DLTypes.WeightType]]
65
65
  ],
66
66
  context: mlrun.MLClientCtx = None,
@@ -94,7 +94,7 @@ class TensorboardLogger(Logger, Generic[DLTypes.WeightType]):
94
94
  :raise MLRunInvalidArgumentError: If the `update_frequency` is illegal or if `tensorboard_directory` and
95
95
  `context` were not given.
96
96
  """
97
- super(TensorboardLogger, self).__init__(context=context)
97
+ super().__init__(context=context)
98
98
 
99
99
  # Validate the context and tensorboard directory combination:
100
100
  if tensorboard_directory is None and context is None:
@@ -136,7 +136,7 @@ class TensorboardLogger(Logger, Generic[DLTypes.WeightType]):
136
136
  self._weights_statistics[statistic_function.__name__] = {} # type: Dict[str, List[float]]
137
137
 
138
138
  @property
139
- def weights(self) -> Dict[str, DLTypes.WeightType]:
139
+ def weights(self) -> dict[str, DLTypes.WeightType]:
140
140
  """
141
141
  Get the logged weights dictionary. Each of the logged weight will be found by its name.
142
142
 
@@ -145,7 +145,7 @@ class TensorboardLogger(Logger, Generic[DLTypes.WeightType]):
145
145
  return self._weights
146
146
 
147
147
  @property
148
- def weight_statistics(self) -> Dict[str, Dict[str, List[float]]]:
148
+ def weight_statistics(self) -> dict[str, dict[str, list[float]]]:
149
149
  """
150
150
  Get the logged statistics for all the tracked weights. Each statistic has a dictionary of weights and their list
151
151
  of epochs values.
@@ -514,23 +514,15 @@ class TensorboardLogger(Logger, Generic[DLTypes.WeightType]):
514
514
  + list(self._dynamic_hyperparameters.keys()),
515
515
  ],
516
516
  ):
517
- text += "\n * **{}**: {}".format(
518
- property_name.capitalize(),
519
- self._markdown_print(value=property_value, tabs=2),
520
- )
517
+ text += f"\n * **{property_name.capitalize()}**: {self._markdown_print(value=property_value, tabs=2)}"
521
518
 
522
519
  # Add the context state:
523
520
  if self._context is not None:
524
- text += "\n####Context initial state: ({})".format(
525
- self._generate_context_link(context=self._context)
526
- )
521
+ text += f"\n####Context initial state: ({self._generate_context_link(context=self._context)})"
527
522
  for property_name, property_value in self._extract_properties_from_context(
528
523
  context=self._context
529
524
  ).items():
530
- text += "\n * **{}**: {}".format(
531
- property_name.capitalize(),
532
- self._markdown_print(value=property_value, tabs=2),
533
- )
525
+ text += f"\n * **{property_name.capitalize()}**: {self._markdown_print(value=property_value, tabs=2)}"
534
526
 
535
527
  return text
536
528
 
@@ -541,7 +533,7 @@ class TensorboardLogger(Logger, Generic[DLTypes.WeightType]):
541
533
 
542
534
  :return: The generated text.
543
535
  """
544
- text = "####Epoch {} summary:".format(self._epochs)
536
+ text = f"####Epoch {self._epochs} summary:"
545
537
  if self._context is not None:
546
538
  for property_name, property_value in self._extract_properties_from_context(
547
539
  context=self._context
@@ -555,16 +547,13 @@ class TensorboardLogger(Logger, Generic[DLTypes.WeightType]):
555
547
  "inputs",
556
548
  "parameters",
557
549
  ]:
558
- text += "\n * **{}**: {}".format(
559
- property_name.capitalize(),
560
- self._markdown_print(value=property_value, tabs=2),
550
+ text += (
551
+ f"\n * **{property_name.capitalize()}**: "
552
+ f"{self._markdown_print(value=property_value, tabs=2)}"
561
553
  )
562
554
  else:
563
555
  for property_name, property_value in self._extract_epoch_results().items():
564
- text += "\n * **{}**: {}".format(
565
- property_name.capitalize(),
566
- self._markdown_print(value=property_value, tabs=2),
567
- )
556
+ text += f"\n * **{property_name.capitalize()}**: {self._markdown_print(value=property_value, tabs=2)}"
568
557
  return text
569
558
 
570
559
  def _generate_run_end_text(self) -> str:
@@ -575,30 +564,22 @@ class TensorboardLogger(Logger, Generic[DLTypes.WeightType]):
575
564
  :return: The generated text.
576
565
  """
577
566
  # Write the run summary:
578
- text = "\n####Run final summary - epoch {}:".format(self._epochs)
567
+ text = f"\n####Run final summary - epoch {self._epochs}:"
579
568
  for property_name, property_value in self._extract_epoch_results().items():
580
- text += "\n * **{}**: {}".format(
581
- property_name.capitalize(),
582
- self._markdown_print(value=property_value, tabs=2),
583
- )
569
+ text += f"\n * **{property_name.capitalize()}**: {self._markdown_print(value=property_value, tabs=2)}"
584
570
 
585
571
  # Add the context final state:
586
572
  if self._context is not None:
587
- text += "\n####Context final state: ({})".format(
588
- self._generate_context_link(context=self._context)
589
- )
573
+ text += f"\n####Context final state: ({self._generate_context_link(context=self._context)})"
590
574
  for property_name, property_value in self._extract_properties_from_context(
591
575
  context=self._context
592
576
  ).items():
593
- text += "\n * **{}**: {}".format(
594
- property_name.capitalize(),
595
- self._markdown_print(value=property_value, tabs=2),
596
- )
577
+ text += f"\n * **{property_name.capitalize()}**: {self._markdown_print(value=property_value, tabs=2)}"
597
578
  return text
598
579
 
599
580
  def _extract_epoch_results(
600
581
  self, epoch: int = -1
601
- ) -> Dict[str, Dict[str, DLTypes.TrackableType]]:
582
+ ) -> dict[str, dict[str, DLTypes.TrackableType]]:
602
583
  """
603
584
  Extract the given epoch results from all the collected values and results.
604
585
 
@@ -633,17 +614,12 @@ class TensorboardLogger(Logger, Generic[DLTypes.WeightType]):
633
614
  :return: The generated link.
634
615
  """
635
616
  return (
636
- '<a href="{}/{}/{}/jobs/monitor/{}/overview" target="_blank">{}</a>'.format(
637
- config.resolve_ui_url(),
638
- config.ui.projects_prefix,
639
- context.project,
640
- context.uid,
641
- link_text,
642
- )
617
+ f'<a href="{config.resolve_ui_url()}/{config.ui.projects_prefix}/{context.project}'
618
+ f'/jobs/monitor/{context.uid}/overview" target="_blank">{link_text}</a>'
643
619
  )
644
620
 
645
621
  @staticmethod
646
- def _extract_properties_from_context(context: mlrun.MLClientCtx) -> Dict[str, Any]:
622
+ def _extract_properties_from_context(context: mlrun.MLClientCtx) -> dict[str, Any]:
647
623
  """
648
624
  Extract the properties of the run this context belongs to.
649
625
 
@@ -672,13 +648,13 @@ class TensorboardLogger(Logger, Generic[DLTypes.WeightType]):
672
648
  if isinstance(value, list):
673
649
  if len(value) == 0:
674
650
  return ""
675
- text = "\n" + yaml.dump(value)
651
+ text = "\n" + yaml.safe_dump(value)
676
652
  text = " \n".join([" " * tabs + line for line in text.splitlines()])
677
653
  return text
678
654
  if isinstance(value, dict):
679
655
  if len(value) == 0:
680
656
  return ""
681
- text = yaml.dump(value)
657
+ text = yaml.safe_dump(value)
682
658
  text = " \n".join(
683
659
  [" " * tabs + "- " + line for line in text.splitlines()]
684
660
  )
@@ -13,7 +13,6 @@
13
13
  # limitations under the License.
14
14
  #
15
15
  from abc import ABC
16
- from typing import List
17
16
 
18
17
  from .._common.artifacts_library import ArtifactsLibrary, Plan
19
18
  from .plans import (
@@ -47,7 +46,7 @@ class MLArtifactsLibrary(ArtifactsLibrary, ABC):
47
46
  @classmethod
48
47
  def default(
49
48
  cls, model: MLTypes.ModelType, y: MLTypes.DatasetType = None, *args, **kwargs
50
- ) -> List[Plan]:
49
+ ) -> list[Plan]:
51
50
  """
52
51
  Get the default artifacts plans list of this framework's library.
53
52
 
@@ -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
- from typing import Dict, List
16
15
 
17
16
  from ..utils import MLTypes
18
17
 
@@ -42,7 +41,7 @@ class Logger:
42
41
  self._iterations = 0
43
42
 
44
43
  @property
45
- def results(self) -> Dict[str, Dict[str, List[float]]]:
44
+ def results(self) -> dict[str, dict[str, list[float]]]:
46
45
  """
47
46
  Get the results logged. The results will be stored in a dictionary where each key is the validation set name
48
47
  and the value is a dictionary of metrics to their list of iterations values.
@@ -52,7 +51,7 @@ class Logger:
52
51
  return self._results
53
52
 
54
53
  @property
55
- def static_hyperparameters(self) -> Dict[str, MLTypes.TrackableType]:
54
+ def static_hyperparameters(self) -> dict[str, MLTypes.TrackableType]:
56
55
  """
57
56
  Get the static hyperparameters logged. The hyperparameters will be stored in a dictionary where each key is the
58
57
  hyperparameter name and the value is his logged value.
@@ -62,7 +61,7 @@ class Logger:
62
61
  return self._static_hyperparameters
63
62
 
64
63
  @property
65
- def dynamic_hyperparameters(self) -> Dict[str, List[MLTypes.TrackableType]]:
64
+ def dynamic_hyperparameters(self) -> dict[str, list[MLTypes.TrackableType]]:
66
65
  """
67
66
  Get the dynamic hyperparameters logged. The hyperparameters will be stored in a dictionary where each key is the
68
67
  hyperparameter name and the value is a list of his logged values per epoch.
@@ -13,7 +13,6 @@
13
13
  # limitations under the License.
14
14
  #
15
15
  import re
16
- from typing import Dict, List
17
16
 
18
17
  import numpy as np
19
18
  import plotly.graph_objects as go
@@ -39,7 +38,7 @@ class MLRunLogger(Logger):
39
38
 
40
39
  :param context: MLRun context to log to. The context parameters can be logged as static hyperparameters.
41
40
  """
42
- super(MLRunLogger, self).__init__()
41
+ super().__init__()
43
42
 
44
43
  # An MLRun context to log to:
45
44
  self._context = context
@@ -47,7 +46,7 @@ class MLRunLogger(Logger):
47
46
  # Prepare the artifacts dictionary:
48
47
  self._artifacts = {} # type: Dict[str, Artifact]
49
48
 
50
- def get_artifacts(self) -> Dict[str, Artifact]:
49
+ def get_artifacts(self) -> dict[str, Artifact]:
51
50
  """
52
51
  Get the artifacts created by this logger.
53
52
 
@@ -55,7 +54,7 @@ class MLRunLogger(Logger):
55
54
  """
56
55
  return self._artifacts
57
56
 
58
- def get_metrics(self) -> Dict[str, float]:
57
+ def get_metrics(self) -> dict[str, float]:
59
58
  """
60
59
  Generate a metrics summary to log along the model.
61
60
 
@@ -144,7 +143,7 @@ class MLRunLogger(Logger):
144
143
 
145
144
  @staticmethod
146
145
  def _produce_convergence_plot_artifact(
147
- name: str, values: List[float]
146
+ name: str, values: list[float]
148
147
  ) -> PlotlyArtifact:
149
148
  """
150
149
  Produce the convergences for the provided metric according.
@@ -13,7 +13,7 @@
13
13
  # limitations under the License.
14
14
  #
15
15
  from abc import ABC
16
- from typing import Dict, List, Union
16
+ from typing import Union
17
17
 
18
18
  import mlrun
19
19
  from mlrun.artifacts import Artifact
@@ -35,10 +35,10 @@ class MLModelHandler(ModelHandler, ABC):
35
35
  model_path: MLTypes.PathType = None,
36
36
  model_name: str = None,
37
37
  modules_map: Union[
38
- Dict[str, Union[None, str, List[str]]], MLTypes.PathType
38
+ dict[str, Union[None, str, list[str]]], MLTypes.PathType
39
39
  ] = None,
40
40
  custom_objects_map: Union[
41
- Dict[str, Union[str, List[str]]], MLTypes.PathType
41
+ dict[str, Union[str, list[str]]], MLTypes.PathType
42
42
  ] = None,
43
43
  custom_objects_directory: MLTypes.PathType = None,
44
44
  context: mlrun.MLClientCtx = None,
@@ -105,7 +105,7 @@ class MLModelHandler(ModelHandler, ABC):
105
105
  self._feature_weights = None # type: List[float]
106
106
 
107
107
  # Continue the initialization:
108
- super(MLModelHandler, self).__init__(
108
+ super().__init__(
109
109
  model=model,
110
110
  model_path=model_path,
111
111
  model_name=model_name,
@@ -153,7 +153,7 @@ class MLModelHandler(ModelHandler, ABC):
153
153
  return self._feature_vector
154
154
 
155
155
  @property
156
- def feature_weights(self) -> List[float]:
156
+ def feature_weights(self) -> list[float]:
157
157
  """
158
158
  Get the feature weights set in this handler.
159
159
 
@@ -213,7 +213,7 @@ class MLModelHandler(ModelHandler, ABC):
213
213
  """
214
214
  self._feature_vector = feature_vector
215
215
 
216
- def set_feature_weights(self, feature_weights: List[float]):
216
+ def set_feature_weights(self, feature_weights: list[float]):
217
217
  """
218
218
  Set the feature weights this model will be logged with.
219
219
 
@@ -224,18 +224,18 @@ class MLModelHandler(ModelHandler, ABC):
224
224
  def log(
225
225
  self,
226
226
  tag: str = "",
227
- labels: Dict[str, Union[str, int, float]] = None,
228
- parameters: Dict[str, Union[str, int, float]] = None,
229
- inputs: List[Feature] = None,
230
- outputs: List[Feature] = None,
231
- metrics: Dict[str, Union[int, float]] = None,
232
- artifacts: Dict[str, Artifact] = None,
233
- extra_data: Dict[str, MLTypes.ExtraDataType] = None,
227
+ labels: dict[str, Union[str, int, float]] = None,
228
+ parameters: dict[str, Union[str, int, float]] = None,
229
+ inputs: list[Feature] = None,
230
+ outputs: list[Feature] = None,
231
+ metrics: dict[str, Union[int, float]] = None,
232
+ artifacts: dict[str, Artifact] = None,
233
+ extra_data: dict[str, MLTypes.ExtraDataType] = None,
234
234
  algorithm: str = None,
235
235
  sample_set: MLTypes.DatasetType = None,
236
236
  target_columns: MLTypes.TargetColumnsNamesType = None,
237
237
  feature_vector: str = None,
238
- feature_weights: List[float] = None,
238
+ feature_weights: list[float] = None,
239
239
  ):
240
240
  """
241
241
  Log the model held by this handler into the MLRun context provided.
@@ -281,7 +281,7 @@ class MLModelHandler(ModelHandler, ABC):
281
281
  self.set_feature_weights(feature_weights=feature_weights)
282
282
 
283
283
  # Continue with the handler logging:
284
- super(MLModelHandler, self).log(
284
+ super().log(
285
285
  tag=tag,
286
286
  labels=labels,
287
287
  parameters=parameters,
@@ -299,15 +299,15 @@ class MLModelHandler(ModelHandler, ABC):
299
299
 
300
300
  def update(
301
301
  self,
302
- labels: Dict[str, Union[str, int, float]] = None,
303
- parameters: Dict[str, Union[str, int, float]] = None,
304
- inputs: List[Feature] = None,
305
- outputs: List[Feature] = None,
306
- metrics: Dict[str, Union[int, float]] = None,
307
- artifacts: Dict[str, Artifact] = None,
308
- extra_data: Dict[str, MLTypes.ExtraDataType] = None,
302
+ labels: dict[str, Union[str, int, float]] = None,
303
+ parameters: dict[str, Union[str, int, float]] = None,
304
+ inputs: list[Feature] = None,
305
+ outputs: list[Feature] = None,
306
+ metrics: dict[str, Union[int, float]] = None,
307
+ artifacts: dict[str, Artifact] = None,
308
+ extra_data: dict[str, MLTypes.ExtraDataType] = None,
309
309
  feature_vector: str = None,
310
- feature_weights: List[float] = None,
310
+ feature_weights: list[float] = None,
311
311
  ):
312
312
  """
313
313
  Update the model held by this handler into the MLRun context provided, updating the model's artifact properties
@@ -336,7 +336,7 @@ class MLModelHandler(ModelHandler, ABC):
336
336
  self._feature_weights = feature_weights
337
337
 
338
338
  # Continue with the handler update:
339
- super(MLModelHandler, self).update(
339
+ super().update(
340
340
  labels=labels,
341
341
  parameters=parameters,
342
342
  inputs=inputs,
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
  #
15
- from typing import Any, Dict
15
+ from typing import Any
16
16
 
17
17
  import numpy as np
18
18
  import pandas as pd
@@ -59,7 +59,7 @@ class PickleModelServer(V2ModelServer):
59
59
 
60
60
  return y_pred.tolist()
61
61
 
62
- def explain(self, request: Dict[str, Any]) -> str:
62
+ def explain(self, request: dict[str, Any]) -> str:
63
63
  """
64
64
  Returns a string listing the model that is being served in this serving function and the function name.
65
65
 
@@ -57,7 +57,7 @@ class MLPlan(Plan, ABC):
57
57
  False.
58
58
  """
59
59
  self._need_probabilities = need_probabilities
60
- super(MLPlan, self).__init__()
60
+ super().__init__()
61
61
 
62
62
  @property
63
63
  def need_probabilities(self) -> bool:
@@ -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
- from typing import Dict
16
15
 
17
16
  import plotly.graph_objects as go
18
17
  from sklearn.calibration import calibration_curve
@@ -51,7 +50,7 @@ class CalibrationCurvePlan(MLPlotPlan):
51
50
  self._strategy = strategy
52
51
 
53
52
  # Continue the initialization for the MLPlan:
54
- super(CalibrationCurvePlan, self).__init__(need_probabilities=True)
53
+ super().__init__(need_probabilities=True)
55
54
 
56
55
  def is_ready(self, stage: MLPlanStages, is_probabilities: bool) -> bool:
57
56
  """
@@ -73,7 +72,7 @@ class CalibrationCurvePlan(MLPlotPlan):
73
72
  model: MLTypes.ModelType = None,
74
73
  x: MLTypes.DatasetType = None,
75
74
  **kwargs,
76
- ) -> Dict[str, Artifact]:
75
+ ) -> dict[str, Artifact]:
77
76
  """
78
77
  Produce the calibration curve according to the ground truth (y) and predictions (y_pred) values. If predictions
79
78
  are not available, the model and a dataset can be given to produce them.