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/ai-studio/how-to/prompt-flow-troubleshoot.md
+16-20Lines changed: 16 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.topic: reference
8
8
author: lgayhardt
9
9
ms.author: lagayhar
10
10
ms.reviewer: chenjieting
11
-
ms.date: 07/17/2024
11
+
ms.date: 07/31/2024
12
12
---
13
13
14
14
# Troubleshoot guidance for prompt flow
@@ -19,17 +19,17 @@ This article addresses frequent questions about prompt flow usage.
19
19
20
20
### Run failed because of "No module named XXX"
21
21
22
-
This type of error related to compute session lacks required packages. If you're using a default environment, make sure the image of your compute session is using the latest version. If you're using a custom base image, make sure you installed all the required packages in your docker context.
22
+
This type of error related to compute session lacks required packages. If you're using a default environment, make sure the image of your compute session is using the latest version. If you're using a custom base image, make sure you installed all the required packages in your docker context.
23
23
24
24
### Where to find the serverless instance used by compute session?
25
25
26
-
You can view the serverless instance used by compute session in the compute session list tab under compute page. Learn more about [how to manage serverless instance](./how-to-manage-compute-session.md#manage-serverless-instance-used-by-compute-session).
26
+
You can view the serverless instance used by compute session in the compute session list tab under compute page. Learn more about how to manage serverless instance[Manage a compute session](./create-manage-compute-session.md#manage-a-compute-session).
27
27
28
28
### Compute session failures using custom base image
29
29
30
30
#### Compute session start failure with requirements.txt or custom base image
31
31
32
-
Compute session support to use `requirements.txt` or custom base image in `flow.dag.yaml` to customize the image. We would recommend you to use `requirements.txt` for common case, which will use `pip install -r requirements.txt` to install the packages. If you have dependency more than python packages, you need to follow the [Customize base image](./how-to-customize-session-base-image.md) to create build a new image base on top of prompt flow base image. Then use it in `flow.dag.yaml`. Learn more [how to specify base image in compute session.](./how-to-manage-compute-session.md#change-the-base-image-for-compute-session)
32
+
Compute session support to use `requirements.txt` or custom base image in `flow.dag.yaml` to customize the image. We would recommend you to use `requirements.txt` for common case, which will use `pip install -r requirements.txt` to install the packages. If you have dependency more than python packages, you need to follow the [Customize base image]() to create build a new image base on top of prompt flow base image. Then use it in `flow.dag.yaml`. Learn more [how to specify base image in compute session.](./create-manage-compute-session.md#change-the-base-image)
33
33
34
34
- You can't use arbitrary base image to create Compute session, you need to use the base image provide by prompt flow.
35
35
- Don't pin the version of `promptflow` and `promptflow-tools` in `requirements.txt`, because we already include them in the base image. Using old version of `promptflow` and `promptflow-tools` may cause unexpected behavior.
@@ -44,13 +44,13 @@ In prompt flow, on flow page with successful run and run detail page, you can fi
44
44
45
45
`Trace` section includes each request and response to the LLM tool. You can check the raw message sent to the LLM model and the raw response from the LLM model.
46
46
47
-
:::image type="content" source="./media/faq/trace-large-language-model-tool.png" alt-text="Screenshot that shows raw request send to LLM model and response from LLM model." lightbox = "./media/faq/trace-large-language-model-tool.png":::
47
+
:::image type="content" source="./media/prompt-flow/trace-large-language-model-tool.png" alt-text="Screenshot that shows raw request send to LLM model and response from LLM model." lightbox = "./media/prompt-flow/trace-large-language-model-tool.png":::
48
48
49
49
### How to fix 409 error from Azure OpenAI?
50
50
51
51
You may encounter 409 error from Azure OpenAI, it means you have reached the rate limit of Azure OpenAI. You can check the error message in the output section of LLM node. Learn more about [Azure OpenAI rate limit](../../ai-services/openai/quotas-limits.md).
52
52
53
-
:::image type="content" source="./media/faq/429-rate-limit.png" alt-text="Screenshot that shows 429 rate limit error from Azure OpenAI." lightbox = "./media/faq/429-rate-limit.png":::
53
+
:::image type="content" source="./media/prompt-flow/429-rate-limit.png" alt-text="Screenshot that shows 429 rate limit error from Azure OpenAI." lightbox = "./media/prompt-flow/429-rate-limit.png":::
54
54
55
55
### Identify which node consumes the most time
56
56
@@ -64,13 +64,13 @@ You may encounter 409 error from Azure OpenAI, it means you have reached the rat
64
64
65
65
-**Case 1:** Python script node runs for a long time.
66
66
67
-
:::image type="content" source="./media/how-to-create-manage-runtime/runtime-timeout-running-for-long-time.png" alt-text="Screenshot that shows a timeout run sign in the studio UI." lightbox = "./media/how-to-create-manage-runtime/runtime-timeout-running-for-long-time.png":::
67
+
:::image type="content" source="./media/prompt-flow/runtime-timeout-running-for-long-time.png" alt-text="Screenshot that shows a timeout run sign." lightbox = "./media/prompt-flow/runtime-timeout-running-for-long-time.png":::
68
68
69
69
In this case, you can find that `PythonScriptNode` was running for a long time (almost 300 seconds). Then you can check the node details to see what's the problem.
70
70
71
71
-**Case 2:** LLM node runs for a long time.
72
72
73
-
:::image type="content" source="./media/how-to-create-manage-runtime/runtime-timeout-by-language-model-timeout.png" alt-text="Screenshot that shows timeout logs caused by an LLM timeout in the studio UI." lightbox = "./media/how-to-create-manage-runtime/runtime-timeout-by-language-model-timeout.png":::
73
+
:::image type="content" source="./media/prompt-flow/rruntime-timeout-by-language-model-timeout.png" alt-text="Screenshot that shows timeout logs caused by an LLM timeout." lightbox = "./media/prompt-flow/how-to-create-manage-runtime/runtime-timeout-by-language-model-timeout.png":::
74
74
75
75
In this case, if you find the message `request canceled` in the logs, it might be because the OpenAI API call is taking too long and exceeding the timeout limit.
76
76
@@ -88,7 +88,7 @@ You may encounter 409 error from Azure OpenAI, it means you have reached the rat
88
88
89
89
### Upstream request timeout issue when consuming the endpoint
90
90
91
-
If you use CLI or SDK to deploy the flow, you may encounter timeout error. By default the `request_timeout_ms` is 5000. You can specify at max to 5 minutes, which is 300,000 ms. Following is example showing how to specify request time-out in the deployment yaml file. To learn more, see [deployment schema](../reference-yaml-deployment-managed-online.md).
91
+
If you use CLI or SDK to deploy the flow, you may encounter timeout error. By default the `request_timeout_ms` is 5000. You can specify at max to 5 minutes, which is 300,000 ms. Following is example showing how to specify request time-out in the deployment yaml file. To learn more, see [deployment schema](../../machine-learning/reference-yaml-deployment-managed-online.md).
92
92
93
93
```yaml
94
94
request_settings:
@@ -102,7 +102,7 @@ If you regenerate your Azure OpenAI key and manually update the connection used
102
102
This is because the connections used in the endpoints/deployments won't be automatically updated. Any change for key or secrets in deployments should be done by manual update, which aims to avoid impacting online production deployment due to unintentional offline operation.
103
103
104
104
- If the endpoint was deployed in the studio UI, you can just redeploy the flow to the existing endpoint using the same deployment name.
105
-
- If the endpoint was deployed using SDK or CLI, you need to make some modification to the deployment definition such as adding a dummy environment variable, and then use `az ml online-deployment update` to update your deployment.
105
+
- If the endpoint was deployed using SDK or CLI, you need to make some modification to the deployment definition such as adding a dummy environment variable, and then use `az ml online-deployment update` to update your deployment.
106
106
107
107
### Vulnerability issues in prompt flow deployments
108
108
@@ -137,11 +137,7 @@ Could not find driver program in the request
137
137
138
138
There are two ways to fix this error.
139
139
140
-
- (Recommended) You can find the container image uri in your custom environment detail page, and set it as the flow base image in the flow.dag.yaml file. When you deploy the flow in UI, you just select **Use environment of current flow definition**, and the backend service will create the customized environment based on this base image and `requirement.txt` for your deployment. Learn more about [the environment specified in the flow definition](how-to-deploy-for-real-time-inference.md#use-environment-of-current-flow-definition).
:::image type="content" source="./media/how-to-deploy-for-real-time-inference/flow-environment-image.png" alt-text="Screenshot of specifying base image in raw yaml file of the flow. " lightbox = "./media/how-to-deploy-for-real-time-inference/flow-environment-image.png":::
140
+
- (Recommended) You can find the container image uri in your custom environment detail page, and set it as the flow base image in the flow.dag.yaml file. When you deploy the flow in UI, you just select **Use environment of current flow definition**, and the backend service will create the customized environment based on this base image and `requirement.txt` for your deployment. Learn more about [the environment specified in the flow definition](./flow-deploy/md#requirements-text-file).
145
141
146
142
- You can fix this error by adding `inference_config` in your custom environment definition.
147
143
@@ -178,13 +174,13 @@ Consider optimizing the endpoint with above considerations to improve the perfor
178
174
179
175
### Unable to fetch deployment schema
180
176
181
-
After you deploy the endpoint and want to test it in the **Test tab** in the endpoint detail page, if the **Test tab** shows **Unable to fetch deployment schema**, you can try the following two methods to mitigate this issue:
177
+
After you deploy the endpoint and want to test it in the **Test** tab in the deployment detail page, if the **Test** tab shows **Unable to fetch deployment schema**, you can try the following two methods to mitigate this issue:
182
178
183
-
:::image type="content" source="./media/how-to-deploy-for-real-time-inference/unable-to-fetch-deployment-schema.png" alt-text="Screenshot of the error unable to fetch deployment schema in Test tab in endpoint detail page. " lightbox = "./media/how-to-deploy-for-real-time-inference/unable-to-fetch-deployment-schema.png":::
179
+
:::image type="content" source="./media/prompt-flow//unable-to-fetch-deployment-schema.png" alt-text="Screenshot of the error unable to fetch deployment schema in Test tab in deployment detail page. " lightbox = "./media/prompt-flow/unable-to-fetch-deployment-schema.png":::
184
180
185
-
- Make sure you have granted the correct permission to the endpoint identity. Learn more about [how to grant permission to the endpoint identity](how-to-deploy-for-real-time-inference.md#grant-permissions-to-the-endpoint).
186
-
- It might be because you ran your flow in an old version runtime and then deployed the flow, the deployment used the environment of the runtime that was in old version as well. To update the runtime, follow [Update a runtime on the UI](./create-manage-runtime.md#update-a-runtime-on-the-ui) and rerun the flow in the latest runtime and then deploy the flow again.
181
+
- Make sure you have granted the correct permission to the endpoint identity. Learn more about [how to grant permission to the endpoint identity](./flow-deploy.md#grant-permissions-to-the-endpoint).
182
+
- It might be because you ran your flow in an old version runtime and then deployed the flow, the deployment used the environment of the runtime that was in old version as well. To update the runtime, follow [Update a runtime on the UI](./create-manage-compute-session.md#upgrade-compute-instance-runtime) and rerun the flow in the latest runtime and then deploy the flow again.
187
183
188
184
### Access denied to list workspace secret
189
185
190
-
If you encounter an error like "Access denied to list workspace secret", check whether you have granted the correct permission to the endpoint identity. Learn more about [how to grant permission to the endpoint identity](flow-deploy.md?tabs=azure-studio#grant-permissions-to-the-endpoint).
186
+
If you encounter an error like "Access denied to list workspace secret", check whether you have granted the correct permission to the endpoint identity. Learn more about [how to grant permission to the endpoint identity](./flow-deploy.md#grant-permissions-to-the-endpoint).
0 commit comments