# MLRun MLRun is an open source AI orchestration platform for quickly building and managing continuous (gen) AI applications across their lifecycle. # Documentation - [Command-Line Interface](https://docs.mlrun.org/en/stable/cli.html): Learn about the CLI commands and how to use them with Git and source archives. - [Using MLRun](https://docs.mlrun.org/en/stable/index.html): MLRun is an open source AI orchestration platform for quickly building and managing continuous (gen) AI applications across their lifecycle. - [Glossary](https://docs.mlrun.org/en/stable/glossary.html): This page describes commonly used MLRun and industry terminology. - [MLRun ecosystem](https://docs.mlrun.org/en/stable/ecosystem.html): This section lists the data stores, development tools, services, platforms, etc., supported by MLRun's open ecosystem. - [Resources](https://docs.mlrun.org/en/stable/resources.html): Familiarize yourself with the resources that can help you in your MLRun journey. - [Set up your client environment](https://docs.mlrun.org/en/stable/setup-guide.html): This guide will walk you through the steps required to set up your MLRun client environment, - [Documenting mlrun](https://docs.mlrun.org/en/stable/CONTRIBUTING.html): This document describes how to write the external documentation for `mlrun`, the - [Working with secrets](https://docs.mlrun.org/en/stable/secrets.html): When executing jobs through MLRun, the code might need access to specific secrets, for example to access data residing on a data-store that requires credentials (such as a private S3 bucket), or many other similar needs. - [MLRun architecture](https://docs.mlrun.org/en/stable/architecture.html): Instead of a siloed, complex, and manual process, MLRun enables production pipeline design using a modular strategy, where the different parts contribute to a continuous, automated, and far simpler path from research and development to scalable production pipelines without refactoring code, adding glue logic, or spending significant efforts on data and ML engineering. - [MLOps development workflow](https://docs.mlrun.org/en/stable/mlops-dev-flow.html): MLRun automates the MLOps workflow end-to-end, simplifying and accelerating the time to production, in a scalable and reproducible way. - [MLRun cheat sheet](https://docs.mlrun.org/en/stable/cheat-sheet.html): The cheat sheet provides simple code examples of many of MLRun's features. - [Ingest and process data](https://docs.mlrun.org/en/stable/data-prep/index.html): MLRun provides a set of tools and capabilities to streamline the task of data ingestion and processing. - [Logging datasets](https://docs.mlrun.org/en/stable/data-prep/logging_datasets.html): Storing datasets is important in order to have a record of the data that was used to train models, as well as storing any processed data. - [Using data sources and items](https://docs.mlrun.org/en/stable/data-prep/ingesting_data.html): Learn how to access data by using the DataItem object, and how to process data. - [Ingest data using the feature store](https://docs.mlrun.org/en/stable/data-prep/ingest-data-fs.html): Define the source and material targets, and start the ingestion process (as [local process](#ingest-data-locally), [using an MLRun job](#ingest-data-using-an-mlrun-job), [real-time ingestion](#real-time-ingestion), or [incremental ingestion](#incremental-ingestion)). - [Training with the feature store](https://docs.mlrun.org/en/stable/feature-store/retrieve-offline-data.html): Learn how to train your model using an offline dataset created by the MLRun feature store. - [Feature set transformations](https://docs.mlrun.org/en/stable/feature-store/transformations.html): You can build a feature set transformation using {ref}`serving graphs`. - [Feature store](https://docs.mlrun.org/en/stable/feature-store/feature-store.html): A feature store provides a single view for sharing all available features across the organization along with their metadata. - [Feature vectors](https://docs.mlrun.org/en/stable/feature-store/feature-vectors.html): You can define a group of features from different feature sets as a {py:class}`~mlrun.feature_store.FeatureVector`. - [Feature sets](https://docs.mlrun.org/en/stable/feature-store/feature-sets.html): In MLRun, a group of features can be ingested together and stored in logical group called feature set. - [Feature store's built-in steps](https://docs.mlrun.org/en/stable/feature-store/feature-store-available-steps.html): A step runs a function or class handler or a REST API call: MLRun comes with pre-built steps that include data manipulation, readers, writers and model serving. - [Ingest features with Spark](https://docs.mlrun.org/en/stable/feature-store/using-spark-engine.html): The feature store supports using Spark for ingesting, transforming, and writing results to data targets. - [Sources and targets](https://docs.mlrun.org/en/stable/feature-store/sources-targets.html): MLRun supports a variety of sources (for batch and real-time ingestion) and targets for working with the feature store. - [Feature store overview](https://docs.mlrun.org/en/stable/feature-store/feature-store-overview.html): In machine-learning scenarios, generating a new feature, called feature engineering, takes a tremendous amount of work: the same features - [Serving with the feature store](https://docs.mlrun.org/en/stable/feature-store/training-serving.html): Learn how to use the feature store to create online features and then to serve the model. - [Feature store end-to-end demo](https://docs.mlrun.org/en/stable/feature-store/end-to-end-demo/index.html): This demo shows the usage of MLRun and the feature store: [Data ingestion & preparation](01-ingest-datasources.ipynb), [Model training & testing](02-create-training-model.ipynb), [Model serving](03-deploy-serving-model.ipynb), [Building an automated ML pipeline](04-pipeline.ipynb). - [Running a task (job)](https://docs.mlrun.org/en/stable/concepts/submitting-tasks-jobs-to-functions.html): Learn how to submit a job using `run_function`, and use the `RunObject` to track the job and its results. - [Automated experiment tracking](https://docs.mlrun.org/en/stable/concepts/auto-logging-mlops.html): You can write custom training functions or use built-in hub functions for training models using common open-source frameworks and/or cloud services (such as AzureML, Sagemaker, etc.). - [Scheduled jobs and workflows](https://docs.mlrun.org/en/stable/concepts/scheduled-jobs.html): Oftentimes you may want to run a `job` on a regular schedule, for example, fetching from a datasource every morning, compiling an analytics report every month, or detecting model drift every hour. - [Kinds of functions (runtimes)](https://docs.mlrun.org/en/stable/concepts/functions-overview.html): When you create an MLRun function you need to specify a runtime kind (for example, `kind='job'`); each runtime supports its own specific attributes (e.g. Jars for Spark, triggers for Nuclio, auto-scaling for Dask, etc.). - [Decorators and auto-logging](https://docs.mlrun.org/en/stable/concepts/decorators-and-auto-logging.html): While it is possible to log results and artifacts using {ref}`the MLRun execution context`, it is often more convenient to use the {py:func}`mlrun.handler` decorator. - [Data and artifacts](https://docs.mlrun.org/en/stable/concepts/data.html): One of the biggest challenge in distributed systems is handling data given the different access methods, APIs, and authentication mechanisms across types and providers: MLRun addresses this challenge by providing abstractions to access structured and unstructured data. - [Batch runs and workflows](https://docs.mlrun.org/en/stable/concepts/runs-workflows.html): A workflow is a definition of execution of functions: it defines the order of execution of multiple dependent steps in a directed acyclic graph (DAG). - [Notifications](https://docs.mlrun.org/en/stable/concepts/notifications.html): Notifications are used to inform you of system events on jobs, both scheduled and manually triggered. - [Alerts](https://docs.mlrun.org/en/stable/concepts/alerts.html): The alert mechanism provides a flexible way to detect and respond to important system events, such as job failures or model drift. - [Model monitoring](https://docs.mlrun.org/en/stable/concepts/model-monitoring.html): The MLRun's model monitoring service includes built-in model monitoring and reporting capabilities. - [Running a multi-stage workflow](https://docs.mlrun.org/en/stable/concepts/workflow-overview.html): Multi-stage workflows define the order of execution of multiple dependent steps in a DAG. - [Types of workflows, KFP, and Python](https://docs.mlrun.org/en/stable/concepts/local-remote.html): A workflow is a Python file that defines and triggers a series of MLRun jobs. - [Alerts and notifications](https://docs.mlrun.org/en/stable/concepts/alerts-notifications.html): {ref}`notifications` are used to notify you of system events on jobs (both scheduled and manually triggered), for example, job finish, and additionally on job start of workflows; {ref}`alerts` are a broader mechanism that allows defining rules like "event X happens N times in T minutes," and are often used for monitoring production models or failing jobs. - [MLRun execution context](https://docs.mlrun.org/en/stable/concepts/mlrun-execution-context.html): MLRun uses the job `context` object inside the code to provide access to job metadata, parameters, inputs, secrets, and API for logging and monitoring the results, as well as log text, files, artifacts, and labels. - [Gen AI development workflow](https://docs.mlrun.org/en/stable/genai/genai-flow.html): MLRun automates the flow of tuning, validation, and optimizing LLMs to specific data - efficiently over elastic resources. - [Developing a gen AI pipeline](https://docs.mlrun.org/en/stable/genai/development/index.html): Learn how to use MLRun for model development, including: working with RAG, evaluationg LLMS, and fine tuning LLMs. - [Gen AI data management](https://docs.mlrun.org/en/stable/genai/data-mgmt/index.html): The first stage of a gen AI task is to build an automated ML pipeline for data collection, data preparation, training and evaluation, including - [Using LLMs to process unstructured data](https://docs.mlrun.org/en/stable/genai/data-mgmt/unstructured-data.html): Large Language Models (LLMs) address the significant challenge posed by unstructured data, such as text, images, and audio files, making it possible to extract valuable insights or information from very large quantities of data. - [Vector databases](https://docs.mlrun.org/en/stable/genai/data-mgmt/vector-databases.html): With MLRun, you can use vector databases to enrich the context of a request before passing it to a model for inference, enabling building more sophisticated models that take into account the context of the request and provide more accurate responses. - [Guardrails for data management](https://docs.mlrun.org/en/stable/genai/data-mgmt/guardrails-data.html): Guardrails ensure intellectual property protection, safeguarding user privacy, alignment with legal and regulatory standards, and more. - [Gen AI liveOps](https://docs.mlrun.org/en/stable/genai/live-ops/index.html): The liveOps stage ensures that the models are always performing optimally and adapting to new data. - [Deploying gen AI application serving pipelines](https://docs.mlrun.org/en/stable/genai/deployment/index.html): MLRun serving can produce managed ML application pipelines using real-time, auto-scaling, Nuclio serverless functions. - [Serving gen AI models](https://docs.mlrun.org/en/stable/genai/deployment/genai_serving.html): With MLRun you can serve any model, including pretrained models from the Hugging Face model hub, as well as models that are fine-tuned with MLRun. - [GPU utilization](https://docs.mlrun.org/en/stable/genai/deployment/gpu_utilization.html): This page described techniques you can use to improve GPU utilization during inference and how to optimize the utilization, thereby preventing GPU bottlenecks. - [Install MLRun CE on AWS](https://docs.mlrun.org/en/stable/install-mlrun-ce/aws-install.html): These instructions install the community edition (CE) on your Amazon EKS cluster. - [MLRun CE overview](https://docs.mlrun.org/en/stable/install-mlrun-ce/index.html): MLRun CE is an open-source platform that simplifies the entire lifecycle of your AI project. - [Install MLRun CE on Kubernetes](https://docs.mlrun.org/en/stable/install-mlrun-ce/kubernetes-install.html): These instructions install the community edition (CE) on your Kubernetes cluster. - [MLRun CE development notes](https://docs.mlrun.org/en/stable/install-mlrun-ce/mlrun-ce-development-notes.html): This page contains notes for configuring your development system (after installation). - [MLRun CE installation notes](https://docs.mlrun.org/en/stable/install-mlrun-ce/mlrun-ce-installation-notes.html): This page lists additional steps or configuration options you may need to follow for non-default MLRun CE installations. - [Storing artifacts in AWS S3 storage](https://docs.mlrun.org/en/stable/install-mlrun-ce/storing-artifact-in-aws-s3-storage.html): MLRun CE uses a SeaweedFS service as a shared storage for artifacts, and accesses it using S3 protocol. - [Installation](https://docs.mlrun.org/en/stable/install-mlrun-ce/installation.html): MLRun CE can be installed on different platforms. - [Change log](https://docs.mlrun.org/en/stable/change-log/index.html): The change log lists updates per version, open issues, limitations, and deprecations. - [Develop and train models](https://docs.mlrun.org/en/stable/development/index.html): MLRun includes all the tools you need to develop and train your models: handling input and model artifacts, automating tracking, an off-the-shelf training function, and more. - [Model training and tracking](https://docs.mlrun.org/en/stable/development/model-training-tracking.html): Learn how to create a model training job, work with the input data and the model artifacts, use an MLRun function to automate the tracking, use a function from the MLRun hub to train the model, to optimize hyperparameter tuning, and to use the feature store to train your model. - [Tutorials and Examples](https://docs.mlrun.org/en/stable/tutorials/index.html): The MLRun tutorials provide a hands-on introduction to using MLRun to implement data science workflows and to automate both gen AI and machine-learning operations (MLOps) tasks. - [Machine learning tutorials](https://docs.mlrun.org/en/stable/tutorials/ml-index.html): Each of these MLRun tutorials is a dedicated Jupyter notebook, illustrating different capabilities of MLRun. - [Demos](https://docs.mlrun.org/en/stable/tutorials/demos.html): These end-to-end demos demonstrate how to use the Iguazio AI platform, MLRun, and related tools, to address data science requirements for different industries and implementations. - [Load projects](https://docs.mlrun.org/en/stable/projects/load-project.html): Project code, metadata, and configuration are stored and versioned in source control systems like Git or archives (zip, tar) and can be loaded into your work environment or CI system with a single SDK or CLI command. - [Run pipelines with GitHub Actions, GitLab](https://docs.mlrun.org/en/stable/projects/ci-integration.html): You can run your ML Pipelines using CI frameworks like GitHub Actions, GitLab CI/CD, etc. - [Create, save, and use projects](https://docs.mlrun.org/en/stable/projects/create-project.html): Your project is the starting point for your work: it contains all the assets, configuration, and code of a particular application. - [CI/CD automation with Git](https://docs.mlrun.org/en/stable/projects/ci-cd-automate.html): Learn how to create a project for CI/CD automation based on a remote source, load the project, and run your pipeline using a CI framework. - [Build and run workflows/pipelines](https://docs.mlrun.org/en/stable/projects/build-run-workflows-pipelines.html): This section shows how to write a batch pipeline so that it can be executed via an MLRun project. - [MLRun project bootstrapping with `project_setup.py`](https://docs.mlrun.org/en/stable/projects/project-setup.html): The `project_setup.py` script in MLRun automates project initialization and configuration, facilitating seamless setup of MLRun projects by registering functions, workflows, Git sources, Docker images, and more. - [Run, build, and deploy functions](https://docs.mlrun.org/en/stable/projects/run-build-deploy.html): The set of methods used to deploy and run project functions can be used interactively or inside a pipeline (for example, Kubeflow). - [Projects and automation](https://docs.mlrun.org/en/stable/projects/project.html): MLRun project is a container for all your work on a particular ML or gen AI application. - [Model monitoring architecture](https://docs.mlrun.org/en/stable/model-monitoring/index.html): Take a deeper dive into model monitoring functionality, including its APIs, model and model monitoring endpoints, multi-port predictions, batch inputs, and more. - [Model monitoring for MLOps](https://docs.mlrun.org/en/stable/model-monitoring/mlops-monitoring.html): Model performance monitoring is a basic operational task that is implemented after an ML model has been deployed. - [Running the model monitoring application](https://docs.mlrun.org/en/stable/model-monitoring/running-applications.html): This page explains how to run your model monitoring application on demand, as a "batch" - [Writing a model monitoring application](https://docs.mlrun.org/en/stable/model-monitoring/applications.html): Learn how to create your own model monitoring applications for LLMs, gen AI, deep-learning models, etc., based on the `ModelMonitoringApplicationBase` class. - [View the model monitoring applications status in the UI](https://docs.mlrun.org/en/stable/model-monitoring/view-mm-applications.html): The Monitoring app view provides you with a comprehensive overview of your model monitoring applications and their status, and an overview about the performance of the model monitoring infrastructure. - [Working with data and model artifacts](https://docs.mlrun.org/en/stable/training/working-with-data-and-model-artifacts.html): When running a training job, you need to pass in the data used for training, and save the resulting model. - [Data stores](https://docs.mlrun.org/en/stable/store/datastore.html): MLRun supports multiple data stores; each one defines a storage provider (for example, file system, S3, Azure blob, Iguazio v3io, etc.). - [LLM prompt artifacts](https://docs.mlrun.org/en/stable/store/llm-artifacts.html): LLM prompt artifacts capture a prompt definition for large language model (LLM) interactions. - [Model artifacts](https://docs.mlrun.org/en/stable/store/models.html): You can work with models that are [stored locally](#locally-hosted-models) and [remotely](#remote-models). - [Artifacts](https://docs.mlrun.org/en/stable/store/artifacts.html): An artifact is any data that is produced and/or consumed by functions, jobs, or pipelines. - [Profiles](https://docs.mlrun.org/en/stable/store/profiles.html): Profiles are containers for credentials for a remote service. - [Data items](https://docs.mlrun.org/en/stable/store/data-items.html): When running jobs or pipelines, data is passed using the {py:class}`~mlrun.datastore.DataItem` objects, which can be one item or a collection of items (file, dir, table, etc.). - [Logging artifacts](https://docs.mlrun.org/en/stable/store/log-artifacts.html): To log artifacts that are not of kind model or dataset, use the {py:meth}`~mlrun.execution.MLClientCtx.log_artifact` method. - [Test and deploy a model server](https://docs.mlrun.org/en/stable/serving/test-deploy-model-server.html): Use MLRun's mock server to test your model before deploying it. - [Model serving API](https://docs.mlrun.org/en/stable/serving/model-api.html): MLRun Serving follows the same REST API defined by Triton and [KFServing v2](https://github.com/kubeflow/kfserving/blob/master/docs/predict-api/v2/required_api.md). - [Building graphs](https://docs.mlrun.org/en/stable/serving/building-graphs.html): MLRun comes with pre-built steps that include data manipulation, readers, writers, and model serving. - [Canary functions and rolling upgrades](https://docs.mlrun.org/en/stable/serving/canary.html): Canary rollout is a known practice to first test a software update on a small number of users before rolling it out to all users. - [Build your own model serving class](https://docs.mlrun.org/en/stable/serving/custom-model-serving-class.html): Model serving classes implement the full model serving functionality, which includes loading models, pre- and post-processing, prediction, explainability, and model monitoring. - [Model serving steps](https://docs.mlrun.org/en/stable/serving/model-serving-steps.html): Learn about the ModelRunnerStep and the HTTP streaming step. - [Branching and merging steps](https://docs.mlrun.org/en/stable/serving/branch-merge.html): You can define a graph that branches into two parallel steps, and the output of both steps merge back together. - [Advanced graph configuration](https://docs.mlrun.org/en/stable/serving/graph-advanced-cfg.html): ```{toctree} - [Real-time serving pipelines (graphs)](https://docs.mlrun.org/en/stable/serving/serving-graph.html): The MLRun serving graph is a realtime orchestration layer for your ML/GenAI logics. - [Error handling](https://docs.mlrun.org/en/stable/serving/pipelines-error-handling.html): You can define exception handling (an error-handling flow) that is triggered on graph or step errors: - [Using built-in model serving classes](https://docs.mlrun.org/en/stable/serving/built-in-model-serving.html): MLRun includes built-in serving classes for commonly used frameworks. - [Distributed graphs](https://docs.mlrun.org/en/stable/serving/distributed-graph-oview.html): Graphs can be hosted by a single function (using zero to n containers), or span multiple functions - [Getting started with serving graphs](https://docs.mlrun.org/en/stable/serving/getting-started.html): Learn how serving graphs can simplify complex workflows as illustrated in these examples. - [Demos and tutorials](https://docs.mlrun.org/en/stable/serving/demos.html): Read and run these tutorials to get an even better understanding of serving graphs. - [Serving graph high availability configuration](https://docs.mlrun.org/en/stable/serving/graph-ha-cfg.html): Learn about the high availability configuration parameters to maximize your serving graph processing. - [Router steps](https://docs.mlrun.org/en/stable/serving/router-steps.html): Router steps allow branching, enrichment, aggregation, etc. - [Router topology](https://docs.mlrun.org/en/stable/serving/router.html): The router topology will be deprecated in an upcoming release. - [Real-time serving](https://docs.mlrun.org/en/stable/serving/serving-overview.html): MLRun can produce managed real-time serverless pipelines from various tasks, including MLRun models or standard model files. - [API handler](https://docs.mlrun.org/en/stable/serving/api-handler.html): This feature is in TechPreview status; there will be changes to the SDK in a future release. - [Attach storage to functions](https://docs.mlrun.org/en/stable/runtimes/function-storage.html): In the vast majority of cases, an MLRun function requires access to storage. - [Functions](https://docs.mlrun.org/en/stable/runtimes/functions.html): All the executions in MLRun are based on serverless functions. - [Build function image](https://docs.mlrun.org/en/stable/runtimes/image-build.html): As discussed in {ref}`images-usage`, MLRun provides pre-built images which contain the components necessary to execute an MLRun runtime. - [Configuring runs and functions](https://docs.mlrun.org/en/stable/runtimes/configuring-job-resources.html): MLRun orchestrates serverless functions over Kubernetes: you can specify the resource requirements (CPU, memory, GPUs), preferences, and pod priorities in the logical function object. - [MLRun hub](https://docs.mlrun.org/en/stable/runtimes/load-from-hub.html): The [MLRun hub](https://www.mlrun.org/hub/) provides a wide range of pre-developed functions and modules for your projects, for a variety of use cases. - [Function of type `job`](https://docs.mlrun.org/en/stable/runtimes/job-function.html): You can deploy a model using a {py:meth}`~mlrun.runtimes.KubejobRuntime` type function, which runs the code in a Kubernetes Pod. - [Function of type `serving`](https://docs.mlrun.org/en/stable/runtimes/serving-function.html): Deploying models in MLRun uses the function type {py:meth}`~mlrun.runtimes.ServingRuntime`. You can create a serving function using the `set_function()` call from a notebook. - [Images and their usage in MLRun](https://docs.mlrun.org/en/stable/runtimes/images.html): Every release of MLRun includes several images for different usages. - [Packagers](https://docs.mlrun.org/en/stable/runtimes/packagers/index.html): Packagers are the recommended way to move data in and out of MLRun functions. - [Packagers overview](https://docs.mlrun.org/en/stable/runtimes/packagers/packagers-overview.html): Learn about built-in and custom packagers, and how to configure and use them. - [Creating custom packagers](https://docs.mlrun.org/en/stable/runtimes/packagers/custom_packagers/index.html): MLRun's {ref}`built-in packagers ` cover common Python types — scalars, - [Custom packager tutorials overview](https://docs.mlrun.org/en/stable/runtimes/packagers/custom_packagers/custom-packagers-tutorial-overview.html): Learn when custom packagers are required, and how to create them. - [Deploy models and applications](https://docs.mlrun.org/en/stable/deployment/index.html): Deployment is more than just model deployment: models usually run as part of a greater system which requires data processing before and after executing the model as well as being part of a business application. ## Examples - [Hyperparameter tuning optimization](https://docs.mlrun.org/en/stable/hyper-params.html): MLRun supports iterative tasks for automatic and distributed execution of many tasks with variable parameters (hyperparams). - [Feature store example (stocks)](https://docs.mlrun.org/en/stable/feature-store/basic-demo.html): This notebook demonstrates how to generate features and feature-sets, build complex transformations and ingest to offline - [Part 2: Training](https://docs.mlrun.org/en/stable/feature-store/end-to-end-demo/02-create-training-model.html): In this part you learn how to use MLRun's **Feature Store** to easily define a **Feature Vector** and create the dataset you need to run the training process. - [Part 1: Data ingestion](https://docs.mlrun.org/en/stable/feature-store/end-to-end-demo/01-ingest-datasources.html): This demo showcases financial fraud prevention using the MLRun feature store to define complex features that help identify fraud. - [Part 4: Automated ML pipeline](https://docs.mlrun.org/en/stable/feature-store/end-to-end-demo/04-pipeline.html): MLRun Project is a container for all your work on a particular activity: all of the associated code, functions, jobs/workflows and artifacts. - [Part 3: Serving](https://docs.mlrun.org/en/stable/feature-store/end-to-end-demo/03-deploy-serving-model.html): In this part you use MLRun's **serving runtime** to deploy your trained models from the previous stage, a `Voting Ensemble` using **max vote** logic. - [Listing alert activations](https://docs.mlrun.org/en/stable/concepts/alert_activations.html): When an alert is activated by its configured trigger, MLRun saves the activation records that you can list, filter, etc. Alert activation records are stored in a partitioned table. - [Nuclio real-time functions](https://docs.mlrun.org/en/stable/concepts/nuclio-real-time-functions.html): Nuclio is a high-performance "serverless" framework focused on data, I/O, and compute intensive workloads. - [Working with RAG in MLRun](https://docs.mlrun.org/en/stable/genai/development/working-with-rag.html): Learn how to build a RAG pipeline using MLRun from top to bottom, using popular models and frameworks. - [Fine tuning LLMs with MLRun](https://docs.mlrun.org/en/stable/genai/development/fine-tuning-llms.html): This demo modifies the vocabulary and behavior of a pre-trained model to talk like a **pirate**. - [Evaluating LLMs with MLRun](https://docs.mlrun.org/en/stable/genai/development/evaluating-llms.html): This example guides you through setup, creating an evaluation function, running an evaluation job, and viewing the logged output. - [Serving graph with batching using a Hugging Face model](https://docs.mlrun.org/en/stable/genai/deployment/hf-model-batch-serving-graph.html): This notebook demonstrates how to set up a serving graph with batch processing with a Hugging Face model, including the Hugging Face profile configuration, creating model artifacts, deploying a serving function with the `dedicated_process` execution mechanism (see {py:meth}`~mlrun.serving.states.ModelRunnerStep.add_model`), and testing the model inference. - [Gen AI realtime serving graph](https://docs.mlrun.org/en/stable/genai/deployment/genai_serving_graph.html): Learn how to create a serving graph using multiple LLM calls, including specific prompt templates, inside your complete workflow. - [Integrating an OpenAI LLM with MLRun](https://docs.mlrun.org/en/stable/genai/deployment/openai-model.html): This notebook demonstrates how to set up and test an OpenAI model integration with MLRun, including profile setup, model deployment, and inference testing. - [Experiment tracking with a vector DB](https://docs.mlrun.org/en/stable/tutorials/genai-03-vector-db.html): This notebook illustrates experiment tracking for document-based models, using the LangChain API to integrate directly with vector databases. - [Batch inference and drift detection](https://docs.mlrun.org/en/stable/tutorials/06-batch-infer.html): This tutorial leverages mlrun's serving-as-a-job feature to perform batch inference, using a logged model and a new prediction dataset. - [Serving pre-trained ML/DL models](https://docs.mlrun.org/en/stable/tutorials/03-model-serving.html): This notebook demonstrate how to serve standard ML/DL models using **MLRun Serving**. - [Using LLM prompt templates and artifacts](https://docs.mlrun.org/en/stable/tutorials/genai-04-llm-prompt-artifact.html): This tutorial illustrates how easy it is to use LLMs and prompt templates, inside a complete workflow using the llm-prompt artifact. - [Model monitoring using LLM](https://docs.mlrun.org/en/stable/tutorials/genai-02-model-monitor-llm.html): This tutorial illustrates a model monitoring system that leverages LLMs to maintain high standards for deployed models. - [Deploying an LLM using MLRun](https://docs.mlrun.org/en/stable/tutorials/genai-01-basic-tutorial.html): This notebook illustrates deploying an LLM using MLRun: it shows how to grab a dataset, which is a list of articles, scrape those articles, chunk and index them into a vector store, and then deploy an open-source Hugging Face model to an endpoint where you can make requests and get responses with a RAG enrichment using the data that you just downloaded. - [Projects and automated ML pipeline](https://docs.mlrun.org/en/stable/tutorials/04-pipeline.html): This notebook demonstrates how to work with projects, source control (git), and automating the ML pipeline. - [Model monitoring tutorial](https://docs.mlrun.org/en/stable/tutorials/05-model-monitoring.html): This tutorial illustrates the basic model monitoring capabilities of MLRun: deploying a model to a live endpoint (model monitoring endpoint); deploying two model-monitoring applications, one of them based on the Evidently service / OSS; configuring alerts on data-drift; exercising the deployment with invocations, and viewing the calculated drift results and the UI feedback, and the triggered alerts. - [Train, compare, and register models](https://docs.mlrun.org/en/stable/tutorials/02-model-training.html): This notebook provides a quick overview of training, comparing, and registering ML models using [MLRun](https://www.mlrun.org/) AI orchestration framework. - [Quick start tutorial for machine learning](https://docs.mlrun.org/en/stable/tutorials/01-mlrun-basics.html): This notebook provides a quick overview of developing serverless functions to train and deploy models using the [MLRun](https://www.mlrun.org/) AI orchestration framework. - [Add MLOps to existing code](https://docs.mlrun.org/en/stable/tutorials/07-add-mlops-to-code.html): This tutorial showcases how you can easily apply MLRun on your existing code with only 7 lines of code. - [Create a project using a Git source](https://docs.mlrun.org/en/stable/projects/automate-project-git-source.html): This example shows how to create a project in MLRun for CI/CD automation based on a remote source, in this case Git. - [Git best practices](https://docs.mlrun.org/en/stable/projects/git-best-practices.html): This section provides an overview of developing and deploying ML applications using MLRun and Git. - [Load project YAML from Git, Zip, Tar source](https://docs.mlrun.org/en/stable/projects/load-project-yaml.html): After you create your project and you have a project.yaml file with all the necessery metadata within the remote source (Git, zip or gz.tar file), you can simply load that project and run, build, and deploy your functions and workflows. - [View model monitoring results in the platform UI](https://docs.mlrun.org/en/stable/model-monitoring/monitoring-models.html): This tutorial illustrates the basic model monitoring capabilities of MLRun: deploying a model to a live endpoint and observing data drift. - [View model monitoring results in Grafana](https://docs.mlrun.org/en/stable/model-monitoring/monitoring-models-grafana.html): You can deploy a Grafana service in your Iguazio instance and use Grafana Dashboards to view model monitoring details. - [Using the built-in training function](https://docs.mlrun.org/en/stable/training/built-in-training-function.html): The MLRun [Hub](https://www.mlrun.org/hub/) includes, among other things, training functions. - [Create a basic training job](https://docs.mlrun.org/en/stable/training/create-a-basic-training-job.html): In this section, you create a simple job to train a model and log metrics, logs, and plots using MLRun's auto-logging. - [Deploying graphs](https://docs.mlrun.org/en/stable/serving/deploying-graphs.html): **In this section** - [Advanced model serving graph example](https://docs.mlrun.org/en/stable/serving/graph-example.html): This example demonstrates how to use MLRun serving graphs and their advanced functionality including: using flow, task, model, and ensemble router states: building tasks from custom handlers, classes and storey components; using custom error handlers; testing graphs locally; deploying the graph as a real-time serverless functions. - [Hub steps](https://docs.mlrun.org/en/stable/serving/hub-steps.html): You can import predefined steps from the MLRun hub and use them in your graph. - [Basic steps](https://docs.mlrun.org/en/stable/serving/basic-steps.html): All steps are supported by the storey engine. - [Remote steps](https://docs.mlrun.org/en/stable/serving/remote-steps.html): Use remote steps to access HTTP sources, external URIs, and remote functions. - [Remote execution](https://docs.mlrun.org/en/stable/serving/remote-execution.html): You can chain functions together with remote execution. - [Basic example of serving graph](https://docs.mlrun.org/en/stable/serving/basic-example.html): This simple serving graph example uses a custom class and a custom function. - [Custom steps](https://docs.mlrun.org/en/stable/serving/writing-custom-steps.html): Serving graphs execute built-in task classes, or task classes and functions that you implement. - [Distributed (multi-function) pipeline example](https://docs.mlrun.org/en/stable/serving/distributed-graph.html): This example demonstrates how to run a pipeline that consists of multiple serverless functions (connected using streams). - [Concurrent processing](https://docs.mlrun.org/en/stable/serving/concurrent-processing.html): Concurrent processing is typically used for serving of deep-learning models, where preparation steps and inference can be CPU/GPU heavy, or involving I/O. - [Pipelines using Dask, Kubeflow, and MLRun](https://docs.mlrun.org/en/stable/runtimes/dask-pipeline.html): This example creates a project and its function, and then trains, tests, and evaluates it with Dask. - [Databricks runtime](https://docs.mlrun.org/en/stable/runtimes/databricks.html): The databricks runtime runs on a Databricks cluster (and not in the Iguazio cluster). - [Dask distributed runtime](https://docs.mlrun.org/en/stable/runtimes/dask-overview.html): You can run run your code as a Dask Distributed job (over Kubernetes). - [Using a Git repo as a hub](https://docs.mlrun.org/en/stable/runtimes/git-repo-as-hub.html): You can save functions in a Git repo, and use this repo as your own hub. - [Running a multiple function workflow with ExitHandler](https://docs.mlrun.org/en/stable/runtimes/multiple-funcs-exithandler.html): This example uses the Kubernetes function ExitHandler to run multiple functions before continuing to the next function. - [Application runtime](https://docs.mlrun.org/en/stable/runtimes/application.html): You can use the {py:meth}`~mlrun.runtimes.ApplicationRuntime` to provide an image that runs on top of your deployed model. - [Create functions](https://docs.mlrun.org/en/stable/runtimes/create-and-use-functions.html): Functions are the basic building blocks of MLRun: they are essentially Python objects that know how to run locally or on a Kubernetes cluster. - [Converting notebooks to function](https://docs.mlrun.org/en/stable/runtimes/mlrun_code_annotations.html): MLRun annotations are used to identify the code that needs to be converted into an MLRun function. - [MPIJob and Horovod runtime](https://docs.mlrun.org/en/stable/runtimes/horovod.html): Learn how to use Horovod for distributed training. - [Spark Operator runtime](https://docs.mlrun.org/en/stable/runtimes/spark-operator.html): The `spark-on-k8s-operator` allows Spark applications to be defined in a declarative manner and supports one-time Spark - [Running a workflow with multiple functions in parallel](https://docs.mlrun.org/en/stable/runtimes/multiple-parallel-workflow.html): This example illustrates a workflow that triggers multiple functions in parallel. - [Running a conditional workflow](https://docs.mlrun.org/en/stable/runtimes/conditional-workflow.html): This example demonstrates creating a workflow that runs a function based on the result of the previous function. - [Running Dask on the cluster with MLRun](https://docs.mlrun.org/en/stable/runtimes/dask-mlrun.html): The Dask framework enables you to parallelize your Python code and run it as a distributed process on an Iguazio cluster and dramatically accelerate the performance. - [Using packagers to automate I/O in a gen AI agent pipeline](https://docs.mlrun.org/en/stable/runtimes/packagers/packagers-tutorial.html): This tutorial demonstrates how MLRun **packagers** automate input parsing and output logging in a mock - [Creating a custom packager - round-trip (pack + unpack) tutorial](https://docs.mlrun.org/en/stable/runtimes/packagers/custom_packagers/round-trip-tutorial.html): This tutorial walks through creating a **round-trip** custom packager for - [Creating a custom packager - itemization (bundling & unbundling) tutorial](https://docs.mlrun.org/en/stable/runtimes/packagers/custom_packagers/itemization-tutorial.html): This tutorial walks through creating a custom packager that supports - [Creating a custom packager - pack-only tutorial](https://docs.mlrun.org/en/stable/runtimes/packagers/custom_packagers/pack-only-tutorial.html): This tutorial walks through creating a **pack-only** custom packager for - [Batch inference](https://docs.mlrun.org/en/stable/deployment/batch_inference.html): Batch inference or offline inference addresses the need to run machine learning model on large datasets.