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
Copy file name to clipboardExpand all lines: articles/machine-learning/prompt-flow/how-to-end-to-end-llmops-with-prompt-flow.md
+25-19Lines changed: 25 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,8 +100,7 @@ Before you can set up a Prompt flow project with Azure Machine Learning, you nee
100
100
101
101
### Setup GitHub repo
102
102
103
-
1. Fork example repo, [LLMOps demo template repo](https://github.com/Azure/llmops-gha-demo/).
104
-
1. [Fork the LLMPos demo repo](https://github.com/Azure/llmops-gha-demo/fork) into your GitHub org. This repo has reusable LLMOps code that can be used across multiple projects.
103
+
1. Fork example repo. [LLMOps Demo Template Repo](https://github.com/Azure/llmops-gha-demo/fork) in your GitHub organization. This repo has reusable LLMOps code that can be used across multiple projects.
105
104
106
105
### Add secret to GitHub repo
107
106
@@ -119,12 +118,15 @@ Before you can set up a Prompt flow project with Azure Machine Learning, you nee
119
118
120
119
1. Add each of the following additional GitHub secrets using the corresponding values from the service principal output as the content of the secret:
121
120
122
-
- **ARM_CLIENT_ID**
123
-
- **ARM_CLIENT_SECRET**
124
-
- **ARM_SUBSCRIPTION_ID**
125
-
- **ARM_TENANT_ID**
121
+
- **GROUP**: \<Resource Group Name\>
122
+
- **WORKSPACE**: \<Azure ML Workspace Name\>
123
+
- **SUBSCRIPTION**: \<Subscription ID\>
126
124
127
-
:::image type="content" source="./media/how-to-end-to-end-llmops-with-prompt-flow/github-secrets-string-2.png" alt-text="Screenshot of GitHub Action secrets when creating a new secret with name ARM_CLIENT_ID. " lightbox = "./media/how-to-end-to-end-llmops-with-prompt-flow/github-secrets-string-2.png":::
125
+
|Variable | Description |
126
+
|---------|---------|
127
+
|GROUP | Name of resource group |
128
+
|SUBSCRIPTION | Subscription ID of your workspace |
129
+
|WORKSPACE | Name of Azure Machine Learning workspace |
128
130
129
131
> [!NOTE]
130
132
> This finishes the prerequisite section and the deployment of the solution accelerator can happen accordingly.
@@ -135,7 +137,14 @@ Connection helps securely store and manage secret keys or other sensitive creden
135
137
136
138
In this guide, we'll use flow `web-classification`, which uses connection `azure_open_ai_connection` inside, we need to set up the connection if we haven’t added it before.
137
139
138
-
Go to workspace portal, select `Prompt flow` -> `Connections` -> `Create`, then follow the instruction to create your own connections. To learn more, see [connections](concept-connections.md).
140
+
Go to workspace portal, select `Prompt flow` -> `Connections` -> `Create` -> `Azure OpenAI`, then follow the instruction to create your own connections. To learn more, see [connections](concept-connections.md).
141
+
142
+
## Setup runtime for Prompt flow
143
+
Prompt flow's runtime provides the computing resources required for the application to run, including a Docker image that contains all necessary dependency packages.
144
+
145
+
In this guide, we will use a runtime to run your prompt flow. You need to create your own [Prompt flow runtime](how-to-create-manage-runtime.md)
146
+
147
+
Go to workspace portal, select**Prompt flow** ->**Runtime** ->**Add**, then follow the instruction to create your own connections
139
148
140
149
## Setup variables with for prompt flow and GitHub Actions
141
150
@@ -151,20 +160,14 @@ Clone repo to your local machine.
151
160
You'll need to update the CLI setup file variables to match your workspace.
152
161
153
162
1. In your cloned repository, go to `.github/workflow/`.
154
-
1. Edit `env` section in the `run-eval-pf-pipeline.yml` and `deploy-pf-online-endpoint-pipeline.yml` and update these variables in the file.
155
-
156
-
|Variable | Description |
157
-
|---------|---------|
158
-
|GROUP | Name of resource group |
159
-
|SUBSCRIPTION | Subscription of your workspace |
160
-
|WORKSPACE | Name of Azure Machine Learning workspace |
163
+
1. Verify `env` section in the `run-eval-pf-pipeline.yml` and `deploy-pf-online-endpoint-pipeline.yml` refers to the workspace secrets you added in the previous step.
161
164
162
165
### Update run.yml with your connections and runtime
163
166
164
167
You'll use a `run.yml` file to deploy your Azure Machine Learning pipeline. This is a flow run definition. You only need to make this update if you're using a name other than `pf-runtime` for your [prompt flow runtime](how-to-create-manage-runtime.md). You'll also need to update all the `connections` to match the connections in your Azure Machine Learning workspace and `deployment_name` to match the name of your GPT 3.5 Turbo deployment associate with that connection.
165
168
166
-
1. In your cloned repository, go to `web-classification/run.yml`.
167
-
1. Each time you see `runtime: abe`, update the value of `pf-runtime` with your runtime name.
169
+
1. In your cloned repository, open `web-classification/run.yml` and `web-classification/run_evaluation.yml`
170
+
1. Each time you see `runtime: <runtime-name>`, update the value of `<runtime-name>` with your runtime name.
168
171
1. Each time you see `connection: Default_AzureOpenAI`, update the value of `Default_AzureOpenAI` to match the connection name in your Azure Machine Learning workspace.
169
172
1. Each time you see `deployment_name: gpt-35-turbo-0301`, update the value of `gpt-35-turbo-0301` with the name of your GPT 3.5 Turbo deployment associate with that connection.
170
173
@@ -230,7 +233,7 @@ With the Prompt flow model registered in the Azure Machine Learning workspace, y
230
233
231
234
## Deploy prompt flow in Azure Machine Learning with GitHub Actions
232
235
233
-
This scenario includes prebuilt workflows fortwo approaches to deploying a trained model, batch scoring or a deploying a model to an endpoint for real-time scoring. You may run either or both of these workflows to test the performance of the modelin your Azure Machine Learning workspace.
236
+
This scenario includes prebuilt workflows fordeploying a modelto an endpoint for real-time scoring. You may run the workflow to test the performance of the modelin your Azure Machine Learning workspace.
234
237
235
238
### Online endpoint
236
239
@@ -248,6 +251,9 @@ This scenario includes prebuilt workflows for two approaches to deploying a trai
248
251
249
252
:::image type="content" source="./media/how-to-end-to-end-llmops-with-prompt-flow/online-endpoint-test.png" alt-text="Screenshot of Azure Machine Learning studio on the endpoints page showing how to test the endpoint." lightbox = "./media/how-to-end-to-end-llmops-with-prompt-flow/online-endpoint-test.png":::
250
253
254
+
> [!NOTE]
255
+
> Make sure you have already [granted permissions to the endpoint](how-to-deploy-for-real-time-inference.md#grant-permissions-to-the-endpoint) before you test or consume the endpoint.
256
+
251
257
## Moving to production
252
258
253
259
This example scenario can be run and deployed both for Dev and production branches and environments. When you're satisfied with the performance of the prompt evaluation pipeline, Prompt Flow model, deployment in testing, development pipelines, and models can be replicated and deployed in the production environment.
@@ -262,4 +268,4 @@ The sample Prompt flow run and evaluation and GitHub workflows can be used as a
262
268
## Next steps
263
269
264
270
- [Install and set up Python SDK v2](https://aka.ms/sdk-v2-install)
265
-
- [Install and set up Python CLI v2](../how-to-configure-cli.md)
271
+
- [Install and set up Python CLI v2](../how-to-configure-cli.md)
0 commit comments