Update test.py
Browse files566 unmodified lines56756856957057157257057157257357457557657757857958058121 unmodified lines603604605600606607608566 unmodified lines split_metadata_path = dl_manager.download(_METADATA_URL) metadata = dl_manager.iter_archive(split_metadata_path) for file_path, file_obj in metadata: if file_path == _TRAIN_TXT: train_set = set(file_obj.read().split("\n")) if file_path == _VALID_TXT: valid_set = set(file_obj.read().split("\n")) if file_path == _TEST_TXT: test_set = set(file_obj.read().split("\n")) if file_path == _TRAIN_TXT: train_set = set(file_obj.read().split("\n")) train_set = {path.encode("utf-8") for path in train_set} if file_path == _VALID_TXT: valid_set = set(file_obj.read().split("\n")) valid_set = {path.encode("utf-8") for path in train_set} if file_path == _TEST_TXT: test_set = set(file_obj.read().split("\n")) test_set = {path.encode("utf-8") for path in train_set} pass return [ datasets.SplitGenerator(21 unmodified lines
def _generate_examples(self, images, metadata_set): """Generate images and labels for splits.""" metadata_set = {path.encode("utf-8") for path in metadata_set} for file_path, file_obj in images: if file_path.startswith(_IMAGES_DIR): if file_path[len(_IMAGES_DIR) : -len(".jpg")] in metadata_set:test.py+9-4