def test_load_dataset(self): # Load the first 20 examples of the boolq dataset dataset = Dataset.load_dataset("boolq", split="train[:20]") # Check that we got 20 examples self.assertTrue(isinstance(dataset, Dataset)) self.assertEqual(len(dataset), 20)
def test_load_dataset(self): # Load the first 20 examples of the boolq dataset dataset = Dataset.load_dataset("boolq", split="train[:20]", dataset_fmt="in_memory") # Check that we got 20 examples self.assertTrue(isinstance(dataset, Dataset)) self.assertEqual(len(dataset), 20) self.assertTrue( isinstance(dataset.identifier.parameters["version"], str))