Skip to content

Commit

Permalink
[Docs] Add v1.7 updates to change log (mlrun#6260)
Browse files Browse the repository at this point in the history
  • Loading branch information
jillnogold authored Oct 28, 2024
1 parent 3b49178 commit ca98312
Show file tree
Hide file tree
Showing 9 changed files with 264 additions and 125 deletions.
312 changes: 241 additions & 71 deletions docs/change-log/index.md

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/concepts/model-monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Model monitoring is currently in Tech Preview status. Migrating from 1.7.0 to la
../model-monitoring/monitoring-models
../model-monitoring/monitoring-models-grafana
../model-monitoring/index
../concepts/alerts
```

**See also**
Expand Down
41 changes: 3 additions & 38 deletions docs/concepts/notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,7 @@ MLRun supports configuring notifications on jobs and scheduled jobs. This sectio


## The notification object
The notification object's schema is:
- `kind`: str - notification kind (slack, git, etc...)
- `when`: list[str] - run states on which to send the notification (completed, error, running)
- `name`: str - notification name
- `message`: str - notification message
- `severity`: str - notification severity (info, warning, error, debug)
- `params`: dict - notification parameters (See definitions in [Notification Kinds](#notification-params-and-secrets))
- `secret_params`: dict - secret data notification parameters (See definitions in [Notification Params and Secrets](#notification-kinds))
- `condition`: str - jinja template for a condition that determines whether the notification is sent or not (See [Notification Conditions](#notification-conditions))
See {py:class}`~module-mlrun.common.schemas.notification`.


## Local vs. remote
Expand All @@ -33,7 +25,7 @@ Usually, a local run sends locally, and a remote run sends remotely.
However, there are several special cases where the notification is sent locally either way.
These cases are:
- Local or KFP Engine Pipelines: To conserve backwards compatibility, the SDK sends the notifications as it did before adding the run
notifications mechanism. This means you need to watch the pipeline in order for its notifications to be sent. (Remote pipelines act differently. See [Configuring Notifications For Pipelines](#configuring-notifications-for-pipelines For Pipelines for more details.)
notifications mechanism. This means you need to watch the pipeline in order for its notifications to be sent. (Remote pipelines act differently. See [Configuring Notifications For Pipelines](#configuring-notifications-for-pipelines) for more details.
- Dask: Dask runs are always local (against a remote Dask cluster), so the notifications are sent locally as well.

> **Disclaimer:** Notifications of local runs aren't persisted.
Expand All @@ -51,34 +43,7 @@ It's essential to utilize `secret_params` exclusively for handling sensitive inf

## Notification kinds

Currently, the supported notification kinds and their params are as follows:

- `slack`:
- `webhook`: The slack webhook to which to send the notification.
- `git`:
- `token`: The git token to use for the git notification.
- `repo`: The git repo to which to send the notification.
- `issue`: The git issue to which to send the notification.
- `merge_request`: In GitLab (as opposed to GitHub), merge requests and issues are separate entities.
If using merge request, the issue will be ignored, and vice versa.
- `server`: The git server to which to send the notification.
- `gitlab`: (bool) Whether the git server is GitLab or not.
- `webhook`:
- `url`: The webhook url to which to send the notification.
- `method`: The http method to use when sending the notification (GET, POST, PUT, etc...).
- `headers`: (dict) The http headers to send with the notification.
- `override_body`: (dict) The body to send with the notification. If not specified, the body will be a dict with the
`name`, `message`, `severity`, and the `runs` list of the completed runs. You can also add the run's details using: `"override_body": {"message":"Run Completed {{ runs }}"`.
Results would look like
```
{
"message": "Run Completed [{'project': 'my-project', 'name': 'my-function', 'host': <run-host>, 'status': {'state': 'completed', 'results': <run-results>}}]"
}
```
- `verify_ssl`: (bool) Whether SSL certificates are validated during HTTP requests or not,
The default is set to `True`.
- `console` (no params, local only)
- `ipython` (no params, local only)
See {py:class}`~mlrun.common.schemas.notification.NotificationKind`.

## Configuring notifications for runs

Expand Down
2 changes: 1 addition & 1 deletion docs/genai/live-ops/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ preventing hallucination: minimizing the risk of LLMs generating factually incor
- {ref}`genai-02-mm-llm`
- {ref}`realtime-monitor-drift-tutor`
- [Build & Deploy Custom (fine-tuned) LLM Models and Applications](https://github.com/mlrun/demo-llm-tuning/tree/main)
- [Large Language Model Monitoring](https://github.com/mlrun/demo-monitoring-and-feedback-loop/blob/main/notebook.ipynb), which includes using an LLM as a judge
- [Large Language Model Monitoring](https://github.com/mlrun/demo-monitoring-and-feedback-loop), which includes using an LLM as a judge
2 changes: 1 addition & 1 deletion docs/model-monitoring/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ as an MLRun function and create MLRun artifacts, using the built-in class `Evide
Projects are used to group functions that use the same model monitoring application. You first need to create a project for a specific application.
Then you disable the default app, enable your customer app, and create and run the functions.

The basic flow for classic ML and other models is the same, but the apps and the infer requests are different. See {ref}`realtime-monitor-drift-tutor`.
The basic flow for classic ML and other models is the same, but the apps and the infer requests are different.

## Multi-port predictions

Expand Down
9 changes: 6 additions & 3 deletions docs/runtimes/configuring-job-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@ The resulting configuration for the function is:
{"region": "us-central1", "zone": "us-east1", "gpu": "true", "arch": "amd64"}
```

```{admonition} Tip
Be sure that the node selectors you are configuring are compatible with the available nodes in your cluster. Incompatible node selectors are not validated at the project level and could result in scheduling issues when running functions.
```
### Overriding node selectors

You can override and ignore node selectors defined at the project level or service level from the function level
Expand All @@ -365,21 +368,21 @@ The zone label from the project level is completely removed, and the resulting c
```
{"gpu": "true", "arch": "amd64"}
```
### Preventing conflicts
### Preventing and resolving conflicts

If your function run is stuck with the status `pending`, it's possible that the "specified" node selector does not exist. There are three
levels of node selectors in MLRun: function, project, and service. At runtime, the system combines these selectors and applies the resolved
configuration to the pod.

How to Investigate:
**How to Investigate:**
1. Check the Configuration Files: Look in the `function.yaml` and `project.yaml` files to see if there are any node selector settings.
2. Review Node Selectors in the UI: Go to **Projects > Jobs and Workflows > Monitor Jobs > Overview > Node Selector**. This shows the node selector
that was ultimately defined for the run after combining the function, project, and service settings.
3. Check Pod Errors in the UI: Go to **Projects > Jobs and Workflows > Monitor Job > Pods**, where you can see the pod details. If no nodes are found
that match the specified node selector, the error is displayed here.
> For Nuclio functions (Nuclio, serving, and application runtimes) the final resolved node selector is displayed in the Nuclio UI. It is not visible on MLRun function spec since it may be further enriched by Nuclio (See {ref}node-selector-runtimes section for more information).
Resolving Conflicts:</br>
**Resolving Conflicts**:</br>
If the node selectors from the function, project, or service levels, conflict or result in an impossible combination, you can resolve
the issue by specifying the conflicting node selector key with an empty string value on your function. Be cautious with this approach
and consult your project admin before making changes to ensure it won’t cause other issues.
Expand Down
4 changes: 2 additions & 2 deletions docs/store/artifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ Example artifact URLs:


Artifacts are comprised of two parts: an artifact object that points to the artifact data; and the artifact data (files). You can delete artifacts from a specific project
and choose what you want to delete. You cannot delete artifacts of type: ModelArtifact, DirArtifact, and DatasetArtifact that has more than one file.
and choose what you want to delete. You cannot delete artifacts of type: ModelArtifact, DirArtifact, or DatasetArtifact that has more than one file.
Deleting artifact data is supported for V3IO, Google, Azure, DBFS, Filestore, and S3.


The options for {py:meth}`~mlrun.projects.MlrunProject.delete_artifact`:
- metadata-only: Delete only the artifact object. The related artifact data remains.
- data-optional: Delete the artifact object and the data. If data deletion is unsuccessful, deletes only the object.
- data-force: Delete the artifact object and the data. If data deletion is unsuccessful, does not delete the object either.
- data-force: Delete the artifact object and the data. If data deletion is unsuccessful, the object is also not deleted.

For example:
```
Expand Down
10 changes: 5 additions & 5 deletions docs/tutorials/demos.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ These end-to-end demos demonstrate how to use the Iguazio AI platform, MLRun, an

|Demo|Description|
|-----------------------------------|---------------------------------------------------------------------------------------------|
|<b>[Call center demo](https://github.com/mlrun/demo-call-center)</b>|This demo showcases how to use LLMs to turn audio files, from call center conversations between customers and agents, into valuable data &mdash; all in a single workflow orchestrated by MLRun. MLRun automates the entire workflow, auto-scales resources as needed, and automatically logs and ses values between the different workflow steps.|
|<b>[Call center](https://github.com/mlrun/demo-call-center)</b>|This demo showcases how to use LLMs to turn audio files, from call center conversations between customers and agents, into valuable data &mdash; all in a single workflow orchestrated by MLRun. MLRun automates the entire workflow, auto-scales resources as needed, and automatically logs and ses values between the different workflow steps.|
|<b>[Fine tune an LLM and build a BOT](https://github.com/mlrun/demo-llm-tuning/blob/main)</b>|This demo shows how to fine-tune an LLM and build a chatbot that can answer all your questions about MLRun's MLOps. It starts with a pre-trained model from Hugging Face, fine tunes the model, creates an automated training pipeline, and deploys a serving graph. The serving graph includes post-processing for accuracy of generated text, and filtering for toxicity.|
|<b>[Interactive bot demo using LLMs](https://github.com/mlrun/demo-llm-bot/blob/main/README.md)</b>|This demo showcases the usage of Language Models (LLMs) and MLRun to build an interactive chatbot using your own data for Retrieval Augmented Question Answering. The data will be ingested and indexed into a Vector Database to be queried by an LLM in real-time. The project utilizes MLRun for orchestration/deployment, HuggingFace embeddings for indexing data, Milvus for the vector database, OpenAI's GPT-3.5 model for generating responses, Langchain to retrieve relevant data from the vector store and augment the response from the LLM, and Gradio for building an interactive frontend.|

|<b>[Interactive bot using LLMs](https://github.com/mlrun/demo-llm-bot/blob/main/README.md)</b>|This demo showcases the usage of Language Models (LLMs) and MLRun to build an interactive chatbot using your own data for Retrieval Augmented Question Answering. The data will be ingested and indexed into a Vector Database to be queried by an LLM in real-time. The project utilizes MLRun for orchestration/deployment, HuggingFace embeddings for indexing data, Milvus for the vector database, OpenAI's GPT-3.5 model for generating responses, Langchain to retrieve relevant data from the vector store and augment the response from the LLM, and Gradio for building an interactive frontend.|
|<b>[LLM monitoring and feedback loop: Banking](https://github.com/mlrun/demo-monitoring-and-feedback-loop/blob/main/README.md)</b>|This demo illustrates how to train, deploy, and monitor, and LLM using an approach described as "LLM as a judge".|

## ML Demos

|Demo|Description|
|-----------------------------------|---------------------------------------------------------------------------------------------|
|<b>[Mask Detection Demo](https://github.com/mlrun/demo-mask-detection)</b>|This demo contains three notebooks that: Serve the model as a serverless function in an http endpoint; Train and evaluate a model for detecting if an image includes a person who is wearing a mask, by using Tensorflow, Keras, or PyTorch; Write an automatic pipeline where you download a dataset of images, train and evaluate the model, then optimize the model (using ONNX) and serve it.|
|<b>[Mask Detection](https://github.com/mlrun/demo-mask-detection)</b>|This demo contains three notebooks that: Serve the model as a serverless function in an http endpoint; Train and evaluate a model for detecting if an image includes a person who is wearing a mask, by using Tensorflow, Keras, or PyTorch; Write an automatic pipeline where you download a dataset of images, train and evaluate the model, then optimize the model (using ONNX) and serve it.|
|<b>[Fraud Prevention (Feature Store)](https://github.com/mlrun/demo-fraud)</b>|This demo shows the usage of MLRun and the feature store. Fraud prevention specifically is a challenge as it requires processing raw transaction and events in real-time and being able to quickly respond and block transactions before they occur. Consider, for example, a case where you would like to evaluate the average transaction amount. When training the model, it is common to take a DataFrame and just calculate the average. However, when dealing with real-time/online scenarios, this average has to be calculated incrementally.|
|<b>[Sagemaker demo](https://github.com/mlrun/demo-sagemaker)</b>|This demo showcases how to build, manage, and deploy ML models using AWS SageMaker and MLRun. It emphasizes the automation of ML workflows from development to production.|
|<b>[Sagemaker](https://github.com/mlrun/demo-sagemaker)</b>|This demo showcases how to build, manage, and deploy ML models using AWS SageMaker and MLRun. It emphasizes the automation of ML workflows from development to production.|
|<b>[Building Production Pipelines WIth AzureML and MLRun](https://github.com/mlrun/demos/tree/1.7.x/azureml-demo) </b>|This demo uses the MLRun Feature Store to ingest and prepare data, create an offline feature vector (snapshot) for training, run AzureML AutoML Service as an automated step (function) in MLRun, view and compare the AzureML Models using MLRun tools, Build a real-time serving pipeline, and provide real-time model monitoring. By default, this demo works with the online feature store, which is currently not part of the Open Source MLRun default deployment.|
8 changes: 5 additions & 3 deletions docs/tutorials/genai-02-model-monitor-llm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"- [Add the monitoring-function code](#dd-the-monitoring-function-code)\n",
"- [Deploy the model, enable tracking, and deploy the function](#deploy-the-model-enable-tracking-and-deploy-the-function)\n",
"\n",
"This tutorial explains how an LLM can be monitored. To see it in action, run the [Large Language Model Monitoring](https://github.com/mlrun/demo-monitoring-and-feedback-loop) demo.\n",
"This tutorial explains how an LLM can be monitored. To see it in action, run the [Large Language Model Monitoring](https://github.com/mlrun/demo-monitoring-and-feedback-loop/blob/main/README.md) demo.\n",
"\n",
"## Prerequisites"
]
Expand Down Expand Up @@ -321,7 +321,8 @@
},
{
"cell_type": "markdown",
"id": "584083af",
"id": "f713b7d9",

"metadata": {},
"source": [
"Adding the model parameters to the endpoint. This allow the model server class to initialize."
Expand All @@ -330,7 +331,8 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e0361bae",
"id": "2ea3139a",

"metadata": {},
"outputs": [],
"source": [
Expand Down

0 comments on commit ca98312

Please sign in to comment.