def from_tu_dataset(
    name: str = "KKI",
    val_split: float = 0.1,
    batch_size: int = 4,
    **data_module_kwargs,
) -> GraphClassificationData:
    """Downloads and loads the TU Dataset."""
    from flash.core.utilities.imports import _TORCH_GEOMETRIC_AVAILABLE

    if _TORCH_GEOMETRIC_AVAILABLE:
        from torch_geometric.datasets import TUDataset
    else:
        raise ModuleNotFoundError("Please, pip install -e '.[graph]'")

    dataset = TUDataset(root="data", name=name)

    return GraphClassificationData.from_datasets(
        train_dataset=dataset,
        val_split=val_split,
        batch_size=batch_size,
        **data_module_kwargs,
    )
Downloads and loads the TU Dataset.
src/flash/graph/classification/cli.py