This chapter covered a lot of ground! Don’t worry if you didn’t grasp all the details; the next chapters will help you understand how things work under the hood.
Before moving on, though, let’s test what you learned in this chapter.
load_dataset() function in 🤗 Datasets allows you to load a dataset from which of the following locations?
2. Suppose you load one of the GLUE tasks as follows:
from datasets import load_dataset dataset = load_dataset("glue", "mrpc", split="train")
Which of the following commands will produce a random sample of 50 elements from
3. Suppose you have a dataset about household pets called
pets_dataset, which has a
name column that denotes the name of each pet. Which of the following approaches would allow you to filter the dataset for all pets whose names start with the letter “L”?
4. What is memory mapping?
5. Which of the following are the main benefits of memory mapping?
6. Why does the following code fail?
from datasets import load_dataset dataset = load_dataset("allocine", streaming=True, split="train") dataset