Skip to content

Commit 930b31f

Browse files
committed
Added second doc: Run an LLM workflow with Flyte
1 parent 3b57e52 commit 930b31f

File tree

3 files changed

+88
-4
lines changed

3 files changed

+88
-4
lines changed

articles/aks/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,8 @@
848848
href: ai-toolchain-operator.md
849849
- name: Deploy data and ML pipelines with Flyte
850850
href: use-flyte.md
851+
- name: Run an LLM workflow with Flyte
852+
href: llm-workflow-flyte.md
851853
- name: DevOps
852854
items:
853855
- name: Azure DevOps Project

articles/aks/llm-workflow-flyte.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
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 function that 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:
69+
70+
```output
71+
XYZ
72+
```
73+
74+
## Run your workflow
75+
76+
77+
78+
## Next steps
79+

articles/aks/use-flyte.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,27 @@ title: Build and deploy data and machine learning pipelines with Flyte on Azure
33
titleSuffix: Azure Kubernetes Service
44
description: Learn about Flyte, an open-source platform for building and deploying data and machine learning pipelines on Azure Kubernetes Service (AKS).
55
ms.topic: how-to
6-
ms.date: 05/21/2024
6+
ms.date: 05/22/2024
77
author: schaffererin
88
ms.author: schaffererin
99
ms.service: azure-kubernetes-service
1010
---
1111

1212
# Build and deploy data and machine learning pipelines with Flyte on Azure Kubernetes Service (AKS)
1313

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.
1515

1616
For more information, see [Introduction to Flyte](https://docs.flyte.org/en/latest/introduction.html).
1717

1818
## Prerequisites
1919

2020
* 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.
2122
* 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).
2223
* 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/).
2324
* 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).
2427

2528
> [!NOTE]
2629
> 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
125128

126129
In this article, you learned how to deploy a Flyte chart on AKS. To learn more about deployments on AKS, see the following articles:
127130

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)
129132
* [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)
131134

132135
<!-- LINKS -->
133136
[az-group-create]: /cli/azure/group#az-group-create

0 commit comments

Comments
 (0)