Skip to content

Commit c0e6c78

Browse files
authored
Merge pull request #261571 from cloga/ai-studio-automatic-runtime
Ai studio automatic runtime
2 parents 1b79057 + 9f00f45 commit c0e6c78

File tree

5 files changed

+59
-0
lines changed

5 files changed

+59
-0
lines changed

articles/ai-studio/how-to/create-manage-runtime.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,34 @@ In Azure AI Studio, you can create and manage prompt flow runtimes. You need a r
2020

2121
Prompt flow runtime has the computing resources required for the application to run, including a Docker image that contains all necessary dependency packages. In addition to flow execution, the runtime is also utilized to validate and ensure the accuracy and functionality of the tools incorporated within the flow, when you make updates to the prompt or code content.
2222

23+
We support following types of runtimes:
24+
25+
|Runtime type|Underlying compute type|Life cycle management| Customize packages |
26+
|------------|----------------------|---------------------|---------------------|
27+
|automatic runtime |Serverless compute| Automatically | Easily customize python packages|
28+
|Compute instance runtime | Compute instance | Manually | |
29+
30+
If you're a new user, we recommend using the automatic runtime that can be used out of box. You can easily customize the environment for this runtime.
31+
32+
If you have a compute instance, you can use it to build your compute instance runtime.
33+
2334
## Create a runtime
2435

36+
### Create automatic runtime in flow page
37+
38+
Automatic is the default option for runtime, you can start automatic runtime in runtime dropdown in flow page.
39+
40+
41+
1. Start creates automatic runtime using the environment defined in`flow.dag.yaml` in flow folder on the VM size you have quota in the project.
42+
43+
:::image type="content" source="../media/prompt-flow/how-to-create-manage-runtime/runtime-create-automatic-init.png" alt-text="Screenshot of prompt flow on the start automatic with default settings on flow page. " lightbox = "../media/prompt-flow/how-to-create-manage-runtime/runtime-create-automatic-init.png":::
44+
45+
2. Start with advanced settings, you can customize the VM size used by the runtime. You can also customize the idle time, which will delete runtime automatically if it isn't in use to save code. Meanwhile, you can set the user assigned manage identity used by automatic runtime, it's used to pull base image (please make sure user assigned manage identity have ACR pull permission) and install packages. If you don't set it, we use user identity as default. Learn more about [how to create update user assigned identities to project](../../machine-learning/how-to-identity-based-service-authentication.md#to-create-a-workspace-with-multiple-user-assigned-identities-use-one-of-the-following-methods).
46+
47+
:::image type="content" source="../media/prompt-flow/how-to-create-manage-runtime/runtime-creation-automatic-settings.png" alt-text="Screenshot of prompt flow on the start automatic with advanced setting on flow page. " lightbox = "../media/prompt-flow/how-to-create-manage-runtime/runtime-creation-automatic-settings.png":::
48+
49+
### Create compute instance runtime in runtime page
50+
2551
A runtime requires a compute instance. If you don't have a compute instance, you can [create one in Azure AI Studio](./create-manage-compute.md).
2652

2753
To create a prompt flow runtime in Azure AI Studio:
@@ -65,6 +91,39 @@ To create a prompt flow runtime in Azure AI Studio:
6591

6692
## Update runtime from UI
6793

94+
### Update automatic runtime in flow page
95+
96+
You can manage automatic runtime in the flow page. Here are options you can use:
97+
98+
- **Install packages** triggers the `pip install -r requirements.txt` in the flow folder. It takes minutes depending on the packages you install.
99+
- **Reset** deletes the current runtime and creates a new one with the same environment. If you encounter package conflict issue, you can try this option.
100+
- **Edit** opens the runtime config page where you can define the VM side and idle time for the runtime.
101+
- **Stop** deletes the current runtime. If there's no active runtime on the underlining compute, the compute resource will also be deleted.
102+
103+
:::image type="content" source="../media/prompt-flow/how-to-create-manage-runtime/runtime-create-automatic-actions.png" alt-text="Screenshot of actions on automatic runtime on flow page. " lightbox = "../media/prompt-flow/how-to-create-manage-runtime/runtime-create-automatic-actions.png":::
104+
105+
You can also customize the environment used to run this flow.
106+
107+
- You can easily customize the environment by adding packages in `requirements.txt` file in the flow folder. After you add more packages in this file, you can choose either save and install or save only. Save and install will trigger the `pip install -r requirements.txt` in flow folder. It takes minutes depends on the packages you install. Save only will only save the `requirements.txt` file, you can install the packages later by yourself.
108+
109+
:::image type="content" source="../media/prompt-flow/how-to-create-manage-runtime/runtime-create-automatic-save-install.png" alt-text="Screenshot of save and install packages for automatic runtime on flow page. " lightbox = "../media/prompt-flow/how-to-create-manage-runtime/runtime-create-automatic-save-install.png":::
110+
111+
#### Add packages in private feed in Azure DevOps
112+
113+
If you want to use a private feed in Azure DevOps, add the Managed Identity in the Azure DevOps organization. To learn more, see [Use service principals & managed identities](/azure/devops/integrate/get-started/authentication/service-principal-managed-identity)
114+
115+
> [!NOTE]
116+
> If the 'Add Users' button isn't visible, it's likely you don't have the necessary permissions to perform this action.
117+
118+
You need to add `{private}` to your private feed URL. For example, if you want to install `test_package` from `test_feed` in Azure devops, add `-i https://{private}@{test_feed_url_in_azure_devops}` in `requirements.txt`.
119+
120+
```txt
121+
-i https://{private}@{test_feed_url_in_azure_devops}
122+
test_package
123+
```
124+
125+
### Update compute instance runtime in runtime page
126+
68127
Azure AI Studio gets regular updates to the base image (`mcr.microsoft.com/azureml/promptflow/promptflow-runtime-stable`) to include the latest features and bug fixes. You should periodically update your runtime to the [latest version](https://mcr.microsoft.com/v2/azureml/promptflow/promptflow-runtime-stable/tags/list) to get the best experience and performance.
69128

70129
Go to the runtime details page and select **Update**. Here you can update the runtime environment. If you select **use default environment**, system will attempt to update your runtime to the latest version.
90.6 KB
Loading
57.5 KB
Loading
48.2 KB
Loading
15.7 KB
Loading

0 commit comments

Comments
 (0)