topobench.data.loaders.graph package#
Init file for graph load module with automated loader discovery.
- class HeterophilousGraphDatasetLoader(parameters)#
Bases:
AbstractLoaderLoad Heterophilous Graph datasets.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
data_type: Type of the dataset (e.g., “heterophilous”)
- __init__(parameters)#
- load_dataset()#
Load Heterophilous Graph dataset.
- Returns:
- Dataset
The loaded Heterophilous Graph dataset.
- Raises:
- RuntimeError
If dataset loading fails.
- class MantraSimplicialDatasetLoader(parameters, **kwargs)#
Bases:
AbstractLoaderLoad Mantra dataset with configurable parameters.
Note: for the simplicial datasets it is necessary to include DatasetLoader into the name of the class!
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
other relevant parameters
- **kwargsdict
Additional keyword arguments.
- __init__(parameters, **kwargs)#
- load_dataset(**kwargs)#
Load the Citation Hypergraph dataset.
- Parameters:
- **kwargsdict
Additional keyword arguments for dataset initialization.
- Returns:
- CitationHypergraphDataset
The loaded Citation Hypergraph dataset with the appropriate data_dir.
- Raises:
- RuntimeError
If dataset loading fails.
- class ManualGraphDatasetLoader(parameters)#
Bases:
AbstractLoaderLoad manually provided graph datasets.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_name: Name of the dataset
data_dir: Root directory for data
- __init__(parameters)#
- get_data_dir()#
Get the data directory.
- Returns:
- Path
The path to the dataset directory.
- load_dataset()#
Load the manual graph dataset.
- Returns:
- DataloadDataset
The dataset object containing the manually loaded graph.
- class MoleculeDatasetLoader(parameters)#
Bases:
AbstractLoaderLoad molecule datasets (ZINC and AQSOL) with predefined splits.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
data_type: Type of the dataset (e.g., “molecule”)
- __init__(parameters)#
- get_data_dir()#
Get the data directory.
- Returns:
- Path
The path to the dataset directory.
- load_dataset()#
Load the molecule dataset with predefined splits.
- Returns:
- Dataset
The combined dataset with predefined splits.
- Raises:
- RuntimeError
If dataset loading fails.
- class OGBGDatasetLoader(parameters)#
Bases:
AbstractLoaderLoad molecule datasets (molhiv, molpcba, ppa) with predefined splits.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
data_type: Type of the dataset (e.g., “molecule”)
- __init__(parameters)#
- get_data_dir()#
Get the data directory.
- Returns:
- Path
The path to the dataset directory.
- load_dataset()#
Load the molecule dataset with predefined splits.
- Returns:
- Dataset
The combined dataset with predefined splits.
- Raises:
- RuntimeError
If dataset loading fails.
- class PlanetoidDatasetLoader(parameters)#
Bases:
AbstractLoaderLoad PLANETOID datasets.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
data_type: Type of the dataset (e.g., “cocitation”)
- __init__(parameters)#
- load_dataset()#
Load Planetoid dataset.
- Returns:
- Dataset
The loaded Planetoid dataset.
- Raises:
- RuntimeError
If dataset loading fails.
- class TUDatasetLoader(parameters)#
Bases:
AbstractLoaderLoad TU datasets.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
data_type: Type of the dataset (e.g., “graph_classification”)
- __init__(parameters)#
- load_dataset()#
Load TU dataset.
- Returns:
- Dataset
The loaded TU dataset.
- Raises:
- RuntimeError
If dataset loading fails.
- class USCountyDemosDatasetLoader(parameters)#
Bases:
AbstractLoaderLoad US County Demos dataset with configurable year and task variable.
- Parameters:
- parametersDictConfig
- Configuration parameters containing:
data_dir: Root directory for data
data_name: Name of the dataset
year: Year of the dataset (if applicable)
task_variable: Task variable for the dataset
- __init__(parameters)#
- load_dataset()#
Load the US County Demos dataset.
- Returns:
- USCountyDemosDataset
The loaded US County Demos dataset with the appropriate data_dir.
- Raises:
- RuntimeError
If dataset loading fails.
Submodules#
- topobench.data.loaders.graph.hetero_datasets module
AbstractLoaderDatasetDataset.__init__()Dataset.download()Dataset.get()Dataset.get_summary()Dataset.index_select()Dataset.indices()Dataset.len()Dataset.print_summary()Dataset.process()Dataset.shuffle()Dataset.to_datapipe()Dataset.has_downloadDataset.has_processDataset.num_classesDataset.num_edge_featuresDataset.num_featuresDataset.num_node_featuresDataset.processed_dirDataset.processed_file_namesDataset.processed_pathsDataset.raw_dirDataset.raw_file_namesDataset.raw_paths
DictConfigHeterophilousGraphDatasetHeterophilousGraphDataset.__init__()HeterophilousGraphDataset.download()HeterophilousGraphDataset.process()HeterophilousGraphDataset.processed_dirHeterophilousGraphDataset.processed_file_namesHeterophilousGraphDataset.raw_dirHeterophilousGraphDataset.raw_file_namesHeterophilousGraphDataset.url
HeterophilousGraphDatasetLoader
- topobench.data.loaders.graph.mantra_dataset module
- topobench.data.loaders.graph.manual_graph_dataset_loader module
AbstractLoaderAnyDataloadDatasetDictConfigManualGraphDatasetLoaderPathPath.absolute()Path.chmod()Path.cwd()Path.exists()Path.expanduser()Path.glob()Path.group()Path.hardlink_to()Path.home()Path.is_block_device()Path.is_char_device()Path.is_dir()Path.is_fifo()Path.is_file()Path.is_mount()Path.is_socket()Path.is_symlink()Path.iterdir()Path.lchmod()Path.link_to()Path.lstat()Path.mkdir()Path.open()Path.owner()Path.read_bytes()Path.read_text()Path.readlink()Path.rename()Path.replace()Path.resolve()Path.rglob()Path.rmdir()Path.samefile()Path.stat()Path.symlink_to()Path.touch()Path.unlink()Path.write_bytes()Path.write_text()
load_manual_graph()
- topobench.data.loaders.graph.modecule_datasets module
AQSOLAbstractLoaderDatasetDataset.__init__()Dataset.download()Dataset.get()Dataset.get_summary()Dataset.index_select()Dataset.indices()Dataset.len()Dataset.print_summary()Dataset.process()Dataset.shuffle()Dataset.to_datapipe()Dataset.has_downloadDataset.has_processDataset.num_classesDataset.num_edge_featuresDataset.num_featuresDataset.num_node_featuresDataset.processed_dirDataset.processed_file_namesDataset.processed_pathsDataset.raw_dirDataset.raw_file_namesDataset.raw_paths
DictConfigMoleculeDatasetLoaderPathPath.absolute()Path.chmod()Path.cwd()Path.exists()Path.expanduser()Path.glob()Path.group()Path.hardlink_to()Path.home()Path.is_block_device()Path.is_char_device()Path.is_dir()Path.is_fifo()Path.is_file()Path.is_mount()Path.is_socket()Path.is_symlink()Path.iterdir()Path.lchmod()Path.link_to()Path.lstat()Path.mkdir()Path.open()Path.owner()Path.read_bytes()Path.read_text()Path.readlink()Path.rename()Path.replace()Path.resolve()Path.rglob()Path.rmdir()Path.samefile()Path.stat()Path.symlink_to()Path.touch()Path.unlink()Path.write_bytes()Path.write_text()
ZINC
- topobench.data.loaders.graph.ogbg_datasets module
AbstractLoaderDatasetDataset.__init__()Dataset.download()Dataset.get()Dataset.get_summary()Dataset.index_select()Dataset.indices()Dataset.len()Dataset.print_summary()Dataset.process()Dataset.shuffle()Dataset.to_datapipe()Dataset.has_downloadDataset.has_processDataset.num_classesDataset.num_edge_featuresDataset.num_featuresDataset.num_node_featuresDataset.processed_dirDataset.processed_file_namesDataset.processed_pathsDataset.raw_dirDataset.raw_file_namesDataset.raw_paths
DictConfigOGBGDatasetLoaderPathPath.absolute()Path.chmod()Path.cwd()Path.exists()Path.expanduser()Path.glob()Path.group()Path.hardlink_to()Path.home()Path.is_block_device()Path.is_char_device()Path.is_dir()Path.is_fifo()Path.is_file()Path.is_mount()Path.is_socket()Path.is_symlink()Path.iterdir()Path.lchmod()Path.link_to()Path.lstat()Path.mkdir()Path.open()Path.owner()Path.read_bytes()Path.read_text()Path.readlink()Path.rename()Path.replace()Path.resolve()Path.rglob()Path.rmdir()Path.samefile()Path.stat()Path.symlink_to()Path.touch()Path.unlink()Path.write_bytes()Path.write_text()
PygGraphPropPredDataset
- topobench.data.loaders.graph.planetoid_datasets module
AbstractLoaderDatasetDataset.__init__()Dataset.download()Dataset.get()Dataset.get_summary()Dataset.index_select()Dataset.indices()Dataset.len()Dataset.print_summary()Dataset.process()Dataset.shuffle()Dataset.to_datapipe()Dataset.has_downloadDataset.has_processDataset.num_classesDataset.num_edge_featuresDataset.num_featuresDataset.num_node_featuresDataset.processed_dirDataset.processed_file_namesDataset.processed_pathsDataset.raw_dirDataset.raw_file_namesDataset.raw_paths
DictConfigPlanetoidPlanetoidDatasetLoader
- topobench.data.loaders.graph.tu_datasets module
AbstractLoaderDatasetDataset.__init__()Dataset.download()Dataset.get()Dataset.get_summary()Dataset.index_select()Dataset.indices()Dataset.len()Dataset.print_summary()Dataset.process()Dataset.shuffle()Dataset.to_datapipe()Dataset.has_downloadDataset.has_processDataset.num_classesDataset.num_edge_featuresDataset.num_featuresDataset.num_node_featuresDataset.processed_dirDataset.processed_file_namesDataset.processed_pathsDataset.raw_dirDataset.raw_file_namesDataset.raw_paths
DictConfigTUDatasetTUDataset.__init__()TUDataset.download()TUDataset.process()TUDataset.cleaned_urlTUDataset.num_edge_attributesTUDataset.num_edge_labelsTUDataset.num_node_attributesTUDataset.num_node_labelsTUDataset.processed_dirTUDataset.processed_file_namesTUDataset.raw_dirTUDataset.raw_file_namesTUDataset.url
TUDatasetLoader
- topobench.data.loaders.graph.us_county_demos_dataset_loader module
AbstractLoaderDictConfigPathPath.absolute()Path.chmod()Path.cwd()Path.exists()Path.expanduser()Path.glob()Path.group()Path.hardlink_to()Path.home()Path.is_block_device()Path.is_char_device()Path.is_dir()Path.is_fifo()Path.is_file()Path.is_mount()Path.is_socket()Path.is_symlink()Path.iterdir()Path.lchmod()Path.link_to()Path.lstat()Path.mkdir()Path.open()Path.owner()Path.read_bytes()Path.read_text()Path.readlink()Path.rename()Path.replace()Path.resolve()Path.rglob()Path.rmdir()Path.samefile()Path.stat()Path.symlink_to()Path.touch()Path.unlink()Path.write_bytes()Path.write_text()
USCountyDemosDatasetUSCountyDemosDataset.__init__()USCountyDemosDataset.download()USCountyDemosDataset.process()USCountyDemosDataset.FILE_FORMATUSCountyDemosDataset.RAW_FILE_NAMESUSCountyDemosDataset.URLSUSCountyDemosDataset.processed_dirUSCountyDemosDataset.processed_file_namesUSCountyDemosDataset.raw_dirUSCountyDemosDataset.raw_file_namesUSCountyDemosDataset.slices
USCountyDemosDatasetLoader