Enabling Google Cloud Translation

3 hours
  • 5 Learning Objectives

About this Hands-on Lab

Generic translation services often provide a close but not ideal output when working with more targeted phrases, like those found in technological industries. Google Cloud AutoML Translation makes it possible to train a machine learning model with custom phrases and sentences that better suit a given situation. In this hands-on lab, you’ll import a tab-separated value file with 1,500 English and French sentence pairs into an AutoML Translation dataset and then train the machine learning model on that dataset. Once the training is completed, you’ll test the model for accuracy.

Please note: this lab does take longer than average to run, given the nature of machine learning.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Enable the Necessary APIs
  1. From the Google Cloud console’s main navigation, choose APIs & Services > Library.
  2. Search for "translation", and select Cloud Translation API.
  3. Click Enable.
  4. Return to the API Library.
  5. Search for "automl", and select Cloud AutoML API.
  6. Click Enable.
Retrieve Data Files
  1. Activate the Cloud Shell.
  2. Retrieve the working files:
git clone https://github.com/linuxacademy/content-gc-ai-services-deepdive
  1. Change to the working directory:
cd content-gc-ai-services-deepdive/ai-translations
  1. Download the testing files:
cloudshell download en-fr.tsv
  1. Click Download when requested.
  2. Navigate to the desired folder on your system, and click Save for each file.
Create AutoML Translation Dataset
  1. From the main Google Cloud navigation, choose Artificial Intelligence > Translations > Datasets.
  2. From the Datasets page, choose New Dataset.
  3. Leave the default name for your dataset.
  4. In the Translate From list, enter en and in the Translate To enter fr.
  5. Click Create.
Import Data
  1. In the Import section, choose the Upload files from your computer option.
  2. Click Select Files, and select the previously downloaded en-fr.tsv file.
  3. From the Destination on Cloud Storage field, click Browse.
  4. In the Select File panel, click the + icon to create a new bucket.
  5. Enter a unique name for your bucket, and click Continue.
  6. In the Choose where to store your data section, choose the Region location type option and select us-central1 (Iowa) from the Location list.
  7. Click Continue.
  8. Choose Standard as the default storage class, and click Continue.
  9. Make sure the Fine-grained is chosen as the access control option, and click Continue.
  10. Leave the Advanced Settings options at their default settings, and click Create.
  11. After the bucket is created, click Select.
  12. Click Continue.
  13. Review imported data.
Train and Deploy Model
  1. After all text has been imported, switch to the Train tab.
  2. Click Start Training.
  3. In the Train new model panel, make sure the Base model option is set to Google NMT.
  4. Click Start Training.

Note: This training will take approximately 2 hours.

Additional Resources

Your company is expanding your latest app into other languages, starting with French. You've been asked to create an AutoML Translation model that relies on specific phrases and the preferred translations.

You’ll need to accomplish the following steps to complete your task:

  1. Enable Translation API.
  2. Retrieve data files.
  3. Create AutoML Translation dataset.
  4. Import data.
  5. Train and deploy model.
  6. Test model.

Note: Training the ML model in this lab can take two hours or more.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


$2,495.00

Checkout
Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!