diff --git a/tensorflow_datasets/core/registered.py b/tensorflow_datasets/core/registered.py index 4776a573fe2..0b22aa90313 100644 --- a/tensorflow_datasets/core/registered.py +++ b/tensorflow_datasets/core/registered.py @@ -71,8 +71,8 @@ class DatasetNotFoundError(ValueError): def __init__(self, name, is_abstract=False, in_development=False): all_datasets_str = "\n\t- ".join([""] + list_builders()) if is_abstract: - error_string = ("Dataset %s not found. " - "Requesting the builder for an abstract class\n" + error_string = ("Dataset %s is an abstract class so cannot be created. " + "Please make sure to instantiate all abstract methods.\n" "%s") % (name, _DATASET_NOT_FOUND_ERR) elif in_development: error_string = ("Dataset %s is under active development and is not " diff --git a/tensorflow_datasets/core/registered_test.py b/tensorflow_datasets/core/registered_test.py index 3dff82c7e0f..ac5245a04b5 100644 --- a/tensorflow_datasets/core/registered_test.py +++ b/tensorflow_datasets/core/registered_test.py @@ -77,8 +77,7 @@ def test_abstract(self): self.assertEqual(name, UnregisteredBuilder.name) self.assertNotIn(name, registered.list_builders()) - with self.assertRaisesWithPredicateMatch( - ValueError, "Requesting the builder for an abstract class"): + with self.assertRaisesWithPredicateMatch(ValueError, "an abstract class"): registered.builder(name) def test_in_development(self):