topobench.data.loaders.graph package#

Init file for graph load module with automated loader discovery.

class HeterophilousGraphDatasetLoader(parameters)#

Bases: AbstractLoader

Load 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: AbstractLoader

Load 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: AbstractLoader

Load 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: AbstractLoader

Load 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: AbstractLoader

Load 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: AbstractLoader

Load 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: AbstractLoader

Load 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: AbstractLoader

Load 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#