Skip to content

Commit 1615bd7

Browse files
committed
update AI studio part also
1 parent 93f2465 commit 1615bd7

File tree

4 files changed

+31
-17
lines changed

4 files changed

+31
-17
lines changed

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

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,44 @@ A prompt flow runtime has computing resources that are required for the applicat
2323

2424
Azure AI Studio supports the following types of runtimes:
2525

26-
|Runtime type|Underlying compute type|Life cycle management| Customize packages |
26+
|Runtime type|Underlying compute type|Life cycle management|Customize environment |
2727
|------------|----------------------|---------------------|---------------------|
28-
|Automatic runtime |Serverless compute| Automatic | Easily customize Python packages|
29-
|Compute instance runtime | Compute instance | Manual | |
28+
|Automatic runtime (preview) |[Serverless compute](../../machine-learning/how-to-use-serverless-compute.md) and [Compute instance](../../machine-learning/how-to-create-compute-instance.md)| Automatic | Easily customize packages|
29+
|Compute instance runtime | [Compute instance](../../machine-learning/how-to-create-compute-instance.md) | Manual | Manually customize via Azure Machine Learning environment|
3030

31-
If you're a new user, we recommend that you use an automatic runtime. You can easily customize the environment for this runtime.
31+
If you're a new user, we recommend that you use the automatic runtime (preview). You can easily customize the environment by adding packages in the `requirements.txt` file in `flow.dag.yaml` in the flow folder.
3232

33-
If you have a compute instance, you can use it to build your compute instance runtime.
33+
If you want manage compute resource by your self, you can use compute instance as compute type in automatic runtime or use compute instance runtime.
3434

3535
## Create a runtime
3636

3737
### Create an automatic runtime on a flow page
3838

3939
Automatic is the default option for a runtime. You can start an automatic runtime by selecting an option from the runtime dropdown list on a flow page:
4040

41-
- Select **Start**. Start creating an automatic runtime by using the environment defined in `flow.dag.yaml` in the flow folder on the virtual machine (VM) size where you have a quota in the project.
41+
- Select **Start**. Start creating an automatic runtime by using the environment defined in `flow.dag.yaml` in the flow folder, it runs on the virtual machine (VM) size of serverless compute which you have enough quota in the workspace.
4242

4343
:::image type="content" source="../media/prompt-flow/how-to-create-manage-runtime/runtime-create-automatic-init.png" alt-text="Screenshot of prompt flow with default settings for starting an automatic runtime on a flow page." lightbox = "../media/prompt-flow/how-to-create-manage-runtime/runtime-create-automatic-init.png":::
4444

4545
- Select **Start with advanced settings**. In the advanced settings, you can:
4646

47-
- Customize the VM size that the runtime uses.
48-
- Customize the idle time, which saves code by deleting the runtime automatically if it isn't in use.
49-
- Set the user-assigned managed identity. The automatic runtime uses this identity to pull a base image and install packages. Make sure that the user-assigned managed identity has Azure Container Registry pull permission.
47+
- Select compute type. You can choose between serverless compute and compute instance.
48+
- If you choose serverless compute, you can set following settings:
49+
- Customize the VM size that the runtime uses.
50+
- Customize the idle time, which saves code by deleting the runtime automatically if it isn't in use.
51+
- Set the user-assigned managed identity. The automatic runtime uses this identity to pull a base image and install packages. Make sure that the user-assigned managed identity has Azure Container Registry pull permission.
52+
53+
If you don't set this identity, we use the user identity by default. [Learn more about how to create and update user-assigned identities for a workspace](../../machine-learning/how-to-identity-based-service-authentication.md#to-create-a-workspace-with-multiple-user-assigned-identities-use-one-of-the-following-methods).
5054

