combine_graph_and_task
- gli.dataloading.combine_graph_and_task(graph: DGLGraph | List[DGLGraph], task: GLITask) DGLDataset
Combine graph(s) and task to get a dataset.
gli.dataloading.combine_graph_and_task()
loads task-specific information into the inputed graph(s) as additional attributes. The graph(s) is then further wrapped by adgl.data.DGLDataset
object.- Parameters:
graph (
dgl.DGLGraph
or list ofdgl.DGLGraph
.) – graph or a list of graphs.task (
gli.task.GLITask
.) – predefined task configuration.
- Return type:
dgl.data.DGLDataset
.
Example
>>> g = get_gli_graph(dataset="cora") >>> t = get_gli_task(dataset="cora", task="NodeClassification") >>> d = combine_graph_and_task(g, t) >>> d.name 'CORA dataset. NodeClassification'