Skip to content

Commit 28378ad

Browse files
committed
conversational meta data
1 parent bc3d379 commit 28378ad

File tree

1 file changed

+43
-43
lines changed
  • articles/ai-services/language-service/conversational-language-understanding/how-to

1 file changed

+43
-43
lines changed

articles/ai-services/language-service/conversational-language-understanding/how-to/use-containers.md

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
2424

2525
## Prerequisites
2626

27-
You must meet the following prerequisites before using CLU containers.
27+
You must meet the following prerequisites before using CLU containers.
2828

2929
* If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/cognitive-services/).
30-
* [Docker](https://docs.docker.com/) installed on a host computer. Docker must be configured to allow the containers to connect with and send billing data to Azure.
30+
* [Docker](https://docs.docker.com/) installed on a host computer. Docker must be configured to allow the containers to connect with and send billing data to Azure.
3131
* On Windows, Docker must also be configured to support Linux containers.
32-
* You should have a basic understanding of [Docker concepts](https://docs.docker.com/get-started/overview/).
32+
* You should have a basic understanding of [Docker concepts](https://docs.docker.com/get-started/overview/).
3333
* A <a href="https://portal.azure.com/#create/Microsoft.CognitiveServicesTextAnalytics" title="Create a Language resource" target="_blank">Language resource </a>
3434

3535
[!INCLUDE [Gathering required parameters](../../../containers/includes/container-gathering-required-parameters.md)]
@@ -42,31 +42,31 @@ The following table describes the minimum and recommended specifications for the
4242

4343
It's recommended to have a CPU with AVX-512 instruction set, for the best experience (performance and accuracy).
4444

45-
| | Minimum host specs | Recommended host specs |
45+
| | Minimum host specs | Recommended host specs |
4646
|---------------------|------------------------|------------------------|
47-
| **CLU** | 1 core, 2 GB memory | 4 cores, 8 GB memory |
47+
| **CLU** | 1 core, 2 GB memory | 4 cores, 8 GB memory |
4848

4949
CPU core and memory correspond to the `--cpus` and `--memory` settings, which are used as part of the `docker run` command.
5050

51-
## Export your Conversational Language Understanding model
51+
## Export your Conversational Language Understanding model
5252

53-
Before you proceed with running the docker image, you need to export your own trained model to expose it to your container. Use the following command to extract your model and replace the placeholders below with your own values:
53+
Before you proceed with running the docker image, you need to export your own trained model to expose it to your container. Use the following command to extract your model and replace the placeholders below with your own values:
5454

5555
|Placeholder |Value|Format or example|
5656
|------------|-----|-----------------|
5757
|**{API_KEY}** |The key for your Language resource. You can find it on your resource's **Key and endpoint** page, on the Azure portal.|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
5858
|**{ENDPOINT_URI}**|The endpoint for accessing the Conversational Language Understanding API. You can find it on your resource's **Key and endpoint** page, on the Azure portal.|`https://<your-custom-subdomain>.cognitiveservices.azure.com`|
5959
|**{PROJECT_NAME}**|The name of the project containing the model that you want to export. You can find it on your projects tab in the Language Studio portal.|myProject|
60-
|**{TRAINED_MODEL_NAME}** |The name of the trained model you want to export. You can find your trained models on your model evaluation tab under your project in the Language Studio portal|myTrainedModel
60+
|**{TRAINED_MODEL_NAME}** |The name of the trained model you want to export. You can find your trained models on your model evaluation tab under your project in the Language Studio portal|myTrainedModel
6161
|**{EXPORTED_MODEL_NAME}** |The name to assign for the new exported model created.|myExportedModel |
6262

6363
```bash
64-
curl --location --request PUT '{ENDPOINT_URI}/language/authoring/analyze-conversations/projects/{PROJECT_NAME}/exported-models/{EXPORTED_MODEL_NAME}?api-version=2024-11-15-preview'\
65-
--header 'Ocp-Apim-Subscription-Key: {API_KEY}'\
66-
--header 'Content-Type: application/json'\
67-
--data-raw '{
68-
    "TrainedModelLabel": "{TRAINED_MODEL_NAME}"
69-
}'
64+
curl --location --request PUT '{ENDPOINT_URI}/language/authoring/analyze-conversations/projects/{PROJECT_NAME}/exported-models/{EXPORTED_MODEL_NAME}?api-version=2024-11-15-preview' \
65+
--header 'Ocp-Apim-Subscription-Key: {API_KEY}' \
66+
--header 'Content-Type: application/json' \
67+
--data-raw '{
68+
    "TrainedModelLabel": "{TRAINED_MODEL_NAME}"
69+
}'
7070
```
7171

7272
## Get the container image with `docker pull`
@@ -75,50 +75,50 @@ The CLU container image can be found on the `mcr.microsoft.com` container regist
7575

7676
To use the latest version of the container, you can use the `latest` tag, which is for English. You can also find a full list of containers for supported languages using the [tags on the MCR](https://mcr.microsoft.com/product/azure-cognitive-services/language/clu/tags).
7777

78-
The latest CLU container is available in several languages. To download the container for the English container, use the command below.
78+
The latest CLU container is available in several languages. To download the container for the English container, use the command below.
7979

8080
```
8181
docker pull mcr.microsoft.com/azure-cognitive-services/language/clu:latest
8282
```
8383

8484
[!INCLUDE [Tip for using docker list](../../../includes/cognitive-services-containers-docker-list-tip.md)]
8585

86-
## Run the container in download model mode
86+
## Run the container in download model mode
8787

88-
After creating the exported model in the section above, users have to run the container in order to download the deployment package that was created specifically for their exported models.
88+
After creating the exported model in the section above, users have to run the container in order to download the deployment package that was created specifically for their exported models.
8989

90-
| Placeholder | Value |Format or example |
91-
|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|
92-
| **{API_KEY}**| The key for your Language resource. You can find it on your resource's **Key and endpoint** page, on the Azure portal. | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | 
93-
| **{ENDPOINT_URI}** | The endpoint for accessing the API. You can find it on your resource's **Key and endpoint** page, on the Azure portal. | `https://<your-custom-subdomain>.cognitiveservices.azure.com` |
94-
| **{IMAGE_TAG}** | The image tag representing the language of the container you want to run. Make sure this matches the `docker pull` command you used.  | latest|
95-
| **{LOCAL_CLU_PORT}** | Port number assigned for the container in local machine. | 5000 |
96-
| **{LOCAL_MODEL_DIRECTORY}** | Absolute directory in host machine where exported models are saved in. | `C:\usr\local\myDeploymentPackage` |
97-
| **{PROJECT_NAME}** | Name of the project that the exported model belongs to | myProject |
98-
| **{EXPORTED_MODEL_NAME}** | Exported model to be downloaded | myExportedModel |
90+
| Placeholder| Value|Format or example |
91+
|---|---|---|
92+
| **{API_KEY}**| The key for your Language resource. You can find it on your resource's **Key and endpoint** page, on the Azure portal. | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | 
93+
| **{ENDPOINT_URI}** | The endpoint for accessing the API. You can find it on your resource's **Key and endpoint** page, on the Azure portal. | `https://<your-custom-subdomain>.cognitiveservices.azure.com` |
94+
| **{IMAGE_TAG}**| The image tag representing the language of the container you want to run. Make sure this matches the `docker pull` command you used.  | latest|
95+
| **{LOCAL_CLU_PORT}**| Port number assigned for the container in local machine.| 5000 |
96+
| **{LOCAL_MODEL_DIRECTORY}** | Absolute directory in host machine where exported models are saved in. | `C:\usr\local\myDeploymentPackage` |
97+
| **{PROJECT_NAME}**| Name of the project that the exported model belongs to | myProject |
98+
| **{EXPORTED_MODEL_NAME}** | Exported model to be downloaded | myExportedModel |
9999

100100
```bash
101-
docker run --rm -it -p {LOCAL_CLU_PORT}:80 \
102-
mcr.microsoft.com/azure-cognitive-services/language/clu:{IMAGE_TAG} \ 
103-
-v {LOCAL_MODEL_DIRECTORY}:/DeploymentPackage \
104-
Billing={ENDPOINT_URI} \ 
105-
ApiKey={API_KEY} \
106-
downloadmodel \
107-
projectName={PROJECT_NAME} \
108-
exportedModelName={EXPORTED_MODEL_NAME}
101+
docker run --rm -it -p {LOCAL_CLU_PORT}:80 \
102+
mcr.microsoft.com/azure-cognitive-services/language/clu:{IMAGE_TAG} \ 
103+
-v {LOCAL_MODEL_DIRECTORY}:/DeploymentPackage \
104+
Billing={ENDPOINT_URI} \ 
105+
ApiKey={API_KEY} \
106+
downloadmodel \
107+
projectName={PROJECT_NAME} \
108+
exportedModelName={EXPORTED_MODEL_NAME}
109109
```
110110

111-
DO NOT alter the downloaded files. Even altering the name or folder structure can affect the integrity of the container and might break it.
111+
DO NOT alter the downloaded files. Even altering the name or folder structure can affect the integrity of the container and might break it.
112112

113-
Repeat those steps to download as many models as you'd like to test. They can belong to different projects and have different exported model names.
113+
Repeat those steps to download as many models as you'd like to test. They can belong to different projects and have different exported model names.
114114

115115
## Run the container with `docker run`
116116

117117
Once the container is on the host computer, use the [docker run](https://docs.docker.com/engine/reference/commandline/run/) command to run the containers. The container continues to run until you stop it. Replace the placeholders below with your own values:
118118

119119

120120
> [!IMPORTANT]
121-
> * The docker commands in the following sections use the back slash, `\`, as a line continuation character. Replace or remove this based on your host operating system's requirements.
121+
> * The docker commands in the following sections use the back slash, `\`, as a line continuation character. Replace or remove this based on your host operating system's requirements.
122122
> * The `Eula`, `Billing`, and `ApiKey` options must be specified to run the container; otherwise, the container won't start. For more information, see [Billing](#billing).
123123
124124
To run the CLU container, execute the following `docker run` command. Replace the placeholders below with your own values:
@@ -150,12 +150,12 @@ This command:
150150

151151
[!INCLUDE [Running multiple containers on the same host](../../../includes/cognitive-services-containers-run-multiple-same-host.md)]
152152

153-
## Running NER Container
154-
CLU relies on NER to handle prebuilt entities. The CLU container works properly without NER if users decide not to integrate it. NER billing is disabled when its used through CLU, no extra charges are generated unless a call is made directly to NERs container.
155-
156-
To set up NER in CLU container
157-
- Follow the [NER container documentation](../../named-entity-recognition/how-to/use-containers.md).
158-
- When running CLU container, make sure to set the parameter `Ner_Url `so that `Ner_Url=http://host.docker.internal:{LOCAL_NER_PORT}`
153+
## Running NER Container
154+
CLU relies on NER to handle prebuilt entities. The CLU container works properly without NER if users decide not to integrate it. NER billing is disabled when it's used through CLU, no extra charges are generated unless a call is made directly to NER's container.
155+
156+
To set up NER in CLU container
157+
- Follow the [NER container documentation](../../named-entity-recognition/how-to/use-containers.md).
158+
- When running CLU container, make sure to set the parameter `Ner_Url `so that `Ner_Url=http://host.docker.internal:{LOCAL_NER_PORT}`
159159

160160
## Query the container's prediction endpoint
161161

0 commit comments

Comments
 (0)