51-
If you don't set this identity, you use the user identity by default. [Learn more about how to create and update user-assigned identities for a 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).
55+
:::image type="content" source="../media/prompt-flow/how-to-create-manage-runtime/runtime-creation-automatic-settings.png" alt-text="Screenshot of prompt flow with advanced settings using serverless compute for starting an automatic runtime on a flow page." lightbox = "../media/prompt-flow/how-to-create-manage-runtime/runtime-creation-automatic-settings.png":::
56+
57+
- If you choose compute instance, you can only set idle shutdown time.
58+
- As it is running on an existing compute instance the VM size is fixed and cannot change in runtime side.
59+
- Identity used for this runtime also is defined in compute instance, by default it uses the user identity. [Learn more about how to assign identity to compute instance](../../machine-learning/how-to-create-compute-instance.md#assign-managed-identity)
60+
- For the idle shutdown time it is used to define life cycle of the runtime, if the runtime is idle for the time you set, it will be deleted automatically. And of you have idle shut down enabled on compute instance, then it will continue
61+
62+
:::image type="content" source="../media/prompt-flow/how-to-create-manage-runtime/runtime-creation-automatic-compute-instance-settings.png" alt-text="Screenshot of prompt flow with advanced settings using compute instance for starting an automatic runtime on a flow page." lightbox = "../media/prompt-flow/how-to-create-manage-runtime/runtime-creation-automatic-compute-instance-settings.png":::
5263

53-
:::image type="content" source="../media/prompt-flow/how-to-create-manage-runtime/runtime-creation-automatic-settings.png" alt-text="Screenshot of prompt flow with advanced settings for starting an automatic runtime on a flow page." lightbox = "../media/prompt-flow/how-to-create-manage-runtime/runtime-creation-automatic-settings.png":::
5464

5565
### Create a compute instance runtime on a runtime page
5666

@@ -142,7 +152,7 @@ If you want to use a private feed in Azure DevOps, follow these steps:
142152
143153
#### Change the base image for automatic runtime (preview)
144154
145-
By default, we use the latest prompt flow image as the base image. If you want to use a different base image, you need build your own base image, this docker image should be built from prompt flow base image that is `mcr.microsoft.com/azureml/promptflow/promptflow-runtime-stable:<newest_version>`. If possible use the [latest version of the base image](https://mcr.microsoft.com/v2/azureml/promptflow/promptflow-runtime-stable/tags/list). To use the new base image, you need to reset the runtime via the `reset` command. This process takes several minutes as it pulls the new base image and reinstalls packages.
155+
By default, we use the latest prompt flow image as the base image. If you want to use a different base image, you need build your own base image, this docker image should be built from prompt flow base image that is `mcr.microsoft.com/azureml/promptflow/promptflow-runtime:<newest_version>`. If possible use the [latest version of the base image](https://mcr.microsoft.com/v2/azureml/promptflow/promptflow-runtime/tags/list). To use the new base image, you need to reset the runtime via the `reset` command. This process takes several minutes as it pulls the new base image and reinstalls packages.
146156
147157
:::image type="content" source="../media/prompt-flow/how-to-create-manage-runtime/runtime-creation-automatic-image-flow-dag.png" alt-text="Screenshot of actions for customizing a base image for an automatic runtime on a flow page." lightbox = "../media/prompt-flow/how-to-create-manage-runtime/runtime-creation-automatic-image-flow-dag.png":::
148158
@@ -166,9 +176,11 @@ Automatic runtime has following advantages over compute instance runtime:
166176
- Automatic manage lifecycle of runtime and underlying compute. You don't need to manually create and managed them anymore.
167177
- Easily customize packages by adding packages in the `requirements.txt` file in the flow folder, instead of creating a custom environment.
168178

169-
We would recommend you to switch to automatic runtime if you're using compute instance runtime. If you have a compute instance runtime, you can switch it to an automatic runtime (preview) by using the following steps:
170-
- Prepare your `requirements.txt` file in the flow folder. Make sure that you don't pin the version of `promptflow` and `promptflow-tools` in `requirements.txt`, because we already include them in the runtime base image. Packages specified in `requirements.txt` will be installed when the runtime is started.
171-
- If you want to keep the automatic runtime (preview) as long running compute like compute instance, you can disable the idle shutdown toggle under automatic runtime (preview) `edit` option.
179+
We would recommend you to switch to automatic runtime, if you're using compute instance runtime. You can switch it to an automatic runtime by using the following steps:
180+
- Prepare your `requirements.txt` file in the flow folder. Make sure that you don't pin the version of `promptflow` and `promptflow-tools` in `requirements.txt`, because we already include them in the runtime base image. Automatic runtimewill install the packages in `requirements.txt` file when it starts.
181+
- If you create custom environment to create compute instance runtime, you can also use get the image from environment detail page, and specify it in `flow.dag.yaml` file in the flow folder. To learn more, see [Change the base image for automatic runtime](#change-the-base-image-for-automatic-runtime-preview). Make sure you have `acr pull` permission for the image.
182+
183+
- For compute resource, you can continue to use the existing compute instance if you would like to manually manage the lifecycle of compute resource or you can try serverless compute which lifecycle is managed by system.
172184

173185

174186
## Next steps
Loading
75.7 KB
Loading

articles/machine-learning/prompt-flow/how-to-create-manage-runtime.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ Azure Machine Learning supports the following types of runtimes:
2525
|Automatic runtime (preview) |[Serverless compute](../how-to-use-serverless-compute.md) and [Compute instance](../how-to-create-compute-instance.md)| Automatic | Easily customize packages|
2626
|Compute instance runtime | [Compute instance](../how-to-create-compute-instance.md) | Manual | Manually customize via Azure Machine Learning environment|
2727

28-
If you're a new user, we recommend that you use the automatic runtime (preview). You can easily customize the environment by adding packages in the `requirements.txt` file in `flow.dag.yaml` in the flow folder. If you're already familiar with the Azure Machine Learning environment and compute instances, you can also use your existing compute instance and environment to build a compute instance runtime.
28+
If you're a new user, we recommend that you use the automatic runtime (preview). You can easily customize the environment by adding packages in the `requirements.txt` file in `flow.dag.yaml` in the flow folder.
29+
30+
If you want manage compute resource by your self, you can use compute instance as compute type in automatic runtime or use compute instance runtime.
2931

3032
## Permissions and roles for runtime management
3133

@@ -55,7 +57,7 @@ Automatic is the default option for a runtime. You can start an automatic runtim
5557
> [!IMPORTANT]
5658
> Automatic runtime is currently in public preview. This preview is provided without a service-level agreement, and we don't recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
5759
58-
- Select **Start**. Start creating an automatic runtime (preview) by using the environment defined in `flow.dag.yaml` in the flow folder, it use on the virtual machine (VM) size of serverless compute which you have enough quota in the workspace.
60+
- Select **Start**. Start creating an automatic runtime (preview) by using the environment defined in `flow.dag.yaml` in the flow folder, it runs on the virtual machine (VM) size of serverless compute which you have enough quota in the workspace.
5961

6062
:::image type="content" source="./media/how-to-create-manage-runtime/runtime-create-automatic-init.png" alt-text="Screenshot of prompt flow with default settings for starting an automatic runtime on a flow page." lightbox = "./media/how-to-create-manage-runtime/runtime-create-automatic-init.png":::
6163

0 commit comments

Comments
 (0)