Skip to content

Commit e0e8b12

Browse files
authored
[Docs] update: change log 1.10.1, Mail notification, add 3 params that need manual cfg (#9129) [1.10.x] (#9144)
### 📝 Description [ML-10406](https://iguazio.atlassian.net/browse/ML-10406), [ML-10488](https://iguazio.atlassian.net/browse/ML-10406) - Notifications: Add details on 3 parameters that need to be cfg in MLRUN (and not in Igz) - Notifications: Reorg first few paragraphs - Add note to App runtime describing limitation in [ML-11883](https://iguazio.atlassian.net/browse/ML-11883) - Change log 1.10.1: closed issues: add 11791 and 11277 [ML-10488]: https://iguazio.atlassian.net/browse/ML-10488?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [ML-10488]: https://iguazio.atlassian.net/browse/ML-10488?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [ML-10406]: https://iguazio.atlassian.net/browse/ML-10406?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [ML-11883]: https://iguazio.atlassian.net/browse/ML-11883?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ # Conflicts: # docs/runtimes/application.ipynb [ML-10406]: https://iguazio.atlassian.net/browse/ML-10406?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [ML-10488]: https://iguazio.atlassian.net/browse/ML-10488?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [ML-11883]: https://iguazio.atlassian.net/browse/ML-11883?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [ML-10488]: https://iguazio.atlassian.net/browse/ML-10488?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [ML-10488]: https://iguazio.atlassian.net/browse/ML-10488?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [ML-10406]: https://iguazio.atlassian.net/browse/ML-10406?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [ML-11883]: https://iguazio.atlassian.net/browse/ML-11883?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 2f6ff7a commit e0e8b12

File tree

3 files changed

+51
-35
lines changed

3 files changed

+51
-35
lines changed

docs/change-log/index.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,24 @@ See a full description of KFP, Python, and the workflow engines in {ref}`local-r
3131
### Closed issues
3232
| ID |Description |
3333
|-------|----------------------------------------------------------------------------|
34-
|ML-10488|Validation of mail configuration does not fail on non-required parameters.|
34+
|ML-10488|Validation of mail configuration does not fail on non-required parameters. See the updated documentation [Mail notifications](../concepts/notifications.md#mail-notifications).|
35+
|ML-11277|Increased the performance of reading partitioned parquets, thereby preventing lag in processing the model monitoring events.|
3536
|ML-11383|Monitoring app UI: The Kind column in the Results tab now prints the description, and not the value as previously. |
3637
|ML-11400|When deploying a serving function as a job, the artifact is now as expected. |
3738
|ML-11408|After an app runtime reached `max_replicas`, it now scales down to `min_replicas` as expected when load decreases.|
3839
|ML-11517|Resolved the thread-safety issues that occasionally caused failure during invoke time when serving using 2 Hugging Face models with `thread_pool` execution mechanism.|
3940
|ML-11530|Model monitoring appplications that have underscores in their names no longer causebreakage when trying to view the counters from the Project view. Underscores in function names will be deprecated in v1.11.0. See [Upcoming changes](#upcoming-changes).|
4041
|ML-11545|Running a workflow with Jupyter on Iguazio systems, the pipeline UI link now resolves successfully. |
41-
|ML-11597| The Model monitoring tutorial now runs successfully. Previously it failed with an error "NameError: name 'alert_objects' is not defined".|
42+
|ML-11597|The Model monitoring tutorial now runs successfully. Previously it failed with an error "NameError: name 'alert_objects' is not defined".|
4243
|ML-11602|In a Python 3.9 environment on Dask clusters, when running code that specifies the `mlrun/ml-base` image, the image name is now replaced with `mlrun/mlrun`. |
44+
|ML-11791|Documentation: Clarified project.save() and function.save(): functions are not saved when you save your project, and how to save functions to the DB. See [A word about saving functions](../runtimes/create-and-use-functions.ipynb#a-word-about-saving-functions).|
4345
|NA|Security fixes.|
4446

4547
(v1100)=
4648
## v1.10.0 (November 2025)
4749

4850
```{admonition} Important
49-
**This is the last version that supports Python 3.9 and TDEngine. They will not be supported in MLRun v1.11.0.<br>
51+
**v1.10.x are the last versions that support Python 3.9 and TDEngine. They will not be supported in MLRun v1.11.0.<br>
5052
TDEngine will be replaced with TimescaleDB. Model monitoring data in TDEngine will not be migrated.**
5153
```
5254

@@ -742,7 +744,7 @@ To upgrade the MLRun server:
742744
| ID | Description |
743745
|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
744746
|ML-3501| Support for running Spark jobs on Databricks cluster. See [Databricks](../runtimes/databricks.ipynb). [View in Git](https://github.com/mlrun/mlrun/pull/3996). |
745-
|ML-3854| Support for webhook notification. See webhook in [Notification Kinds](../concepts/notifications.md#notification-kinds) and [view in Git](https://github.com/mlrun/mlrun/pull/3946). |
747+
|ML-3854| Support for webhook notification. See webhook in {ref}`notifications` and [view in Git](https://github.com/mlrun/mlrun/pull/3946). |
746748
|ML-4059| Support for adding env vars or secrets to the docker build during runtime. See [Extra arguments](../runtimes/image-build.md#extra-arguments), {py:meth}`~mlrun.projects.MlrunProject.build_config` and [view in Git](https://github.com/mlrun/mlrun/pull/4013). |
747749

748750
#### UI
@@ -1441,6 +1443,7 @@ with a drill-down to view the steps and their details. [Tech Preview]
14411443
|ML-9338|If the same project+key were created from both a hyper-param run and single run, and you removed the latest tag from everything, MLRun assigns latest to either the hyper-param items or the single run item, depending on which item comes up first when iterating over the results: it might not be the actual latest.|NA|v1.8.0|
14421444
|ML-9913|UI: There may be a discrepancy in the artifact count between the Project monitoring page and the Artifacts page when running hyper-param jobs without a best-iteration. |Always provide a selection criteria for `best-iteration`.|v1.8.0|
14431445
|ML-11463|The application graph in the model monitoring UI does not present the “dead zones” where no activity happened, and the time axis representation is not consistent.|NA|v1.10.0|
1446+
|ML-11654|MLRun serving graphs with HTTP trigger and no responder. When a serving function is configured with an HTTP trigger only and the graph does not include any `.respond()` step, the function does not return the actual result or error of the graph execution. Instead, it only returns a generic invocation ID (for example, {"id": "<uuid>"}), even if an exception occurred inside the graph.|Add a `.respond()` step.|v1.10.0|
14441447
|ML-11771|In rare circumstances, access to projects is temporarily unavailable.|Restart MLRun.|V1.9.2|
14451448

14461449

docs/concepts/notifications.md

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ This section describes the notifications SDK and its usage.
99

1010
**In this section**
1111

12-
- [The notification object](#the-notification-object)
12+
- [SDK](#sdk)
1313
- [Local vs. remote](#local-vs-remote)
1414
- [Notification parameters and secrets](#notification-parameters-and-secrets)
15-
- [Notification kinds](#notification-kinds)
15+
- [MLRun on Iguazio](#mlrun-on-iguazio)
16+
- [MLRun CE](#mlrun-ce)
1617
- [Mail notifications](#mail-notifications)
1718
- [Configuring notifications for runs](#configuring-notifications-for-runs)
1819
- [Configuring notifications for pipelines](#configuring-notifications-for-pipelines)
@@ -21,8 +22,11 @@ This section describes the notifications SDK and its usage.
2122
- [Notification conditions](#notification-conditions)
2223

2324

24-
## The notification object
25-
See {py:class}`~mlrun.common.schemas.notification.Notification`.
25+
## SDK
26+
- {py:class}`~mlrun.common.schemas.notification.Notification`: The notification object
27+
- {py:class}`~mlrun.common.schemas.notification.NotificationKind`: The notification kinds
28+
- {py:class}`~mlrun.db.httpdb.HTTPRunDB.refresh_smtp_configuration`: Gets or refreshes the SMTP configuration from the Iguazio platform and sets it
29+
as the default SMTP configuration (creates an `mlrun-smtp-config` with the SMTP configuration). For privileged user: `IT Admin`.
2630

2731

2832
## Local vs. remote
@@ -42,17 +46,44 @@ To ensure the safety of this sensitive data, the parameters are split into two o
4246
Either can be used to store any notification parameter. However the `secret_params` is protected by project secrets.
4347
When a notification is created, its `secret_params` are automatically masked and stored in an mlrun project secret.
4448
The name of the secret is built from the hash of the parameters themselves (so if multiple notifications use the same secret, it doesn't waste space in the project secret).
45-
Inside the notification's `secret_params`, you'll find a reference to the secret under the `secret` key after it's masked.
49+
Inside the notification's `secret_params`, there's a reference to the secret under the `secret` key after it's masked.
4650
For non-sensitive notification parameters, you can simply use the `params` parameter, which doesn't go through this masking process.
4751
It's essential to utilize `secret_params` exclusively for handling sensitive information, ensuring secure data management.
4852

4953

50-
## Notification kinds
54+
## Mail notifications
55+
### MLRun on Iguazio
56+
When MLRun is deployed on the Iguazio platform, your IT Admin can [configure the SMTP server in the Iguazio platform](https://www.iguazio.com/docs/latest-release/cluster-mgmt/deployment/post-deployment-howtos/smtp/). To use this as your default configuration, run the following (with privileged user - `IT Admin`):
57+
```python
58+
import mlrun
59+
60+
mlrun.get_run_db().refresh_smtp_configuration()
61+
```
62+
The `refresh_smtp_configuration` method gets the SMTP configuration from the Iguazio platform and sets it
63+
as the default, cluster-wide, SMTP configuration (creates an `mlrun-smtp-config` secret with the SMTP configuration).
64+
If you edit the configuration on the Iguazio platform, run the `refresh_smtp_configuration` method again.
5165

52-
See {py:class}`~mlrun.common.schemas.notification.NotificationKind`.
66+
Three parameters cannot be configured on the Iguazio platform. To set their defaults for the cluster, run these commands with the relevant values:
67+
```
68+
kubectl -n default-tenant patch secret mlrun-smtp-config -p='{"stringData":{"use_tls":"false"}}'
69+
kubectl -n default-tenant patch secret mlrun-smtp-config -p='{"stringData":{"start_tls":"true"}}'
70+
kubectl -n default-tenant patch secret mlrun-smtp-config -p='{"stringData":{"validate_certs":"false"}}'
71+
```
72+
These parameters are maintained when modifying parameters on the Iguazio platform.
73+
74+
### MLRun CE
75+
In the community edition, you can use your own SMTP server.
76+
To configure it, manually create the `mlrun-smtp-config` Kubernetes secret with the default
77+
parameters for the SMTP server (`server_host`, `server_port`, `username`, `password`, `start_tls`, etc.).
78+
After creating or editing the secret, refresh the MLRun SMTP configuration by running the `refresh_smtp_configuration` method.
79+
80+
### Create a mail notification object
81+
82+
The following snippet shows the format of a notification object.
83+
You can inherit the default `mlrun-smtp-config`, or choose to overwrite parameter/s.
84+
Any `params` not defined in this format will be enriched with the values in the `mlrun-smtp-config` secret.
85+
The only mandatory field in `params` is `email_addresses`.
5386

54-
## Mail notifications
55-
To send mail notifications, you need an existing SMTP server.
5687
```python
5788
mail_notification = mlrun.model.Notification(
5889
kind="mail",
@@ -62,9 +93,6 @@ mail_notification = mlrun.model.Notification(
6293
condition="",
6394
severity="verbose",
6495
params={
65-
"start_tls": True,
66-
"use_tls": False,
67-
"validate_certs": False,
6896
"email_addresses": ["[email protected]"],
6997
},
7098
)
@@ -82,28 +110,9 @@ The `params` argument is a dictionary that supports the following fields:
82110
- `validate_certs` (boolean): Whether to validate the certificates
83111

84112
You can read more about `start_tls` and `use_tls` on the [aiosmtplib docs](https://aiosmtplib.readthedocs.io/en/stable/encryption.html).
85-
Missing params are enriched with default values, which can be configured in the `mlrun-smtp-config` kubernetes (see below).
86113

87114
Email notifications on local runs must explicitly include all SMTP settings.
88115

89-
### MLRun on Iguazio
90-
If MLRun is deployed on the Iguazio platform, an SMTP server already exists.
91-
To use it, run the following (with privileged user - `IT Admin`):
92-
```python
93-
import mlrun
94-
95-
mlrun.get_run_db().refresh_smtp_configuration()
96-
```
97-
The `refresh_smtp_configuration` method gets the SMTP configuration from the Iguazio platform and sets it
98-
as the default SMTP configuration (create an `mlrun-smtp-config` with the SMTP configuration).
99-
If you edit the configuration on the Iguazio platform, run the `refresh_smtp_configuration` method again.
100-
101-
### MLRun CE
102-
In the community edition, you can use your own SMTP server.
103-
To configure it, manually create the `mlrun-smtp-config` kubernetes secret with the default
104-
params for the SMTP server (`server_host`, `server_port`, `username`, `password`, etc..).
105-
After creating or editing the secret, refresh the MLRun SMTP configuration by running the `refresh_smtp_configuration` method.
106-
107116
## Configuring notifications for runs
108117

109118
In any `run` method you can configure the notifications via their model. For example:

docs/runtimes/application.ipynb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
"- Deploy a model and a UI &mdash; the model serving is the backend and the UI is the side car.\n",
2323
"- Deploy a fastapi web-server with an MLRun model. In this case, the Nuclio function is a reverse proxy and the user web-app is the side car.\n",
2424
"\n",
25+
"```{admonition} Note\n",
26+
"When using an application runtime with min-replicas set to 0 (Scale-To-Zero enabled) and direct port access enabled , be aware of a known limitation in metric collection. Scale-to-Zero currently relies on metrics collected only from the main Nuclio container that runs the reverse proxy. Traffic sent directly to the application runtime sidecar bypasses these metrics, so such requests are not counted. As a result, the function may scale down to zero even while it is actively serving traffic through the direct port. In addition, once scaled to zero, the function can only be scaled back up by invoking the main Nuclio port, not the direct port. To avoid unexpected behavior, do not rely on direct port traffic alone when using Scale-To-Zero.\n",
27+
"```\n",
28+
"\n",
2529
"**In this section**\n",
2630
"- [Usage examples](#usage-examples)\n",
2731
"- [Authentication modes](#authentication-modes)\n",

0 commit comments

Comments
 (0)