You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Run an LLM inferecing workflow with Flyte on Azure Kubernetes Service (AKS)
3
+
titleSuffix: Azure Kubernetes Service
4
+
description: Learn how to run an LLM inferencing workflow with Flyte on Azure Kubernetes Service (AKS).
5
+
ms.topic: how-to
6
+
ms.date: 05/22/2024
7
+
author: schaffererin
8
+
ms.author: schaffererin
9
+
ms.service: azure-kubernetes-service
10
+
---
11
+
12
+
# Run an LLM inferencing workflow with Flyte on Azure Kubernetes Service (AKS)
13
+
14
+
This article shows you how to run an LLM inferencing workflow with [Flyte](https://docs.flyte.org/en/latest/introduction.html) on Azure Kubernetes Service (AKS).
15
+
16
+
In this article, you learn how to:
17
+
18
+
> [!div class="checklist"]
19
+
>
20
+
> * Install the PyTorch plugin for Flyte.
21
+
> * Create a Flyte task that uses the PyTorch Lightning deep learning framework to define LLM inferencing logic.
22
+
> * Create a Flyte workflow that orchestrates the LLM inferencing task.
23
+
> * Build Docker images for the task and workflow.
24
+
> * Register the workflow with Flyte.
25
+
> * Run the workflow on AKS.
26
+
27
+
## Before you begin
28
+
29
+
* See [Build and deploy data and machine learning pipelines with Flyte on Azure Kubernetes Service (AKS)](./use-flyte.md) for **initial setup and prerequisites**.
30
+
* This article assumes a basic understanding of Kubernetes concepts. For more information, see [Core Kubernetes concepts for Azure Kubernetes Service (AKS)](./concepts-clusters-workloads.md).
31
+
32
+
## Install the PyTorch plugin for Flyte
33
+
34
+
The PyTorch plugin for Flyte leverages the Kubeflow training operator to provide a streamlined interface for conducting distributed training. For more information, see [PyTorch Distributed plugin for Flyte](https://docs.flyte.org/en/latest/flytesnacks/examples/kfpytorch_plugin/index.html#).
35
+
36
+
* Install the PyTorch plugin for Flyte using the following `pip` command:
37
+
38
+
```bash
39
+
pip install flytekitplugins-kfpytorch
40
+
```
41
+
42
+
## Create a Flyte task
43
+
44
+
A Flyte *task* is a functionthat performs a specific unit of work. Tasks are assembled into workflows to create data and machine learning pipelines. When deployed to a Flyte cluster, each task runs in its own Pod on the cluster. For more information, see [Flyte tasks](https://docs.flyte.org/en/latest/user_guide/basics/tasks.html).
45
+
46
+
Add step(s)
47
+
48
+
## Create a Flyte workflow
49
+
50
+
Flyte *workflows* consist of multiple tasks or workflows to produce a desired output. For more information, see [Flyte workflows](https://docs.flyte.org/en/latest/user_guide/basics/workflows.html).
51
+
52
+
Add step(s)
53
+
54
+
## Build Docker images
55
+
56
+
Add step(s)
57
+
58
+
## Register the workflow with Flyte
59
+
60
+
Packaging and registering, or *deploying*, a workflow with Flyte enables you to scale, schedule, and manage your workloads. There are different methods for registering your workflows with Flyte. In this article, we iterate on a single workflow script. For more information, see [Registering Flyte workflows](https://docs.flyte.org/en/latest/flyte_fundamentals/registering_workflows.html).
61
+
62
+
* Make sure you're in your Flyte project directory and register your workflow using the `pyflyte run` command.
63
+
64
+
```bash
65
+
pyflyte run XYZ
66
+
```
67
+
68
+
Your output should look similar to the following example output:
Copy file name to clipboardExpand all lines: articles/aks/use-flyte.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,24 +3,27 @@ title: Build and deploy data and machine learning pipelines with Flyte on Azure
3
3
titleSuffix: Azure Kubernetes Service
4
4
description: Learn about Flyte, an open-source platform for building and deploying data and machine learning pipelines on Azure Kubernetes Service (AKS).
5
5
ms.topic: how-to
6
-
ms.date: 05/21/2024
6
+
ms.date: 05/22/2024
7
7
author: schaffererin
8
8
ms.author: schaffererin
9
9
ms.service: azure-kubernetes-service
10
10
---
11
11
12
12
# Build and deploy data and machine learning pipelines with Flyte on Azure Kubernetes Service (AKS)
13
13
14
-
This article shows you how to use Flyte on Azure Kubernetes Service (AKS). Flyte is an open-source workflow orchestrator that unifies machine learning, data engineering, and data analytics stacks to help you build robust and reliable applications.
14
+
This article shows you how to use Flyte on Azure Kubernetes Service (AKS). Flyte is an open-source workflow orchestrator that unifies machine learning, data engineering, and data analytics stacks to help you build robust and reliable applications. When using Flyte as a Kubernetes-native workflow automation tool, you can focus on experimentation and providing business value without increasing your scope to infrastructure and resource management.
15
15
16
16
For more information, see [Introduction to Flyte](https://docs.flyte.org/en/latest/introduction.html).
17
17
18
18
## Prerequisites
19
19
20
20
* An Azure subscription. If you don't have an Azure subscription, you can create a [free account](https://azure.microsoft.com/free).
21
+
* If you have multiple subscriptions, make sure you select the correct one using the `az account set --subscription <subscription-id>` command.
21
22
* The Azure CLI installed and configured. Check your version using the `az --version` command. If you need to install or upgrade, see [Install the Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli).
22
23
* The Helm CLI installed and updated. Check your version using the `helm version` command. If you need to install or upgrade, see [Install Helm](https://helm.sh/docs/intro/install/).
23
24
* The `kubectl` CLI installed and updated. Install it locally using the `az aks install-cli` command or using [Install kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/).
25
+
* A local Docker development environment. For more information, see [Get Docker](https://docs.docker.com/get-docker/).
26
+
*`flytekit` and `flytectl` installed. For more information, see [Flyte installation](https://flyte-next.readthedocs.io/en/latest/introduction.html#installation).
24
27
25
28
> [!NOTE]
26
29
> If you're using the Azure Cloud Shell, the Azure CLI, Helm, and kubectl are already installed.
@@ -125,9 +128,9 @@ For more information, see [Introduction to Flyte](https://docs.flyte.org/en/late
125
128
126
129
In this article, you learned how to deploy a Flyte chart on AKS. To learn more about deployments on AKS, see the following articles:
127
130
128
-
* [Deploy an application that uses OpenAI on Azure Kubernetes Service (AKS)](./open-ai-quickstart.md)
131
+
* [Run an LLM inferencing workflow with Flyte on Azure Kubernetes Service (AKS)](./llm-workflow-flyte.md)
129
132
* [Install existing applications with Helm on Azure Kubernetes Service (AKS)](./kubernetes-helm.md)
130
-
* [Deploy a containerized application to Azure Kubernetes Service (AKS)](./tutorial-kubernetes-deploy-application.md
133
+
* [Deploy a containerized application to Azure Kubernetes Service (AKS)](./tutorial-kubernetes-deploy-application.md)
0 commit comments