Google Cloud Professional Machine Learning Engineer — Question 245
You are working on a prototype of a text classification model in a managed Vertex AI Workbench notebook. You want to quickly experiment with tokenizing text by using a Natural Language Toolkit (NLTK) library. How should you add the library to your Jupyter kernel?
Answer options
- A. Install the NLTK library from a terminal by using the pip install nltk command.
- B. Write a custom Dataflow job that uses NLTK to tokenize your text and saves the output to Cloud Storage.
- C. Create a new Vertex AI Workbench notebook with a custom image that includes the NLTK library.
- D. Install the NLTK library from a Jupyter cell by using the !pip install nltk --user command.
Correct answer: D
Explanation
The correct answer is D because it allows for the installation of the NLTK library directly within the Jupyter notebook environment, making it quick and efficient for experimentation. Option A requires terminal access and does not directly integrate into the Jupyter kernel. Option B involves additional complexity with Cloud Storage, and option C is unnecessary for a simple library installation when it can be done directly in the notebook.