get_gli_task

gli.dataloading.get_gli_task(dataset: str, task: str, task_id: int = 1, verbose: bool = False) GLITask

Get a GLI task configuration object from GLI repo.

The returned gli.task.GLITask object is an intermediate product of the dataloading pipeline. It contains the task-specific information.

Parameters:
  • dataset (str) – graph dataset name.

  • task (str) – task type, e.g. “NodeClassification”, “NodeRegression”.

  • task_id (int, optional.) – task ID defined in dataset folder, defaults to 1.

  • verbose (bool, optional) – verbose level, defaults to False.

Return type:

gli.task.GLITask

Raises:
  • NotImplementedError – Raised when task type is unsupported.

  • FileNotFoundError – Raised when task configuration file is not found.

Examples

>>> get_gli_task(dataset="cora", task="NodeClassification", task_id=1)
Node classification on CORA dataset. Planetoid split.
<gli.task.NodeClassificationTask object at 0x...>