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
title: Enable Virtual Network service endpoints with Custom Translator service
3
+
titleSuffix: Azure Cognitive Services
4
+
description: This article describes how to use Custom Translator service with an Azure Virtual Network service endpoint.
5
+
services: cognitive-services
6
+
author: laujan
7
+
manager: nitinme
8
+
ms.service: cognitive-services
9
+
ms.subservice: translator-text
10
+
ms.date: 07/05/2023
11
+
ms.author: moelghaz
12
+
ms.topic: how-to
13
+
---
14
+
15
+
# Enable Custom Translator through Azure Virtual Network
16
+
17
+
In this article, we show you how to set up and use VNet service endpoints with Custom Translator.
18
+
19
+
Azure Virtual Network (VNet) [service endpoints](../../../../virtual-network/virtual-network-service-endpoints-overview.md) securely connect your Azure service resources to your virtual networks over an optimized route via the Azure global network. Service endpoints enable private IP addresses within your virtual network to reach the endpoint of an Azure service without the need for a public IP address on the virtual network.
20
+
21
+
For more information, see [Azure Virtual Network overview](../../../../virtual-network/virtual-networks-overview.md)
22
+
23
+
> [!NOTE]
24
+
> Before you start, review [how to use virtual networks with Cognitive Services](../../../cognitive-services-virtual-networks.md).
25
+
26
+
To set up a Translator resource for VNet service endpoint scenarios, you need the resources:
To start, you need to add all virtual networks that are allowed access via the service endpoint to the Translator resource networking properties. To enable access to a Translator resource via the VNet, you need to enable the `Microsoft.CognitiveServices` service endpoint type for the required subnets of your virtual network. Doing so routes all subnet traffic related to Cognitive Services through the private global network. If you intend to access any other Cognitive Services resources from the same subnet, make sure these resources are also configured to allow your virtual network.
34
+
35
+
> [!NOTE]
36
+
>
37
+
> * If a virtual network isn't added as *allowed* in the Translator resource networking properties, it won't have access to the Translator resource via the service endpoint, even if the `Microsoft.CognitiveServices` service endpoint is enabled for the virtual network.
38
+
> * If the service endpoint is enabled but the virtual network isn't allowed, the Translator resource won't be accessible for the virtual network through a public IP address, regardless of your other network security settings.
39
+
> * Enabling the `Microsoft.CognitiveServices` endpoint routes all traffic related to Cognitive Services through the private global network. Thus, the virtual network should be explicitly allowed to access the resource.
40
+
> * This guidance applies for all Cognitive Services resources, not just for Translator resources.
41
+
42
+
Let's get started:
43
+
44
+
1. Navigate to the [Azure portal](https://portal.azure.com/) and sign in to your Azure account.
45
+
46
+
1. Select a regional Translator resource.
47
+
48
+
1. From the **Resource Management** group in the left side panel, select **Networking**.
49
+
50
+
:::image type="content" source="../media/how-to/resource-management-networking.png" alt-text="Screenshot of the networking selection under Resource Management in the Azure portal.":::
51
+
52
+
1. From the **Firewalls and virtual networks** tab, choose **Selected Networks and Private Endpoints**.
53
+
54
+
:::image type="content" source="../media/how-to/firewalls-virtual-network.png" alt-text="Screenshot of the firewalls and virtual network page in the Azure portal.":::
55
+
56
+
> [!NOTE]
57
+
> To use Virtual Network service endpoints, you need to select the **Selected Networks and Private Endpoints** network security option. No other options are supported.
58
+
59
+
1. Select **Add existing virtual network** or **Add new virtual network** and provide the required parameters.
60
+
61
+
* Complete the process by selecting **Add** for an existing virtual network or **Create** for a new one.
62
+
63
+
* If you add an existing virtual network, the `Microsoft.CognitiveServices` service endpoint is automatically enabled for the selected subnets.
64
+
65
+
* If you create a new virtual network, the **default** subnet is automatically configured to the `Microsoft.CognitiveServices` service endpoint. This operation can take few minutes.
66
+
67
+
> [!NOTE]
68
+
> As described in the [previous section](#configure-virtual-networks-resource-networking-settings), when you configure a virtual network as *allowed* for the Translator resource, the `Microsoft.CognitiveServices` service endpoint is automatically enabled. If you later disable it, you need to re-enable it manually to restore the service endpoint access to the Translator resource (and to other Cognitive Services resources).
69
+
70
+
1. Now, when you choose the **Selected Networks and Private Endpoints** tab, you can see your enabled virtual network and subnets under the **Virtual networks** section.
71
+
72
+
1. How to check the service endpoint
73
+
74
+
* From the **Resource Management** group in the left side panel, select **Networking**.
75
+
76
+
* Select your **virtual network** and then select the desired **subnet**.
77
+
78
+
:::image type="content" source="../media/how-to/select-subnet.png" alt-text="Screenshot of subnet selection section in the Azure portal.":::
79
+
80
+
* A new **Subnets** window appears.
81
+
82
+
* Select **Service endpoints** from the **Settings** menu located on the left side panel.
83
+
84
+
:::image type="content" source="../media/how-to/service-endpoints.png" alt-text="Screenshot of the **Subnets** selection from the **Settings** menu in the Azure portal.":::
85
+
86
+
1. From the **Settings** menu in the left side panel, choose **Service Endpoints** and, in the main window, check that your virtual network subnet is included in the `Microsoft.CognitiveServices` list.
87
+
88
+
## Use the Custom Translator portal
89
+
90
+
The following table describes Custom Translator project accessibility per Translator resource **Networking** → **Firewalls and virtual networks** security setting:
91
+
92
+
:::image type="content" source="../media/how-to/allow-network-access.png" alt-text="Screenshot of allowed network access section in the Azure portal.":::
93
+
94
+
> [!IMPORTANT]
95
+
> If you configure **Selected Networks and Private Endpoints** via the **Networking** → **Firewalls and virtual networks** tab, you can't use the Custom Translator portal and your Translator resource. However, you can still use the Translator resource outside of the Custom Translator portal.
| Selected Networks and Private Endpoints | Accessible from allowed VNET IP addresses |
101
+
| Disabled | Not accessible |
102
+
103
+
To use Custom Translator without relaxing network access restrictions on your production Translator resource, consider this workaround:
104
+
105
+
* Create another Translator resource for development that can be used on a public network.
106
+
107
+
* Prepare your custom model in the Custom Translator portal on the development resource.
108
+
109
+
* Copy the model on your development resource to your production resource using [Custom Translator non-interactive REST API](https://microsofttranslator.github.io/CustomTranslatorApiSamples/)`workspaces` → `copy authorization and models` → `copy functions`.
110
+
111
+
Congratulations! You learned how to use Azure VNet service endpoints with Custom Translator.
112
+
113
+
## Learn more
114
+
115
+
Visit the [**Custom Translator API**](https://microsofttranslator.github.io/CustomTranslatorApiSamples/) page to view our non-interactive REST APIs.
Copy file name to clipboardExpand all lines: articles/cognitive-services/Translator/custom-translator/quickstart.md
+13-18Lines changed: 13 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,33 +6,30 @@ author: laujan
6
6
manager: nitinme
7
7
ms.service: cognitive-services
8
8
ms.subservice: translator-text
9
-
ms.date: 11/04/2022
9
+
ms.date: 07/05/2023
10
10
ms.author: lajanuar
11
11
ms.topic: quickstart
12
12
---
13
13
# Quickstart: Build, publish, and translate with custom models
14
14
15
-
Translator is a cloud-based neural machine translation service that is part of the Azure Cognitive Services family of REST API that can be used with any operating system. Translator powers many Microsoft products and services used by thousands of businesses worldwide to perform language translation and other language-related operations. In this quickstart, you'll learn to build custom solutions for your applications across all [supported languages](../language-support.md).
15
+
Translator is a cloud-based neural machine translation service that is part of the Azure Cognitive Services family of REST API that can be used with any operating system. Translator powers many Microsoft products and services used by thousands of businesses worldwide to perform language translation and other language-related operations. In this quickstart, learn to build custom solutions for your applications across all [supported languages](../language-support.md).
16
16
17
17
## Prerequisites
18
18
19
-
To use the [Custom Translator](https://portal.customtranslator.azure.ai/) portal, you'll need the following resources:
19
+
To use the [Custom Translator](https://portal.customtranslator.azure.ai/) portal, you need the following resources:
20
20
21
21
* A [Microsoft account](https://signup.live.com).
22
22
23
23
* Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services/)
24
24
* Once you have an Azure subscription, [create a Translator resource](https://portal.azure.com/#create/Microsoft.CognitiveServicesTextTranslation) in the Azure portal to get your key and endpoint. After it deploys, select **Go to resource**.
25
-
* You'll need the key and endpoint from the resource to connect your application to the Translator service. You'll paste your key and endpoint into the code below later in the quickstart. You can find these values on the Azure portal **Keys and Endpoint** page:
25
+
* You need the key and endpoint from the resource to connect your application to the Translator service. Paste your key and endpoint into the code later in the quickstart. You can find these values on the Azure portal **Keys and Endpoint** page:
26
26
27
27
:::image type="content" source="../media/keys-and-endpoint-portal.png" alt-text="Screenshot: Azure portal keys and endpoint page.":::
28
28
29
29
For more information, *see*[how to create a Translator resource](../how-to-create-translator-resource.md).
30
30
31
31
## Custom Translator portal
32
32
33
-
>[!Note]
34
-
>Custom Translator does not support creating workspace for a Translator Text API resource created inside an [Enabled VNet](../../../api-management/api-management-using-with-vnet.md?tabs=stv2).
35
-
36
33
Once you have the above prerequisites, sign in to the [Custom Translator](https://portal.customtranslator.azure.ai/) portal to create workspaces, build projects, upload files, train models, and publish your custom solution.
37
34
38
35
You can read an overview of translation and custom translation, learn some tips, and watch a getting started video in the [Azure AI technical blog](https://techcommunity.microsoft.com/t5/azure-ai/customize-a-translation-to-make-sense-in-a-specific-context/ba-p/2811956).
@@ -41,11 +38,11 @@ You can read an overview of translation and custom translation, learn some tips,
41
38
42
39
1.[**Create a workspace**](#create-a-workspace). A workspace is a work area for composing and building your custom translation system. A workspace can contain multiple projects, models, and documents. All the work you do in Custom Translator is done inside a specific workspace.
43
40
44
-
1.[**Create a project**](#create-a-project). A project is a wrapper for models, documents, and tests. Each project includes all documents that are uploaded into that workspace with the correct language pair. For example, if you have both an English-to-Spanish project and a Spanish-to-English project, the same documents will be included in both projects.
41
+
1.[**Create a project**](#create-a-project). A project is a wrapper for models, documents, and tests. Each project includes all documents that are uploaded into that workspace with the correct language pair. For example, if you have both an English-to-Spanish project and a Spanish-to-English project, the same documents are included in both projects.
45
42
46
43
1.[**Upload parallel documents**](#upload-documents). Parallel documents are pairs of documents where one (target) is the translation of the other (source). One document in the pair contains sentences in the source language and the other document contains sentences translated into the target language. It doesn't matter which language is marked as "source" and which language is marked as "target"—a parallel document can be used to train a translation system in either direction.
47
44
48
-
1.[**Train your model**](#train-your-model). A model is the system that provides translation for a specific language pair. The outcome of a successful training is a model. When you train a model, three mutually exclusive document types are required: training, tuning, and testing. If only training data is provided when queuing a training, Custom Translator will automatically assemble tuning and testing data. It will use a random subset of sentences from your training documents, and exclude these sentences from the training data itself. A 10,000 parallel sentence is the minimum requirement to train a model.
45
+
1.[**Train your model**](#train-your-model). A model is the system that provides translation for a specific language pair. The outcome of a successful training is a model. When you train a model, three mutually exclusive document types are required: training, tuning, and testing. If only training data is provided when queuing a training, Custom Translator automatically assembles tuning and testing data. It uses a random subset of sentences from your training documents, and excludes these sentences from the training data itself. A 10,000 parallel sentence is the minimum requirement to train a model.
49
46
50
47
1.[**Test (human evaluate) your model**](#test-your-model). The testing set is used to compute the [BLEU](beginners-guide.md#what-is-a-bleu-score) score. This score indicates the quality of your translation system.
51
48
@@ -82,9 +79,9 @@ You can read an overview of translation and custom translation, learn some tips,
82
79
83
80
## Create a project
84
81
85
-
Once the workspace is created successfully, you'll be taken to the **Projects** page.
82
+
Once the workspace is created successfully, you're taken to the **Projects** page.
86
83
87
-
You'll create English-to-German project to train a custom model with only a [training](training-and-model.md#training-document-type-for-custom-translator) document type.
84
+
You create English-to-German project to train a custom model with only a [training](training-and-model.md#training-document-type-for-custom-translator) document type.
88
85
89
86
1. Select **Create project**.
90
87
@@ -102,9 +99,7 @@ You'll create English-to-German project to train a custom model with only a [tra
102
99
103
100
## Upload documents
104
101
105
-
In order to create a custom model, you need to upload all or a combination of [training](training-and-model.md#training-document-type-for-custom-translator), [tuning](training-and-model.md#tuning-document-type-for-custom-translator), [testing](training-and-model.md#testing-dataset-for-custom-translator), and [dictionary](concepts/dictionaries.md) document types.
106
-
107
-
In this quickstart, you'll upload [training](training-and-model.md#training-document-type-for-custom-translator) documents for customization.
102
+
In order to create a custom model, you need to upload all or a combination of [training](training-and-model.md#training-document-type-for-custom-translator), [tuning](training-and-model.md#tuning-document-type-for-custom-translator), [testing](training-and-model.md#testing-dataset-for-custom-translator), and [dictionary](concepts/dictionaries.md) document types for customization.
108
103
109
104
>[!Note]
110
105
> You can use our sample training, phrase and sentence dictionaries dataset, [Customer sample English-to-German datasets](https://github.com/MicrosoftTranslator/CustomTranslatorSampleDatasets), for this quickstart. However, for production, it's better to upload your own training dataset.
@@ -153,9 +148,9 @@ Now you're ready to train your English-to-German model.
153
148
154
149
1. After successful model training, select **Model details** from the left navigation menu.
155
150
156
-
1. Select the model name *en-de with sample data*. Review training date/time, total training time, number of sentences used for training, tuning, testing, and dictionary. Check whether the system generated the test and tuning sets. You'll use the `Category ID` to make translation requests.
151
+
1. Select the model name *en-de with sample data*. Review training date/time, total training time, number of sentences used for training, tuning, testing, and dictionary. Check whether the system generated the test and tuning sets. You use the `Category ID` to make translation requests.
157
152
158
-
1. Evaluate the model [BLEU](beginners-guide.md#what-is-a-bleu-score) score. The test set **BLEU score** is the custom model score and **Baseline BLEU** is the pre-trained baseline model used for customization. A higher **BLEU score** means higher translation quality using the custom model.
153
+
1. Evaluate the model [BLEU](beginners-guide.md#what-is-a-bleu-score) score. The test set **BLEU score** is the custom model score and **Baseline BLEU** is the pretrained baseline model used for customization. A higher **BLEU score** means higher translation quality using the custom model.
159
154
160
155
>[!Note]
161
156
>If you train with our shared customer sample datasets, BLEU score will be different than the image.
@@ -168,7 +163,7 @@ Once your training has completed successfully, inspect the test set translated s
168
163
169
164
1. Select **Test model** from the left navigation menu.
170
165
2. Select "en-de with sample data"
171
-
3. Human evaluate translation from **New model** (custom model), and **Baseline model** (our pre-trained baseline used for customization) against **Reference** (target translation from the test set)
166
+
3. Human evaluate translation from **New model** (custom model), and **Baseline model** (our pretrained baseline used for customization) against **Reference** (target translation from the test set)
172
167
173
168
## Publish your model
174
169
@@ -193,4 +188,4 @@ Publishing your model makes it available for use with the Translator API. A proj
193
188
## Next steps
194
189
195
190
> [!div class="nextstepaction"]
196
-
> [Learn how to manage workspaces](how-to/create-manage-workspace.md)
191
+
> [Learn how to manage workspaces](how-to/create-manage-workspace.md)
0 commit comments